/* BELAIRE UNDERWRITING DOCUMENTS HANDLER — theme
   Navy blue background, royal blue tabs, metallic gold headers,
   white text. Minimum 12pt (base 16px). Matches RealEstateUnderwriting.us */
:root {
  --navy: #0a1830;
  --navy2: #0e2142;
  --royal: #2456e0;
  --royal-lt: #4d7cfe;
  --gold1: #f6dd8f;
  --gold2: #d9a83c;
  --gold3: #8d610d;
  --white: #ffffff;
  --muted: #aebad4;
  --line: #22345c;
  --green: #7ee2a8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--gold1); }
a:hover { color: var(--gold2); }

/* ---------- header ---------- */
.site-header {
  background: linear-gradient(180deg, #060f22, var(--navy2));
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--gold3), var(--gold1), var(--gold3)) 1;
  text-align: center;
  padding: 18px 16px 14px;
}
.header-logo { max-width: 520px; width: 90%; height: auto; display: block; margin: 0 auto; }
.gold-title {
  margin: 10px 0 0;
  font-size: 30px; letter-spacing: 1px;
  background: linear-gradient(180deg, var(--gold1) 20%, var(--gold2) 55%, var(--gold3) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.6));
}
.subtitle { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- site tabs ---------- */
.tabs-nav {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 16px;
}
.tab-link {
  background: var(--royal); color: #fff !important; text-decoration: none;
  padding: 10px 20px; border-radius: 8px; font-size: 16px; font-weight: 600;
  border: 1px solid var(--royal-lt); transition: transform .08s ease;
}
.tab-link:hover { background: var(--royal-lt); color: #fff; transform: translateY(-1px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px;
  font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .08s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-gold {
  background: linear-gradient(180deg, var(--gold1), var(--gold2) 60%, var(--gold3));
  color: #1a1206; border-color: var(--gold3);
}
.btn-royal { background: var(--royal); color: #fff; }
.btn-royal:hover { background: var(--royal-lt); color: #fff; }
.btn-outline { background: transparent; color: var(--white); border-color: var(--line); }
.btn-outline:hover { border-color: var(--gold2); color: var(--gold1); }
.btn-lg { font-size: 18px; padding: 13px 30px; }

/* ---------- layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.panel {
  background: linear-gradient(180deg, var(--navy2), #0b1a36);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 26px; margin: 26px 0;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.panel.narrow { max-width: 600px; margin: 40px auto; }
.panel .gold-title { font-size: 24px; margin-bottom: 4px; }
.panel-sub { color: var(--muted); margin-top: 0; }
.royal-h { color: var(--royal-lt); font-size: 18px; margin: 22px 0 10px;
           border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.section-head { text-align: center; margin-bottom: 8px; }
.section-head .gold-title { font-size: 26px; }

/* ---------- forms ---------- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 22px; }
label { display: block; font-size: 15px; color: var(--white); }
.inp {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px;
  font-size: 16px; color: #1a1a1a; background: #fff8e1;
  border: 2px solid var(--gold2); border-radius: 8px;
}
.inp:focus { outline: none; border-color: var(--gold1); box-shadow: 0 0 0 3px rgba(217,168,60,.35); }
.form label { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: 14px; }
.banner { padding: 12px 16px; border-radius: 8px; margin: 14px 0; font-size: 16px; }
.banner.error { background: #4d1420; border: 1px solid #a33; color: #ffd9d9; }
.banner.success { background: #123f2a; border: 1px solid #2c7a4b; color: #c9f2d8; }

/* ---------- document library ---------- */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-bottom: 1px solid var(--line);
}
.doc-list li:hover { background: rgba(36,86,224,.10); }
.doc-mark { height: 30px; width: auto; flex: 0 0 auto; }
.doc-link { color: var(--white); text-decoration: none; font-size: 16px; font-weight: 500; }
.doc-link:hover { color: var(--gold1); text-decoration: underline; }
.doc-dl { margin-left: auto; flex: 0 0 auto; }

/* ---------- upload ---------- */
.dropzone {
  border: 2px dashed var(--gold2); border-radius: 12px;
  padding: 34px 18px; text-align: center; cursor: pointer;
  background: rgba(217,168,60,.05); margin: 16px 0;
}
.dropzone:hover, .dropzone.drag { background: rgba(217,168,60,.13); border-color: var(--gold1); }
.dropzone p { margin: 6px 0; }
.file-list { list-style: none; padding: 0; margin: 12px 0; }
.file-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 15px;
}
.file-list .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fsize { color: var(--muted); font-size: 14px; }
.file-list .fstatus { font-size: 14px; color: var(--gold1); }
.file-list .fstatus.done { color: var(--green); }
.file-list .fstatus.fail { color: #ff9d9d; }
.id-box {
  border: 1px solid var(--line); border-radius: 12px; padding: 20px;
  margin: 22px 0; background: rgba(36,86,224,.06);
}
.id-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.id-slot {
  border: 1px dashed var(--royal-lt); border-radius: 10px; padding: 16px; text-align: center;
}
.id-slot h4 { margin: 0 0 8px; color: var(--gold1); font-size: 16px; }
.id-slot .ok { color: var(--green); font-size: 14px; margin-top: 8px; }
.send-row { text-align: center; margin-top: 26px; }
.folder-name {
  display: inline-block; background: rgba(36,86,224,.15);
  border: 1px solid var(--royal-lt); border-radius: 8px;
  padding: 8px 16px; color: var(--gold1); font-weight: 600; font-size: 16px;
}

/* ---------- calendar ---------- */
.cal-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0; flex-wrap: wrap; }
.cal-month { font-size: 20px; color: var(--gold1); font-weight: 700; min-width: 220px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 14px; font-weight: 700; padding: 6px 0; }
.cal-day {
  min-height: 64px; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px; font-size: 14px; cursor: pointer; background: rgba(255,255,255,.02);
  position: relative;
}
.cal-day:hover { border-color: var(--gold2); }
.cal-day.other { opacity: .35; }
.cal-day.today { border-color: var(--gold1); box-shadow: inset 0 0 0 1px var(--gold1); }
.cal-day.selected { background: rgba(36,86,224,.25); }
.cal-num { font-weight: 700; }
.cal-dots { position: absolute; bottom: 6px; left: 8px; display: flex; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.download { background: var(--royal-lt); }
.dot.upload { background: var(--gold2); }
.dot.account { background: var(--green); }
.cal-legend { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin: 14px 0 4px; font-size: 15px; color: var(--muted); }
.cal-legend .dot { margin-right: 6px; vertical-align: middle; }
.cal-detail { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.cal-detail h4 { color: var(--gold1); margin: 0 0 8px; font-size: 17px; }
.cal-detail ul { list-style: none; padding: 0; margin: 0; }
.cal-detail li { padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.ev-type { display: inline-block; min-width: 92px; font-weight: 700; font-size: 14px; }
.ev-type.download { color: var(--royal-lt); }
.ev-type.upload { color: var(--gold2); }
.ev-type.account { color: var(--green); }
.ev-time { color: var(--muted); font-size: 14px; margin-left: 10px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.results { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
table.results th { background: var(--royal); color: #fff; text-align: left; padding: 10px 12px; font-size: 15px; }
table.results td { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--white); }
table.results tr:nth-child(even) td { background: rgba(36,86,224,.08); }

/* ---------- admin user table: fit on screen, no horizontal scroll ---------- */
#adm-table { table-layout: fixed; font-size: 13px; }
#adm-table th, #adm-table td { padding: 8px 6px; word-break: break-word; vertical-align: top; }
#adm-table th:nth-child(1), #adm-table td:nth-child(1) { width: 9%; }
#adm-table th:nth-child(2), #adm-table td:nth-child(2) { width: 11%; }
#adm-table th:nth-child(3), #adm-table td:nth-child(3) { width: 23%; }
#adm-table th:nth-child(4), #adm-table td:nth-child(4) { width: 11%; }
#adm-table th:nth-child(5), #adm-table td:nth-child(5) { width: 21%; }
#adm-table th:nth-child(6), #adm-table td:nth-child(6) { width: 5%; text-align: center; }
#adm-table th:nth-child(7), #adm-table td:nth-child(7) { width: 9%; }
#adm-table th:nth-child(8), #adm-table td:nth-child(8) { width: 11%; }
#adm-table td:nth-child(8) .btn { display: block; width: 100%; font-size: 12px; padding: 6px 4px; margin: 3px 0; }
#adm-table .table-wrap, .table-wrap:has(#adm-table) { overflow-x: visible; }

/* ---------- footer ---------- */
.site-footer { text-align: center; padding: 30px 16px; color: var(--muted);
               font-size: 15px; border-top: 1px solid var(--line); }
.footer-logo { max-width: 300px; width: 70%; height: auto; margin-bottom: 12px; }
.contact-block { line-height: 1.8; }
.contact-block strong { color: var(--gold1); }
.disclaimer { font-size: 12px; color: #7c8aa8; margin-top: 14px; }

/* ---------- account ---------- */
.auth-card {
  background: rgba(36,86,224,.07);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 22px; margin-bottom: 18px;
}
.auth-card label { margin-bottom: 12px; }
.auth-card .btn { margin: 6px 8px 0 0; }
.welcome-line { font-size: 18px; }
.welcome-line strong { color: var(--gold1); }

@media (max-width: 640px) {
  .gold-title { font-size: 22px; }
  .panel { padding: 18px; }
  .cal-day { min-height: 48px; }
  .header-logo { max-width: 340px; }
}
