/* ===== GSD OS Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --orange: #FF5C00;
  --orange-hover: #E05200;
  --orange-light: #FFF3EE;
  --dark: #1A1A1A;
  --dark-2: #2A2A2A;
  --body: #2D2D2D;
  --secondary: #888888;
  --muted: #AAAAAA;
  --bg: #F5F5F5;
  --card: #FFFFFF;
  --border: #E8E8E8;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --sidebar-w: 240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--body); display: flex; flex-direction: column; }

/* ===== SIDEBAR ===== */
.app-layout { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--dark);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  z-index: 50;
}

.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid #2A2A2A;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--orange);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  letter-spacing: 0;
  line-height: 1;
  flex-shrink: 0;
}
.sidebar-logo-text { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 18px; color: #fff; letter-spacing: 1px; }
.sidebar-logo-text span { color: var(--orange); }
.sidebar-logo-img { height: 32px; width: auto; object-fit: contain; flex-shrink: 0; }

.sidebar-section { padding: 20px 0 4px; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0 16px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  cursor: pointer;
  color: #999;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  position: relative;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: #2A2A2A; color: #fff; }
.nav-item.active {
  background: rgba(255,92,0,0.1);
  color: var(--orange);
  border-left-color: var(--orange);
}
.nav-item.active .nav-icon { color: var(--orange); }
.nav-icon { font-size: 16px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-item.coming-soon { opacity: 0.45; cursor: default; }
.nav-item.coming-soon:hover { background: transparent; color: #999; }
.nav-lock { font-size: 11px; margin-left: auto; color: #555; }

.sidebar-divider { height: 1px; background: #2A2A2A; margin: 8px 16px; }

.sidebar-bottom {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid #2A2A2A;
}
.g-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 12px;
  color: #888;
}
.g-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-green 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-green {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}
.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: #fff; }
.user-role { font-size: 11px; color: #666; }
.settings-btn { margin-left: auto; color: #666; font-size: 16px; cursor: pointer; }

/* ===== MAIN AREA ===== */
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ===== TOP BAR ===== */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.topbar-left {}
.topbar-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--body);
  line-height: 1;
}
.topbar-breadcrumb { font-size: 11px; color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--secondary);
  cursor: pointer;
  min-width: 200px;
}
.search-bar kbd {
  background: var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: 'Inter', sans-serif;
  color: var(--muted);
  margin-left: auto;
}

.icon-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--secondary);
  position: relative;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--bg); }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--danger);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ask-g-btn {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  font-family: 'Inter', sans-serif;
}
.ask-g-btn:hover { background: var(--orange-hover); }

/* ===== CONTENT ===== */
.content { flex: 1; overflow-y: auto; padding: 28px; background: var(--bg); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; font-family: 'Inter', sans-serif; transition: all 0.15s; white-space: nowrap; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-hover); }
.btn-secondary { background: #fff; color: var(--body); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--body); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 4px; }

/* ===== CARDS ===== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.card-pad { padding: 20px; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; border-radius: 100px; padding: 3px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.badge-green { background: #DCFCE7; color: #15803D; }
.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-blue { background: #DBEAFE; color: #1D4ED8; }
.badge-grey { background: #F3F4F6; color: #6B7280; }
.badge-orange { background: var(--orange-light); color: var(--orange); }

/* ===== INPUTS ===== */
.input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--body);
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,92,0,0.1); }
.input::placeholder { color: var(--muted); }

.form-label { font-size: 12px; font-weight: 600; color: var(--body); margin-bottom: 5px; display: block; }
.form-label .req { color: var(--orange); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab { padding: 10px 20px; font-size: 13px; font-weight: 500; color: var(--secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.15s; white-space: nowrap; }
.tab:hover { color: var(--body); }
.tab.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 600; }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 600; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--body); vertical-align: middle; }
.data-table tr:hover td { background: var(--orange-light); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== AVATAR ===== */
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 40px; height: 40px; font-size: 15px; }
.avatar-xl { width: 56px; height: 56px; font-size: 20px; }

/* ===== PROGRESS BAR ===== */
.progress-bar { height: 6px; background: var(--border); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--orange); border-radius: 100px; }
.progress-fill.green { background: var(--success); }

/* ===== DRAWER ===== */
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  height: 100vh;
  background: var(--card);
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
}
.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; }
.drawer-close { width: 32px; height: 32px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; color: var(--secondary); }

/* ===== FAB ===== */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,92,0,0.4);
  z-index: 100;
  transition: all 0.2s;
}
.fab:hover { background: var(--orange-hover); transform: scale(1.05); }

/* ===== TOAST ===== */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.1); min-width: 280px; font-size: 13px; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }

