:root{
  --green:#22c55e;         /* primary */
  --green-600:#16a34a;
  --charcoal:#111827;      /* text */
  --gray-600:#4b5563;
  --gray-200:#e5e7eb;
  --gray-100:#f3f4f6;
  --white:#ffffff;
  --shadow:0 10px 30px rgba(0,0,0,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--charcoal);
  background:var(--white);
}

.container{
  width:min(1100px,92%);
  margin-inline:auto;
}

/* Header / Navbar */
.header{
  position:sticky;
  top:0;
  z-index:50;
  transition:background .25s ease, box-shadow .25s ease, border-color .25s ease;
  background:transparent;
  border-bottom:1px solid transparent;
}
.header.scrolled{
  background:var(--white);
  border-color:rgba(0,0,0,.06);
  box-shadow:var(--shadow);
}

.nav{
  display:flex;
  align-items:center;
  gap:24px;
  height:64px;
}

.brand{
  font-weight:700;
  font-size:20px;
  letter-spacing:.2px;
  text-decoration:none;
  color:inherit;
}

.nav-links{
  list-style:none;
  display:flex;
  align-items:center;
  gap:14px;
  margin:0;
  padding:0;
  flex:1;
}

.nav-item{position:relative}
.nav-link{
  background:transparent;
  border:0;
  font:inherit;
  padding:8px 10px;
  display:flex;
  align-items:center;
  gap:6px;
  color:inherit;
  cursor:pointer;
  
}
.chevron{transition:transform .2s ease}

/* Dropdown */
.has-dropdown:hover .dropdown{opacity:1; transform:translateY(0); pointer-events:auto}
.has-dropdown:focus-within .dropdown{opacity:1; transform:translateY(0); pointer-events:auto}
.has-dropdown[aria-expanded="true"] .dropdown{opacity:1; transform:translateY(0); pointer-events:auto}

.dropdown{
  position:absolute;
  top:42px;
  left:0;
  min-width:220px;
  background:var(--white);
  border:1px solid rgba(0,0,0,.06);
  border-radius:10px;
  box-shadow:var(--shadow);
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:4px;
  opacity:0;
  transform:translateY(6px);
  transition:opacity .15s ease, transform .15s ease;
  pointer-events:none;
}
.dropdown a{
  display:block;
  padding:10px 12px;
  border-radius:8px;
  color:var(--charcoal);
  text-decoration:none;
  font-size:14px;
}
.dropdown a:hover{background:var(--gray-100)}

/* Right actions */
.nav-actions{
  display:flex;
  align-items:center;
  gap:14px;
}
.action-link{
  text-decoration:none;
  color:inherit;
  padding:8px 10px;
  font-weight:500;
}
.btn-outline{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--gray-200);
  background:var(--white);
  color:var(--charcoal);
  text-decoration:none;
  padding:8px 14px;
  border-radius:999px;
  font-weight:600;
}
.btn-outline.block{display:block; text-align:center}
.btn-outline:hover{border-color:var(--charcoal)}

.arrow{transform:translateX(0); transition:transform .15s ease}
.btn-outline:hover .arrow{transform:translateX(2px)}

/* Mobile */
.hamburger{
  display:none;
  width:40px; height:40px; border:1px solid var(--gray-200);
  border-radius:8px; background:transparent; cursor:pointer;
}
.hamburger span{display:block; height:2px; background:currentColor; margin:6px 8px}

/* Mobile menu panel */
.mobile-menu{
  background:var(--white);
  border-top:1px solid rgba(0,0,0,.06);
  box-shadow:var(--shadow);
  padding:10px 16px 16px;
}
.mobile-menu details{padding:10px 0}
.mobile-menu summary{cursor:pointer; font-weight:600; list-style:none}
.mobile-menu a{display:block; padding:8px 0; color:var(--charcoal); text-decoration:none}
.mobile-menu hr{border:0; border-top:1px solid var(--gray-200); margin:8px 0}

