/* ─── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&family=Cormorant+Garamond:ital,wght@0,400;1,400&display=swap');

/* ─── CSS Variables ────────────────────────────────────────────────────────── */
:root {
  --bg: #0A0A0B;
  --surface: #111114;
  --surface-raised: #18181C;
  --border-subtle: rgba(255,255,255,0.06);
  --border-active: rgba(255,255,255,0.12);
  --cobalt: #1B3A6B;
  --cobalt-light: #3A6BAF;
  --cobalt-glow: rgba(27,58,107,0.15);
  --sand: #EDE8DE;
  --muted: #6B6B7A;
  --very-muted: #3A3A45;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --sidebar-width: 220px;
}

/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--sand);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cobalt-light); text-decoration: none; }
a:hover { color: var(--sand); }

/* ─── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-raised); }
::-webkit-scrollbar-thumb { background: var(--very-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─── Typography ────────────────────────────────────────────────────────────── */
.serif { font-family: 'Cormorant Garamond', Georgia, serif; }
.serif-italic { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; }

h1, h2, h3, h4 { font-weight: 400; color: var(--sand); }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

p { color: var(--muted); font-size: 13px; line-height: 1.7; }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ─── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: #0D0D10;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 28px 20px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo .logo-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  color: var(--sand);
  letter-spacing: -0.5px;
}

.sidebar-logo .logo-text .dot { color: var(--cobalt-light); }

.sidebar-logo .logo-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
  display: block;
}

.sidebar-nav {
  padding: 12px 0;
  flex: 1;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
  user-select: none;
}

.sidebar-nav-item:hover {
  background: var(--surface-raised);
  color: var(--sand);
}

.sidebar-nav-item.active {
  border-left-color: var(--cobalt);
  background: rgba(27,58,107,0.12);
  color: var(--cobalt-light);
}

.sidebar-nav-item svg, .sidebar-nav-item .nav-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-nav-item.active svg, .sidebar-nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-user-name {
  font-size: 12px;
  color: var(--sand);
  font-weight: 400;
  display: block;
  margin-bottom: 2px;
}

.sidebar-user-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.sidebar-signout {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
}

.sidebar-signout:hover { color: var(--danger); }

/* ─── Main Content ──────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 32px 40px;
  min-height: 100vh;
  flex: 1;
}

/* ─── Page Header ───────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-header-left h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  color: var(--sand);
}

.page-header-left p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.page-header-right { display: flex; align-items: center; gap: 12px; }

/* ─── Top Bar ───────────────────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.top-bar-left .business-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  color: var(--sand);
}

.top-bar-left .date-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.top-bar-right { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--cobalt);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--sand);
  cursor: pointer;
}

.bell-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
}

.bell-btn:hover { border-color: var(--border-active); color: var(--sand); }

/* ─── Page Sections ─────────────────────────────────────────────────────────── */
.page-section { display: none; }
.page-section.active { display: block; }

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.card-body { padding: 24px; }

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 13px;
  font-weight: 400;
  color: var(--sand);
}

/* ─── Stat Cards ────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
}

.stat-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  color: var(--sand);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 300;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.stat-sub {
  font-size: 11px;
  color: var(--very-muted);
  margin-top: 6px;
}

.stat-icon {
  font-size: 20px;
  margin-bottom: 12px;
  opacity: 0.6;
}

/* ─── Grids ─────────────────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--cobalt);
  color: var(--sand);
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover { background: var(--cobalt-light); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--cobalt-light);
  border: 1px solid rgba(27,58,107,0.3);
  border-radius: 8px;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-ghost:hover {
  background: rgba(27,58,107,0.08);
  border-color: rgba(27,58,107,0.5);
  color: var(--sand);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger:hover { background: rgba(239,68,68,0.08); }

.btn-full { width: 100%; justify-content: center; }

/* ─── Input Fields ──────────────────────────────────────────────────────────── */
.input-field {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--sand);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.input-field::placeholder { color: var(--muted); }

.input-field:focus {
  border-color: rgba(27,58,107,0.6);
  box-shadow: 0 0 0 3px rgba(27,58,107,0.15);
}

.input-field:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

