:root {
    --bg-page: #F8FAFC;
    --bg-hero-start: #F0FDFA;
    --bg-hero-end: #F1F5F9;
    --bg-card: #FFFFFF;
    --primary-accent: #0D9488;
    --primary-accent-light: #CCFBF1;
    --text-dark: #1E293B;
    --text-medium: #475569;
    --text-light: #94A3B8;
    --border-color: #E2E8F0;
    --error-bg: #FEF2F2;
    --error-text: #DC2626;
    --warning-bg: #FFFBEB;
    --warning-text: #B45309;
    --success-bg: #ECFDF5;
    --success-text: #065F46;
    --upload-bg: #F8FAFC;
    --upload-border: #E2E8F0;
    --upload-active: #CCFBF1;
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-medium);
    line-height: 1.6;
    overflow-x: hidden;
  }
  
  h1, h2, h3, h4 {
    color: var(--text-dark);
    line-height: 1.2;
    font-weight: 600;
  }
  
  h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
  }
  
  h2.section-title {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    margin-bottom: 1.25rem;
  }
  
  h3.subsection-title {
    font-size: clamp(1rem, 3vw, 1.1rem);
    margin-bottom: 0.75rem;
  }
  
  /* Navigation */
  .navbar {
    background-color: var(--bg-card);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
  }
  
  .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem clamp(0.75rem, 3vw, 1rem);
  }
  
  .nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .nav-logo {
    height: 32px;
    width: auto;
  }
  
  .brand-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
  }
  
  /* Brand Link - Remove underline */
  .brand-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .brand-link:hover {
    text-decoration: none;
    color: inherit;
  }
  
  /* Navigation Toggle */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.25rem;
    z-index: 1002;
  }
  
  .nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
    transform-origin: center;
  }
  
  /* Navigation Slider */
  .nav-slider {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-card);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
  }
  
  .nav-slider.active {
    right: 0;
  }
  
  .slider-content {
    padding: 1.5rem;
    height: 100%;
  }
  
  .slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .slider-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
  }
  
  .slider-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .slider-link {
    display: block;
    padding: 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
  }
  
  .slider-link:hover, .slider-link.active {
    background-color: var(--primary-accent-light);
    color: var(--primary-accent);
  }
  
  /* Overlay when slider is open */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Layout */
  main {
    padding: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }
  
  .card {
    background-color: var(--bg-card);
    border-radius: 0.75rem;
    padding: clamp(0.75rem, 3vw, 1.25rem);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    width: 100%;
  }
  
  .main-card {
    border-top: 4px solid var(--primary-accent);
  }
  
  .main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }
  
  @media (min-width: 768px) {
    main {
      padding: 1rem;
    }
    .main-grid {
      grid-template-columns: 1fr 1fr;
      gap: 2rem;
    }
  }
  
  /* Form Styles */
  .form-section {
    width: 100%;
  }
  
  .input-group {
    margin-bottom: 1.5rem;
  }
  
  .form-section label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.8rem, 2.5vw, 0.875rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
  }
  
  .form-section input, .form-section select {
    width: 100%;
    padding: clamp(0.5rem, 2vw, 0.75rem);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    background-color: var(--bg-page);
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  
  .form-section input:focus, .form-section select:focus {
    outline: none;
    background-color: white;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px var(--primary-accent-light);
  }
  
  .calculate-button {
    width: 100%;
    background-color: var(--primary-accent);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
  }
  
  .calculate-button:hover {
    background-color: #0b8378;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
  }
  
  /* Tab Buttons */
  .tab-buttons {
    display: flex;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
  }
  
  .tab-button {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    background: transparent;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
    color: var(--text-medium);
  }
  
  .tab-button.active {
    background: var(--primary-accent);
    color: white;
  }
  
  /* Business Feature */
  .business-feature {
    background: linear-gradient(135deg, #0D9488 0%, #0b8378 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
  }
  
  .business-feature h3 {
    color: white;
    margin-bottom: 0.5rem;
  }
  
  .business-feature p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 0;
  }
  
  /* Add Button */
  .btn-add {
    background: var(--primary-accent);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
  }
  
  .btn-add:hover {
    background: #0b8378;
  }
  
  /* Deduction Items */
  .deduction-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
  }
  
  .btn-remove {
    background: var(--error-text);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.75rem;
  }
  
  .btn-remove:hover {
    background: #b91c1c;
  }
  
  /* Results Section */
  .results-section {
    width: 100%;
  }
  
  .results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
  }
  
  .result-box {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--bg-page);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    width: 100%;
  }
  
  .result-box.primary {
    background-color: var(--primary-accent-light);
    border-color: var(--primary-accent);
  }
  
  .result-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    font-weight: 500;
  }
  
  .result-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    word-break: break-all;
  }
  
  .result-box small {
    font-size: 0.75rem;
    color: var(--text-light);
  }
  
  /* Payslip Preview */
  .preview-section {
    width: 100%;
  }
  
  .preview-container {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: var(--bg-page);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
  }
  
  .payslip-preview {
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .payslip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
  }
  
  .company-info h3 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
  }
  
  .company-info p {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.25rem;
  }
  
  .payslip-title h2 {
    color: var(--primary-accent);
    margin-bottom: 0.25rem;
    text-align: right;
  }
  
  .payslip-title p {
    font-size: 0.875rem;
    color: var(--text-medium);
    text-align: right;
  }
  
  .employee-details {
    margin-bottom: 1.5rem;
  }
  
  .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .detail-row:last-child {
    border-bottom: none;
  }
  
  .detail-row span:first-child {
    font-weight: 600;
    color: var(--text-dark);
  }
  
  .detail-row span:last-child {
    color: var(--text-medium);
  }
  
  .salary-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .earnings-section, .deductions-section {
    padding: 1rem;
    background: var(--bg-page);
    border-radius: 0.5rem;
  }
  
  .earnings-section h4, .deductions-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-accent);
    text-align: center;
  }
  
  .breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .breakdown-row:last-child {
    border-bottom: none;
  }
  
  .breakdown-row.total {
    font-weight: 700;
    border-top: 2px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
  }
  
  .net-pay-section {
    text-align: center;
    padding: 1rem;
    background: var(--primary-accent-light);
    border-radius: 0.5rem;
    border: 2px solid var(--primary-accent);
  }
  
  .net-pay {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
  }
  
  /* Action Buttons */
  .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  
  @media (min-width: 480px) {
    .action-buttons {
      flex-direction: row;
    }
  }
  
  .action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    flex: 1;
  }
  
  .print-button {
    background-color: var(--primary-accent);
    color: white;
  }
  
  .print-button:hover {
    background-color: #0b8378;
  }
  
  .save-button {
    background-color: var(--bg-page);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
  }
  
  .save-button:hover {
    background-color: var(--border-color);
  }
  
  /* Privacy Notice */
  .privacy-notice {
    background: var(--primary-accent-light);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-accent);
  }
  
  .privacy-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-accent);
    margin-bottom: 0.5rem;
  }
  
  .privacy-text {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.5;
  }
  
  /* Hero Section */
  .hero-section {
    background: linear-gradient(135deg, var(--bg-hero-start) 0%, var(--bg-hero-end) 100%);
    padding: clamp(2rem, 6vw, 4rem) 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
  }
  
  .hero-text h1 {
    color: var(--text-dark);
    margin-bottom: 1rem;
  }
  
  .hero-text p {
    font-size: clamp(1rem, 3vw, 1.125rem);
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-medium);
  }
  
  .cta-button {
    display: inline-block;
    background-color: var(--primary-accent);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
  }
  
  .cta-button:hover {
    background-color: #0b8378;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.3);
  }
  
  /* Content Section */
  .content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
  }
  
  .content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  @media (min-width: 1024px) {
    .content-grid {
      grid-template-columns: 2fr 1fr;
      gap: 2rem;
    }
  }
  
  .content-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  /* Info Items */
  .info-item {
    margin-bottom: 1.5rem;
  }
  
  .info-item h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
  }
  
  .info-item p {
    color: var(--text-medium);
  }
  
  /* FAQ Items */
  .faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
  
  .faq-item h3 {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
  }
  
  .faq-item p {
    color: var(--text-medium);
  }
  
  /* Tip Items */
  .tip-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .tip-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
  
  .tip-icon {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary-accent-light);
    color: var(--primary-accent);
    border-radius: 50%;
    flex-shrink: 0;
  }
  
  .tip-icon i {
    font-size: 1rem;
    margin-top: 0.75rem;
  }
  
  .tip-content h3 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
    font-size: 1rem;
  }
  
  .tip-content p {
    color: var(--text-medium);
    font-size: 0.875rem;
  }
  
  /* Message Boxes */
  .message-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .error-box {
    background-color: var(--error-bg);
    color: var(--error-text);
    border-left: 4px solid var(--error-text);
  }
  
  .info-box {
    background-color: var(--success-bg);
    color: var(--success-text);
    border-left: 4px solid var(--success-text);
  }
  
  .message-content {
    flex: 1;
  }
  
  /* Footer */
  .footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    margin-top: 2rem;
  }
  
  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
  }
  
  .footer p {
    margin-bottom: 1rem;
    color: var(--text-medium);
  }
  
  .footer a {
    color: var(--primary-accent);
    text-decoration: none;
  }
  
  .footer a:hover {
    text-decoration: underline;
  }
  
  .footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .footer-links a {
    color: var(--text-medium);
    font-weight: 500;
  }
  
  .footer-links a:hover {
    color: var(--primary-accent);
  }
  
  .disclaimer {
    font-size: 0.875rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
  }
  
  /* Animations */
  .animate-on-load {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
  }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Responsive Adjustments */
  @media (max-width: 767px) {
    .nav-container {
      padding: 0.5rem 0.75rem;
    }
    
    .nav-slider {
      width: 280px;
    }
    
    .hero-section {
      padding: 1.5rem 0.75rem;
    }
    
    .card {
      padding: 1rem;
    }
    
    .payslip-preview {
      padding: 1rem;
    }
    
    .salary-breakdown {
      grid-template-columns: 1fr;
      gap: 1rem;
    }
    
    .payslip-header {
      flex-direction: column;
      gap: 1rem;
      text-align: center;
    }
    
    .payslip-title h2,
    .payslip-title p {
      text-align: center;
    }
    
    .deduction-item {
      grid-template-columns: 1fr;
      gap: 0.5rem;
    }
    
    .preview-container {
      min-height: 300px;
    }
  }
  
  /* Accessibility */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  
  /* Focus styles for keyboard navigation */
  button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
  }
  
  /* Print styles */
  @media print {
    .navbar, .hero-section, .footer, .content-sidebar {
      display: none;
    }
    
    .card {
      box-shadow: none;
      border: 1px solid #000;
    }
    
    .main-grid {
      display: block;
    }
    
    .calculate-button, .action-button {
      display: none;
    }
    
    .payslip-preview {
      box-shadow: none;
      border: 1px solid #000;
    }
  }
  
  .input-help {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }
  
  /* Loading state */
  .loading {
    opacity: 0.7;
    pointer-events: none;
  }
  
  .loading::after {
    content: '...';
    animation: loading 1.5s infinite;
  }
  
  @keyframes loading {
    0%, 33% { content: '.'; }
    34%, 66% { content: '..'; }
    67%, 100% { content: '...'; }
  }