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

:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C96A;
  --gold-dim:    rgba(201,168,76,0.12);
  --sidebar-bg:  #111111;
  --sidebar-w:   240px;
  --bg:          #F4F4F2;
  --card:        #FFFFFF;
  --border:      #E4E4E0;
  --text:        #1A1A1A;
  --text-muted:  #7A7A78;
  --text-light:  #B0B0AE;
  --green:       #2ECC71;
  --green-dim:   rgba(46,204,113,0.12);
  --red:         #E74C3C;
  --red-dim:     rgba(231,76,60,0.12);
  --blue:        #3498DB;
  --blue-dim:    rgba(52,152,219,0.12);
  --orange:      #F39C12;
  --orange-dim:  rgba(243,156,18,0.12);
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
  --transition:  0.18s ease;
  --font:        'Inter', -apple-system, sans-serif;
}

html { font-size: 15px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
button, input, select, textarea { font-family: var(--font); }
img { max-width: 100%; }

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

/* ─── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.vs-logo { display: flex; flex-direction: column; gap: 4px; }
.vs-logo-wordmark {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.vs-bracket { color: var(--gold); opacity: 0.7; font-weight: 300; }
.vs-visual  { font-weight: 800; }
.vs-story   { font-weight: 400; letter-spacing: 1px; }
.vs-logo-sub {
  font-size: 9.5px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
/* keep old classes for collapsed sidebar */
.logo-mark {
  width: 38px; height: 38px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #000;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; }
.logo-main { font-size: 12px; font-weight: 600; color: #fff; line-height: 1.3; }
.logo-sub { font-size: 10px; color: rgba(255,255,255,0.4); }

.sidebar-nav { padding: 14px 10px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.55);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
  white-space: nowrap;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.8; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.85); }
.nav-item.active {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.2);
}
.nav-item.active svg { opacity: 1; }

.nav-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 20px;
  margin-left: auto;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-date { font-size: 11px; color: rgba(255,255,255,0.3); }

