:root { --bg:#f6f7f9; --card:#fff; --ink:#1b2430; --muted:#5d6b7c; --line:#dde2e8; --brand:#0b5fff; --ok:#0a7d33; --bad:#b3261e; --warn:#8a5a00; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); }
header { background:#10243e; color:#fff; padding:14px 24px; display:flex; align-items:center; gap:16px; }
header h1 { font-size:18px; margin:0; font-weight:650; letter-spacing:.2px; }
header .sp { flex:1; }
main { max-width:1100px; margin:24px auto; padding:0 16px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:20px; margin-bottom:18px; }
.card h2 { margin:0 0 12px; font-size:17px; }
label { display:block; font-weight:600; margin:12px 0 4px; }
input, select, textarea, button { font:inherit; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea { width:100%; padding:8px 10px; border:1px solid var(--line); border-radius:6px; background:#fff; }
textarea { min-height:90px; resize:vertical; }
button { cursor:pointer; border:1px solid var(--brand); background:var(--brand); color:#fff; border-radius:6px; padding:8px 14px; }
button.secondary { background:#fff; color:var(--brand); }
button.danger { background:var(--bad); border-color:var(--bad); }
button:disabled { opacity:.5; cursor:default; }
.row { display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end; }
.row > * { flex:1 1 180px; }
.grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:0 16px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--muted); font-weight:600; }
tr.click:hover { background:#eef3ff; cursor:pointer; }
.pill { display:inline-block; padding:1px 8px; border-radius:99px; font-size:12px; font-weight:650; background:#e8edf3; }
.pill.Active, .pill.Approved { background:#dff3e6; color:var(--ok); }
.pill.Submitted, .pill.Pending, .pill.Suspended { background:#fff0d4; color:var(--warn); }
.pill.Rejected, .pill.Revoked, .pill.Expired, .pill.Retired { background:#fde5e3; color:var(--bad); }
.muted { color:var(--muted); }
.msg { padding:10px 12px; border-radius:6px; margin:10px 0; }
.msg.err { background:#fde5e3; color:var(--bad); }
.msg.ok { background:#dff3e6; color:var(--ok); }
.msg.warn { background:#fff0d4; color:var(--warn); }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; background:#eef1f5; padding:2px 6px; border-radius:4px; word-break:break-all; }
.tabs { display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap; }
.tabs button { background:#fff; color:var(--ink); border-color:var(--line); }
.tabs button.on { background:var(--brand); color:#fff; border-color:var(--brand); }
.checks { display:flex; flex-wrap:wrap; gap:6px 18px; }
.checks label { font-weight:400; margin:0; display:flex; gap:6px; align-items:center; }
.checks input { width:auto; }
.hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.hidden { display:none; }
.kv { display:grid; grid-template-columns:170px 1fr; gap:4px 12px; margin:8px 0; }
.kv div:nth-child(odd) { color:var(--muted); }

/* ---- admin console (phase 3) ---- */
header form.search { flex:0 1 320px; } header form.search input { padding:6px 10px; border-radius:6px; border:0; width:100%; }
nav#nav { background:#fff; border-bottom:1px solid var(--line); padding:0 16px; display:flex; gap:2px; flex-wrap:wrap; }
nav#nav a { padding:11px 14px; color:var(--ink); text-decoration:none; font-weight:600; border-bottom:3px solid transparent; }
nav#nav a.on { color:var(--brand); border-bottom-color:var(--brand); }
.badge { display:inline-block; min-width:18px; padding:0 6px; margin-left:6px; border-radius:99px; background:var(--bad); color:#fff; font-size:12px; text-align:center; }
.badge.warn { background:#c77c00; }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin-bottom:18px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px 16px; }
.stat a { color:inherit; text-decoration:none; } .stat .n { font-size:28px; font-weight:700; line-height:1.1; } .stat .l { color:var(--muted); font-size:13px; }
.stat .sub { font-size:13px; margin-top:6px; } .stat .sub.bad { color:var(--bad); } .stat .sub.warn { color:var(--warn); }
.pill.danger { background:#fde5e3; color:var(--bad); } .pill.warn { background:#fff0d4; color:var(--warn); } .pill.info { background:#e6eefc; color:#1b4aa0; }
.pill.ok, .pill.Registered { background:#e8edf3; } .pill.overdue { background:#fff0d4; color:var(--warn); } .pill.locked { background:#fde5e3; color:var(--bad); }
.overlay { position:fixed; inset:0; background:rgba(16,36,62,.55); display:flex; align-items:flex-start; justify-content:center; padding:6vh 16px; z-index:50; overflow:auto; }
.modal-card { background:#fff; border-radius:12px; padding:22px; width:min(560px,100%); box-shadow:0 20px 60px rgba(0,0,0,.35); }
.modal-card h2 { margin-top:0; }
#toasts { position:fixed; right:16px; bottom:16px; display:flex; flex-direction:column; gap:8px; z-index:60; max-width:min(520px,90vw); }
.row-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
button.small { padding:3px 9px; font-size:13px; }
.pager { display:flex; gap:10px; align-items:center; margin:10px 0 0; color:var(--muted); }
.filters { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-bottom:12px; } .filters > div { flex:0 1 200px; } .filters label { margin-top:0; }
a.link, td a { color:var(--brand); text-decoration:none; } td a:hover, a.link:hover { text-decoration:underline; }
.cols2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(380px,1fr)); gap:18px; }
.alert-row { display:flex; gap:10px; align-items:flex-start; padding:8px 0; border-bottom:1px solid var(--line); } .alert-row:last-child { border-bottom:0; }
.alert-row .t { font-weight:600; } .alert-row .d { color:var(--muted); font-size:13px; }
.secret { font-size:16px; letter-spacing:.5px; }
.pill.Current { background:#dff3e6; color:var(--ok); } .pill.Standby { background:#e6eefc; color:#1b4aa0; }

/* ---- localisation ---- */
.lang-switch { display:flex; gap:6px; } .lang-switch button.on { background:var(--brand); color:#fff; }
code { direction:ltr; unicode-bidi:isolate; }
[dir=rtl] .kv { direction:rtl; } [dir=rtl] ol { padding-inline-start:24px; padding-inline-end:0; }