/* ===== SECTION HEADING ===== */
.section-title { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--body); }
.section-subtitle { font-size: 12px; color: var(--secondary); margin-top: 2px; }

/* ===== COMING SOON ===== */
.coming-soon-card {
  background: #F8F8F8;
  border: 1px dashed #D0D0D0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}
.coming-soon-card .cs-icon { font-size: 28px; margin-bottom: 8px; }
.coming-soon-card .cs-title { font-weight: 600; font-size: 14px; color: #999; margin-bottom: 4px; }
.coming-soon-card .cs-desc { font-size: 12px; color: var(--muted); margin-bottom: 12px; }

/* ===== BACK NAV ===== */
.back-nav { display: inline-flex; align-items: center; gap: 6px; color: var(--secondary); font-size: 12px; text-decoration: none; margin-bottom: 20px; padding: 6px 0; }
.back-nav:hover { color: var(--orange); }

/* ===== GRID UTILS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 20px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--muted); }
.text-secondary { color: var(--secondary); }
.text-orange { color: var(--orange); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-bold { font-weight: 700; }
.font-600 { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   MOBILE RESPONSIVE — GSHD OS
   Breakpoint: 768px
   ============================================================ */

/* ── Hamburger button ── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  margin-right: 10px;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--body);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── Sidebar overlay scrim ── */
.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 49;
}
.sidebar-scrim.visible { display: block; }

/* ── Table scroll wrapper ── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Bottom nav ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--dark);
  border-top: 1px solid #2A2A2A;
  z-index: 100;
  flex-direction: row;
  align-items: stretch;
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: #888;
  transition: color 0.15s;
  padding: 6px 0;
}
.mobile-nav-item.active { color: var(--orange); }
.mobile-nav-icon { font-size: 18px; line-height: 1; }
.mobile-nav-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

@media (max-width: 768px) {

  /* ── Show hamburger, bottom nav ── */
  .hamburger-btn { display: flex; }
  .mobile-bottom-nav { display: flex; }

  /* ── Body / html ── */
  html, body { overflow: auto; }

  /* ── App layout ── */
  .app-layout {
    flex-direction: column;
    height: 100%;
    min-height: 100vh;
    overflow: visible;
  }

  /* ── Sidebar — hidden off-screen by default, slides in ── */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 50;
    overflow-y: auto;
  }
  .sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }

  /* ── Main area fills screen ── */
  .main-area {
    width: 100%;
    min-height: 100vh;
    overflow: visible;
    padding-bottom: 64px; /* space for bottom nav */
  }

  /* ── Topbar ── */
  .topbar {
    padding: 0 16px;
    height: 54px;
    position: sticky;
    top: 0;
    z-index: 40;
  }
  .topbar-left { gap: 0; }
  .search-bar { display: none; }
  .icon-btn { width: 32px; height: 32px; font-size: 14px; }
  .ask-g-btn { padding: 7px 12px; font-size: 12px; }
  .topbar-breadcrumb { display: none; }

  /* ── Content ── */
  .content {
    padding: 16px;
    overflow-y: visible;
    min-height: calc(100vh - 54px - 60px);
  }

  /* ── Drawer — full-screen on mobile ── */
  .drawer {
    width: 100vw !important;
    left: 0;
    right: 0;
    top: 0;
    border-radius: 0;
  }

  /* ── Grid utils — collapse to 1 col ── */
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; gap: 12px; }

  /* ── Tabs — horizontal scroll ── */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 0;
    scrollbar-width: none;
    margin-bottom: 16px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; padding: 10px 14px; font-size: 12px; flex-shrink: 0; }

  /* ── Cards ── */
  .card-pad { padding: 14px; }

  /* ── Buttons ── */
  .btn { padding: 8px 12px; font-size: 12px; }
  .btn-sm { padding: 5px 9px; font-size: 11px; }

  /* ── Section title ── */
  .section-title { font-size: 14px; }

  /* ── KPI / stat grids ── */
  .kpi-grid,
  .stats-row,
  .metric-grid { grid-template-columns: 1fr 1fr !important; gap: 10px; }

  /* ── Toolbar (CRM/table filters) ── */
  .toolbar,
  .toolbar-left,
  .toolbar-right {
    flex-wrap: wrap;
    gap: 8px;
  }
  .toolbar-right { width: 100%; justify-content: flex-end; }

  /* ── Pipeline select + search input ── */
  .pipeline-select,
  .search-input { width: 100%; }

  /* ── View toggle (Kanban / List) ── */
  .view-toggle { margin-left: auto; }

  /* ── Kanban ── */
  .kanban-board {
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    gap: 12px;
    flex-wrap: nowrap !important;
  }
  .kanban-col {
    min-width: 260px !important;
    max-width: 260px !important;
    flex-shrink: 0;
  }

  /* ── Finance layout ── */
  .finance-layout {
    flex-direction: column !important;
    gap: 12px;
  }

  /* ── Files layout ── */
  .files-layout {
    flex-direction: column !important;
    height: auto !important;
    gap: 12px;
  }
  .files-sidebar {
    width: 100% !important;
    flex-shrink: unset;
  }
  .folder-tree {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    height: auto !important;
    border-radius: 8px;
    flex-direction: row;
    -webkit-overflow-scrolling: touch;
  }
  .folder-item {
    flex-shrink: 0;
    border-bottom: none !important;
    border-right: 1px solid #F5F5F5;
    white-space: nowrap;
  }
  .folder-item.active { border-left: none; border-bottom: 2px solid #FF5C00; }

  /* ── Documents 3-panel ── */
  .doc-layout { flex-direction: column !important; }
  .doc-sidebar { width: 100% !important; }
  .doc-preview { display: none; }

  /* ── Charts — smaller on mobile ── */
  canvas { max-height: 200px; }

  /* ── Subheader / action rows ── */
  .subheader,
  .action-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* ── Currency/date pills ── */
  .currency-pills,
  .date-pills {
    flex-wrap: wrap;
  }

  /* ── Login page ── */
  .login-card {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 24px 20px !important;
    border-radius: 0 !important;
    min-height: 100vh;
    box-shadow: none !important;
  }
  .login-logo { font-size: 24px !important; }

  /* ── Dashboard summary cards ── */
  .summary-grid { grid-template-columns: 1fr 1fr !important; }

  /* ── Chat page ── */
  .chat-layout { flex-direction: column !important; height: auto !important; }
  .chat-sidebar { display: none; }
  .chat-main { height: calc(100vh - 54px - 60px) !important; }

  /* ── Toast ── */
  .toast-container { left: 12px; right: 12px; top: 66px; }
  .toast { min-width: unset; width: 100%; }

  /* ── FAB — shift up above bottom nav ── */
  .fab { bottom: 76px; right: 16px; width: 48px; height: 48px; font-size: 20px; }

  /* ── Settings ── */
  .settings-layout { flex-direction: column !important; }
  .settings-sidebar { width: 100% !important; flex-direction: row; overflow-x: auto; }

  /* ── Project detail drawer content ── */
  .project-meta-grid { grid-template-columns: 1fr 1fr !important; }

  /* ── Agent cards grid ── */
  .agents-grid { grid-template-columns: 1fr !important; }

  /* ── Pagination ── */
  .pagination { flex-wrap: wrap; gap: 4px; }

  /* ── Inline edit tables ── */
  .data-table th:nth-child(n+4),
  .data-table td:nth-child(n+4) { 
    display: none; 
  }

  /* ── Show only key columns in recon table on mobile ── */
  .recon-table th:nth-child(2),
  .recon-table td:nth-child(2),
  .recon-table th:nth-child(5),
  .recon-table td:nth-child(5) { display: none; }

}

