/* THE DISTRICT — Investor Portal · v10.9 · Navy + Gold */

:root {
  --navy: #0e1f47;
  --navy-dark: #081429;
  --navy-light: #1c2e5e;
  --gold: #c9a94d;
  --gold-light: #e3c773;
  --gold-dark: #8a6d2d;
  --bone: #f7f7f2;
  --paper: #fdfcf8;
  --ink: #1a2438;
  --ink-soft: #4a5568;
  --ink-mute: #6b7280;
  --border: #e5e7eb;
  --success: #107c41;
  --danger: #c23030;
  --shadow-sm: 0 1px 3px rgba(14,31,71,.08);
  --shadow-md: 0 4px 12px rgba(14,31,71,.10);
  --shadow-lg: 0 10px 30px rgba(14,31,71,.15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Calibri', Arial, sans-serif;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  line-height: 1.5;
}

/* VIEWS */
.view { display: none; min-height: 100vh; }
.view.active { display: block; }

/* LOGIN VIEW — warm cream background, navy/gold logo sits naturally on it */
#login-view {
  background:
    radial-gradient(ellipse at top, rgba(201, 169, 77, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--bone) 100%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}
/* Subtle top gold accent rule to echo the logo's gold rules */
#login-view::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
  opacity: 0.7;
}
#login-view.active { display: flex; }

.login-container {
  width: 100%;
  max-width: 480px;
}

.login-brand {
  text-align: center;
  margin-bottom: 30px;
}

/* Legacy "T·D" chip (kept as fallback for divs) */
div.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  background: var(--gold);
  color: var(--navy);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}
div.brand-mark.small {
  width: 42px;
  height: 42px;
  font-size: 15px;
  margin-bottom: 0;
}

/* Real SVG logos */
img.brand-mark {
  display: block;
  margin-bottom: 12px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Login screen — navy logo plaque framed on cream, like a nameplate on letterhead */
.brand-logo {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto 14px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(14, 31, 71, 0.18), 0 1px 3px rgba(14, 31, 71, 0.08);
}

/* Header bar — transparent-background variant sits flush on navy bar */
.brand-header-logo {
  height: 54px;
  width: auto;
  margin-bottom: 0;
  cursor: pointer;
  display: block;
  /* SVG's internal padding already gives it nice breathing room */
}

.login-brand h1 {
  font-size: 28px;
  letter-spacing: 3px;
  margin: 0 0 4px;
  color: var(--navy);
  font-weight: 800;
}

.login-brand .subtitle {
  color: var(--navy);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 2px;
}

.tagline {
  color: var(--gold-dark);
  font-size: 12px;
  letter-spacing: 2px;
  margin-top: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.login-card {
  background: #ffffff;
  color: var(--ink);
  border-radius: 14px;
  padding: 30px 34px;
  box-shadow: 0 12px 40px rgba(14, 31, 71, 0.12), 0 2px 6px rgba(14, 31, 71, 0.06);
  border-top: 4px solid var(--gold);
  border: 1px solid rgba(14, 31, 71, 0.06);
  border-top: 4px solid var(--gold);
}

.login-card h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 20px;
  letter-spacing: 0.3px;
}

.login-card .hint {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 0 0 18px;
}

.login-card label {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.login-card input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
}

.login-card input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,77,0.15);
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: 0.3px;
  margin-top: 6px;
}

.btn-google {
  width: 100%;
  padding: 11px 16px;
  background: white;
  color: #3c4043;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: box-shadow 0.15s, background 0.15s;
  font-family: 'Roboto', inherit;
  letter-spacing: 0.1px;
  margin-bottom: 4px;
}
.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(60,64,67,0.15);
}
.btn-google:active { transform: scale(0.995); }
.btn-google svg { flex-shrink: 0; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--ink-mute);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-divider span { padding: 0 4px; }

/* ================================================================ */
/* GOD MODE — admin impersonation of other tiers                     */
/* ================================================================ */

