/* Republican Red — Investor Data Room
   Premium patriotic heritage: deep wine-red, gold, cream, ink. */

:root {
  --red-900: #6E1420;
  --red-700: #9B1B30;
  --red-600: #C0182F;
  --red-500: #C41E3A;
  --gold-600: #B8893B;
  --gold-500: #C6A15B;
  --gold-300: #E4CD9A;
  --cream:    #F8F5EF;
  --cream-2:  #F1EBDF;
  --paper:    #FFFFFF;
  --ink:      #1B1A18;
  --ink-soft: #4A4640;
  --muted:    #8A8578;
  --line:     #E4DECF;
  --ok:       #2F7D4F;
  --danger:   #B23A2E;
  --shadow:   0 10px 30px rgba(30, 12, 8, 0.10);
  --shadow-sm:0 2px 8px rgba(30, 12, 8, 0.07);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 700; letter-spacing: 0.2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Split auth layout ---------- */
.auth-wrap { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-brand {
  position: relative;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(198,161,91,0.20), transparent 60%),
    linear-gradient(160deg, var(--red-700) 0%, var(--red-900) 70%, #4d0d16 100%);
  color: #fff;
  padding: 64px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 46px);
  opacity: 0.5; pointer-events: none;
}
.brand-mark { display: flex; align-items: center; gap: 14px; z-index: 1; }
.seal {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--gold-500);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; color: var(--gold-300);
  background: rgba(0,0,0,0.15);
}
.brand-name { font-family: var(--serif); font-size: 22px; letter-spacing: 0.5px; }
.brand-hero { z-index: 1; max-width: 460px; }
.brand-hero .kicker {
  text-transform: uppercase; letter-spacing: 3px; font-size: 12px;
  color: var(--gold-300); margin-bottom: 18px;
}
.brand-hero h1 { font-size: 46px; line-height: 1.08; margin: 0 0 18px; color: #fff; }
.brand-hero p { color: rgba(255,255,255,0.82); font-size: 16px; }
.brand-foot { z-index: 1; color: rgba(255,255,255,0.6); font-size: 13px; }

.auth-panel { display: grid; place-items: center; padding: 48px; background: var(--cream); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 28px; margin: 0 0 6px; }
.auth-card .sub { color: var(--ink-soft); margin: 0 0 28px; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 0 0 7px; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 13px 14px; font-size: 15px; font-family: var(--sans);
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
  color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(198,161,91,0.18);
}
.otp-input { text-align: center; letter-spacing: 12px; font-size: 26px; font-weight: 600; }
.field { margin-bottom: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 18px; font-size: 15px; font-weight: 600; font-family: var(--sans);
  border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(180deg, var(--red-600), var(--red-700));
  color: #fff; box-shadow: var(--shadow-sm); transition: transform .05s, filter .15s;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); box-shadow: none; }
.btn-gold { background: linear-gradient(180deg, var(--gold-500), var(--gold-600)); color: #2a1c05; }
.btn-sm { width: auto; padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-row { display: flex; gap: 10px; }

.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.alert-error { background: #fbeae8; color: var(--danger); border: 1px solid #f0cfc9; }
.alert-info { background: #fff8ea; color: #7a5a15; border: 1px solid var(--gold-300); }
.alert-ok { background: #e9f5ee; color: var(--ok); border: 1px solid #c3e3cf; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------- App shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, var(--red-700), var(--red-900));
  color: #fff; border-bottom: 3px solid var(--gold-500);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar .brand-mark .brand-name { font-size: 19px; }
.topbar .seal { width: 40px; height: 40px; font-size: 15px; }
.topbar nav { display: flex; align-items: center; gap: 6px; }
.topbar nav a {
  color: rgba(255,255,255,0.9); padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.topbar nav a:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.topbar nav a.active { background: rgba(0,0,0,0.22); color: #fff; }
.badge-user { font-size: 13px; color: rgba(255,255,255,0.75); }

.container { max-width: 1160px; margin: 0 auto; padding: 32px 24px 80px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 30px; margin: 0 0 4px; }
.page-head .sub { color: var(--ink-soft); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-sm); padding: 26px;
}
.card + .card { margin-top: 20px; }
.narrow { max-width: 640px; margin: 0 auto; }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 14px; }
.crumbs a { color: var(--red-700); }
.crumbs .sep { color: var(--muted); }
.crumbs .cur { color: var(--ink); font-weight: 600; }

/* ---------- Document list ---------- */
.doc-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; background: var(--cream-2); color: var(--ink-soft); border: 1px solid var(--line); }
.pill-live { background: #e9f5ee; color: var(--ok); border-color: #c3e3cf; }

.doc-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.doc-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background .12s; }
.doc-row:last-child { border-bottom: none; }
.doc-row:hover { background: var(--cream); }
.doc-ico { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  font-size: 12px; font-weight: 700; color: #fff; letter-spacing: 0.3px; }
.ico-folder { background: linear-gradient(180deg, var(--gold-500), var(--gold-600)); color: #2a1c05; }
.ico-pdf { background: #c0392b; } .ico-doc { background: #2b579a; } .ico-xls { background: #217346; }
.ico-ppt { background: #c43e1c; } .ico-img { background: #6b4fa0; } .ico-file { background: #6b675e; }
.doc-main { flex: 1; min-width: 0; }
.doc-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: 12.5px; color: var(--muted); }
.doc-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- Tables (admin) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.tag-active { background: #e9f5ee; color: var(--ok); }
.tag-pending { background: #fff8ea; color: #7a5a15; }
.tag-disabled { background: #f0eeea; color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tabs a { padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-soft); border: 1px solid var(--line); background: var(--paper); }
.tabs a.active { background: var(--red-700); color: #fff; border-color: var(--red-700); }
.table-scroll { overflow-x: auto; }

.legal { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; }
.check-row input { width: auto; margin-top: 3px; }
.nda-box { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: var(--cream); font-size: 13.5px; line-height: 1.7; }
.opt-card { border: 1px solid var(--line); border-radius: 11px; padding: 16px; margin-bottom: 12px; cursor: pointer; transition: border-color .12s, background .12s; }
.opt-card:hover { border-color: var(--gold-500); }
.opt-card input { width: auto; }
.opt-head { display: flex; gap: 10px; align-items: center; font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat .n { font-family: var(--serif); font-size: 28px; color: var(--red-700); }
.stat .l { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

.footer-legal { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; color: var(--muted); font-size: 12px; }

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { padding: 40px 32px; }
  .brand-hero h1 { font-size: 34px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-actions .label { display: none; }
}