/* ─── Main Content ──────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 16px; font-weight: 600; color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.content { padding: 28px; flex: 1; }

/* ─── Flash Messages ────────────────────────────────────────────────────── */
.flash-container { padding: 0 28px 0; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
}
.flash button { background: none; border: none; font-size: 18px; cursor: pointer; opacity: 0.5; padding: 0 4px; }
.flash-success { background: var(--green-dim); color: #1a7a43; border: 1px solid rgba(46,204,113,0.25); }
.flash-error   { background: var(--red-dim);   color: #9b2c1c; border: 1px solid rgba(231,76,60,0.25); }
.flash-info    { background: var(--blue-dim);  color: #1a5276; border: 1px solid rgba(52,152,219,0.25); }
.flash-warning { background: var(--orange-dim);color: #7d5a0a; border: 1px solid rgba(243,156,18,0.25); }

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.card-body  { padding: 20px 22px; }
.card-footer{ padding: 14px 22px; border-top: 1px solid var(--border); background: #fafaf8; border-radius: 0 0 var(--radius) var(--radius); }

/* ─── KPI Cards ─────────────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.kpi-card.green::before { background: var(--green); }
.kpi-card.red::before   { background: var(--red); }
.kpi-card.blue::before  { background: var(--blue); }
.kpi-label { font-size: 11.5px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.kpi-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 6px; }
.kpi-sub   { font-size: 12px; color: var(--text-muted); }
.kpi-trend { font-size: 12px; font-weight: 600; }
.kpi-trend.up   { color: var(--green); }
.kpi-trend.down { color: var(--red); }

/* ─── Grid Helpers ──────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-half { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary   { background: var(--gold); color: #000; border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); color: #000; }
.btn-outline   { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); border-color: #ccc; }
.btn-danger    { background: var(--red-dim); color: var(--red); border-color: rgba(231,76,60,0.25); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost     { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm        { padding: 6px 12px; font-size: 12.5px; }
.btn-icon      { padding: 7px; }

/* ─── Forms ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text);
  background: var(--card);
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 18px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-section { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 20px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }

/* ─── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #fafaf8;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 13px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid #f0f0ee;
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafaf9; }

/* ─── Badges / Tags ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green   { background: var(--green-dim);  color: #1a6b3a; }
.badge-red     { background: var(--red-dim);    color: #8b1e14; }
.badge-blue    { background: var(--blue-dim);   color: #1a4f76; }
.badge-orange  { background: var(--orange-dim); color: #7d4a00; }
.badge-gray    { background: #f0f0ee;           color: var(--text-muted); }
.badge-gold    { background: var(--gold-dim);   color: #7a5a10; }

/* ─── Search Bar ────────────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  min-width: 260px;
}
.search-bar svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  border: none; outline: none; font-size: 13.5px;
  color: var(--text); background: transparent; width: 100%;
}

/* ─── Dashboard specific ────────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-container { position: relative; height: 220px; }
.news-ticker { display: flex; flex-direction: column; gap: 14px; max-height: 340px; overflow-y: auto; }
.news-item { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item-title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; }
.news-item-meta  { font-size: 11.5px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.news-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); display: inline-block; }

/* ─── Customer Cards ────────────────────────────────────────────────────── */
.customer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.customer-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.customer-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: #d0d0cc; }
.customer-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.customer-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.customer-name { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.customer-company { font-size: 12.5px; color: var(--text-muted); }
.customer-kpis { display: flex; gap: 18px; }
.customer-kpi { display: flex; flex-direction: column; }
.customer-kpi-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); font-weight: 500; }
.customer-kpi-value { font-size: 13.5px; font-weight: 600; color: var(--text); }

/* ─── Detail Page ───────────────────────────────────────────────────────── */
.detail-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow);
}
.detail-avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px;
  flex-shrink: 0;
}
.detail-name { font-size: 20px; font-weight: 700; color: var(--text); }
.detail-company { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.detail-meta-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.detail-meta-item svg { width: 14px; height: 14px; }
.detail-kpis { display: flex; gap: 28px; flex-wrap: wrap; }
.detail-kpi { text-align: right; }
.detail-kpi-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.detail-kpi-value { font-size: 22px; font-weight: 700; color: var(--text); }

.tab-nav { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─── Notes ─────────────────────────────────────────────────────────────── */
.note-item {
  padding: 14px 16px;
  background: #fffef8;
  border: 1px solid #ece9d8;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  position: relative;
}
.note-date { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.note-text { font-size: 13.5px; line-height: 1.6; }
.note-delete { position: absolute; top: 10px; right: 10px; }

/* ─── File upload ───────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #fafaf8;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--gold); background: var(--gold-dim); }
.upload-zone svg { width: 32px; height: 32px; color: var(--text-muted); margin-bottom: 10px; }
.upload-zone p { font-size: 13.5px; color: var(--text-muted); }
.upload-zone strong { color: var(--gold); }

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--card);
}
.file-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--blue-dim); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.file-icon svg { width: 18px; height: 18px; }
.file-name { font-size: 13.5px; font-weight: 500; }
.file-size { font-size: 12px; color: var(--text-muted); }
.file-actions { margin-left: auto; display: flex; gap: 6px; }

/* ─── Finance ───────────────────────────────────────────────────────────── */
.finance-chart-large { height: 260px; position: relative; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ─── News ──────────────────────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
}
.news-card:hover { box-shadow: var(--shadow-md); }
.news-card-source { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gold); }
.news-card-title { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--text); }
.news-card-title a { color: var(--text); }
.news-card-title a:hover { color: var(--gold); }
.news-card-summary { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; flex: 1; }
.news-card-meta { font-size: 11.5px; color: var(--text-light); display: flex; align-items: center; gap: 6px; }

/* ─── Empty States ──────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; opacity: 0.25; margin-bottom: 16px; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; }

/* ─── Alerts ────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13.5px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-warning { background: var(--orange-dim); color: #7d4a00; border: 1px solid rgba(243,156,18,0.25); }
.alert-info    { background: var(--blue-dim);   color: #1a4f76; border: 1px solid rgba(52,152,219,0.2); }

/* ─── Misc ──────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted { color: var(--text-muted); }
.text-gold  { color: var(--gold); }
.font-mono  { font-family: 'Courier New', monospace; font-size: 12.5px; }
.gap-8 { display: flex; align-items: center; gap: 8px; }
.ml-auto { margin-left: auto; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-16 { margin-top: 16px; }
.w-full { width: 100%; }
.bold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0d0cc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b0b0aa; }

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 60px; }
  .logo-text, .nav-item span, .sidebar-footer { display: none; }
  .logo-mark { margin: 0 auto; }
  .sidebar-logo { justify-content: center; padding: 18px 10px; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-item svg { width: 20px; height: 20px; }
  .content { padding: 16px; }
  .grid-2, .grid-half, .dash-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .detail-header { flex-direction: column; }
  .detail-kpis { flex-direction: row; }
}

/* ─── Loading Spinner ───────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Progress Bar ──────────────────────────────────────────────────────── */
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--gold); border-radius: 3px; transition: width 0.4s ease; }

