:root { --bg:#f8fafc; --card:#fff; --text:#0f172a; --muted:#64748b; --line:#e2e8f0;
  --accent:#dc2626; --ok:#16a34a; --warn:#b45309; --radius:12px; color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#0b1120; --card:#111827; --text:#e5e7eb; --muted:#94a3b8; --line:#1f2937; --warn:#fbbf24; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin:0; font:16px/1.45 system-ui, -apple-system, sans-serif; background:var(--bg); color:var(--text);
  padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.top { display:flex; justify-content:space-between; align-items:center; padding:12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top)); background:#0f172a; color:#fff; }
.top select { width:auto; background:transparent; color:#fff; border:1px solid #334155; border-radius:8px; padding:4px 6px; }
main { max-width:760px; margin:0 auto; padding:16px; }
h1 { font-size:1.4rem; margin:.5rem 0 1rem; }
.card, .list li { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px; margin-bottom:12px; }
.list { list-style:none; padding:0; margin:0 0 12px; }
.list li { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.list li.col { flex-direction:column; }
.list a { color:inherit; text-decoration:none; display:flex; flex-direction:column; flex:1; }
.row { display:flex; justify-content:space-between; width:100%; gap:8px; }
small { color:var(--muted); display:block; }
small.warn { color:var(--warn); }
label { display:block; margin-bottom:10px; }
label span { display:block; font-size:.85rem; color:var(--muted); margin-bottom:4px; }
input, select, textarea { width:100%; font:inherit; padding:10px; border:1px solid var(--line); border-radius:8px;
  background:var(--bg); color:var(--text); }
button { font:inherit; border:0; border-radius:8px; padding:10px 14px; background:var(--accent); color:#fff; cursor:pointer; }
button.secondary { background:#475569; } button.danger { background:#7f1d1d; }
form.inline { display:flex; flex-wrap:wrap; gap:8px; width:100%; margin-top:8px; }
form.inline input { flex:1 1 160px; width:auto; }
summary { cursor:pointer; font-weight:600; padding:4px 0; }
details form { margin-top:10px; }
.badge { font-size:.75rem; padding:3px 8px; border-radius:999px; background:var(--line); white-space:nowrap; }
.s-approved, .s-completed, .s-verified { background:#dcfce7; color:#166534; }
.s-rejected, .s-expired { background:#fee2e2; color:#991b1b; }
.s-submitted, .s-under_review, .s-info_requested { background:#fef3c7; color:#92400e; }
.back { color:var(--muted); text-decoration:none; }
#tabs { position:fixed; bottom:0; left:0; right:0; display:flex; background:var(--card); border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom); }
#tabs a { flex:1; text-align:center; padding:14px 4px; color:var(--text); text-decoration:none; font-weight:600; }
#toast { position:fixed; left:16px; right:16px; bottom:80px; max-width:520px; margin:0 auto; background:#0f172a; color:#fff;
  padding:12px 16px; border-radius:10px; }
#toast.error { background:#991b1b; }

/* ---------- Header: NES logo, powered by SYNETCO, transparent bar ---------- */
.top { background:transparent; color:var(--text); border-bottom:1px solid var(--line); gap:1rem; }
.top select { color:var(--text); border-color:var(--line); }
.top .brand { display:flex; align-items:center; gap:.6rem; color:inherit; text-decoration:none; }
.brand-logo { height:108px; width:auto; display:block; border-radius:4px; }
.top .powered { display:flex; align-items:center; gap:.4rem; margin-right:auto; font-size:.75rem; color:var(--muted); }
.top .powered img { height:14px; width:auto; display:block; }
@media (max-width: 600px) {
  .brand-logo { height:56px !important; }
  .top { flex-wrap:wrap; }
  .top .brand strong { font-size:.95rem; }
}

/* ---------- Tabs: current page highlighted ---------- */
#tabs a.active { color:var(--accent); }

/* ---------- Administration ---------- */
.subnav { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.subnav a { padding:6px 12px; border:1px solid var(--line); border-radius:999px; color:var(--text);
  text-decoration:none; font-size:.9rem; background:var(--card); }
.subnav a.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.hint { color:var(--muted); font-size:.9rem; margin:0 0 12px; }
.notice { border-color:var(--ok); }
.notice .pw { display:flex; gap:8px; align-items:center; margin:8px 0; flex-wrap:wrap; }
.notice code { font-size:1.15rem; padding:6px 10px; background:var(--bg); border:1px solid var(--line);
  border-radius:8px; user-select:all; }
.list li > .row > div { flex:1; min-width:0; }
.actions { display:flex; gap:8px; margin-top:8px; }
details > form { margin-top:10px; }
.row { align-items:flex-start; }
.row > .badge, .row > button { align-self:flex-start; flex-shrink:0; }
@media (max-width: 600px) {
  #tabs a { font-size:.78rem; padding:12px 2px; }
}