/* Top-of-page banner when impersonation is active */
.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 2500;
  background: linear-gradient(90deg, #8a6d2d 0%, #c9a94d 50%, #8a6d2d 100%);
  color: #1a1a1a;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
}
.impersonation-banner .imp-icon {
  font-size: 16px;
}
.impersonation-banner .imp-text strong {
  color: var(--navy);
}
.impersonation-banner .imp-exit {
  background: var(--navy);
  color: var(--gold);
  border: 1px solid var(--gold-dark);
  padding: 5px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
  font-family: inherit;
  transition: background 0.15s;
}
.impersonation-banner .imp-exit:hover {
  background: var(--navy-dark);
}
.impersonation-banner .imp-exit:active { transform: scale(0.97); }

/* Admin panel — God Mode preview box */
.godmode-panel {
  background: linear-gradient(135deg, #fffdf3 0%, #f7efd7 100%);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(201, 169, 77, 0.15);
}
.godmode-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.godmode-icon {
  font-size: 28px;
  line-height: 1;
  color: var(--gold-dark);
  flex-shrink: 0;
}
.godmode-title {
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 3px;
}
.godmode-sub {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.45;
}
.godmode-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.godmode-btn {
  background: white;
  color: var(--navy);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: 0.2px;
}
.godmode-btn:hover {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(14, 31, 71, 0.15);
}
.godmode-btn:active { transform: scale(0.98); }

/* INVITE PANEL */
.invite-panel {
  background: white;
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.invite-panel h4 { margin: 0 0 12px; color: var(--navy); font-size: 14px; text-transform: uppercase; letter-spacing: 0.4px; }
.invite-form {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}
@media (max-width: 720px) {
  .invite-form { grid-template-columns: 1fr; }
}
.invite-form input, .invite-form select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}
.invite-form input:focus, .invite-form select:focus {
  outline: none;
  border-color: var(--gold);
}
.invite-hint { color: var(--ink-mute); font-size: 11.5px; margin: 0; font-style: italic; }
.invite-result {
  background: linear-gradient(135deg, #fffdf3 0%, #f7efd7 100%);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--navy);
}
.invite-result strong { color: var(--gold-dark); }
.invite-result code {
  background: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid var(--border);
  font-weight: 700;
  user-select: all;
}
.custom-docs-badge {
  background: var(--gold);
  color: var(--navy);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.btn-docs {
  background: var(--navy) !important;
  color: var(--gold) !important;
  border-color: var(--navy) !important;
}
.btn-docs:hover {
  background: var(--navy-light) !important;
}

/* DOC PICKER MODAL */
.doc-picker-modal-content {
  max-width: 700px !important;
  max-height: 90vh;
}
.doc-picker-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: calc(90vh - 80px);
  background: var(--paper);
}
.doc-picker-header {
  position: sticky;
  top: 0;
  background: var(--paper);
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  z-index: 2;
}
.doc-picker-mode { display: grid; gap: 10px; margin-bottom: 14px; }
.radio-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.radio-option input { margin-top: 2px; flex-shrink: 0; }
.radio-option:has(input:checked) {
  background: #fffdf3;
  border-color: var(--gold);
}
.doc-picker-bulk { display: flex; gap: 6px; }
.doc-picker-list { display: grid; gap: 18px; }
.doc-picker-category h4 {
  color: var(--navy);
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.doc-picker-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  border: 1px solid var(--border);
  align-items: flex-start;
}
.doc-picker-item:has(input:checked) {
  background: #fffdf3;
  border-color: var(--gold);
}
.doc-picker-item input { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.doc-picker-info { flex: 1; min-width: 0; }
.doc-picker-title { font-weight: 600; color: var(--navy); font-size: 13.5px; }
.doc-picker-meta { color: var(--ink-soft); font-size: 11.5px; margin-top: 2px; }
.doc-picker-footer {
  position: sticky;
  bottom: 0;
  background: var(--paper);
  padding: 14px 0 0;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 2;
}
.doc-picker-footer .btn-primary { max-width: 200px; }

/* Toast notifications (auth status, etc.) */
.auth-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -120%);
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(14, 31, 71, 0.25);
  z-index: 4000;
  max-width: 92vw;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3), opacity 0.25s;
  opacity: 0;
  letter-spacing: 0.2px;
  pointer-events: none;
  font-family: inherit;
}
.auth-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.auth-toast--success {
  background: #107c41;
  color: #fff;
  border-top: 3px solid #c9a94d;
}
.auth-toast--error {
  background: #c23030;
  color: #fff;
}
.auth-toast--info {
  background: var(--navy);
  color: #fff;
  border-top: 3px solid var(--gold);
}
.btn-primary:hover { background: var(--navy-light); }
.btn-primary:active { transform: scale(0.98); }