/* Hero */
.hero{
  min-height:calc(100vh - 64px);
  display:flex; align-items:center;
  background:
    radial-gradient(1200px 600px at 85% 30%, rgba(34,197,94,.12), transparent 60%),
    radial-gradient(900px 400px at 70% 70%, rgba(34,197,94,.08), transparent 60%);
}
.hero-inner{
  display:grid; grid-template-columns:1.2fr 1fr; gap:40px; align-items:center;
}
.hero-copy h1{
  font-size: clamp(32px, 5vw, 56px);
  line-height:1.05; margin:0 0 10px;
}
.subhead{font-size: clamp(18px, 2.5vw, 22px); color:var(--green-600); font-weight:600; margin:0 0 8px}
.muted{color:var(--gray-600); max-width:48ch; margin:0 0 22px}
.hero-cta{display:flex; gap:12px; flex-wrap:wrap}
.btn-solid, .btn-ghost{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 18px; border-radius:10px; text-decoration:none; font-weight:600
}
.btn-solid{background:var(--green); color:white}
.btn-solid:hover{background:var(--green-600)}
.btn-ghost{border:1px solid var(--gray-200); color:var(--charcoal)}
.btn-ghost:hover{border-color:var(--charcoal)}

/* Animated gradient visual */
.hero-visual{
  position:relative; min-height:360px; height:60vh; border-radius:16px; overflow:hidden;
  background:linear-gradient(135deg, rgba(34,197,94,.18), rgba(34,197,94,.05));
  border:1px solid rgba(0,0,0,.06);
}
.gradient-blob{
  position:absolute; inset:-30%;
  background: conic-gradient(from 0deg, rgba(34,197,94,.75), rgba(34,197,94,.25), rgba(34,197,94,.65), rgba(34,197,94,.2), rgba(34,197,94,.75));
  filter: blur(60px);
  animation: swirl 10s linear infinite;
}
@keyframes swirl {
  to { transform: rotate(360deg); }
}

/* Top transparent state: make links light over hero */
.header:not(.scrolled) .brand,
.header:not(.scrolled) .nav-link,
.header:not(.scrolled) .action-link,
.header:not(.scrolled) .btn-outline{
  color:#f8fafc;               /* light text over hero */
  border-color:rgba(255,255,255,.25);
}
.header:not(.scrolled) .btn-outline:hover{border-color:#fff}
.header:not(.scrolled) .nav .chevron path{stroke:#f8fafc}

/* Dropdown contrast when header is transparent */
/* Ensure dropdown stays white when header is transparent */
.header:not(.scrolled) .dropdown {
  background: var(--white);
}

/* === NAVBAR VISIBILITY FIX (transparent state) === */

/* Default to charcoal on top (transparent header) */
.header:not(.scrolled) .brand,
.header:not(.scrolled) .nav-link,
.header:not(.scrolled) .action-link,
.header:not(.scrolled) .btn-outline {
  color: var(--charcoal);
  border-color: rgba(0,0,0,.08);
}

/* Hover turns links green */
.header:not(.scrolled) .brand:hover,
.header:not(.scrolled) .nav-link:hover,
.header:not(.scrolled) .action-link:hover {
  color: var(--green);
}

/* Chevron color (works whether it's text or an SVG path) */
.header:not(.scrolled) .nav .chevron { color: var(--charcoal); }
.header:not(.scrolled) .nav .chevron path { stroke: var(--charcoal); }

/* Contact Sales button look on top state */
.header:not(.scrolled) .btn-outline {
  background: rgba(255,255,255,.9);
  border-color: var(--gray-200);
}
.header:not(.scrolled) .btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Keep dropdown white for contrast */
.header:not(.scrolled) .dropdown {
  background: var(--white);
}

/* User chip (shown when logged in) */
.user-area { display:flex; align-items:center; }
.user-chip {
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 12px;
  border:1px solid var(--gray-200);
  border-radius:999px;
  font-weight:600; color:var(--charcoal);
  background:var(--white);
  box-shadow: var(--shadow);
}

/* Little green avatar dot */
.user-chip::before {
  content:"";
  width:22px; height:22px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.8), rgba(255,255,255,0) 40%), var(--green);
  box-shadow: 0 0 0 2px var(--white);
}

/* Remove avatar dot (the 'eyeball') from the user chip */
.user-chip::before { content: none; }



/* Ensure hamburger stays to the right on mobile */
@media (max-width: 880px){
  .nav-links{ display:none; }
  .nav-actions .action-link{ display:none; }
  .nav-actions .btn-outline{ display:none; }
  .hamburger{ display:inline-block; margin-left: 8px; }
  .nav{ justify-content: space-between; } /* brand left, hamburger right */
}

