/* Tensor KYC portal - light, matte, minimally warm; navy bands; teal accents. No dark mode. */
@font-face { font-family: 'Inter Tight'; src: url('../fonts/InterTight-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Inter Tight'; src: url('../fonts/InterTight-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; }

:root {
  --navy: #101820;
  --navy-2: #1c2834;
  --navy-soft: #e8ebee;
  --teal: #0f7c86;
  --teal-soft: #e3f0f1;
  --bg: #f7f7f4;
  --card: #ffffff;
  --line: #e4e3de;
  --text: #1b232c;
  --muted: #5d656d;
  --ok: #1e6e55;     --ok-soft: #e4f1ec;
  --warn: #9a6512;   --warn-soft: #f7eedd;
  --bad: #a3392d;    --bad-soft: #f6e6e3;
  --info: #2c4a66;   --info-soft: #e6edf4;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light; }
body { font-family: 'Inter Tight', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; font-style: normal;
       background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; min-height: 100vh;
       display: flex; flex-direction: column; }
em, i { font-style: normal; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; color: var(--navy); }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
.mono, code { font-family: var(--mono); font-size: 0.86em; letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

/* header */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner, .band-inner, .container, .footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 600; letter-spacing: 0.32em; font-size: 15px; }
.brand-sub { font-size: 11px; letter-spacing: 0.22em; color: var(--teal); text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 18px; font-size: 14px; color: var(--muted); }
.top-actions form { display: inline; }
.lang a, .lang button { color: var(--muted); font-size: 13px; letter-spacing: 0.06em; }
.lang .active { color: var(--navy); font-weight: 600; }
.linkbtn { background: none; border: 0; font: inherit; color: var(--teal); cursor: pointer; padding: 0; }

/* navy band */
.band { background: var(--navy); color: #fff; }
.band-inner { padding-top: 26px; padding-bottom: 0; }
.band .eyebrow { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #8fc3c8; }
.band h1 { color: #fff; margin: 4px 0 18px; }
.tabs { display: flex; gap: 4px; }
.tabs a { color: #c9d1d8; padding: 10px 16px 12px; border-bottom: 3px solid transparent; font-size: 14px; }
.tabs a:hover { color: #fff; text-decoration: none; }
.tabs a.active { color: #fff; border-bottom-color: var(--teal); font-weight: 600; }

.container { padding-top: 28px; padding-bottom: 48px; flex: 1; width: 100%; }

/* cards / grid */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; margin-bottom: 20px; }
.card h2 { margin-bottom: 12px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 2fr 1fr; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; color: var(--text); }
.tile:hover { text-decoration: none; border-color: var(--teal); }
.tile .n { font-size: 26px; font-weight: 600; color: var(--navy); }
.tile .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tile.alert .n { color: var(--bad); }

/* status summary */
.summary { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.summary > div { padding: 18px 22px; border-right: 1px solid var(--line); }
.summary > div:last-child { border-right: 0; }
.summary .k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.summary .v { font-size: 18px; font-weight: 600; color: var(--navy); }
.progress { height: 6px; background: var(--navy-soft); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--teal); }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
     color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ref { font-size: 12px; color: var(--muted); }

/* pills */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
        white-space: nowrap; background: var(--navy-soft); color: var(--navy); }
.pill.approved, .pill.complete, .pill.accepted, .pill.low { background: var(--ok-soft); color: var(--ok); }
.pill.missing, .pill.rejected, .pill.expired, .pill.action_required, .pill.blocked, .pill.high, .pill.overdue
  { background: var(--bad-soft); color: var(--bad); }
.pill.expiring, .pill.escalated, .pill.incomplete { background: var(--warn-soft); color: var(--warn); }
.pill.submitted, .pill.under_review, .pill.in_review { background: var(--info-soft); color: var(--info); }
.pill.req { background: var(--navy-soft); color: var(--navy); }
.pill.optional, .pill.tbc, .pill.superseded { background: #efefeb; color: var(--muted); }
.pill.standard { background: var(--teal-soft); color: var(--teal); }

/* buttons & forms */
.btn { display: inline-block; background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: 7px;
       padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--navy-2); text-decoration: none; }
.btn.teal { background: var(--teal); border-color: var(--teal); }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--navy); }
.btn.danger { background: transparent; color: var(--bad); border-color: #e3c4bf; }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn.block { width: 100%; text-align: center; padding: 12px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.form-row .help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.form-row.inline { display: flex; gap: 16px; }
.form-row.inline > div { flex: 1; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=file], select, textarea {
  width: 100%; font: inherit; font-size: 14.5px; padding: 9px 11px; border: 1px solid #d6d5cf; border-radius: 7px;
  background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-soft); border-color: var(--teal); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--teal); vertical-align: -3px; margin-right: 6px; }
.errorlist { list-style: none; color: var(--bad); font-size: 13px; margin-top: 4px; }
.check-row label { font-weight: 400; color: var(--text); display: flex; gap: 8px; align-items: flex-start; }
.hidden { display: none; }
form.card h2 { margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
form.card h2:first-of-type { margin-top: 4px; padding-top: 0; border-top: 0; }
.audit td:nth-child(5) { min-width: 150px; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }

/* messages */
.messages { list-style: none; margin-bottom: 18px; }
.messages li { padding: 11px 16px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; border: 1px solid; }
.messages .success { background: var(--ok-soft); color: var(--ok); border-color: #c9e2d8; }
.messages .error { background: var(--bad-soft); color: var(--bad); border-color: #ebccc7; }
.messages .info, .messages .warning { background: var(--warn-soft); color: var(--warn); border-color: #ecdab8; }

.note { background: var(--teal-soft); border-left: 3px solid var(--teal); padding: 12px 16px; border-radius: 6px;
        font-size: 13.5px; color: var(--navy); margin-bottom: 16px; }
.note.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.note.bad { background: var(--bad-soft); border-left-color: var(--bad); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.reasons { margin: 6px 0 0 18px; font-size: 13.5px; }
details summary { cursor: pointer; color: var(--teal); font-size: 13.5px; }
.decision { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
form.decision { flex-direction: column; align-items: flex-start; }
.decision-row { display: flex; gap: 6px; align-items: center; }
form.decision:not(:has(.decision-row)) { flex-direction: row; align-items: center; }
.decision input[type=text] { width: 220px; padding: 5px 9px; font-size: 13px; }

/* login */
.login-wrap { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 0px); }
.login-side { background: var(--navy); color: #fff; padding: 48px 56px; display: flex; flex-direction: column;
              justify-content: flex-start; }
.login-side h1 { color: #fff; font-size: 22px; margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: .01em; }
.login-logo { width: 120px; margin-bottom: 28px; }
.login-logo img { width: 100%; display: block; mix-blend-mode: multiply; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 48px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 22px; margin-bottom: 6px; }
.login-card .lead { color: var(--muted); margin-bottom: 26px; font-size: 14px; }

/* footer */
.footer { background: var(--navy); color: #aab4bd; font-size: 12.5px; }
.footer-inner { padding-top: 22px; padding-bottom: 22px; display: flex; justify-content: space-between; gap: 24px; }
.footer strong { color: #fff; font-weight: 600; }

/* ---- responsive: tablet ---- */
@media (max-width: 900px) {
  .grid-2, .grid-3, .login-wrap { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary > div { border-bottom: 1px solid var(--line); }
  .summary > div:nth-child(2n) { border-right: 0; }
  .summary > div:first-child { grid-column: 1 / -1; border-right: 0; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .login-side { padding: 32px; }
  .login-main { padding: 32px 20px; }
  .footer-inner { flex-direction: column; gap: 10px; }
  .footer .right { text-align: left; }
  /* wide reviewer tables scroll inside their card instead of overflowing the page */
  .card table:not(.stack) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---- responsive: phone ---- */
@media (max-width: 640px) {
  body { font-size: 15px; }
  h1 { font-size: 21px; }
  .topbar-inner, .band-inner, .container, .footer-inner { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { height: auto; min-height: 60px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; gap: 8px; }
  .brand img { height: 34px; }
  .brand-name { font-size: 13px; letter-spacing: 0.26em; }
  .brand-sub { font-size: 9.5px; }
  .top-actions { gap: 12px; font-size: 13px; flex-wrap: wrap; justify-content: flex-end; }
  .top-actions .who { display: none; }
  .band-inner { padding-top: 18px; }
  .band h1 { margin-bottom: 12px; }
  .tabs { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 8px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { white-space: nowrap; padding: 10px 10px 12px; flex: 0 0 auto; }
  .container { padding-top: 18px; padding-bottom: 32px; }
  .card { padding: 16px; border-radius: 8px; margin-bottom: 14px; }
  .card-head { flex-wrap: wrap; gap: 10px; }
  .summary { padding: 0; }
  .summary > div { padding: 14px 16px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form-row.inline { flex-direction: column; gap: 16px; }
  /* 16px inputs stop iOS Safari from zooming on focus */
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=file], select, textarea { font-size: 16px; }
  input[type=date] { min-height: 42px; }
  .actions { flex-wrap: wrap; }
  .actions .btn { flex: 1 1 auto; text-align: center; padding: 11px 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .decision input[type=text] { width: 100%; }
  .decision-row { flex-wrap: wrap; }
  .login-side { padding: 22px 20px; }
  .login-side h1 { font-size: 20px; }
  .login-logo { width: 96px; margin-bottom: 20px; }

  /* LP tables become one card per row */
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { position: relative; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0; padding: 3px 0; text-align: left; }
  table.stack td.title { font-weight: 600; color: var(--navy); padding-right: 92px; }
  table.stack td.title .sub { font-weight: 400; }
  table.stack td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
  table.stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.06em; }
  table.stack td.act { position: absolute; top: 12px; right: 0; width: auto; padding: 0; }
  table.stack td.act:empty { display: none; }
  table.stack td.hide-sm, table.stack td[data-label].hide-sm { display: none; }
}
.login-lang { display: flex; justify-content: flex-end; margin-bottom: 28px; }
.right { text-align: right; }
.mt { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
progress.bar { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 3px;
  background: var(--navy-soft); margin: 10px 0 4px; overflow: hidden; }
progress.bar::-webkit-progress-bar { background: var(--navy-soft); border-radius: 3px; }
progress.bar::-webkit-progress-value { background: var(--teal); border-radius: 3px; }
progress.bar::-moz-progress-bar { background: var(--teal); }

/* --- invitations / registration / direct upload --------------------------- */
.inline-form { display: inline-block; margin-right: 4px; }
.mb { margin-bottom: 14px; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 220px; margin: 0 0 12px; }
.qr svg { width: 100%; height: auto; display: block; }
.upload-progress { display: none; margin-top: 12px; }
.upload-progress.active { display: block; }
.upload-progress .bar { width: 100%; height: 8px; }
.upload-progress .status { font-size: 13px; color: var(--muted); margin-top: 6px; }
