/* TrancheReady — Pro UI */
/* Typeface */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* Theme */
:root{
  --bg: #0b1020;
  --panel: #11162a;
  --panel-2:#0f1426;
  --ink: #e9edf7;
  --muted: #9aa3b2;
  --line: #1f2740;
  --brand: #5c86ff;
  --brand-2:#7aa3ff;
  --good:#21c07a;
  --warn:#ffb020;
  --bad:#ff5568;
  --code:#0b122a;
  --pill:#17204a;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* Base */
*{box-sizing:border-box}
html,body{height:100%}
html,body{
  background: radial-gradient(1200px 700px at 80% -10%, rgba(92,134,255,0.15), transparent 60%),
              radial-gradient(900px 600px at -10% -20%, rgba(33,192,122,0.10), transparent 50%),
              var(--bg);
  color:var(--ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
a{color:var(--brand-2);text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:1100px;margin:0 auto;padding:24px 20px}

/* Header */
.header{
  display:flex;align-items:center;justify-content:space-between;
  gap:16px;margin:10px 0 24px 0
}
.brand{display:flex;align-items:center;gap:12px}
.brand img{height:28px;width:auto;filter:drop-shadow(0 2px 6px rgba(92,134,255,.25))}
.brand h1{font-size:18px;font-weight:700;letter-spacing:.2px;margin:0}
.tag{font-size:12px;color:#c8d1ff;background:rgba(92,134,255,.17);padding:4px 8px;border-radius:999px;border:1px solid rgba(92,134,255,.35)}
.header .meta{color:var(--muted);font-size:12px}

/* Cards / Panels */
.card{
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border:1px solid var(--line); border-radius:14px; padding:18px; box-shadow: var(--shadow);
}
.grid{display:grid;gap:18px}
.grid.cols-2{grid-template-columns:1fr 1fr}
@media(max-width:960px){.grid.cols-2{grid-template-columns:1fr}}

/* Forms */
label{display:block;font-size:12px;color:var(--muted);margin:6px 0 8px}
input[type=file]{
  width:100%;padding:14px 12px;border-radius:12px;border:1px dashed #2a355f;
  background:#0d1430;color:#cbd5e1
}
.btn,.btn:visited{
  display:inline-flex;align-items:center;gap:10px;
  background:linear-gradient(180deg, var(--brand) 0%, #466fff 100%);
  color:#fff;font-weight:600;border:none;border-radius:12px;padding:12px 16px;
  box-shadow:0 6px 18px rgba(92,134,255,.35);cursor:pointer;text-decoration:none
}
.btn:hover{transform:translateY(-1px)}
.btn.secondary{
  background:transparent;border:1px solid #2a355f;color:#d6def8;box-shadow:none
}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
@media(max-width:960px){.kpis{grid-template-columns:repeat(2,1fr)}}
.kpi{background:linear-gradient(180deg,#0e1632,#0b132e);border:1px solid #1f2740;padding:14px;border-radius:12px}
.kpi .label{font-size:12px;color:var(--muted)}
.kpi .value{font-size:24px;font-weight:700;margin-top:2px}

/* Tables */
.table{width:100%;border-collapse:collapse;font-size:14px}
.table thead th{
  text-align:left;padding:10px;border-bottom:1px solid #2a355f;
  color:#cbd5e1;font-weight:600;background:#0d1430;position:sticky;top:0;z-index:1
}
.table td{padding:10px;border-bottom:1px solid #1b2342;color:#dbe3f5}
.table tr:hover td{background:#0e1534}

/* Pills / Status */
.pill{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid #2a355f;background:var(--pill)}
.pill.good{color:#bbf7d0;background:rgba(33,192,122,.13);border-color:rgba(33,192,122,.35)}
.pill.warn{color:#ffe3ad;background:rgba(255,176,32,.12);border-color:rgba(255,176,32,.35)}
.pill.bad{ color:#ffb3bd;background:rgba(255,85,104,.12); border-color:rgba(255,85,104,.35)}

/* Code blocks */
code, .mono{font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace}
code{background:#0a1228;border:1px solid #1f2740;border-radius:8px;padding:2px 6px;color:#c8d1ff}

/* Footer */
.footer{margin:28px 0;color:var(--muted);font-size:12px;text-align:center}

.notice{color:#dbe3f5;font-size:13px;margin:10px 0}

/* --- Hero layout --- */
.hero{display:grid;grid-template-columns:1.2fr 1fr;gap:22px;align-items:center}
@media(max-width:960px){.hero{grid-template-columns:1fr}}
.hero-copy h2{font-size:28px;letter-spacing:.2px;margin:2px 0 6px}
.checks{margin:10px 0 0;padding:0;list-style:none}
.checks li{margin:6px 0;color:#dbe3f5;position:relative;padding-left:18px}
.checks li:before{content:"✓";position:absolute;left:0;top:0;color:#21c07a}

.upload-form{margin-top:6px}
.dropzone{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  border:1px dashed #2a355f;border-radius:14px;background:#0d1430;min-height:160px;
  text-align:center; padding:18px; cursor:pointer; transition:.2s ease;
}
.dropzone .dz-icon{font-size:26px;opacity:.85;margin-bottom:6px}
.dropzone .dz-text{font-size:14px}
.dropzone.dz-hover{background:#0f1840}
.dropzone.dz-has-files{border-color:#21c07a}
.hidden-input{display:none}

.file-pickers{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.file-pickers input[type=file]{background:#0b142f;border:1px solid #2a355f}
.actions{display:flex;gap:10px;align-items:center;margin-top:14px}
.small{font-size:12px}

.trust{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:16px 0}
.chip{border:1px solid #2a355f;background:#0e1534;color:#cbd5e1;padding:6px 10px;border-radius:999px;font-size:12px}

/* Titles in cards */
.card-title{margin:0 0 6px 0;font-size:15px}
.hintbox{background:#0d1430;border:1px solid #1f2740;padding:10px;border-radius:10px;overflow:auto}
.steps{margin:6px 0 0 18px}
.steps li{margin:8px 0}

/* Inputs, progress, toast, light theme support */
.input{
  background:#0d1430;border:1px solid #2a355f;border-radius:10px;color:#dbe3f5;padding:8px 10px
}
.progress{width:100%;height:8px;background:#0d1430;border:1px solid #1f2740;border-radius:999px;margin-top:10px}
.progress .bar{height:100%;width:0;background:linear-gradient(90deg,#5c86ff,#7aa3ff);border-radius:999px;transition:width .2s ease}
.toast{
  position:fixed;bottom:24px;left:50%;transform:translateX(-50%);
  background:#0e1632;border:1px solid #2a355f;color:#e9edf7;padding:12px 16px;border-radius:12px;display:none
}

/* Light theme (toggle via data-theme="light" on <html>) */
html[data-theme="light"]{
  --bg:#f6f7fb; --panel:#ffffff; --panel-2:#fdfdfd; --ink:#111827; --muted:#6b7280; --line:#e5e7eb;
  --brand:#284bff; --brand-2:#4c6dff; --good:#0ea371; --warn:#d97706; --bad:#e11d48; --pill:#eef2ff
}
html[data-theme="light"] .tag{color:#1e3a8a;background:#eef2ff;border-color:#c7d2fe}
html[data-theme="light"] .card{box-shadow:0 10px 30px rgba(17,24,39,.06)}
html[data-theme="light"] .dropzone{background:#f2f4ff;border-color:#c7d2fe}
html[data-theme="light"] .mono, html[data-theme="light"] code{background:#f3f4f6;border-color:#e5e7eb;color:#111827}