.btn-text {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 13px;
  margin-top: 14px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  font-family: inherit;
}
.btn-text:hover { color: var(--navy); text-decoration: underline; }

.btn-secondary {
  padding: 8px 14px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover { background: var(--gold-light); }

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { background: var(--bone); color: var(--navy); }

.error-msg {
  background: #fce8e8;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 12px;
}

.login-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.confidential {
  font-size: 10px;
  color: var(--ink-mute);
  font-style: italic;
  line-height: 1.5;
  margin: 0;
}
.test-mode-link {
  margin: 10px 0 0;
  text-align: center;
  font-size: 11px;
}
.test-mode-link a {
  color: var(--gold-dark);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px dashed var(--border);
  border-radius: 4px;
}
.test-mode-link a:hover {
  color: var(--navy);
  border-color: var(--gold);
  background: var(--bone);
}

/* APP HEADER */
.app-header {
  background: var(--navy);
  color: white;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 66px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-title h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.4px;
}

.header-title {
  display: flex;
  align-items: center;
  align-self: center;
  padding-left: 4px;
  border-left: 1px solid rgba(201, 169, 77, 0.25);
  padding: 0 0 0 14px;
}

.header-sub {
  margin: 0;
  font-size: 10.5px;
  color: var(--gold);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
}

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

.user-chip {
  background: rgba(201, 169, 77, 0.15);
  color: var(--gold-light);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(201, 169, 77, 0.3);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-right .btn-icon {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: white;
}
.header-right .btn-icon:hover { background: rgba(255,255,255,0.2); color: white; }

/* TAB NAV */
.tab-nav {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* MAIN */
.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 28px 50px;
}

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

.page-title {
  color: var(--navy);
  font-size: 28px;
  letter-spacing: 0.3px;
  margin: 0 0 6px;
  font-weight: 700;
}

.page-sub {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 28px;
}

.section-title {
  color: var(--navy);
  font-size: 18px;
  margin: 34px 0 14px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* HERO IMAGES on Overview (arena exterior + interior) */
.hero-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0 30px;
}
@media (max-width: 720px) {
  .hero-images { grid-template-columns: 1fr; }
}
.hero-image {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--navy);
  position: relative;
  aspect-ratio: 16 / 10;
}
.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.hero-image:hover img { transform: scale(1.03); }
.hero-image figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 16px 12px;
  background: linear-gradient(to top, rgba(14, 31, 71, 0.85) 0%, rgba(14, 31, 71, 0) 100%);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* KPI GRID */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.kpi {
  background: white;
  border-top: 3px solid var(--gold);
  padding: 16px 14px;
  text-align: center;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.kpi-clickable {
  border: none;
  border-top: 3px solid var(--gold);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.kpi-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(14, 31, 71, 0.12);
}
.kpi-clickable:active { transform: translateY(0); }
/* Math-breakdown affordance — ALWAYS visible so users (especially on mobile
   where there's no hover state) know the tile is tappable. */
.kpi-clickable .kpi-hint {
  display: block;
  font-size: 9.5px;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-top: 4px;
  opacity: 1; /* was 0 on desktop — too easy for investors to miss the affordance */
}
.kpi-clickable:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* KPI Breakdown modal */
.kpi-modal-content {
  max-width: 720px !important;
  height: auto !important;
  max-height: 85vh;
}
.kpi-modal-body {
  padding: 24px 28px 28px;
  overflow-y: auto;
  background: var(--paper);
}
.kpi-subtitle {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 0 0 18px;
  font-style: italic;
}
.kpi-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.kpi-breakdown-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.kpi-row-label {
  color: var(--navy);
  font-weight: 600;
  font-size: 13px;
  width: 60%;
}
.kpi-row-detail {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 400;
  margin-top: 3px;
  font-style: italic;
  line-height: 1.4;
}
.kpi-row-val {
  text-align: right;
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.kpi-total-row td {
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  border-bottom: none;
  padding-top: 14px;
  padding-bottom: 14px;
}
.kpi-total-row .kpi-row-label {
  color: var(--navy);
}
.kpi-total-row .kpi-row-val {
  font-size: 16px;
}
.kpi-footer {
  background: #fffdf3;
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 10px;
  border-radius: 4px;
}

.kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.2px;
}

.kpi-label {
  font-size: 10.5px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  font-weight: 600;
}

/* TWO-COL */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.col {
  background: white;
  padding: 18px 20px;
  border-radius: 8px;
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow-sm);
}

.col h3 {
  color: var(--navy);
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.col p {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0;
}

/* CAPITAL TABLE */
.capital-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}

.capital-table th {
  background: var(--navy);
  color: white;
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.capital-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.capital-table tr:last-child td { border-bottom: none; }
.capital-table tr:nth-child(even) td { background: #fafaf7; }
.capital-table tr.total td {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}

/* DOC CATEGORIES */
.doc-categories {
  display: grid;
  gap: 24px;
}

.doc-category {
  background: white;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
}

.doc-category h3 {
  color: var(--navy);
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: 0.3px;
}

.doc-category-desc {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 0 0 14px;
}

.doc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.doc-item {
  background: var(--bone);
  padding: 12px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.doc-item:hover {
  background: white;
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.doc-info {
  flex: 1;
  min-width: 0;
}

.doc-title {
  font-weight: 600;
  color: var(--navy);
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-meta {
  font-size: 11px;
  color: var(--ink-mute);
}

.doc-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}
.doc-item.locked:hover { background: var(--bone); transform: none; border-color: var(--border); }

.doc-badge {
  background: var(--gold);
  color: var(--navy);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 700;
}

/* CALCULATOR */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}
@media (max-width: 820px) { .calc-grid { grid-template-columns: 1fr; } }

.calc-inputs, .calc-outputs {
  background: white;
  padding: 22px 26px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
}

.calc-inputs h3, .calc-outputs h3 {
  color: var(--navy);
  margin: 0 0 16px;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.calc-inputs label {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.calc-inputs input[type="range"] {
  width: 100%;
  margin: 6px 0 2px;
  accent-color: var(--gold);
}

.input-readout {
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: none;
}

.input-hint {
  color: var(--ink-mute);
  font-size: 11.5px;
  margin: 0 0 18px;
  font-style: italic;
}

.calc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.calc-kpi {
  background: var(--bone);
  padding: 12px 10px;
  text-align: center;
  border-radius: 6px;
  border-left: 2px solid var(--gold);
}
.calc-kpi .kpi-val { font-size: 18px; }

.calc-outputs h4 {
  color: var(--navy);
  font-size: 13px;
  margin: 18px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.assumptions {
  font-size: 12px;
  color: var(--ink-soft);
  padding-left: 20px;
  margin: 0;
}
.assumptions li { margin-bottom: 3px; }

/* PRESETS */
.preset-scenarios {
  background: white;
  padding: 22px 26px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
}
.preset-scenarios h3 {
  color: var(--navy);
  margin: 0 0 14px;
  font-size: 15px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.preset-btn {
  padding: 10px 14px;
  background: var(--bone);
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.preset-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.disclaimer-text {
  font-size: 11px;
  color: var(--ink-mute);
  font-style: italic;
  margin-top: 20px;
  text-align: center;
}

/* ACTIVITY LOG */
.activity-list {
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.activity-row {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr 180px 120px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.activity-row:last-child { border-bottom: none; }
.activity-row:nth-child(even) { background: #fafaf7; }
.activity-row.header {
  background: var(--navy);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 11px;
}

.activity-user { color: var(--navy); font-weight: 600; }
.activity-doc { color: var(--ink-soft); }
.activity-time { color: var(--ink-mute); font-size: 11.5px; }
.activity-action {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
}
.activity-action.view { background: #e3ecf7; color: var(--navy); }
.activity-action.download { background: #fbf0d4; color: var(--gold-dark); }

.loading {
  text-align: center;
  padding: 40px;
  color: var(--ink-mute);
  font-style: italic;
}

/* FOOTER */
.app-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.6);
  padding: 18px 28px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.3px;
}

/* MODAL */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(14,31,71,0.85);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  background: var(--navy);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: 15px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-back {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  border: 1px solid rgba(201, 169, 77, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-back:hover { background: rgba(201, 169, 77, 0.2); }
.btn-back:active { transform: scale(0.97); }
.btn-back-label { letter-spacing: 0.3px; }
@media (max-width: 520px) {
  .btn-back-label { display: none; }
  .btn-back { padding: 6px 10px; font-size: 15px; }
}

.modal-actions { display: flex; gap: 8px; align-items: center; }

/* Viewer Download button — the ONLY download path that returns a watermarked
   PDF (intercepted by app.js, calls the watermarkDownload Cloud Function).
   Styled prominently in gold/navy so mobile users know to tap it. */
#viewer-download {
  background: var(--gold);
  color: var(--navy);
  border: 1px solid var(--gold);
  font-weight: 700;
  padding: 8px 18px;
  font-size: 14px;
  letter-spacing: 0.3px;
  border-radius: 6px;
}
#viewer-download:hover { background: var(--gold-light); color: var(--navy); }
@media (max-width: 640px) {
  #viewer-download { padding: 10px 16px; font-size: 13px; }
}

#viewer-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: var(--bone);
}

/* ================================================================ */
/* NEW SECTIONS: Announcements, Timeline, Contacts, Q&A, Admin Panel */
/* ================================================================ */

.overview-section { margin-bottom: 28px; }
.no-items { color: var(--ink-mute); font-style: italic; padding: 16px; text-align: center; }
.small-hint { color: var(--ink-soft); font-size: 12px; margin: 4px 0 14px; font-style: italic; }

/* ANNOUNCEMENTS */
.announcements-list {
  display: grid;
  gap: 12px;
}
.announcement-card {
  background: white;
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.announcement-card.pinned {
  background: #fffdf3;
  border-left-color: var(--navy);
  box-shadow: var(--shadow-md);
}
.ann-pin-badge {
  position: absolute;
  top: 8px;
  right: 12px;
  background: var(--navy);
  color: var(--gold);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.ann-title {
  color: var(--navy);
  font-size: 15px;
  margin: 0 0 4px;
  font-weight: 700;
}
.ann-meta {
  color: var(--ink-mute);
  font-size: 11.5px;
  margin-bottom: 8px;
}
.ann-body {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
}

/* TIMELINE */
.milestones-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  padding-left: 24px;
}
.milestones-list::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--gold);
  border-radius: 1px;
}
.milestone {
  position: relative;
  background: white;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--border);
}
.milestone-dot {
  position: absolute;
  left: -20px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--border);
}
.milestone.active { border-left-color: var(--gold); }
.milestone.active .milestone-dot { background: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.milestone.complete { border-left-color: var(--success); }
.milestone.complete .milestone-dot { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.milestone-label {
  color: var(--navy);
  font-weight: 700;
  font-size: 13.5px;
}
.milestone-date {
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 2px 0 4px;
}
.milestone-detail {
  color: var(--ink-soft);
  font-size: 12.5px;
}

/* CONTACTS */
.contacts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.contact-card {
  background: white;
  border-top: 3px solid var(--gold);
  padding: 14px 18px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
/* Pending / prospective contacts — name + email + phone + notes blurred.
   Investor sees the relationship density in the network without false
   signaling of a confirmed commitment. Admin view never blurs. */
.contact-card.contact-pending {
  border-top-color: var(--ink-mute);
  background: #f8f7f3;
}
.contact-card.contact-pending .contact-name,
.contact-card.contact-pending .contact-role,
.contact-card.contact-pending .contact-line,
.contact-card.contact-pending .contact-notes {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}
.contact-status-badge {
  display: inline-block;
  background: var(--ink-mute);
  color: white;
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
  font-weight: 600;
}
.contact-name {
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
}
.contact-role {
  color: var(--ink-soft);
  font-size: 12px;
  margin-bottom: 8px;
}
.contact-line {
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 2px;
}
.contact-k {
  color: var(--ink-mute);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}
.contact-notes {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-style: italic;
}

/* FAQ SECTION — featured/pinned public Q&As at top of Q&A tab */
.faq-section {
  background: linear-gradient(135deg, #fffdf3 0%, #f7efd7 100%);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(201, 169, 77, 0.12);
}
.faq-heading {
  color: var(--navy);
  font-size: 16px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.4px;
}
.faq-star {
  color: var(--gold-dark);
  font-size: 22px;
  line-height: 1;
}
.faq-list { display: grid; gap: 14px; }
.faq-card {
  background: white;
  border-left: 3px solid var(--gold);
  padding: 14px 18px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.faq-q, .faq-a {
  display: flex;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.55;
}
.faq-q {
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 10px;
}
.faq-a {
  color: var(--ink);
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.faq-q-icon, .faq-a-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}
.faq-q-icon {
  background: var(--navy);
  color: var(--gold);
}
.faq-a-icon {
  background: var(--gold);
  color: var(--navy);
}
.faq-admin-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 6px;
}
.qa-section-heading {
  color: var(--navy);
  font-size: 14px;
  margin: 24px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.btn-feature {
  background: var(--gold) !important;
  color: var(--navy) !important;
  border-color: var(--gold-dark) !important;
}

.btn-ai-draft {
  background: linear-gradient(135deg, #1a2e5c 0%, #2d4a8a 100%) !important;
  color: var(--gold-light) !important;
  border: 1px solid var(--gold-dark) !important;
  font-weight: 700 !important;
}
.btn-ai-draft:hover {
  background: linear-gradient(135deg, #0e1f47 0%, #1a2e5c 100%) !important;
  color: var(--gold) !important;
  box-shadow: 0 2px 6px rgba(14, 31, 71, 0.25);
}
.btn-ai-draft:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Q&A */
.qa-submit {
  background: white;
  padding: 18px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
}
.qa-submit textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 10px;
  resize: vertical;
  color: var(--ink);
}
.qa-submit textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,77,0.15); }
.qa-list {
  display: grid;
  gap: 12px;
}
.qa-card {
  background: white;
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--border);
}
.qa-question {
  margin-bottom: 10px;
}
.qa-answer {
  background: #fffdf3;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 3px solid var(--gold);
  margin-top: 8px;
}
.qa-meta {
  color: var(--ink-mute);
  font-size: 11px;
  margin-bottom: 4px;
}
.qa-text {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
}
.qa-public { color: var(--success); font-weight: 600; }
.qa-private { color: var(--gold-dark); font-weight: 600; }
.qa-pending {
  color: var(--ink-mute);
  font-style: italic;
  font-size: 12px;
  margin-top: 6px;
}
.qa-admin-actions {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.qa-public-toggle {
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* ADMIN PANEL */
.admin-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
}
.admin-subtab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  font-family: inherit;
  white-space: nowrap;
}
.admin-subtab-btn:hover { color: var(--navy); }
.admin-subtab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}
.admin-subpanel { display: none; }
.admin-subpanel.active { display: block; }
.admin-subpanel h3 {
  color: var(--navy);
  font-size: 16px;
  margin: 0 0 6px;
}
.admin-subpanel h4 {
  color: var(--navy);
  font-size: 13px;
  margin: 18px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
}

.admin-list {
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-user-row, .admin-doc-row, .admin-ann-row, .admin-milestone-row, .admin-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  font-size: 13px;
}
.admin-user-row:last-child, .admin-doc-row:last-child, .admin-ann-row:last-child,
.admin-milestone-row:last-child, .admin-contact-row:last-child { border-bottom: none; }
.admin-user-row:nth-child(even), .admin-doc-row:nth-child(even),
.admin-ann-row:nth-child(even), .admin-milestone-row:nth-child(even),
.admin-contact-row:nth-child(even) { background: #fafaf7; }

.user-info { flex: 1; }
.user-email { color: var(--navy); font-weight: 600; }
.user-meta { color: var(--ink-mute); font-size: 11px; margin-top: 2px; }
.you-badge {
  background: var(--gold);
  color: var(--navy);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-left: 4px;
}
.pin-ok {
  color: var(--success);
  font-weight: 600;
}

.tier-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-size: 12px;
  color: var(--navy);
  font-family: inherit;
}

.admin-doc-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.admin-doc-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.admin-doc-title { color: var(--navy); font-weight: 600; }
.admin-doc-meta { color: var(--ink-mute); font-size: 11px; }
.admin-doc-actions, .admin-ann-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.admin-ann-info { flex: 1; }
.admin-ann-title { color: var(--navy); font-weight: 600; font-size: 13px; }
.admin-ann-meta { color: var(--ink-mute); font-size: 11px; }

.admin-upload-box {
  background: white;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
  margin-bottom: 18px;
}
.admin-upload-box h4 { margin-top: 0; }
.admin-upload-box label {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-bottom: 10px;
}
.admin-upload-box input[type="text"],
.admin-upload-box select,
.admin-upload-box textarea,
.admin-upload-box input[type="file"] {
  display: block;
  width: 100%;
  padding: 8px 10px;
  margin-top: 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  background: white;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
}
.admin-upload-box textarea { resize: vertical; }
.admin-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-items: end;
}
.upload-full { grid-column: 1 / -1; }
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 13px !important;
  color: var(--ink) !important;
}

.btn-small {
  padding: 5px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--navy);
  font-family: inherit;
}
.btn-small:hover { background: var(--bone); border-color: var(--gold); }
.btn-small.danger { color: var(--danger); border-color: #fce8e8; }
.btn-small.danger:hover { background: #fce8e8; }
.file-btn { position: relative; cursor: pointer; }

/* RESPONSIVE */
@media (max-width: 640px) {
  .app-header { padding: 10px 14px; }
  .header-title h2 { font-size: 13px; }
  .header-sub { font-size: 10px; }
  .tab-nav { padding: 0 10px; }
  .tab-btn { padding: 12px 14px; font-size: 13px; }
  .app-main { padding: 18px 14px 40px; }
  .page-title { font-size: 22px; }
  .kpi-val { font-size: 18px; }
  .login-card { padding: 20px; }
  .activity-row { grid-template-columns: 1fr; gap: 4px; }
  .activity-row.header { display: none; }
  .user-chip { display: none; }
}