/* Drawer + Backdrop */
.drawer-backdrop{
  position: fixed; inset:0;
  background: rgba(0,0,0,.35);
  opacity:0; transition: opacity .2s ease;
  z-index: 90;
}
.drawer-backdrop.show{ opacity:1; }

.drawer{
  position: fixed;
  top:0; left:0;
  height:100vh;
  width: clamp(260px, 86vw, 360px);
  background: var(--white);
  border-right: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--shadow);
  transform: translateX(-100%);
  transition: transform .2s ease;
  z-index: 100;
  display: flex; flex-direction: column;
}
.drawer.open{ transform: translateX(0); }

.drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 14px; border-bottom:1px solid var(--gray-200);
}
.brand-sm{ font-weight: 700; }
.drawer-close{
  background: transparent; border:1px solid var(--gray-200);
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
}

.drawer-nav{
  padding: 10px 12px 18px;
  overflow-y: auto; height: 100%;
}
.drawer-nav details{ padding: 6px 0; }
.drawer-nav summary{
  cursor:pointer; font-weight:600; list-style:none;
  padding: 10px 6px; border-radius:8px;
}
.drawer-nav summary:hover{ background: var(--gray-100); }
.drawer-nav a{
  display:block; padding: 8px 12px; border-radius:8px;
  color: var(--charcoal); text-decoration:none;
}
.drawer-nav a:hover{ background: var(--gray-100); }

.drawer-nav hr{
  border:0; border-top:1px solid var(--gray-200);
  margin: 10px 0 8px;
}
.drawer-auth a{ display:block; padding:8px 0; text-decoration:none; color: var(--charcoal); }
.drawer-auth .btn-outline{ margin-top: 6px; }

/* === Avatar chip: letter OR logo === */
.user-area { display:flex; align-items:center; gap:10px }
.user-chip{
  width:34px; height:34px; border-radius:8px;
  display:grid; place-items:center;
  background:#e5e7eb; color:#0b1324; font-weight:800; font-size:14px;
  border:1px solid var(--gray-200);
  overflow:hidden;
}
.user-chip.logo { background:#fff; padding:0 }
.user-chip.logo img{
  width:100%; height:100%;
  object-fit:contain; border-radius:8px;
  background:#fff; display:block;
}

/* Optional: make the chip show an image cleanly */
.user-chip.has-logo { padding: 0; overflow: hidden; }
.user-chip.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }

/* --- Bigger, clean logo chip in navbar --- */
.user-chip.has-logo,
.user-chip.logo{
  /* a bit bigger than the letter chip */
  width: 40px;
  height: 40px;

  /* no fill — let the navbar/background show through */
  background: transparent !important;
  border: 0 !important;
  padding: 0;

  /* keep corners tidy */
  border-radius: 8px;
  overflow: hidden;
}

/* make the image fill neatly without any background */
.user-chip.has-logo img,
.user-chip.logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;   /* preserve logo proportions */
  display: block;
  background: transparent; /* if PNG is transparent, the navbar shows through */
}

/* optional: keep hover/focus subtle and accessible */
.user-chip:focus-visible{
  outline: 2px solid rgba(0,0,0,.15);
  outline-offset: 2px;
}
.header.scrolled .user-chip:focus-visible{
  outline-color: rgba(255,255,255,.35);
}

/* Add to your existing CSS */
.receipt-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
}

.receipt-info h4 {
  margin: 0 0 8px 0;
  color: #1f2937;
}

.receipt-actions .btn-match {
  background: #10b981;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

/* Modal styles - add to your existing modal CSS */
.customer-match-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
}

.customer-match-item:hover {
  background-color: #f9fafb;
}

/* receipt-matching.css */
.match-queue {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.queue-header {
    display: flex;
    align-items: center;
    justify-content: between;
    margin-bottom: 1rem;
}

.queue-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: white;
}

.queue-item:last-child {
    margin-bottom: 0;
}

.queue-item-info {
    font-weight: 500;
}

