/* ============================================================
   ARO Document Portal — SWISS / MONOSPACE design system
   Near-monochrome, ink-forward, IBM Plex Mono for labels &
   numbers, hairline borders over shadows. Scoped under .aro.
   ============================================================ */

.aro {
  /* ink-forward neutrals */
  --ink:   #14161A;   /* primary text + primary actions */
  --ink-2: #3A3F47;
  --muted: #6B7280;
  --faint: #9CA2AC;
  --bg:    #FFFFFF;
  --bg-2:  #FAFBFC;
  --card:  #FFFFFF;
  --line:  #E7E9ED;
  --line-2:#EFF1F4;

  /* status accents — used as dots & sparing fills, never the whole UI */
  --blue:     #1A4D8F;  --blue-50: #EEF3F9;  --blue-100:#DCE7F2;
  --green:    #2E7D54;  --green-700:#266B47; --green-50:#EBF3EE;
  --amber:    #9A6A12;  --amber-bg: #C77F12; --amber-50:#FAF4E9;
  --red:      #B23B2E;  --red-50:  #FAEDEB;

  /* legacy aliases kept so existing markup resolves */
  --blue-700: var(--ink);
  --blue-800: #000;

  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --r-card: 11px;
  --r-input: 9px;
  --r-chip: 999px;

  --sh-sm: 0 1px 2px rgba(20,22,26,.04);
  --sh-md: 0 4px 18px rgba(20,22,26,.06);
  --sh-lg: 0 18px 44px rgba(20,22,26,.12);
  --sh-blue: none;

  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.012em;
}

.aro *, .aro *::before, .aro *::after { box-sizing: border-box; }
.aro p { margin: 0; }
.aro h1,.aro h2,.aro h3,.aro h4 { margin: 0; font-weight: 700; letter-spacing: -0.028em; }
.aro button { font-family: inherit; cursor: pointer; }

/* ---------- APP SHELL (mobile) ---------- */
.aro-app { height: 100%; background: var(--bg); color: var(--ink); display: flex; flex-direction: column; font-size: 16px; line-height: 1.5; position: relative; }
.aro-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 30px; }
.aro-scroll::-webkit-scrollbar { width: 0; }

.aro-topbar { padding: 60px 22px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg); position: sticky; top: 0; z-index: 8; }
.aro-topbar.solid { border-bottom: 1px solid var(--line); }
.aro-brand { display: flex; align-items: center; gap: 11px; }
.aro-logo { width: 34px; height: 34px; border-radius: 8px; background: var(--blue); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -0.04em; }
.aro-brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.aro-brand-txt b { font-size: 15px; letter-spacing: -0.02em; }
.aro-brand-txt span { font-family: var(--mono); font-size: 10px; color: var(--faint); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }

.aro-iconbtn { width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.aro-iconbtn:hover { background: var(--bg-2); }
.aro-back { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--blue); font-weight: 600; font-size: 14px; padding: 6px 4px; margin-left: -4px; }

.aro-pad { padding: 0 22px; }
.aro-pad-b { padding-bottom: 28px; }

