: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) !important;
  min-height:100vh;
}
main{ 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}
.app-downloads{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}
.store-chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border:1px dashed var(--gray-200);
  border-radius:10px;
  background:var(--gray-100);
  text-decoration:none;
  color:var(--charcoal);
  min-width:160px;
}
.store-chip .store-name{font-weight:700}
.store-chip .store-status{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--gray-600);
}
.store-chip.is-disabled{
  cursor:not-allowed;
  opacity:.9;
  pointer-events:none;
}
.download-section{
  padding:60px 0 80px;
  background:linear-gradient(180deg, rgba(34,197,94,.05), rgba(34,197,94,.0));
}
.download-inner{
  display:grid;
  gap:24px;
}
.download-copy h2{
  margin:0 0 6px;
  font-size: clamp(26px, 4vw, 36px);
}
.download-copy .eyebrow{
  text-transform:uppercase;
  letter-spacing:.18em;
  font-weight:700;
  color:var(--green-600);
  margin:0 0 6px;
  font-size:12px;
}
.download-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
}
.platform-main{
  display:flex;
  align-items:center;
  gap:12px;
}
.platform-icon{
  width:42px;
  height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:var(--gray-100);
  border:1px solid var(--gray-200);
  color:var(--charcoal);
}
.platform-icon svg{
  width:22px;
  height:22px;
}
.platform-icon.android{
  color:var(--green-600);
  background:rgba(34,197,94,.12);
  border-color:rgba(34,197,94,.25);
}
.platform-icon.windows{
  color:#2563eb;
  background:rgba(37,99,235,.1);
  border-color:rgba(37,99,235,.25);
}
.platform-icon.ios{
  color:#0b1324;
  background:rgba(0,0,0,.05);
  border-color:rgba(0,0,0,.12);
}
.platform-card{
  border:1px solid var(--gray-200);
  border-radius:14px;
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  text-decoration:none;
  color:inherit;
  background:var(--white);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.platform-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow);
  border-color:rgba(34,197,94,.35);
}
.platform-title{
  margin:0;
  font-weight:700;
  font-size:16px;
}
.platform-note{
  margin:4px 0 0;
  color:var(--gray-600);
  font-size:13px;
}
.platform-cta{
  font-weight:700;
  color:var(--green-600);
  font-size:14px;
}
.platform-card.disabled{
  opacity:.65;
  cursor:not-allowed;
  border-style:dashed;
  box-shadow:none;
  transform:none;
}
.platform-card.disabled .platform-cta{
  color:var(--gray-600);
}
.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;
}

/* Keep protected pages and auth views on a consistent viewport height */
html, body{
    height: 100%;
    min-height: 100vh;
}
.crm-shell,
.inventory-shell,
.documents-shell,
.accounting-shell,
.business-shell,
.auth-shell{
    min-height: 100vh !important;
}

.auth-blocked .crm-shell,
.auth-blocked .inventory-shell,
.auth-blocked .documents-shell,
.auth-blocked .accounting-shell,
.auth-blocked .business-shell{
    display: none !important;
}

#loginGateOverlay{
    position: fixed;
    inset: 0;
    z-index: 50000;
    background: rgba(0,0,0,0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
#loginGateOverlay .gate-card{
    background: #fff;
    color: #0b1324;
    padding: 24px 22px;
    border-radius: 14px;
    box-shadow: 0 18px 38px rgba(0,0,0,0.14);
    min-width: 260px;
    max-width: 420px;
    text-align: center;
    display: grid;
    gap: 12px;
    font-weight: 600;
}
#loginGateOverlay .gate-title{ margin:0; font-size:18px; }
#loginGateOverlay .gate-desc{ margin:0; color:#4b5563; font-weight:500; font-size:14px; }
#loginGateOverlay .gate-spinner{
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid #e5e7eb;
    border-top-color: #22c55e;
    margin: 0 auto;
    animation: gateSpin 0.9s linear infinite;
}
@keyframes gateSpin{ to { transform: rotate(360deg); } }
.auth-blocked{ overflow:hidden; }

/* Force login modal to center on the viewport (ignores varying page heights) */
#loginModal,
.login-modal,
[data-modal="login"] {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: grid !important;
    place-items: center !important;
    align-content: center;
    justify-items: center;
    padding: clamp(14px, 3vw, 28px);
    background: rgba(0, 0, 0, 0.55);
    z-index: 40000;
}

#loginModal .modal-content,
.login-modal .modal-content,
[data-modal="login"] .modal-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
    max-height: min(560px, 90vh);
    overflow: auto;
}

.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: green;
  border-top: 1px solid var(--border);
  margin-top: auto;
  color: white;
}

.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: 30; /* Keep behind sticky header */
  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;
  }
}

/* Make profile and business chips round like Google */
.business-chip, .profile-chip {
  border-radius: 50% !important;
 
}

.business-chip.has-logo img,
.profile-chip.has-logo img {
  border-radius: 50% !important;
  object-fit: cover !important;
  
}