.queue-item-meta {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.match-option {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.match-option.recommended {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.05);
}

.match-option:hover {
    border-color: var(--primary);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.match-header h5 {
    margin: 0;
    color: var(--gray-900);
}

.confidence-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.confidence-badge.high {
    background: var(--success-light);
    color: var(--success-dark);
}

.confidence-badge.medium {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.confidence-badge.low {
    background: var(--gray-100);
    color: var(--gray-600);
}

.match-details {
    margin-bottom: 1rem;
}

.match-details p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--error);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
}

.close-btn:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.receipt-info {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.receipt-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--gray-700);
}

  /* Custom styles for the new layout */
    .nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
    }

    .hamburger {
      order: 1;
      margin-right: auto;
    }

    .center-brand {
      order: 2;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }

    .nav-links {
      order: 3;
      display: flex;
      gap: 2rem;
      margin: 0 auto;
    }

    .nav-actions {
      order: 4;
      margin-left: auto;
    }

    /* Green hamburger menu with wider lines */
    .hamburger span {
      display: block;
      width: 28px;
      height: 3px;
      margin-bottom: 5px;
      background-color: #22c55e;
      border-radius: 2px;
      transition: all 0.3s ease;
    }

    .hamburger span:last-child {
      margin-bottom: 0;
    }

    /* Make main nav items clickable */
    .nav-link.dropdown-trigger {
      text-decoration: none;
      color: inherit;
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 0.5rem 0;
    }

    .nav-link.dropdown-trigger:hover {
      color: #22c55e;
    }

    /* Mobile drawer main links */
    .drawer-main-link {
      display: block;
      padding: 0.75rem 1rem;
      font-weight: 600;
      color: #1f2937;
      text-decoration: none;
      border-bottom: 1px solid #e5e7eb;
    }

    .drawer-main-link:hover {
      background-color: #f3f4f6;
      color: #22c55e;
    }

    /* Responsive adjustments */
    @media (max-width: 1024px) {
      .nav-links {
        display: none;
      }
      
      .center-brand {
        position: static;
        transform: none;
        order: 2;
      }
      
      .hamburger {
        order: 1;
      }
      
      .nav-actions {
        order: 3;
      }
    }

      /* Custom styles for the new layout */
  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  .hamburger {
    order: 1;
    margin-right: auto;
    display: none; /* Hidden on desktop */
  }

  .brand {
    order: 2;
    margin-right: auto; /* Push everything else to the right */
  }

  .nav-links {
    order: 3;
    display: flex;
    gap: 2rem;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-actions {
    order: 4;
    margin-left: auto;
  }

  /* Green hamburger menu with wider lines */
  .hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    margin-bottom: 5px;
    background-color: #22c55e;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .hamburger span:last-child {
    margin-bottom: 0;
  }

  /* Make main nav items clickable */
  .nav-link.dropdown-trigger {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 0;
  }

  .nav-link.dropdown-trigger:hover {
    color: #22c55e;
  }

  /* Mobile drawer main links */
  .drawer-main-link {
    display: block;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .drawer-main-link:hover {
    background-color: #f3f4f6;
    color: #22c55e;
  }

  /* Responsive adjustments */
  @media (max-width: 1024px) {
    .nav-links {
      display: none;
    }
    
    .hamburger {
      display: block; /* Show hamburger on mobile */
      order: 1;
    }
    
    .brand {
      order: 2;
      margin-right: 0;
      position: static;
      transform: none;
    }
    
    .nav-actions {
      order: 3;
    }
  }

  /* Remove the center-brand class since we're using the regular brand class */
  .center-brand {
    /* Reset any previous center positioning */
    position: static;
    transform: none;
    left: auto;
  }

  /* Add to your existing styles */
.attachment-preview {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.attachment-preview:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
}

.attachment-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.attachment-icon {
    font-size: 20px;
    width: 40px;
    text-align: center;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-meta {
    font-size: 12px;
    color: #6b7280;
}

.attachment-actions {
    display: flex;
    gap: 8px;
}

.btn-download-attachment {
    padding: 6px 12px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
}

.btn-download-attachment:hover {
    background: #059669;
}

.btn-remove-attachment {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-remove-attachment:hover {
    background: #dc2626;
}

.compression-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Add to your accounting CSS */
.file-attachment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    color: #0369a1;
    margin-left: 8px;
}

.file-attachment-badge::before {
    content: "📎";
}

.transaction-with-attachment {
    border-left: 3px solid #3b82f6;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f0f9ff;
}

.attachment-link:hover {
    background: #e0f2fe;
    text-decoration: underline;
}



/* Footer Styles */
.sv-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  margin-top: auto;
  color: var(--ink);
}

.sv-footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}