/* ---------- TYPE ---------- */
.aro-h1 { font-size: 27px; line-height: 1.16; }
.aro-h2 { font-size: 21px; line-height: 1.22; }
.aro-h3 { font-size: 17px; line-height: 1.3; }
.aro-lead { font-size: 15.5px; color: var(--muted); line-height: 1.5; }
.aro-eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.aro-small { font-size: 13px; color: var(--muted); }
.aro-tnum { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- BUTTONS ---------- */
.aro-btn { --bh: 52px; height: var(--bh); border: 0; border-radius: var(--r-input); font-size: 15.5px; font-weight: 700; letter-spacing: -0.015em; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 22px; width: 100%; transition: transform .12s ease, background .15s ease, border-color .15s ease; user-select: none; white-space: nowrap; }
.aro-btn:active { transform: translateY(1px); }
.aro-btn-primary { background: var(--blue); color: #fff; }
.aro-btn-primary:hover { background: #163F75; }
.aro-btn-secondary { background: var(--card); color: var(--blue); box-shadow: inset 0 0 0 1px var(--line); }
.aro-btn-secondary:hover { background: var(--bg-2); }
.aro-btn-tertiary { background: transparent; color: var(--blue); height: 44px; }
.aro-btn-tertiary:hover { color: var(--muted); }
.aro-btn-ghost { background: var(--bg-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.aro-btn-success { background: var(--green); color: #fff; }
.aro-btn[disabled] { opacity: .45; pointer-events: none; }
.aro-btn-sm { --bh: 42px; font-size: 13px; width: auto; padding: 0 15px; }

/* ---------- STATUS CHIP — mono tag + dot ---------- */
.aro-chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.11em; text-transform: uppercase; white-space: nowrap; background: none; padding: 0; height: auto; }
.aro-chip .cdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: currentColor; }
.aro-chip svg { display: none; } /* legacy icon hidden — dot only */
.aro-chip.todo     { color: var(--amber); }
.aro-chip.review   { color: var(--blue); }
.aro-chip.accepted { color: var(--green); }
.aro-chip.revise   { color: var(--amber); }
.aro-chip.error    { color: var(--red); }

/* ---------- DOCUMENT CARD ---------- */
.aro-card { background: var(--card); border-radius: var(--r-card); border: 1px solid var(--line); }
.aro-doc { padding: 16px; display: flex; flex-direction: column; gap: 13px; transition: border-color .16s ease; position: relative; }
.aro-doc.tappable { cursor: pointer; }
.aro-doc.tappable:hover { border-color: #CDD2D9; }
.aro-doc.done { background: var(--bg-2); }
.aro-doc-top { display: flex; gap: 13px; align-items: flex-start; }
.aro-doc-ic { width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--blue); }
.aro-doc.accepted .aro-doc-ic { color: var(--green); }
.aro-doc.revise .aro-doc-ic { color: var(--amber-bg); }
.aro-doc-name { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.aro-doc-why { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 4px; }
.aro-doc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.aro-revise-note { background: var(--amber-50); border-radius: 8px; padding: 11px 13px; display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: #7a5410; line-height: 1.45; }
.aro-revise-note b { color: var(--amber); }

/* ---------- PROGRESS — segmented meter ---------- */
.aro-meter { border: 1px solid var(--line); border-radius: var(--r-card); padding: 17px 18px 16px; background: var(--card); }
.aro-meter-top { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted); }
.aro-meter-top b { color: var(--ink); font-size: 11px; }
.aro-seg { display: flex; gap: 4px; margin-top: 12px; }
.aro-seg i { flex: 1; height: 5px; border-radius: 1px; background: var(--line); transition: background .4s ease; }
.aro-seg i.on { background: var(--blue); }
.aro-meter-cap { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.45; }

/* legacy thin bar (staff progress) */
.aro-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.aro-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--blue); transition: width .5s cubic-bezier(.4,0,.2,1); }

/* ---------- UPLOAD ZONE ---------- */
.aro-drop { border: 1.5px dashed var(--line); border-radius: var(--r-card); background: var(--bg-2); padding: 30px 22px; display: flex; flex-direction: column; align-items: center; gap: 11px; text-align: center; transition: background .15s ease, border-color .15s ease; cursor: pointer; }
.aro-drop:hover { background: #F4F6F8; border-color: #C8CDD4; }
.aro-drop-ic { width: 54px; height: 54px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--blue); }
.aro-drop b { font-size: 16px; }
.aro-drop span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }
.aro-upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.aro-preview { display: flex; gap: 13px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-input); padding: 13px; }
.aro-preview-thumb { width: 50px; height: 62px; border-radius: 6px; flex-shrink: 0; background: repeating-linear-gradient(135deg, #f1f3f6 0 7px, #e9edf1 7px 14px); display: grid; place-items: center; color: var(--ink); border: 1px solid var(--line); }

/* ---------- ALERT ---------- */
.aro-alert { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border-radius: var(--r-input); font-size: 13.5px; line-height: 1.45; border: 1px solid transparent; }
.aro-alert b { font-weight: 700; }
.aro-alert.info { background: var(--bg-2); color: var(--ink-2); border-color: var(--line); }
.aro-alert.success { background: var(--green-50); color: var(--green-700); }
.aro-alert.attention { background: var(--amber-50); color: #7a5410; }
.aro-alert.error { background: var(--red-50); color: var(--red); }
.aro-alert .ic { flex-shrink: 0; margin-top: 1px; }

/* ---------- TRUST ---------- */
.aro-trust { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.aro-trust .lock { color: var(--blue); flex-shrink: 0; }
.aro-trust-footer { margin: 0 16px; padding: 13px 15px; border-radius: var(--r-input); background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 500; }
.aro-trust-footer svg { color: var(--blue); flex-shrink: 0; }

/* ---------- FORM FIELDS ---------- */
.aro-field { display: flex; flex-direction: column; gap: 7px; }
.aro-label { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.aro-input { height: 52px; border-radius: var(--r-input); border: 1px solid var(--line); background: var(--card); padding: 0 15px; font-size: 16px; color: var(--ink); font-family: inherit; transition: border-color .15s ease, box-shadow .15s ease; width: 100%; }
.aro-input::placeholder { color: var(--faint); }
.aro-input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,77,143,.14); }
.aro-input.invalid { border-color: var(--red); }
.aro-input.invalid:focus { box-shadow: 0 0 0 3px var(--red-50); }
.aro-help { font-size: 12.5px; color: var(--muted); }
.aro-help.err { color: var(--red); font-weight: 600; }
.aro-inwrap { position: relative; }
.aro-inwrap .eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); background: none; border: 0; padding: 6px; }

.aro-strength { display: flex; gap: 5px; margin-top: 2px; }
.aro-strength i { height: 4px; flex: 1; border-radius: 1px; background: var(--line); transition: background .2s; }

.aro-check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.aro-check .box { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); flex-shrink: 0; display: grid; place-items: center; color: #fff; transition: background .12s, border-color .12s; margin-top: 1px; }
.aro-check.on .box { background: var(--blue); border-color: var(--blue); }
.aro-check .box svg { opacity: 0; transition: opacity .12s; }
.aro-check.on .box svg { opacity: 1; }
.aro-check .lbl { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.aro-check .lbl a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- STEPPER (where things stand) ---------- */
.aro-stepper { display: flex; flex-direction: column; }
.aro-step { display: flex; gap: 14px; }
.aro-step-rail { display: flex; flex-direction: column; align-items: center; }
.aro-step-dot { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 500; background: var(--card); border: 1px solid var(--line); color: var(--faint); }
.aro-step.done .aro-step-dot { background: var(--blue); color: #fff; border-color: var(--blue); }
.aro-step.current .aro-step-dot { background: var(--card); color: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,77,143,.14); }
.aro-step-line { width: 1px; flex: 1; background: var(--line); margin: 2px 0; min-height: 26px; }
.aro-step.done .aro-step-line { background: var(--blue); }
.aro-step-body { padding-bottom: 22px; }
.aro-step-body b { font-size: 15px; }
.aro-step-body p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }

/* ---------- TIMELINE (item detail) ---------- */
.aro-tl { display: flex; flex-direction: column; }
.aro-tl-row { display: flex; gap: 13px; }
.aro-tl-rail { display: flex; flex-direction: column; align-items: center; }
.aro-tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); margin-top: 5px; flex-shrink: 0; }
.aro-tl-row.muted .aro-tl-dot { background: var(--line); }
.aro-tl-line { width: 1px; flex: 1; background: var(--line); margin: 3px 0; min-height: 16px; }
.aro-tl-body { padding-bottom: 16px; }
.aro-tl-body b { font-size: 14px; }
.aro-tl-body span { font-family: var(--mono); font-size: 11px; color: var(--muted); display: block; margin-top: 1px; }

/* ---------- ALL-DONE / EMPTY ---------- */
.aro-celebrate { text-align: center; padding: 8px 6px 0; }
.aro-celebrate .seal { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 18px; background: var(--blue); display: grid; place-items: center; color: #fff; animation: aro-pop .5s cubic-bezier(.2,1.3,.5,1); }
@keyframes aro-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.aro-empty { text-align: center; padding: 30px 16px; }
.aro-empty .ill { width: 88px; height: 88px; border-radius: 18px; margin: 0 auto 18px; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--blue); }

.aro-spin { animation: aro-rot 0.9s linear infinite; }
@keyframes aro-rot { to { transform: rotate(360deg); } }
.aro-fade { animation: aro-fade .35s ease; }
@keyframes aro-fade { from { transform: translateY(7px); } to { transform: none; } }

.aro-actionbar { padding: 14px 22px 28px; background: linear-gradient(to top, var(--bg) 72%, transparent); position: sticky; bottom: 0; z-index: 6; display: flex; flex-direction: column; gap: 10px; }
.aro-actionbar.card-bg { background: var(--card); border-top: 1px solid var(--line); }

.aro-tag { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