/* Loading text styles */
.loading-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-logo{
  display:flex;
  align-items:center;
  gap:12px;
}
.loading-logo__svg{
  width:72px;
  height:auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.12));
}
.loading-logo__text{
  font-weight:700;
  letter-spacing:.02em;
}

.loading-text.show {
  opacity: 1;
  visibility: visible;
}

.loading-text::after {
  content: '';
  animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Optional: Add a backdrop overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Ensure user area and chips are hidden when parent has hidden attribute */
.user-area[hidden] {
  display: none !important;
}

/* Mobile drawer user area hidden state */
.drawer-user-area[hidden] {
  display: none !important;
}

/* Standalone (installed) view: white top bar, hide brand/page titles */
@media (display-mode: standalone) {
  .header {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.06);
    box-shadow: var(--shadow);
  }
  .center-brand,
  .page-title {
    display: none !important;
  }
}

/* Floating chat button */
.chat-fab{
  position:fixed;
  right:clamp(12px, 2vw, 22px);
  bottom:calc(16px + env(safe-area-inset-bottom, 0px));
  z-index:40000;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:12px 16px;
  background:linear-gradient(135deg, #22c55e, #16a34a);
  color:#fff;
  border:0;
  border-radius:999px;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
  cursor:pointer;
  font-weight:700;
  letter-spacing:0.01em;
  text-decoration:none;
  overflow:hidden;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.chat-fab:hover{ transform:translateY(-1px); box-shadow:0 16px 32px rgba(0,0,0,.20); }
.chat-fab:active{ transform:translateY(0); }
.chat-fab .ripple{
  position:absolute;
  border-radius:50%;
  background:rgba(255,255,255,0.35);
  transform:scale(0);
  animation:rippleAnim 500ms ease-out;
  pointer-events:none;
}
@keyframes rippleAnim{
  to{ transform:scale(6); opacity:0; }
}

/* Home sections hide when navigating */
.home-hidden{ display:none !important; }

/* Shared auth shell (login/signup) */
.auth-shell{
  position:relative;
  min-height:calc(100vh - 64px);
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--white);
  padding:48px 12px;
}
@media (max-width: 680px){
  .auth-shell{
    padding:48px 12px;
  }
}

/* App shell iframe loader */
.app-shell{
  background: var(--white);
  padding: 0 0 80px; /* bottom space so shell footer doesn’t overlap */
}
.app-frame-wrap{
  width:100%;
  max-width:none;
  margin:0;
  position:relative;
  overflow:hidden;
}
#contentFrame, .shell-frame{
  width:100%;
  min-height:100vh;
  border:0;
  border-radius:0;
  box-shadow:none;
  background: transparent;
  display:block;
}
.shell-frame{ transition:opacity .2s ease; }
.app-frame-wrap.loading #contentFrame,
.app-frame-wrap.loading .shell-frame{
  opacity:0;
  pointer-events:none;
}
#contentFrame::-webkit-scrollbar,
.shell-frame::-webkit-scrollbar{ display:none; } /* WebKit */

/* Frame loader */
.frame-loader{
  position:relative;
  width:100%;
  height:4px;
  overflow:hidden;
  background:rgba(0,0,0,0.04);
  border-radius:999px;
  margin-bottom:6px;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--gray-600);
  font-weight:600;
  font-size:12px;
}
.frame-loader.hide{ display:none; }
.frame-spinner{
  position:absolute;
  left:0; top:0; bottom:0;
  width:30%;
  background:linear-gradient(90deg, rgba(34,197,94,0.15), rgba(34,197,94,0.55), rgba(34,197,94,0.15));
  animation: frameSlide 1s ease-in-out infinite;
  border-radius:999px;
}
.frame-loader p{ margin:0 0 0 36px; }
@keyframes frameSlide{
  0% { transform: translateX(-30%); opacity:0.8; }
  50% { transform: translateX(80%); opacity:1; }
  100% { transform: translateX(180%); opacity:0.8; }
}
.frame-skeleton{
  position:fixed;
  top:64px;
  left:0;
  right:0;
  bottom:0;
  background:rgba(255,255,255,0.98);
  z-index:40;
  padding:0 12px;
  display:grid;
  align-items:center;
  justify-items:center;
  pointer-events:none;
}
.frame-skeleton.hide{ display:none; }
.frame-skeleton-inner{
  width:min(420px, 85vw);
  display:grid;
  place-items:center;
}
.sk-logo-wrap{
  position:relative;
  width:220px;
  height:220px;
  display:grid;
  place-items:center;
}
.sk-logo{
  width:180px;
  opacity:0.95;
}
.sk-logo-outline{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  fill:none;
  stroke: rgba(67,182,94,0.65);
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-dasharray: 170 40 90 40 140 40 90 40;
  stroke-dashoffset: 0;
  animation: skOutline 2s ease-in-out infinite;
}
@keyframes skOutline{
  0% { stroke-dashoffset: 0; opacity:0.2; }
  50% { stroke-dashoffset: 200; opacity:1; }
  100% { stroke-dashoffset: 400; opacity:0.2; }
}