.sv-footer__brand h3 {
  color: var(--brand);
  font-size: 1.5rem;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.sv-footer__brand p {
  margin: 0 0 16px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.sv-footer__tagline {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.sv-footer__social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  transition: var(--trans);
  padding: 6px 0;
  font-size: 0.9rem;
}

.social-link:hover {
  color: var(--brand);
  transform: translateX(4px);
}

.social-link svg {
  flex-shrink: 0;
}

/* Footer Links */
.sv-footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.footer-column h4 {
  color: var(--ink);
  font-size: 1rem;
  margin: 0 0 16px 0;
  font-weight: 600;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 8px;
}

.footer-column a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--trans);
}

.footer-column a:hover {
  color: var(--brand);
  padding-left: 4px;
}

/* Newsletter */
.sv-footer__newsletter {
  background: rgba(42, 127, 98, 0.05);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(42, 127, 98, 0.1);
}

.sv-footer__newsletter h4 {
  color: var(--ink);
  margin: 0 0 8px 0;
  font-weight: 600;
}

.sv-footer__newsletter p {
  color: var(--muted);
  margin: 0 0 16px 0;
  font-size: 0.9rem;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--card);
  transition: var(--trans);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(42, 127, 98, 0.1);
}

.newsletter-form button {
  padding: 10px 20px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans);
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: var(--brand-600);
  transform: translateY(-1px);
}

/* Footer Bottom */
.sv-footer__bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  background: rgba(0, 0, 0, 0.02);
}

.footer-bottom__content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  transition: var(--trans);
}

.footer-legal a:hover {
  color: var(--brand);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .sv-footer__container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 15px;
  }

  .sv-footer__links {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-column {
    text-align: center;
  }

  .sv-footer__social {
    align-items: center;
  }

  .social-link {
    justify-content: center;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    min-width: auto;
  }

  .footer-bottom__content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }

  .sv-footer__newsletter {
    text-align: center;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .sv-footer__container {
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
  }

  .sv-footer__newsletter {
    grid-column: 1 / -1;
  }

  .sv-footer__links {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sv-footer {
  animation: fadeInUp 0.6s ease-out;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .sv-footer__bottom {
    background: rgba(255, 255, 255, 0.02);
  }
  
  .sv-footer__newsletter {
    background: rgba(42, 127, 98, 0.08);
    border-color: rgba(42, 127, 98, 0.2);
  }
  
  .newsletter-form input {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
  }
}

/* Fixed Sidebar Layout */
.sv-sidebar {
  width: 280px; 
  min-height: 100vh; 
  background: var(--card); 
  box-shadow: var(--shadow-soft);
  position: fixed !important; /* Force fixed positioning */
  top: 0 !important; /* Stick to top */
  left: 0 !important; /* Stick to left */
  bottom: 0 !important; /* Extend full height */
  align-self: flex-start; 
  padding: 20px 0; 
  z-index: 1000; /* Ensure it's above content */
  overflow-y: auto; /* Allow scrolling if needed */
}

/* Main content area adjustment */
.sv-main {
  flex: 1; 
  min-width: 0; 
  display: flex; 
  flex-direction: column; 
  padding: 24px;
  margin-left: 280px; /* Account for sidebar width */
}

/* Ensure app container handles layout correctly */
.sv-app {
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  position: relative; /* Important for fixed sidebar */
}

/* Panel System - Fixed */
.sv-panel { 
  display: none !important; /* Force hidden by default */
  width: 100%;
}

.sv-panel.is-active { 
  display: block !important; /* Force show when active */
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
  .sv-sidebar {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    z-index: 1000;
    padding: 10px 0;
  }
  
  .sv-main {
    margin-left: 0 !important;
    margin-bottom: 80px !important; /* Space for bottom navbar */
    padding: 16px;
  }
  
  .sv-app {
    flex-direction: column;
  }
  
  /* Mobile-optimized navigation */
  .sv-sidenav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 10px;
    gap: 5px;
  }
  
  .sv-sidenav .nav__item {
    flex-direction: column;
    min-width: 70px;
    padding: 8px 5px;
    margin: 2px;
  }
  
  .sv-sidenav .nav__text {
    font-size: 11px;
    text-align: center;
  }
  
  .sv-sidenav .nav__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
  }
  
  /* Hide logo on mobile to save space */
  .sv-logo {
    display: none;
  }
}