/* ─── Sidebar User ──────────────────────────────────────────────────────── */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 10.5px; color: rgba(255,255,255,0.35); }
.sidebar-logout {
  color: rgba(255,255,255,0.3);
  padding: 4px;
  border-radius: 4px;
  display: flex; align-items: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-logout:hover { color: var(--red); background: var(--red-dim); }
.sidebar-logout svg { width: 14px; height: 14px; }

/* ─── Nav Section Label ─────────────────────────────────────────────────── */
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.25);
  padding: 14px 12px 6px;
}

/* ─── Chat ──────────────────────────────────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
}

.chat-msg-wrap { display: flex; flex-direction: column; }
.chat-msg-wrap-user { align-items: flex-end; }

.chat-msg {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.chat-msg-user {
  background: var(--gold);
  color: #000;
  border-radius: 14px 14px 4px 14px;
}

.chat-msg-ai-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.chat-ai-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--sidebar-bg);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.chat-msg-ai {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px 14px 14px 14px;
  max-width: 80%;
}

.chat-welcome {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.chat-welcome-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: var(--gold-dim);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.chat-welcome h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.chat-welcome p  { font-size: 13.5px; max-width: 420px; margin: 0 auto 20px; line-height: 1.6; }

.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chat-suggestion-btn {
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12.5px;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text);
  transition: var(--transition);
}
.chat-suggestion-btn:hover { border-color: var(--gold); color: var(--gold); }

.chat-input-area {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  background: var(--bg);
}
.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px 10px 16px;
  transition: var(--transition);
}
.chat-input-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.chat-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  resize: none;
  line-height: 1.5;
  min-height: 24px;
  max-height: 160px;
}
.chat-send-btn {
  width: 36px; height: 36px;
  background: var(--gold);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #000;
  flex-shrink: 0;
  transition: var(--transition);
}
.chat-send-btn:hover { background: var(--gold-light); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Typing Indicator ──────────────────────────────────────────────────── */
.typing-indicator .chat-msg-ai {
  padding: 12px 18px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.typing-dot {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  display: inline-block;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ─── Password Vault ────────────────────────────────────────────────────── */
.vault-item td { vertical-align: middle; }
.reveal-btn { opacity: 0.6; }
.reveal-btn:hover { opacity: 1; }

/* ─── Kanban Board ──────────────────────────────────────────────────────── */
.kanban-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}
.kanban-col {
  background: #e8e8e6;
  border-radius: var(--radius);
  padding: 16px;
  min-height: 200px;
}
.kanban-col-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  border-left: 3px solid var(--gold);
  transition: var(--transition);
}
.kanban-card:hover { box-shadow: var(--shadow-md); }
.kanban-card-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.kanban-card-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.kanban-card-meta  { font-size: 11px; color: var(--text-muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ─── Portal Styles ─────────────────────────────────────────────────────── */
.portal-page { font-family: var(--font); }

/* ─── Responsive additions ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .kanban-board { grid-template-columns: 1fr; }
  .chat-msg { max-width: 90%; }
}
