@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* SMART INSIGHTS SIDEBAR */
.insights-sidebar {
  position: fixed; top: 0; right: -420px; width: 400px; height: 100vh;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px);
  box-shadow: -10px 0 30px rgba(0,0,0,0.1); transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000; padding: 25px; display: flex; flex-direction: column;
  border-left: 1px solid rgba(255,255,255,0.3);
}
.insights-sidebar.open { right: 0; }
.insights-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.insights-card {
  background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 15px;
  border: 1px solid #f1f5f9; box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.insights-badge {
  font-size: 9px; font-weight: 800; text-transform: uppercase; padding: 3px 8px;
  border-radius: 6px; margin-bottom: 8px; display: inline-block;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.insight-trend { font-size: 11px; color: #64748b; margin-top: 5px; }
.insight-title { font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.insight-desc { font-size: 12px; color: #475569; line-height: 1.5; }
.close-insights { cursor: pointer; font-size: 20px; color: #94a3b8; transition: color 0.2s; }
.close-insights:hover { color: #0f172a; }

/* ═══════════════════════════════════════════════════════════
   EMBOSS DESIGN  ·  2.0  ·  Odoo / Zoho / QuickBooks Style
   Light, professional, enterprise SaaS aesthetic
   ⚠ LOCKED — DO NOT MODIFY OR REMOVE ANY CODE BELOW
   Version locked: 2026-03-07
═══════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  /* Brand */
  --brand:       #4f46e5;   /* Modern Indigo 600 */
  --brand-d:     #3730a3;   /* Indigo 800 */
  --brand-xd:    #1e1b4b;   /* Indigo 950 */
  --brand-light: #f5f3ff;   /* Indigo 50 */
  --brand-mid:   #a5b4fc;   /* Indigo 300 */
  --accent:      #6366f1;   /* Indigo 500 */

  /* Background layers */
  --bg:          #f8fafc;   /* Slate 50 */
  --surface:     #ffffff;
  --surface2:    #f1f5f9;   /* Slate 100 */
  --surface3:    #e2e8f0;   /* Slate 200 */

  /* Borders */
  --border:      #e2e8f0;   /* Slate 200 */
  --border2:     #cbd5e1;   /* Slate 300 */

  /* Text */
  --text:        #0f172a;   /* Slate 900 */
  --text2:       #334155;   /* Slate 700 */
  --muted:       #64748b;   /* Slate 500 */
  --muted2:      #94a3b8;   /* Slate 400 */

  /* Status colours */
  --green:       #10b981;   --green-d:#047857; --green-bg:#ecfdf5;
  --red:         #ef4444;   --red-d:#b91c1c;   --red-bg:#fef2f2;
  --amber:       #f59e0b;   --amber-d:#b45309; --amber-bg:#fffbeb;
  --blue:        #3b82f6;   --blue-d:#1d4ed8;  --blue-bg:#eff6ff;
  --purple:      #8b5cf6;   --purple-d:#6d28d9;--purple-bg:#f5f3ff;
  --teal:        #14b8a6;   --teal-d:#0f766e;  --teal-bg:#f0fdfa;
  --orange:      #f97316;   --orange-bg:#fff7ed;

  /* Sidebar */
  --sb-bg:       #1e1b4b;   /* Deep indigo sidebar */
  --sb-w:        240px;

  /* Elevation */
  --sh-sm:  0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --sh:     0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --sh-md:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --sh-lg:  0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

  /* Radius */
  --r:   8px;
  --r-md:12px;
  --r-lg:18px;
}







/* ── RESET ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
}

/* ══════════════════════════════════════
   SIDEBAR  —  Odoo dark left nav
══════════════════════════════════════ */
/* ═══════════════════════════════════════
   SIDEBAR  —  Deep forest green theme
═══════════════════════════════════════ */
/* ── TOP NAV replaces sidebar ── */
#sidebar {
  display: none !important;
}
/* Top nav bar (Premium Glassmorphism) */
/* Top nav bar (Ultra-Premium Glassmorphism) */
#topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  z-index: 2000;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: 0 1px 2px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.01);
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

/* Logo Section */
.tn-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 40px;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
}
.tn-logo img {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.tn-logo-name {
  font-size: 16px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.tn-logo-ver {
  font-size: 9px;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation Items */
.tn-items {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tn-item {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tn-item:hover {
  color: #0f172a;
  border-bottom-color: rgba(99,102,241,0.3);
}
.tn-item.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.tn-item .tn-arr {
  font-size: 9px;
  opacity: 0.5;
  margin-left: 2px;
  transition: transform 0.25s;
}
.tn-item:hover .tn-arr, .tn-item.open .tn-arr {
  transform: rotate(180deg);
  opacity: 1;
}

/* Dropdowns (Premium Overlay) */
.tn-drop {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 260px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  box-shadow: 0 10px 30px -5px rgba(0,0,0,0.1), 0 4px 12px -2px rgba(0,0,0,0.05);
  padding: 12px;
  z-index: 2100;
  transform-origin: top left;
}
.tn-item.open .tn-drop {
  display: block;
  animation: tnPop .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tnPop {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.tn-drop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s;
}
.tn-drop-item:hover {
  background: #f8fafc;
  color: var(--brand);
  transform: translateX(4px);
}
.tn-drop-item.active {
  background: #f1f5f9;
  color: var(--brand);
  font-weight: 700;
}
.tn-drop-item .tn-di {
  font-size: 14px;
  width: 20px;
  text-align: center;
  color: #94a3b8;
  transition: all 0.2s;
}
.tn-drop-item:hover .tn-di {
  color: var(--brand);
  transform: scale(1.1);
}

/* Icon specific colors */
#tni-dashboard i { color: #6366f1; }
#tni-sales i { color: #3b82f6; }
#tni-purchase i { color: #f59e0b; }
#tni-finance i { color: #10b981; }
#tni-analytics i { color: #8b5cf6; }
#tni-masterdata i { color: #64748b; }
#tni-ai_tools i { color: #2bd7bf; }
#tni-settings i { color: #475569; }


.tn-drop-item:hover { background: var(--brand-light); color: var(--brand-d); }
.tn-drop-item.active { color: var(--brand-d); background: var(--brand-light); font-weight: 700; }
.tn-drop-item .tn-di { font-size: 11px; width: 16px; text-align: center; color: var(--muted); flex-shrink: 0; opacity: 0.7; }
.tn-drop-item.active .tn-di { color: var(--brand); opacity: 1; }
.tn-drop-item .tn-badge {
  margin-left: auto; background: var(--brand-light); color: var(--brand-d);
  font-size: 9.5px; font-weight: 800; padding: 2px 7px;
  border-radius: 6px; border: 1px solid var(--brand-mid);
}
.tn-drop-sep { height: 1px; background: var(--border); margin: 6px 0; opacity: .6; }
/* Right side of nav */
.tn-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Search button — single unified pill */
.tn-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 200px;
}
.tn-search-btn:hover {
  background: #e8eef6;
  border-color: rgba(99,102,241,0.3);
  color: #374151;
}
.tn-search-btn i {
  font-size: 13px;
  color: #94a3b8;
  flex-shrink: 0;
}
.tn-search-btn span:first-of-type {
  flex: 1;
  text-align: left;
}
.tn-search-kbd {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1px 6px;
  letter-spacing: 0.3px;
}

.tn-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  padding-right: 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(15, 23, 42, 0.03);
}
.tn-user:hover {
  background: rgba(15, 23, 42, 0.06);
}
.tn-av {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.tn-uname {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.tn-urole {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sync badge & refresh button — premium inline widgets */
#sb-sync-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sync-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  cursor: default;
}
.btn-sync {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(226,232,240,0.8);
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-sync:hover {
  background: #f1f5f9;
  color: var(--brand);
  border-color: rgba(99,102,241,0.25);
  transform: rotate(20deg);
}
.btn-sync.pulse {
  animation: syncPulse 1.2s ease infinite;
}
@keyframes syncPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(99,102,241,0); }
}

/* Hide sync container from navbar - status handled internally */
#sb-sync-container { display: none !important; }

/* ── PREMIUM TABS ── */
/* Premium Segmented Control for Sub-filters */
.premium-segmented-control {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  width: fit-content;
  border: 1px solid #e2e8f0;
}
.premium-segmented-control button {
  border: none;
  background: transparent;
  padding: 6px 20px;
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.premium-segmented-control button.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.premium-segmented-control button:hover:not(.active) {
  background: rgba(255,255,255,0.5);
  color: #0f172a;
}

.premium-tabs-wrapper { scrollbar-width: none; -ms-overflow-style: none; }
.premium-tabs-wrapper::-webkit-scrollbar { display: none; }

.p-tab { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; position: relative; }
.p-tab:hover:not(.active) { 
  background: rgba(255, 255, 255, 0.5) !important; 
  transform: translateY(-1px);
  color: var(--brand) !important;
}
.p-tab.active {
  z-index: 2;
}
.p-tab:active { transform: scale(0.96); }

/* Sync UI */
.sync-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  transition: all .3s;
  display: inline-block;
}
.btn-sync {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all .2s;
}
.btn-sync:hover {
  background: rgba(255,255,255,.15);
  color: #f8fafc;
  transform: rotate(45deg);
}
.btn-sync:active { transform: scale(0.9); }
.btn-sync.pulse {
  border-color: #3b82f6;
  color: #3b82f6;
  animation: sync-pulse 1.5s infinite;
}
@keyframes sync-pulse {
  0% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  70% { box-shadow: 0 0 0 8px rgba(59,130,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* SVG mesh graphic layer */
#sb-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* Logo strip */
.logo-wrap {
  padding: 0 14px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #f1f5f9;
}
.logo-wrap img {
  height: 32px;
  width: 32px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.logo-text .co {
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
  letter-spacing: -.2px;
  line-height: 1.2;
}
.logo-text .ver {
  font-size: 8.5px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Search box */
.sb-search-wrap {
  padding: 8px 10px 8px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
#sb-search {
  width: 100%;
  padding: 7px 10px 7px 32px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  color: #0f172a;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  outline: none;
}
#sb-search:focus {
  border-color: #f59e0b;
  background: #fffbeb;
}
#sb-search::placeholder { color: #94a3b8; }
.sb-search-wrap input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px 7px 30px;
  font-size: 12px;
  color: #334155;
  outline: none;
  transition: all .2s;
  box-sizing: border-box;
}
.sb-search-wrap input::placeholder { color: #94a3b8; }
.sb-search-wrap input:focus {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #0f172a;
}
.sb-search-wrap .sb-si {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #94a3b8;
  pointer-events: none;
}

/* Nav scroll area */
nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 6px;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
  position: relative;
  z-index: 2;
}
nav::-webkit-scrollbar { width: 2px; }
nav::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* Section labels */
.nl {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 16px 18px 5px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nl::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #f1f5f9;
  border-radius: 1px;
}

/* Nav item */
.ni {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  cursor: pointer;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  transition: all .17s ease;
  margin: 1px 8px;
  border-radius: 9px;
  position: relative;
  z-index: 2;
  user-select: none;
  letter-spacing: .01em;
}
.ni:hover {
  background: #fffbeb;
  color: #d97706;
}
.ic {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #94a3b8;
  flex-shrink: 0; transition: color .15s;
}
.ni.active .ic { color: #f59e0b !important; }
.ni:hover .ic { color: #d97706; }

/* Active item — teal accent */
.ni.active {
  background: linear-gradient(90deg, #fff7ed 0%, #fffbeb 100%);
  color: #d97706 !important;
  font-weight: 700;
  border-left: 3px solid #f59e0b;
  padding-left: 9px;
}
.ni.active .ic {
  color: #f59e0b !important;
  opacity: 1;
}
.ni.active::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: linear-gradient(180deg, #f59e0b, #d97706);
  border-radius: 3px 0 0 3px;
}

/* Icon */
.ni .ic {
  font-size: 12.5px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  color: #94a3b8;
  transition: color .15s;
}

/* Badge */
.ni .nb {
  margin-left: auto;
  background: #fef3c7;
  color: #d97706;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
  line-height: 1.65;
  border: 1px solid #fde68a;
  flex-shrink: 0;
}

/* Footer */
.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2bd7bf, #3ed0c5);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px; color: #fff;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.un { font-size: 12.5px; font-weight: 600; color: #0f172a; }
.ur { font-size: 10.5px; color: #94a3b8; margin-top: 1px; }


#main {
  margin-left: 0;
  padding-top: 64px;

  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar - sub-header below topnav */
/* ── PREMIUM MODULE TOOLBAR (TOPBAR) ── */
.topbar {
  min-height: 72px;
  background: #ffffff;
  border-bottom: 1px solid #eef2f6;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  z-index: 10;
  box-shadow: 0 1px 0 #eef2f6;
  transition: all 0.3s ease;
}


.tb-left, .tb-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tb-title {
  font-size: 28px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.04em;
  margin-right: 32px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
}


.tb-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(to bottom, var(--brand), var(--brand-d));
  border-radius: 4px;
  margin-right: 2px;
}

.tb-left-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modern Odoo-style Buttons */
.btn-odoo-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  color: #ffffff;
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.1px;
}

.btn-odoo-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  filter: brightness(1.1);
}

.btn-odoo-primary:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.btn-odoo-secondary {
  background: #ffffff;
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-odoo-secondary:hover {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.btn-odoo-secondary:active {
  transform: scale(0.98);
}

.act-bar { display: flex; align-items: center; gap: 10px; }
.tb-actions { display: flex; gap: 10px; align-items: center; }

/* ERP Dashboard Styling */


/* Card view for data tables */

/* Modern Module Search Bar */
.mod-search-wrap {
  margin: 12px 0 18px;
}
/* ══════════════ APPLE-STYLE SEARCH SYSTEM ══════════════ */
.apple-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-search-input {
  width: 100%;
  height: 42px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 40px 0 42px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.apple-search-input:hover {
  background: rgba(0, 0, 0, 0.06);
}

.apple-search-input:focus {
  background: #ffffff;
  border-color: var(--brand-mid);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 0 0 4px var(--brand-light);
  width: 320px;
}

.apple-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
  opacity: 0.7;
}
.apple-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s;
  opacity: 0.6;
  z-index: 20;
  pointer-events: auto !important;
}
.apple-search-clear:hover {
  opacity: 1;
  color: #ef4444;
  transform: translateY(-50%) scale(1.1);
}



/* Module Bar Override */
.tb-search-wrap.apple-style .apple-search-input {
  height: 38px;
  width: 220px;
}
.tb-search-wrap.apple-style .apple-search-input:focus {
  width: 320px;
}


/* ERP Chatbot */
.erp-chatbot-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg,#111827,#1f2937);
  border: 2px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(15,23,42,.35);
  cursor: pointer;
  z-index: 2000;
}
.erp-chatbot-panel {
  position: fixed;
  right: 22px;
  bottom: 90px;
  width: 360px;
  max-width: calc(100vw - 44px);
  max-height: 70vh;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15,23,42,.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 2000;
}
.erp-chatbot-panel.open { display: flex; }
.erp-chatbot-header {
  background: linear-gradient(135deg,#0f172a,#1f2937);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}
.erp-chatbot-log {
  padding: 12px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.erp-chatbot-msg {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
}
.erp-chatbot-msg.user { background: #fef3c7; color: #92400e; align-self: flex-end; }
.erp-chatbot-msg.bot { background: #f1f5f9; color: #0f172a; align-self: flex-start; }
.erp-chatbot-input {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}
.erp-chatbot-input input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  background: var(--surface);
  color: var(--text);
}
.erp-chatbot-input button {
  border: none;
  background: #0f172a;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Content area */
#content { padding: 20px 24px 32px; }

/* ══════════════════════════════════════
   FINANCIAL & LEDGER UI  —  Premium ERP
   Sleek transaction tables and audit logs
══════════════════════════════════════ */
.ledger-card {
  background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--border);
  box-shadow: var(--sh); overflow: hidden; margin-bottom: 24px; transition: transform 0.2s;
}
.ledger-header {
  background: linear-gradient(to right, var(--surface2), #ffffff);
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.ledger-title { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger-table th { 
  background: var(--surface2); color: var(--muted); font-weight: 700; 
  text-transform: uppercase; font-size: 10px; letter-spacing: 0.08em;
  padding: 12px 20px; text-align: left; border-bottom: 1px solid var(--border);
}
.ledger-table td { padding: 14px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ledger-row { transition: all 0.2s; }
.ledger-row:hover { background: #fffcf0; }
.ledger-row.overdue { background: #fff5f5; }
.ledger-row.paid { opacity: 0.7; }

.action-float {
  display: flex; gap: 6px; opacity: 0; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(10px);
}
.ledger-row:hover .action-float { opacity: 1; transform: translateX(0); }

.amount-pill {
  font-family: 'Outfit', sans-serif !important; font-weight: 400; font-size: 14px;
  padding: 4px 10px; border-radius: 6px; display: inline-block;
}
.amount-in { color: var(--green-d); background: var(--green-bg); }
.amount-out { color: var(--red-d); background: var(--red-bg); }

/* Tabs for 360 View */
.tab-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-item {
  padding: 10px 18px; font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; position: relative; transition: all 0.2s; border-radius: 8px 8px 0 0;
}
.tab-item:hover { color: var(--brand); background: var(--brand-light); }
.tab-item.active { color: var(--brand); background: #fff; border: 1px solid var(--border); border-bottom-color: #fff; margin-bottom: -1px; z-index: 2; }

/* Calendar Premium */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cal-day { background: #fff; min-height: 120px; padding: 10px; transition: background 0.2s; position: relative; }
.cal-day:hover { background: var(--brand-light); }
.cal-day.today { background: #fffcf0; }
.cal-date { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.cal-today-mark { background: var(--amber); color: #fff; padding: 2px 6px; border-radius: 4px; }
.cal-event {
  font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 4px;
  margin-bottom: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid transparent; transition: transform 0.1s;
}
.cal-event:hover { transform: scale(1.02); filter: brightness(0.95); }
.cal-event.in { background: var(--green-bg); color: var(--green-d); border-left-color: var(--green); }
.cal-event.out { background: var(--red-bg); color: var(--red-d); border-left-color: var(--red); }

/* ══════════════════════════════════════
   BUTTONS  —  QuickBooks / Odoo style
══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .14s;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -.1px;
}
.btn i { font-size: 12px; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 1px 3px rgba(0,160,157,.35);
}
.btn-primary:hover {
  background: var(--brand-d);
  border-color: var(--brand-d);
  box-shadow: 0 2px 8px rgba(0,160,157,.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border2);
  color: var(--text2);
}
.btn-outline:hover { background: var(--surface2); border-color: var(--brand); color: var(--brand-d); }

.btn-ok {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: 0 1px 3px rgba(54,179,126,.3);
}
.btn-ok:hover { background: var(--green-d); transform: translateY(-1px); }

.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-danger:hover { background: var(--red-d); transform: translateY(-1px); }

.btn-info {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-warn {
  background: var(--amber);
  color: #fff;
  border-color: var(--amber);
}
.btn-ghost {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text2);
}
.btn-ghost:hover { background: var(--surface3); border-color: var(--border2); }

.btn-pdf {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.btn-pdf:hover { background: var(--text2); }

.btn-email {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-email:hover { background: var(--blue-d); }


.btn-purple {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.btn-teal {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Centered Module Content Container */
.mod-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ══════════════════════════════════════
   GRID & CARDS  —  Odoo-style panels
══════════════════════════════════════ */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--sh-sm);
}

/* KPI stat card — coloured left border like Odoo */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--sh-sm);
  border-left: 4px solid var(--brand);
  transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--sh); transform: translateY(-1px); }
.stat-card.teal  { border-left-color: var(--brand); }
.stat-card.green { border-left-color: var(--green); }
.stat-card.red   { border-left-color: var(--red); }
.stat-card.amber { border-left-color: var(--amber); }
.stat-card.blue  { border-left-color: var(--blue); }
.stat-card.purple{ border-left-color: var(--purple); }
.stat-card.pink  { border-left-color: #e91e8c; }
.stat-card.orange{ border-left-color: var(--orange); }

.card-icon {
  width: 40px; height: 40px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}
.card-title {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 6px;
}
.card-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
  line-height: 1;
}
.card-sub { font-size: 12px; color: var(--muted); margin-top: 5px; }
.big-metric { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.8px; line-height: 1.1; }
.metric-change { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.mc-up { color: var(--green-d); }
.mc-dn { color: var(--red-d); }
.card-pct {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; margin-top: 5px;
}
.up   { background: var(--green-bg); color: var(--green-d); }
.dn   { background: var(--red-bg);   color: var(--red-d);   }
.neu  { background: var(--surface2); color: var(--muted);   }

.sec-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ══════════════════════════════════════
   TABLES  —  base reset (card-row design in DATA GRID block)
══════════════════════════════════════ */
.tw { }
table { width: 100%; }
th {
  padding: 8px 14px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
}
td {
  padding: 11px 14px;
  font-size: 12.5px;
  color: #1e293b;
  vertical-align: middle;
}

/* ══════════════════════════════════════
   BADGES  —  Atlassian lozenge style
══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 3px;   /* Atlassian square-ish */
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bk  { background: var(--text);         color: #fff; }
.bg  { background: var(--green-bg);     color: var(--green-d); }
.bb  { background: var(--blue-bg);      color: var(--blue-d); }
.bo  { background: var(--amber-bg);     color: var(--amber-d); }
.br  { background: var(--red-bg);       color: var(--red-d); }
.by  { background: #fffae6;             color: #7a5800; }
.bp  { background: var(--purple-bg);    color: var(--purple-d); }
.bgy { background: var(--surface3);     color: var(--muted); border:1px solid var(--border); }
.bteal { background: var(--teal-bg);    color: var(--teal-d); }
.borg  { background: #fff0e0;           color: #974000; }

/* ══════════════════════════════════════
   MODAL  —  Odoo dialog style
══════════════════════════════════════ */
.modal-ov {
  position: fixed; inset: 0;
  background: rgba(9,30,66,.54);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px; /* Prevent edge-to-edge on mobile */
  overflow-y: auto; /* Handle overflow at overlay level if needed */
}
.modal-ov.open {
  display: flex;
  animation: mo .15s ease;
}
@keyframes mo {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: 720px;
  max-width: 100%;
  max-height: calc(100vh - 40px); /* Leave room for overlay padding */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(9,30,66,.22);
  position: relative;
}
.modal-xl { width: 1200px; max-width: 95vw; }
.modal-max { width: 95vw; max-width: 1700px; height: 92vh; }
.modal-lg { width: 840px; }
.modal-full { 
  width: 100vw; 
  height: 100vh; 
  max-width: 100vw; 
  max-height: 100vh; 
  border-radius: 0; 
  border: none;
  margin: 0;
}

.mh {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--surface);
  z-index: 10;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.modal-full .mh { border-radius: 0; }
.mt {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
}
.mc {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--r);
  line-height: 1;
  font-weight: 800;
  transition: .13s;
  box-shadow: var(--sh-sm);
}
.mc:hover { background: var(--red); color: #fff; border-color: var(--red); }
.mb { padding: 20px 22px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.mf {
  padding: 12px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  z-index: 2;
}
/* SO/PO modals use an inner column wrapper — keep those rows tidy */
.mf > .mf-rows { display: flex; flex-direction: column; gap: 0; width: 100%; }
.mf > .mf-rows > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0; }
.mf > .mf-rows > div + div { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
/* Prevent any button or element inside .mf-rows from stretching full-width */
.mf > .mf-rows > div > * { flex-shrink: 0; flex-grow: 0; width: auto !important; }
.mf > .mf-rows > div > button { display: inline-flex; width: auto !important; }
/* Spacer spans that use margin-left:auto should still work */
.mf > .mf-rows > div > .mf-spacer { flex-grow: 1; }

/* ══════════════════════════════════════
   FORMS  —  clean enterprise inputs
══════════════════════════════════════ */
.fg { margin-bottom: 14px; }
label, .lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  display: block;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: var(--r);
  padding: 8px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border .14s, box-shadow .14s;
}
input::placeholder { color: var(--muted2); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(0,160,157,.18);
  background: var(--surface);
}
input[readonly] { opacity: .55; cursor: not-allowed; background: var(--surface2) !important; }
.fr { display: grid; gap: 12px; margin-bottom: 14px; }
.fr2 { grid-template-columns: 1fr 1fr; }
.fr3 { grid-template-columns: 1fr 1fr 1fr; }
.fr4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* ── Line-item table (inside forms) ── */
.lt { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.lt th {
  background: var(--surface2);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 1px solid var(--border);
}
.lt td { padding: 3px 4px; border: 1px solid var(--border); }
.lt input, .lt select {
  border: none;
  background: transparent;
  padding: 5px 7px;
  font-size: 13px;
  color: var(--text);
  border-radius: 0;
}
.lt input:focus, .lt select:focus {
  background: var(--brand-light);
  border-radius: 3px;
  box-shadow: none;
  border-color: transparent;
}
.lt-tot td {
  background: var(--surface2);
  font-weight: 700;
  padding: 9px 9px;
  font-size: 13.5px;
  color: var(--text);
}

/* ══════════════════════════════════════
   TABS  —  Odoo chatter / pivot style
══════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tab {
  padding: 9px 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: .13s;
  white-space: nowrap;
}
.tab.active { color: var(--brand-d); border-bottom-color: var(--brand); }
.tab:hover:not(.active) { color: var(--text2); background: var(--surface2); }

/* ══════════════════════════════════════
   SEARCH BAR
══════════════════════════════════════ */
.sb { position: relative; }
.sb input { padding-left: 34px; }
.sbi {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
  font-size: 13px;
  pointer-events: none;
}
.ab {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ab .sb { flex: 1; min-width: 180px; }

/* ══════════════════════════════════════
   MISC UTILITIES
══════════════════════════════════════ */
.div { height: 1px; background: var(--border); margin: 16px 0; }

/* Progress bar */
.pb {
  height: 6px;
  background: var(--surface3);
  border-radius: 20px;
  overflow: hidden;
}
.pf { height: 100%; border-radius: 20px; transition: width .4s ease; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 22px; right: 22px;
  background: var(--text);
  border-radius: var(--r-md);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 9px;
  box-shadow: var(--sh-lg);
  color: #fff;
  max-width: 380px;
}
.toast.show {
  display: flex;
  animation: tin .22s ease;
}
@keyframes tin {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

.mt14 { margin-top: 14px; }
.mt18 { margin-top: 18px; }
.fw7  { font-weight: 700; }
.fw8  { font-weight: 800; }

.link { color: var(--brand-d); cursor: pointer; font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 2px; }

.tm   { color: var(--muted); }
.tr   { text-align: right !important; }
.tc   { text-align: center !important; }
.tok  { color: var(--green-d) !important; }
.trd  { color: var(--red-d) !important; }

/* Section box */
.sbox {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 12px;
}
.sbh {
  background: var(--surface2);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 1px solid var(--border);
}
.sbb { padding: 14px; }
.ag  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }

/* ══════════════════════════════════════
   P&L / FINANCIAL REPORT ROWS
══════════════════════════════════════ */
.pl-r {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
}
.pl-r span:last-child { font-weight: 700; color: var(--text); }
.pl-h {
  background: var(--surface2);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.pl-h span { color: var(--muted) !important; }
.pl-s { background: var(--surface2); font-weight: 700; }
.pl-t {
  background: var(--text);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.pl-t span { color: #fff !important; }
.pl-p { background: var(--green-bg); font-weight: 700; }
.pl-p span { color: var(--green-d) !important; }
.pl-l { background: var(--red-bg); font-weight: 700; }
.pl-l span { color: var(--red-d) !important; }
.pl-sec {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--surface);
}

.rc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.rch {
  padding: 12px 18px;
  font-weight: 700;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  background: var(--surface2);
}

/* Interactive table rows */
tbody tr { transition: background .12s; }
tbody tr:hover td { background: transparent !important; transition: background .1s; }
tbody tr:hover td .link { color: #1d4ed8; }
/* Clickable rows */
tbody tr[onclick] { cursor: pointer; }
tbody tr[onclick]:hover td { background: transparent !important; }
tbody tr:nth-child(even) td { background: transparent; }
tbody tr:nth-child(even):hover td { background: transparent !important; }
/* Bottom border accent on last visible th */
thead tr { border-bottom: 2px solid rgba(62,208,197,.5); }

/* Animated stat cards */
.stat-card {
  transition: box-shadow .18s, transform .18s, border-left-color .18s;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

/* Product P&L specific */
.ppnl-bar-fill {
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════
   STATUS STEPPER
══════════════════════════════════════ */
.stepper { display:flex; align-items:center; gap:0; padding:6px 0; overflow-x:auto; }

/* Track connector */
.step { display:flex; flex-direction:column; align-items:center; flex:1; min-width:72px; position:relative; }
.step:not(:last-child)::after {
  content:''; position:absolute;
  left:50%; top:16px;
  width:100%; height:3px;
  background:#e2e8f0;
  z-index:0;
  transition:background .25s;
}
.step.done::after  { background: var(--brand); }

/* Dot */
.step-dot {
  width:32px; height:32px;
  border-radius:50%;
  border:2.5px solid #e2e8f0;
  background:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:700;
  z-index:1; position:relative;
  transition:all .2s;
  color:#94a3b8;
  box-shadow:0 1px 3px rgba(15,23,42,.1);
}
#content {
  flex: 1;
  padding: 30px 24px;
  min-height: calc(100vh - 52px);
  margin-top: 52px;
  position: relative;
  z-index: 10;
  transition: all 0.3s;
}
.step.done    .step-dot {
  border-color:var(--brand);
  background:var(--brand);
  color:#fff;
  box-shadow:0 2px 6px rgba(var(--brand-rgb),.35);
}
.step.current .step-dot {
  border-color:var(--brand);
  background:var(--brand);
  color:#fff;
  box-shadow:0 0 0 5px rgba(30,58,138,.18), 0 2px 8px rgba(var(--brand-rgb),.4);
  transform:scale(1.12);
}
.step.clickable:hover .step-dot {
  border-color:var(--brand);
  background:var(--brand-light);
  color:var(--brand-d);
  transform:scale(1.08);
}

/* Label */
.step-lbl {
  font-size:9.5px; margin-top:6px;
  font-weight:500; color:#94a3b8;
  text-align:center; white-space:nowrap;
  transition:color .2s;
}
.step.current .step-lbl { color:var(--brand-d); font-weight:800; font-size:10px; }
.step.done    .step-lbl { color:var(--brand-d); font-weight:600; }

/* ══════════════════════════════════════
   SHIPMENT INFO BANNERS
══════════════════════════════════════ */
.ship-info {
  padding: 9px 14px;
  border-radius: var(--r);
  font-size: 12.5px;
  margin-top: 8px;
  border: 1px solid;
  font-weight: 500;
}
.ship-ok     { background: var(--green-bg); border-color: #b3f0d4; color: var(--green-d); }
.ship-short  { background: var(--amber-bg); border-color: #ffd580; color: var(--amber-d); }
.ship-excess { background: var(--blue-bg);  border-color: #b3ccf5; color: var(--blue-d); }

/* ══════════════════════════════════════
   PAID RIBBON  (single, no dup)
══════════════════════════════════════ */
.ribbon-wrap { position: relative; overflow: hidden; }
.ribbon {
  position: absolute;
  top: 20px; right: -36px;
  width: 140px;
  text-align: center;
  background: var(--green);
  color: #fff;
  font-size: 11px; font-weight: 900;
  padding: 6px 0;
  transform: rotate(35deg);
  letter-spacing: .15em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 5;
  pointer-events: none;
}
.ribbon.red { background: var(--red); }

/* ══════════════════════════════════════
   PDF FULLSCREEN
══════════════════════════════════════ */
/* PDF opens in new tab — no overlay CSS needed */

/* ══════════════════════════════════════
   SCROLLBARS
══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }


/* ══════════════════════════════════════════════════════════════
   EMBOSS V29+  —  ULTRA PREMIUM UI  "Obsidian & Teal"
   Luxury fintech / enterprise SaaS aesthetic
══════════════════════════════════════════════════════════════ */

/* ── Google Font: DM Sans for headings / Sora for labels ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ═════════════════════════════════════════════
   TABLE DESIGN — Card Rows + Status Color Rows
   Each row = raised mini-card, bg tinted by status
═════════════════════════════════════════════ */

/* Wrapper — no outer border, just breathing room */
.tw {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

/* Table reset */
.tw table { width:100%; border-collapse:separate; border-spacing:0 5px; }

/* ── Header ── */
.tw table thead th {
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #94a3b8;
  background: transparent;
  border: none;
  white-space: nowrap;
}
.tw table thead th:first-child { padding-left: 16px; }

/* ── Body rows — the card ── */
.tw table tbody tr {
  background: var(--row-bg, var(--surface));
  box-shadow: 0 1px 3px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.04);
  border-radius: 8px;
  transition: box-shadow .15s, transform .1s;
  cursor: default;
}
.tw table tbody tr:hover {
  box-shadow: 0 4px 12px rgba(15,23,42,.12), 0 1px 4px rgba(15,23,42,.08);
  transform: translateY(-1px);
}

/* ── Cells ── */
.tw table tbody td {
  padding: 11px 14px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 12.5px;
  color: var(--text);
  vertical-align: middle;
  border-top: 1px solid rgba(0,0,0,.05) !important;
  border-bottom: 1px solid rgba(0,0,0,.05) !important;
  border-left: none !important;
  border-right: none !important;
  white-space: nowrap;
  background: transparent !important;
}
.tw table tbody td:first-child {
  padding-left: 16px !important;
  border-left: 3px solid var(--row-accent, #cbd5e1) !important;
  border-radius: 8px 0 0 8px;
}
.tw table tbody td:last-child {
  border-radius: 0 8px 8px 0;
  border-right: 3px solid var(--row-accent, #cbd5e1) !important;
}

/* ── Alignment ── */
.tw table td.tr, .tw table th.tr { text-align:right !important; }
.tw table td.tc, .tw table th.tc { text-align:center !important; }

/* ── Fade action buttons ── */
.row-actions { opacity:0; transition:opacity .15s; }
.tw table tbody tr:hover .row-actions { opacity:1; }

/* ══════════════════════════════════════
   PREMIUM FORM BANNERS  (V29+)
══════════════════════════════════════ */
.pf-banner {
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 110px;
}
/* Animated diagonal pattern overlay */
.pf-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -55deg,
      rgba(255,255,255,.03) 0px,
      rgba(255,255,255,.03) 1px,
      transparent 1px,
      transparent 32px
    );
  pointer-events: none;
  z-index: 0;
}
/* Glowing top-right orb */
.pf-banner::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.pf-banner-left { position: relative; z-index: 1; }
.pf-banner-right { position: relative; z-index: 1; text-align: right; }
.pf-banner-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 5px;
  font-family: 'Inter', sans-serif;
}
.pf-banner-title {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -.5px;
  font-family: 'Inter', sans-serif;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.pf-banner-sub {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  margin-top: 7px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pf-banner-sub-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  display: inline-block;
}
.pf-banner-svg {
  position: absolute;
  right: -16px;
  top: -16px;
  opacity: .08;
  pointer-events: none;
  z-index: 0;
}
/* Stat box in banner right */
.pf-banner-stat {
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 12px 18px;
  text-align: right;
  min-width: 140px;
}
.pf-banner-stat-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255,255,255,.45);
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}
.pf-banner-stat-value {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  font-family: 'Inter', sans-serif;
}
.pf-banner-stat-sub {
  font-size: 10px;
  color: rgba(255,255,255,.35);
  margin-top: 3px;
}
/* Status pills in banner */
.pf-banner-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}
.pf-banner-pill {
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  font-family: 'Inter', sans-serif;
}
.pf-banner-pill.active { background: rgba(255,255,255,.92); }
.pf-banner-pill.inactive { background: rgba(255,255,255,.1); color: rgba(255,255,255,.55); }

/* ── Form section dividers ── */
.pf-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
}
.pf-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.pf-section-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.pf-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border2) 0%, transparent 100%);
}

/* ── Premium input fields (V29+) ── */
.mb input, .mb select, .mb textarea {
  border: 1.5px solid var(--border2);
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 13.5px;
  transition: border .15s, box-shadow .15s, background .15s;
  background: var(--surface);
}
.mb input:focus, .mb select:focus, .mb textarea:focus {
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30,58,138,.12), 0 2px 8px rgba(30,58,138,.08);
  background: #fff;
  outline: none;
}
.mb label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--text2);
}

/* ── Form line-item table (inside modals) upgraded ── */
.lt {
  border-radius: 10px;
  overflow: hidden;
}
.lt thead tr {
  background: linear-gradient(135deg, #0e1e38 0%, #162844 100%);
}
.lt th {
  background: transparent !important;
  color: rgba(255,255,255,.6) !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  padding: 12px 10px !important;
  text-transform: uppercase !important;
  border: none !important;
  font-family: 'Inter', sans-serif !important;
}
.lt td {
  padding: 4px 5px !important;
  border-bottom: 1px solid var(--border) !important;
  border-top: none !important; border-left: none !important; border-right: none !important;
  background: var(--surface) !important;
  vertical-align: middle !important;
}
.lt tbody tr:nth-child(even) td { background: transparent !important; }
.lt tbody tr:hover td { background: transparent !important; }
.lt input, .lt select {
  border: none !important;
  background: transparent !important;
  padding: 5px 7px !important;
  font-size: 13px !important;
  border-radius: 0 !important;
}
.lt input:focus, .lt select:focus {
  background: rgba(30,58,138,.08) !important;
  border-radius: 5px !important;
  outline: 1px solid #1e3a8a !important;
  box-shadow: none !important;
}

/* ── Add-line button (V29+) ── */
.tabs {
  display: flex; gap: 1px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 2px;
}
.tab {
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all .2s;
}
.tab:hover { color: var(--text); background: var(--surface2); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.btn-add-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1.5px dashed var(--border2);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s;
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
}
.btn-add-line:hover {
  border-color: #2bd7bf;
  color: var(--brand-d);
  background: rgba(43,215,191,.06);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(43,215,191,.12);
}
.btn-add-line svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Info pill ── */
.info-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 14px;
}
.info-pill-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}

/* ── Modal header upgrade ── */
.mh { border-bottom: 2px solid #0a1628; }
.mt { font-family: 'Inter', sans-serif; font-size: 15px; letter-spacing: -.2px; }

/* ── Premium total display in forms ── */
.pf-total-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  letter-spacing: -.3px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  transition: all .2s;
}

/* ── Field group card ── */
.fg-group {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

/* ── Line items wrapper ── */
.li-wrapper {
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 12px rgba(9,30,66,.06);
}

/* ── Line items footer gradient ── */
.li-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 18px;
  border-radius: 0 0 12px 12px;
}
.li-footer-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.5);
  font-family: 'Inter', sans-serif;
}
.li-footer-value {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  font-family: 'Inter', sans-serif;
  letter-spacing: -.4px;
}

/* ── Button bar (modal footer) upgrade ── */
.mf .btn-primary {
  background: linear-gradient(135deg, #2bd7bf 0%, #0ea5e9 100%);
  border: none;
  color: #0a1628;
  font-weight: 800;
  letter-spacing: -.1px;
  box-shadow: 0 4px 14px rgba(43,215,191,.35);
  transition: all .18s;
  font-family: 'Inter', sans-serif;
}
.mf .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(43,215,191,.5);
  filter: brightness(1.05);
}

@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%  { opacity:.6; transform:scale(1.3); }
}

/* ── DASHBOARD REDESIGN ─────────────────────────────────── */
.dash-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.dash-greeting { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.dash-date { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.dash-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-qa-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--text2); transition: all .15s;
}
.dash-qa-btn:hover { border-color: #f59e0b; color: #d97706; background: #fffbeb; }
.dash-qa-btn i { font-size: 12px; }

.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 20px;
}
.kpi-card {
  border-radius: 16px; padding: 22px 20px 18px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.12), 0 0 0 1px rgba(255,255,255,.08) inset;
  cursor: default;
  transition: transform .18s, box-shadow .18s;
}
.kpi-card::before, .stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(350px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(255, 255, 255, 0.08), transparent 80%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s;
}
.kpi-card:hover::before, .stat-card:hover::before {
  opacity: 1;
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,.28), 0 4px 12px rgba(0,0,0,.15), 0 0 0 1px rgba(255,255,255,.1) inset;
}
.kpi-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.7); margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}
.kpi-value {
  font-size: 28px; font-weight: 900; color: #fff;
  letter-spacing: -1.5px; line-height: 1; margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.kpi-sub { font-size: 11.5px; color: rgba(255,255,255,.6); }
.kpi-icon {
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: rgba(255,255,255,.9);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  backdrop-filter: blur(4px);
}
.kpi-bar-wrap {
  margin-top: 14px; height: 3px;
  background: rgba(255,255,255,.18); border-radius: 2px; overflow: hidden;
}
.kpi-bar { height: 100%; border-radius: 2px; background: rgba(255,255,255,.75); }
.kpi-trend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; padding: 2px 7px;
  border-radius: 20px; background: rgba(255,255,255,.15); color: rgba(255,255,255,.85);
  margin-top: 6px;
}

.dash-row { display: grid; gap: 14px; margin-bottom: 14px; }
.dash-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.dash-row.cols-2 { grid-template-columns: 1.4fr 1fr; }
.dash-row.cols-2b { grid-template-columns: 1fr 1.4fr; }

.mini-stat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.mini-stat:last-child { border-bottom: none; }
.mini-stat-label { font-size: 12.5px; color: var(--text2); display: flex; align-items: center; gap: 7px; }
.mini-stat-dot { width: 7px; height: 7px; border-radius: 50%; }
.mini-stat-value { font-size: 13px; font-weight: 800; color: var(--text); }

.activity-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.activity-text { font-size: 12px; color: var(--text2); line-height: 1.5; }
.activity-time { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.top-cust-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.top-cust-row:last-child { border-bottom: none; }
.top-cust-rank {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--surface2); font-size: 10px; font-weight: 800;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
}
.top-cust-name { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--text); }
.top-cust-bar-wrap {
  flex: 2; height: 5px; background: var(--surface3); border-radius: 3px; overflow: hidden;
}
.top-cust-bar { height: 100%; border-radius: 3px; background: #f59e0b; }
.top-cust-val { font-size: 12px; font-weight: 800; color: var(--text); min-width: 70px; text-align: right; }

/* ── DASHBOARD REDESIGN ─────────────────────────────────── */
.dash-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 24px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.dash-greeting { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.dash-date { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.dash-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-qa-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--text2); transition: all .15s;
}
.dash-qa-btn:hover { border-color: #f59e0b; color: #d97706; background: #fffbeb; }
.dash-qa-btn i { font-size: 12px; }

.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 18px;
}
.kpi-card {
  border-radius: 14px; padding: 20px 20px 16px;
  position: relative; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  cursor: default;
}
.kpi-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.6); margin-bottom: 8px;
}
.kpi-value {
  font-size: 26px; font-weight: 900; color: #fff;
  letter-spacing: -1px; line-height: 1; margin-bottom: 6px;
}
.kpi-sub { font-size: 11.5px; color: rgba(255,255,255,.55); }
.kpi-icon {
  position: absolute; right: 16px; top: 16px;
  font-size: 22px; opacity: .18;
}
.kpi-bar-wrap {
  margin-top: 12px; height: 3px;
  background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden;
}
.kpi-bar { height: 100%; border-radius: 2px; background: rgba(255,255,255,.7); }
.kpi-trend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; padding: 2px 7px;
  border-radius: 20px; background: rgba(255,255,255,.15); color: rgba(255,255,255,.85);
  margin-top: 6px;
}

.dash-row { display: grid; gap: 14px; margin-bottom: 14px; }
.dash-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.dash-row.cols-2 { grid-template-columns: 1.4fr 1fr; }
.dash-row.cols-2b { grid-template-columns: 1fr 1.4fr; }

.mini-stat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.mini-stat:last-child { border-bottom: none; }
.mini-stat-label { font-size: 12.5px; color: var(--text2); display: flex; align-items: center; gap: 7px; }
.mini-stat-dot { width: 7px; height: 7px; border-radius: 50%; }
.mini-stat-value { font-size: 13px; font-weight: 800; color: var(--text); }

.activity-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.activity-text { font-size: 12px; color: var(--text2); line-height: 1.5; }
.activity-time { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.top-cust-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.top-cust-row:last-child { border-bottom: none; }
.top-cust-rank {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--surface2); font-size: 10px; font-weight: 800;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
}
.top-cust-name { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--text); }
.top-cust-bar-wrap {
  flex: 2; height: 5px; background: var(--surface3); border-radius: 3px; overflow: hidden;
}
.top-cust-bar { height: 100%; border-radius: 3px; background: #f59e0b; }
.top-cust-val { font-size: 12px; font-weight: 800; color: var(--text); min-width: 70px; text-align: right; }

/* ════ LOGIN ═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500;600&display=swap');
#login-screen{position:fixed;inset:0;z-index:99999;display:flex;font-family:'DM Sans',sans-serif;background:#0f172a}
#login-screen.hidden{display:none!important}
.lp-form-panel{width:480px;flex-shrink:0;display:flex;flex-direction:column;justify-content:center;padding:64px 56px;background:#ffffff;position:relative;z-index:2;box-shadow:8px 0 48px rgba(0,0,0,.18)}
.lp-logo-wrap{display:flex;align-items:center;gap:14px;margin-bottom:48px}
.lp-logo-img{width:46px;height:46px;border-radius:10px;object-fit:contain;box-shadow:0 2px 12px rgba(0,0,0,.12)}
.lp-logo-name{font-family:'Playfair Display',serif;font-size:19px;font-weight:700;color:#0f172a}
.lp-logo-sys{font-size:10.5px;font-weight:500;color:#94a3b8;letter-spacing:.1em;text-transform:uppercase;margin-top:1px}
.lp-form-title{font-family:'Playfair Display',serif;font-size:32px;font-weight:700;color:#0f172a;letter-spacing:-.6px;line-height:1.15;margin-bottom:6px}
.lp-form-title em{font-style:italic;color:#d97706}
.lp-form-sub{font-size:13px;color:#94a3b8;margin-bottom:36px;line-height:1.6}
.lp-field{margin-bottom:20px;position:relative}
.lp-field label{display:block;font-size:11px;font-weight:600;color:#475569;letter-spacing:.09em;text-transform:uppercase;margin-bottom:8px}
.lp-field input{width:100%;padding:13px 44px 13px 16px;background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:10px;color:#0f172a;font-size:15px;font-family:'DM Sans',sans-serif;outline:none;transition:all .2s;box-sizing:border-box}
.lp-field input:focus{border-color:#f59e0b;background:#fffbeb;box-shadow:0 0 0 3px rgba(245,158,11,.12)}
.lp-field input::placeholder{color:#cbd5e1}
.lp-eye{position:absolute;right:15px;top:38px;cursor:pointer;color:#cbd5e1;font-size:14px;transition:color .2s}
.lp-eye:hover{color:#d97706}
.lp-btn{width:100%;padding:14px;background:#0f172a;border:none;border-radius:10px;color:#fff;font-size:14px;font-weight:600;cursor:pointer;font-family:'DM Sans',sans-serif;box-shadow:0 4px 20px rgba(15,23,42,.2);transition:all .2s;display:flex;align-items:center;justify-content:center;gap:10px;position:relative;overflow:hidden;margin-bottom:0}
.lp-btn::after{content:'';position:absolute;bottom:0;left:20%;right:20%;height:2px;background:linear-gradient(90deg,transparent,#f59e0b,transparent);opacity:.7}
.lp-btn:hover{background:#1e293b;transform:translateY(-1px)}
.lp-err{display:none;margin-top:12px;padding:10px 14px;background:#fef2f2;border:1px solid #fecaca;border-radius:8px;font-size:12.5px;color:#dc2626;text-align:center}
.lp-err.show{display:block;animation:lpShake .35s ease}
@keyframes lpShake{0%,100%{transform:translateX(0)}20%{transform:translateX(-6px)}60%{transform:translateX(6px)}}
.lp-hint{margin-top:10px;font-size:11px;color:#94a3b8;text-align:center}
.lp-footer{position:absolute;bottom:28px;left:52px;right:52px;display:flex;justify-content:space-between}
.lp-footer-txt{font-size:11px;color:#cbd5e1}
.lp-ver{font-size:11px;color:#f59e0b;font-weight:600}
.lp-visual{flex:1;position:relative;overflow:hidden;background:linear-gradient(145deg,#1a1a2e 0%,#0f172a 50%,#1e1b4b 100%)}
.lp-visual-inner{position:absolute;inset:0;background:radial-gradient(ellipse 65% 55% at 75% 15%,rgba(251,191,36,.22) 0%,transparent 60%),radial-gradient(ellipse 55% 60% at 20% 85%,rgba(99,102,241,.18) 0%,transparent 55%)}
.lp-grid{position:absolute;inset:0;background-image:radial-gradient(circle,rgba(245,158,11,.35) 1.5px,transparent 1.5px);background-size:32px 32px;opacity:.5}
.lp-big-e{position:absolute;font-family:'Playfair Display',serif;font-size:520px;font-weight:900;font-style:italic;color:transparent;-webkit-text-stroke:2px rgba(245,158,11,.25);top:50%;left:50%;transform:translate(-46%,-52%);line-height:1;pointer-events:none;user-select:none}
.lp-headline{position:absolute;top:52px;left:52px;right:52px}
.lp-tag{display:inline-flex;align-items:center;gap:7px;padding:5px 13px;background:rgba(245,158,11,.15);border:1px solid rgba(245,158,11,.4);border-radius:20px;font-size:10.5px;font-weight:600;color:#fbbf24;letter-spacing:.1em;text-transform:uppercase;margin-bottom:20px}
.lp-tag-dot{width:6px;height:6px;border-radius:50%;background:#f59e0b;animation:lpPulse 2s ease-in-out infinite}
@keyframes lpPulse{0%,100%{opacity:1}50%{opacity:.35}}
.lp-h1{font-family:'Playfair Display',serif;font-size:50px;font-weight:900;line-height:1.08;letter-spacing:-1.5px;color:#f8fafc;margin-bottom:14px}
.lp-h1 em{font-style:italic;color:#fbbf24}
.lp-desc{font-size:14px;color:#94a3b8;line-height:1.75;max-width:380px}
.lp-vdiv{position:absolute;top:0;bottom:0;left:0;width:1px;background:linear-gradient(to bottom,transparent 0%,rgba(245,158,11,.3) 20%,rgba(245,158,11,.3) 80%,transparent 100%)}
.lp-cards{position:absolute;bottom:48px;left:48px;right:48px;display:flex;gap:12px}
.lp-stat-card{flex:1;padding:16px 18px;background:rgba(255,255,255,.08);border:1px solid rgba(245,158,11,.25);border-radius:14px;backdrop-filter:blur(16px);box-shadow:0 4px 24px rgba(0,0,0,.25)}
.lp-stat-dot{width:7px;height:7px;border-radius:50%;background:#f59e0b;margin-bottom:8px;box-shadow:0 0 0 3px rgba(245,158,11,.25)}
.lp-stat-val{font-family:'Playfair Display',serif;font-size:22px;font-weight:700;color:#f8fafc;line-height:1;margin-bottom:3px}
.lp-stat-lbl{font-size:10px;font-weight:600;color:#94a3b8;text-transform:uppercase;letter-spacing:.1em}
@media(max-width:900px){.lp-visual{display:none!important}.lp-form-panel{width:100%}}
/* ════════════════════════════════════════════════════════════════ */

/* 🔦 OBSIDIAN SPOTLIGHT SEARCH */
#global-search-container { position: static; } /* Unset relative to allow full-screen overlay */

.spotlight-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 100px;
  animation: spotlight-fade 0.3s ease;
}
@keyframes spotlight-fade {
  from { opacity: 0; } to { opacity: 1; }
}
.spotlight-overlay.active { display: flex; }

.spotlight-card {
  width: 720px; max-width: 94%;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  box-shadow: 0 50px 150px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  overflow: hidden;
  animation: spotlight-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes spotlight-pop {
  0% { transform: scale(0.92) translateY(-20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.spotlight-search-header {
  display: flex; align-items: center; padding: 28px 32px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.spotlight-input {
  background: transparent !important; border: none !important; outline: none !important;
  color: #ffffff !important; font-size: 24px; font-weight: 700; width: 100%;
  margin-left: 20px; letter-spacing: -0.5px;
}
.spotlight-input::placeholder { color: rgba(255,255,255,0.2); }

.spotlight-kbd-hint {
  display: flex; align-items: center; gap: 8px;
  position: absolute; bottom: 24px; right: 32px;
  font-size: 11px; font-weight: 800; color: #475569;
  letter-spacing: 0.05em; pointer-events: none;
}
.spotlight-kbd-key {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px; border-radius: 6px; color: #cbd5e1;
}

.spotlight-results {
  max-height: 500px; overflow-y: auto; padding: 12px;
}
.spotlight-group { margin-bottom: 20px; }
.spotlight-group-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  color: #94a3b8; letter-spacing: 0.15em; margin: 16px 20px 10px;
}

.spotlight-item {
  display: flex; align-items: center; padding: 16px 20px; border-radius: 20px;
  cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 6px; border: 1px solid transparent;
}
.spotlight-item:hover, .spotlight-item.selected {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(43, 215, 191, 0.3);
  transform: scale(1.015);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.spotlight-item-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-right: 20px; font-size: 22px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.spotlight-item-label { font-size: 17px; font-weight: 700; color: #ffffff; line-height: 1.2; }
.spotlight-item-meta { font-size: 12.5px; color: #94a3b8; margin-top: 4px; font-weight: 500; }
.spotlight-item-badge {
  margin-left: auto; font-size: 10px; font-weight: 800;
  background: rgba(255, 255, 255, 0.12); color: #cbd5e1;
  padding: 4px 12px; border-radius: 20px; text-transform: uppercase;
}

/* Modal Facelift */
.modal-overlay {
  background: rgba(15, 23, 42, 0.3) !important;
  backdrop-filter: blur(8px) !important;
}
.modal {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(30px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(30px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2) !important;
}
.modal-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}

/* BUTTONS ALREADY UPDATED IN TOPBAR SECTION */

/* Premium Pulse for NEW features */
@keyframes pulse-teal {
  0% { box-shadow: 0 0 0 0 rgba(43, 215, 191, 0.4); transform: scale(1); }
  70% { box-shadow: 0 0 0 10px rgba(43, 215, 191, 0); transform: scale(1.05); }
  100% { box-shadow: 0 0 0 0 rgba(43, 215, 191, 0); transform: scale(1); }
}
.pulse-teal { animation: pulse-teal 2s infinite; }

/* Liquid Staggered Dropdown Entry */
@keyframes stagger-slide-down {
  0% { opacity: 0; transform: translateY(-10px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.tn-drop-item { animation: stagger-slide-down 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
.tn-drop-item:nth-child(1) { animation-delay: 0.05s; }
.tn-drop-item:nth-child(2) { animation-delay: 0.10s; }
.tn-drop-item:nth-child(3) { animation-delay: 0.15s; }
.tn-drop-item:nth-child(4) { animation-delay: 0.20s; }
.tn-drop-item:nth-child(5) { animation-delay: 0.25s; }
.tn-drop-item:nth-child(6) { animation-delay: 0.30s; }
.tn-drop-item:nth-child(7) { animation-delay: 0.35s; }

/* Modal Micro-Bounce */
@keyframes modal-bounce {
  0% { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.modal.open { animation: modal-bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important; }

/* ═══════════════ SMART PARSER UI ═══════════════ */
.parser-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(12px);
  z-index: 3000; display: none; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
.parser-overlay.active { display: flex; }
.parser-card {
  background: rgba(255, 255, 255, 0.95); width: 90%; max-width: 700px;
  border-radius: 20px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  overflow: hidden; display: flex; flex-direction: column;
}
.parser-header {
  padding: 24px; background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff; display: flex; justify-content: space-between; align-items: center;
}
.parser-dropzone {
  margin: 24px; padding: 48px; border: 2px dashed #e2e8f0;
  border-radius: 16px; text-align: center; cursor: pointer;
  transition: all 0.2s ease; background: #f8fafc;
}
.parser-dropzone:hover { border-color: #3b82f6; background: #eff6ff; }
.parser-dropzone i { font-size: 40px; color: #94a3b8; margin-bottom: 16px; }

.parser-preview {
  padding: 24px; max-height: 400px; overflow-y: auto; border-top: 1px solid #f1f5f9;
}
.parser-mapping-grid {
  display: grid; grid-template-columns: 120px 1fr; gap: 12px; margin-top: 16px;
}
.parser-field-label { font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; padding-top: 8px; }
.parser-field-input { 
  padding: 8px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px; 
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
}
.parser-field-input:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px; padding-bottom: 2px; }
.tab { padding: 10px 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; transition: all .2s; position: relative; }
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-count { background: #f1f5f9; color: #64748b; font-size: 10px; padding: 2px 6px; border-radius: 10px; margin-left: 6px; font-weight: 700; vertical-align: middle; }
.tab.active .tab-count { background: var(--brand-light); color: var(--brand); }

.f-num { font-family: 'Outfit', sans-serif !important; letter-spacing: 0.02em; font-weight: 600 !important; }

/* QUICK CHIPS FOR BROKER DESCRIPTIONS */
.badge-pill-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
}
.badge-pill-btn:hover {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}
.badge-pill-btn:active {
  transform: translateY(0);
}