/* Tablet adjustments */
@media (max-width: 1100px) and (min-width: 769px) {
  .sv-sidebar {
    width: 240px;
  }
  
  .sv-main {
    margin-left: 240px;
  }
}

/* =========================================================
   Savanna – Single File CSS (Fully namespaced to .sv-app)
   ========================================================= */

/* Variables scoped to the app only */
.sv-app{
  --bg:#f3f6f9;
  --card:#fff;
  --ink:#1f2937;
  --muted:#6b7280;
  --brand:#2a7f62;
  --brand-600:#236c53;
  --err:#e74c3c;
  --warn:#f59e0b;
  --ok:#16a34a;
  --border:#e5e7eb;
  --radius:12px;
  --shadow:0 8px 24px rgba(2,6,23,.06);
  --shadow-soft:0 2px 8px rgba(2,6,23,.06);
  --trans:all .25s ease;
}

/* Resets & base only inside app */
.sv-app, .sv-app *{ box-sizing:border-box; }
.sv-app{
  min-height:100dvh;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
  display:flex;
  position: relative;
  padding-top: 64px; /* Add padding for main navbar */
}

/* Fixed Sidebar Layout - FIXED POSITIONING */
.sv-sidebar{
  width:280px; 
  min-height:calc(100vh - 64px); /* Account for navbar */
  background:var(--card); 
  box-shadow:var(--shadow-soft);
  position:fixed !important;
  top:64px !important; /* Position below main navbar */
  left:0 !important;
  bottom:0 !important;
  align-self:flex-start; 
  padding:20px 0; 
  z-index:900; /* Lower than main navbar */
  overflow-y:auto;
}

/* Main content area adjustment */
.sv-main{
  flex:1; 
  min-width:0; 
  display:flex; 
  flex-direction:column; 
  padding:24px;
  margin-left:280px;
  min-height:calc(100vh - 64px);
}

.sv-logo{padding:0 20px 16px; border-bottom:1px solid var(--border); margin-bottom:10px}
.sv-logo h1{margin:0; font-size:22px; color:var(--brand); letter-spacing:.2px}
.sv-logo p{margin:6px 0 0; color:var(--muted); font-size:13px}