/* Tablet (769px–1024px) — minor tweaks only */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar { width: 200px; min-width: 200px; }
  :root { --sidebar-w: 200px; }
  .content { padding: 20px; }
  .grid-4 { grid-template-columns: 1fr 1fr; gap: 16px; }
  .topbar { padding: 0 20px; }
  .search-bar { min-width: 150px; }
}

/* ── Additional targeted mobile fixes ── */
@media (max-width: 768px) {

  /* Finance sidebar stacks vertically */
  .finance-sidebar {
    width: 100% !important;
    flex-shrink: unset !important;
  }

  /* Login — full screen clean form */
  .login-wrap {
    flex-direction: column !important;
    height: auto !important;
    min-height: 100vh;
  }
  .login-left { display: none !important; } /* hide brand panel on mobile */
  .login-right {
    flex: 1;
    width: 100% !important;
    padding: 24px 20px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .login-box {
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  /* Agent cards — single column */
  .agent-grid,
  .agents-grid,
  div[style*="grid-template-columns"]:has(.agent-card) {
    grid-template-columns: 1fr !important;
  }

  /* Topbar title smaller on very small screens */
  @media (max-width: 375px) {
    .topbar-title { font-size: 16px; }
    .ask-g-btn span:last-child { display: none; }
  }

  /* Hide "ask g" text, keep icon on small */
  .ask-g-btn { padding: 7px 10px; }

  /* Toolbar inline-flex → wrap */
  div.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
  div.toolbar > * { flex-shrink: 0; }

  /* Section padding reduction */
  .section-header,
  .page-header { flex-wrap: wrap; gap: 8px; }

  /* Subheader date pills wrap */
  .subheader { flex-wrap: wrap; }
}