select.input-field {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B7A' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

textarea.input-field { resize: vertical; min-height: 90px; }

/* ─── Form Groups ───────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 400;
  margin-bottom: 6px;
}

.form-hint {
  font-size: 11px;
  color: var(--very-muted);
  margin-top: 5px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ─── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.badge-active {
  background: rgba(34,197,94,0.1);
  color: var(--success);
}

.badge-due {
  background: rgba(245,158,11,0.1);
  color: var(--warning);
}

.badge-overdue {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
}

.badge-paid {
  background: rgba(34,197,94,0.1);
  color: var(--success);
}

.badge-submitted {
  background: rgba(245,158,11,0.1);
  color: var(--warning);
}

.badge-inprogress {
  background: rgba(27,58,107,0.2);
  color: var(--cobalt-light);
}

.badge-completed {
  background: rgba(34,197,94,0.1);
  color: var(--success);
}

.badge-cobalt {
  background: var(--cobalt);
  color: var(--sand);
}

.badge-cancelled {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
}

.badge-muted {
  background: rgba(107,107,122,0.15);
  color: var(--muted);
}

/* ─── Table ─────────────────────────────────────────────────────────────────── */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr { background: var(--surface-raised); }

th {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--sand);
  font-size: 13px;
  font-weight: 300;
}

tr:last-child td { border-bottom: none; }

tbody tr:hover { background: rgba(17,24,32,0.6); }

.td-muted { color: var(--muted); font-size: 12px; }
.td-actions { display: flex; gap: 6px; align-items: center; }

/* ─── Slide Panel ───────────────────────────────────────────────────────────── */
.slide-panel {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: 420px;
  background: var(--surface);
  border-left: 1px solid var(--border-subtle);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.slide-panel.open { transform: translateX(0); }

.slide-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.slide-panel-header h3 { font-size: 15px; color: var(--sand); }

.slide-panel-close {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  transition: all 0.15s;
}

.slide-panel-close:hover { color: var(--sand); border-color: var(--border-active); }

.slide-panel-body { padding: 24px; flex: 1; overflow-y: auto; }

.slide-panel-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* ─── Overlay ───────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
  backdrop-filter: blur(2px);
}

.overlay.active { display: block; }

/* ─── Modal ─────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.modal-backdrop.active { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ─── Auth Pages ────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  color: var(--sand);
  letter-spacing: -0.5px;
  display: block;
}

.auth-logo .logo-text .dot { color: var(--cobalt-light); }

.auth-logo .logo-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 3px;
  display: block;
}

.auth-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  color: var(--sand);
  text-align: center;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 28px;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

.error-msg {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--danger);
  font-size: 12px;
  display: none;
}

.error-msg.visible { display: block; }

.success-msg {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--success);
  font-size: 12px;
  display: none;
}

.success-msg.visible { display: block; }

/* ─── Chat ──────────────────────────────────────────────────────────────────── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.msg-user {
  align-self: flex-end;
  background: var(--cobalt);
  color: var(--sand);
  border-radius: 12px 12px 2px 12px;
}

.msg-ai {
  align-self: flex-start;
  background: var(--surface);
  color: var(--sand);
  border: 1px solid var(--border-subtle);
  border-radius: 12px 12px 12px 2px;
}

.msg-timestamp {
  font-size: 10px;
  color: var(--very-muted);
  margin-top: 3px;
  display: block;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px 12px 12px 2px;
  align-self: flex-start;
}

.typing-dots span {
  width: 6px; height: 6px;
  background: var(--muted);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input-area textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  background: var(--surface-raised);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--sand);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.chat-input-area textarea:focus {
  border-color: rgba(27,58,107,0.6);
  box-shadow: 0 0 0 3px rgba(27,58,107,0.15);
}

.chat-send-btn {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--cobalt);
  border: none;
  color: var(--sand);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.chat-send-btn:hover { background: var(--cobalt-light); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}

.quick-prompt-chip {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.quick-prompt-chip:hover {
  border-color: rgba(27,58,107,0.4);
  color: var(--cobalt-light);
  background: rgba(27,58,107,0.06);
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  padding: 40px;
}

.chat-empty .chat-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* ─── Venture Cards ─────────────────────────────────────────────────────────── */
.venture-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.15s;
}

.venture-card:hover { border-color: var(--border-active); }

.venture-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.venture-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--sand);
}