/* Navigation */
.sv-sidenav{display:flex; flex-direction:column; padding:6px}
.sv-sidenav .nav__item{
  display:flex; align-items:center; gap:12px; padding:12px 14px; margin:2px 8px;
  border-radius:10px; cursor:pointer; transition:var(--trans); color:#111827;
}
.sv-sidenav .nav__item:hover{background:rgba(42,127,98,.06)}
.sv-sidenav .nav__item.is-active{background:rgba(42,127,98,.12); outline:1px solid rgba(42,127,98,.28)}
.sv-sidenav .nav__item svg{width:20px; height:20px; color:#6b7280}
.sv-sidenav .nav__item.is-active svg{color:var(--brand)}
.sv-sidenav .nav__text{font-size:14px; font-weight:500}
.sv-sidenav .nav__badge{
  margin-left:auto; min-width:22px; height:22px; padding:0 6px; border-radius:11px;
  display:inline-flex; align-items:center; justify-content:center; font-size:12px;
  color:#fff; background:var(--brand);
}

/* Header */
.sv-header{display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px}
.sv-header__meta{display:flex; flex-direction:column}
.sv-header__title{margin:0; font-size:22px; letter-spacing:.2px}
.sv-header__sub{margin:6px 0 0; color:var(--muted); font-size:13px}
.sv-header__actions{display:flex; align-items:center; gap:10px}

/* Buttons */
.btn{
  appearance:none; border:0; padding:10px 14px; border-radius:10px; font-weight:600; font-size:14px;
  cursor:pointer; display:inline-flex; gap:10px; align-items:center; transition:var(--trans);
  background:var(--brand); color:#fff; box-shadow:var(--shadow-soft);
}
.btn svg{width:18px; height:18px}
.btn:hover{background:var(--brand-600); transform:translateY(-1px)}
.btn[disabled]{opacity:.55; cursor:not-allowed; transform:none}
.btn--ghost{background:#fff; color:var(--brand); outline:1px solid rgba(42,127,98,.3)}
.btn--ghost:hover{background:rgba(42,127,98,.06)}
.btn--muted{background:#fff; color:#111827; outline:1px solid var(--border)}
.btn--muted:hover{background:#f8fafc}
.btn--danger{background:#e74c3c; color:#fff}
.btn--danger:hover{background:#c0392b}
.btn--secondary{background:#6b7280; color:#fff}
.btn--secondary:hover{background:#4b5563}

/* Panel System - Fixed */
.sv-panel { 
  display: none !important;
  width: 100%;
  animation: fadeIn 0.3s ease-in-out;
}

.sv-panel.is-active { 
  display: block !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card/grid primitives */
.card{
  background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow); padding:18px;
}
.card--p0{padding:0}
.grid{display:grid; gap:16px}
.grid--2{grid-template-columns:1.1fr .9fr}
.grid--1{grid-template-columns:1fr}

/* Source Documents layout */
.sd{
  display:grid; grid-template-columns:1.1fr .9fr; gap:16px;
}
.sd .left{display:grid; gap:16px}
.sd .uploader{padding:16px}
.drop{
  border:2px dashed var(--border); border-radius:12px; padding:26px; text-align:center;
  transition:var(--trans); cursor:pointer; background:#fff;
}
.drop:hover{border-color:var(--brand); background:rgba(42,127,98,.02)}
.drop .icon{display:flex; align-items:center; justify-content:center; color:#9ca3af; margin-bottom:10px}
.drop .icon svg{width:42px; height:42px}
.drop h3{margin:4px 0 2px; font-size:16px}
.drop p{margin:0; color:var(--muted); font-size:13px}
.file-input{display:none}

.preview{border-top:1px solid var(--border); padding:16px}
.preview.hide{display:none}
.preview__head{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px}
.filetag{
  display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:10px; background:#f1f5f9; font-size:12px;
}
.preview .page{width:100%; display:flex; align-items:center; justify-content:center; background:#f8fafc; border-radius:10px; overflow:hidden}
.preview .page img{max-width:100%; height:auto; display:block}
.preview .page canvas{max-width:100%; display:block}
.sticky-actions{
  display:flex; gap:10px; padding:12px 16px; border-top:1px solid var(--border); position:sticky; bottom:0; background:#fff; border-radius:0 0 12px 12px;
}

.sd aside.card{display:flex; flex-direction:column; height:100%}
.form{
  display:grid; gap:12px; padding:12px 16px 8px;
}
.form .row{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.input, .select, .textarea{
  width:100%; background:#fff; border:1px solid var(--border); border-radius:10px; padding:10px 12px; font-size:14px; transition:var(--trans);
}
.input:focus, .select:focus, .textarea:focus{outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(42,127,98,.12)}
.textarea{min-height:84px; resize:vertical}
.label{font-weight:600; font-size:12px; color:#374151; margin-bottom:6px}
.help{font-size:12px; color:var(--muted)}
.hide-on-init [disabled]{opacity:.7; pointer-events:none}

.alert{
  margin:10px 0 0; border-radius:10px; padding:10px 12px; font-size:13px; display:none;
}
.alert--error{background:rgba(231,76,60,.08); color:var(--err); display:none}
.alert--success{background:rgba(42,127,98,.08); color:var(--brand); display:none}

/* Tables */
.table{width:100%; border-collapse:collapse}
.table th, .table td{padding:12px 14px; border-bottom:1px solid var(--border); text-align:left; font-size:14px}
.table th{background:#f8fafc; color:#374151; font-weight:600}
.table tr:hover td{background:#f9fafb}
.table .total-row td{background:#f0fdf4; font-weight:700}

/* Financial blocks */
.fs h3{margin:12px 0; font-size:18px; color:var(--brand)}
.fs .section{margin-bottom:10px; border-left:2px solid #eef2f7; padding-left:12px}
.fs .row{display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px dashed #eef2f7}
.fs .row.total{font-weight:700; border-bottom:1px solid #e5e7eb}

/* Action buttons in tables */
.action-btn { background: none; border: none; cursor: pointer; padding: 4px; border-radius: 4px; transition: var(--trans); color: var(--muted); }
.action-btn:hover { background: rgba(0,0,0,0.05); color: var(--ink); }
.action-btns { display: flex; gap: 4px; justify-content: flex-end; }

/* Accounting Integration Styles */
.accounting-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.summary-item {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.summary-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.summary-value.pending {
  color: var(--warn);
}
.summary-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.accounting-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 12px;
  margin-bottom: 20px;
  align-items: end;
}
.filter-group {
  display: flex;
  flex-direction: column;
}
.filter-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--muted);
}

/* Status badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warn);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-approved {
  background: rgba(22, 163, 74, 0.1);
  color: var(--ok);
  border: 1px solid rgba(22, 163, 74, 0.3);
}
.status-posted {
  background: rgba(42, 127, 98, 0.1);
  color: var(--brand);
  border: 1px solid rgba(42, 127, 98, 0.3);
}
.status-rejected {
  background: rgba(231, 76, 60, 0.1);
  color: var(--err);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Accounting categories */
.accounting-category {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.accounting-category.receivable {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}
.accounting-category.income {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}
.accounting-category.payable {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}
.accounting-category.expense {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.accounting-category.credit {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

/* Amount styling */
.amount-positive {
  color: var(--ok);
  font-weight: 600;
}
.amount-negative {
  color: var(--err);
  font-weight: 600;
}

/* Document type styling */
.document-type {
  font-weight: 600;
  color: var(--ink);
}
.document-number {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Transaction details */
.transaction-details {
  display: grid;
  gap: 16px;
}
.detail-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}
.detail-row label {
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
}
.line-items {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.line-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.line-item:last-child {
  border-bottom: none;
}
.item-name {
  font-weight: 500;
}
.item-quantity {
  color: var(--muted);
  font-size: 13px;
}
.item-total {
  font-weight: 600;
  color: var(--brand);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state h3 {
  margin: 0 0 8px;
  color: var(--ink);
}
.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* Customer Search */
.customer-search-container {
  position: relative;
  margin-bottom: 15px;
}

.customer-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.customer-search-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: var(--trans);
}

.customer-search-item:hover {
  background: rgba(42, 127, 98, 0.05);
}

.customer-search-item:last-child {
  border-bottom: none;
}

.customer-search-item.add-new {
  background: rgba(42, 127, 98, 0.1);
  font-weight: 600;
}

.selected-customer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(42, 127, 98, 0.05);
  border-radius: 6px;
  margin-bottom: 10px;
}

.clear-customer {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-balances-display {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.balance-we-owe, .balance-they-owe {
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.balance-we-owe.has-balance {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.balance-they-owe.has-balance {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

/* Responsive */
@media (max-width:1100px){
  .grid--2, .sd{grid-template-columns:1fr}
  .accounting-filters {
    grid-template-columns: 1fr;
  }
  .accounting-summary {
    grid-template-columns: 1fr;
  }
  .detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
  .sv-app {
    padding-top: 0; /* Remove top padding on mobile */
    flex-direction: column;
  }
  
  .sv-sidebar {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    z-index: 1000;
    padding: 10px 0;
  }
  
  .sv-main {
    margin-left: 0 !important;
    margin-bottom: 80px !important;
    padding: 16px;
    min-height: calc(100vh - 80px); /* Adjust for bottom navbar */
  }
  
  /* Mobile-optimized navigation */
  .sv-sidenav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 10px;
    gap: 5px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
  
  .sv-sidenav .nav__item {
    flex-direction: column;
    min-width: 70px;
    padding: 8px 5px;
    margin: 2px;
    position: relative; /* For badge positioning */
  }
  
  .sv-sidenav .nav__text {
    font-size: 11px;
    text-align: center;
  }
  
  .sv-sidenav .nav__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
  }
  
  /* Hide logo on mobile to save space */
  .sv-logo {
    display: none;
  }
}

/* Tablet adjustments */
@media (max-width: 1100px) and (min-width: 769px) {
  .sv-sidebar {
    width: 240px;
  }
  
  .sv-main {
    margin-left: 240px;
  }
}

/* Loading spinner */
.loading{
  width:18px; height:18px; border-radius:50%; border:3px solid rgba(255,255,255,.35); border-top-color:#fff; display:inline-block;
  animation:spin 1s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* Ensure main navbar stays on top */
#site-header {
  z-index: 1000 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* Mobile navigation indicator */
.mobile-nav-indicator {
  position: fixed;
  bottom: 70px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 10px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
  z-index: 999;
  font-size: 12px;
  color: var(--muted);
  display: none;
}

@media (max-width: 768px) {
  .mobile-nav-indicator.mobile-only {
    display: block;
  }
}