.venture-tier {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.venture-icon {
  font-size: 22px;
  opacity: 0.5;
}

/* ─── Info Rows ─────────────────────────────────────────────────────────────── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}

.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); font-size: 12px; }
.info-value { color: var(--sand); }

/* ─── Empty States ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.3; }
.empty-state h3 { font-size: 15px; color: var(--muted); font-weight: 400; margin-bottom: 6px; }
.empty-state p { font-size: 12px; color: var(--very-muted); }

/* ─── Loading Skeleton ──────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-raised) 25%, #222228 50%, var(--surface-raised) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long { width: 90%; }

/* ─── Alert Banner ──────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-warning {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  color: var(--warning);
}

.alert-success {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  color: var(--success);
}

.alert-info {
  background: rgba(27,58,107,0.12);
  border: 1px solid rgba(27,58,107,0.25);
  color: var(--cobalt-light);
}

/* ─── Checkboxes ────────────────────────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--cobalt-light);
  cursor: pointer;
}

.checkbox-row label { font-size: 13px; color: var(--sand); cursor: pointer; }

/* ─── Venture Checkboxes & Tiers ──────────────────────────────────────────── */
.venture-selector {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.venture-selector-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-raised);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.venture-selector-header:hover { background: #1E1E24; }

.venture-selector-header input[type="checkbox"] {
  accent-color: var(--cobalt-light);
  width: 15px; height: 15px;
}

.venture-selector-header label {
  font-size: 13px;
  font-weight: 500;
  color: var(--sand);
  flex: 1;
  cursor: pointer;
}

.venture-tier-options {
  padding: 12px 16px;
  background: var(--surface);
  display: none;
  gap: 8px;
}

.venture-tier-options.visible { display: flex; }

.tier-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.tier-radio input[type="radio"] { accent-color: var(--cobalt-light); }
.tier-radio label { font-size: 12px; color: var(--muted); cursor: pointer; }

/* ─── Copy Button ───────────────────────────────────────────────────────────── */
.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
}

.copy-url {
  flex: 1;
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Search Bar ────────────────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--sand);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: rgba(27,58,107,0.4); }

/* ─── Invoice Summary Bar ───────────────────────────────────────────────────── */
.summary-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.summary-item {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px;
}

.summary-item .amount {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  color: var(--sand);
  line-height: 1;
}

.summary-item .label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 6px;
}

/* ─── Greeting ──────────────────────────────────────────────────────────────── */
.greeting-block {
  margin-bottom: 28px;
}

.greeting-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  color: var(--sand);
  line-height: 1.2;
}

.greeting-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ─── Admin Login Overlay ───────────────────────────────────────────────────── */
.admin-login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ─── Tab Bar ───────────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--sand); }
.tab-btn.active { border-bottom-color: var(--cobalt-light); color: var(--cobalt-light); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Section Headers ───────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--sand);
}

/* ─── Tag Row ───────────────────────────────────────────────────────────────── */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ─── Quick Actions ─────────────────────────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.quick-action-btn {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--muted);
  font-size: 12px;
}

.quick-action-btn:hover {
  border-color: rgba(27,58,107,0.3);
  background: rgba(27,58,107,0.06);
  color: var(--cobalt-light);
}

.quick-action-btn .qa-icon { font-size: 20px; margin-bottom: 6px; opacity: 0.5; display: block; }

/* ─── Detail Panel Sections ─────────────────────────────────────────────────── */
.detail-section {
  margin-bottom: 24px;
}

.detail-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--very-muted);
  margin-bottom: 10px;
  font-weight: 400;
}

/* ─── Recent Activity ───────────────────────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 1px; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
  margin-top: 4px;
  flex-shrink: 0;
}

.activity-text {
  font-size: 13px;
  color: var(--sand);
  flex: 1;
}

.activity-time { font-size: 11px; color: var(--very-muted); }

/* ─── Divider ───────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 20px 0;
}

/* ─── Inline Loading ────────────────────────────────────────────────────────── */
.loading-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--cobalt-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }

  .sidebar.open { transform: translateX(0); width: 220px; }

  .main-content { margin-left: 0; padding: 20px 16px 80px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .summary-bar { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr 1fr; }

  .slide-panel { width: 100%; }

  .bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #0D0D10;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    z-index: 150;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    color: var(--muted);
    font-size: 10px;
    cursor: pointer;
    gap: 2px;
  }

  .bottom-nav-item.active { color: var(--cobalt-light); }
  .bottom-nav-icon { font-size: 18px; }
}

@media (min-width: 769px) {
  .bottom-nav { display: none; }
}

/* ─── PDF Embed ─────────────────────────────────────────────────────────────── */
.pdf-embed {
  width: 100%;
  height: 500px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface-raised);
}

/* ─── Report Data Grid ──────────────────────────────────────────────────────── */
.report-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.report-data-item {
  background: var(--surface-raised);
  border-radius: 8px;
  padding: 14px;
}

.report-data-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.report-data-value {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  color: var(--sand);
}

/* ─── Month Name Helper ─────────────────────────────────────────────────────── */
.month-badge {
  background: rgba(27,58,107,0.15);
  color: var(--cobalt-light);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
}
