/* Shoe Control Plane — shared shell.
   Accent switches with data-shoe-type so a golden shoe still reads gold. */
:root {
  color-scheme: dark;
  --bg:            #0b1220;
  --bg-card:       #121c31;
  --bg-panel:      rgba(15, 23, 42, 0.55);
  --bg-sunken:     rgba(0, 0, 0, 0.28);
  --border:        #223252;
  --text:          #e5eefc;
  --text-muted:    #a9bddb;
  --accent:        #3b82f6;
  --accent-deep:   #2563eb;
  --accent-light:  #bfdbfe;
  --accent-ink:    #06122b;
  --accent-glow:   rgba(59, 130, 246, 0.35);
  --ok:            #10b981;
  --warn:          #f59e0b;
  --err:           #ef4444;
}
:root[data-shoe-type="golden"] {
  --bg:            #1a1300;
  --bg-card:       #211900;
  --bg-panel:      rgba(33, 25, 0, 0.75);
  --border:        rgba(245, 197, 24, 0.28);
  --text:          #fef3c7;
  --text-muted:    #b8960a;
  --accent:        #f5c518;
  --accent-deep:   #c9960c;
  --accent-light:  #fde68a;
  --accent-ink:    #1a1000;
  --accent-glow:   rgba(245, 197, 24, 0.35);
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  transition: background .25s ease, color .25s ease;
}
a { color: var(--accent); }

/* ── Chrome ─────────────────────────────────────────────── */
header.app {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  background: var(--bg-card); position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: var(--accent-ink); font-weight: 700; font-size: 16px;
}
.brand h1 { margin: 0; font-size: 16px; font-weight: 700; color: var(--accent); }
.brand p { margin: 0; font-size: 12px; color: var(--text-muted); }
nav.app { display: flex; gap: 4px; }
nav.app a {
  padding: 7px 13px; border-radius: 9px; font-size: 13.5px;
  text-decoration: none; color: var(--text-muted);
}
nav.app a:hover { background: var(--bg-sunken); color: var(--text); }
nav.app a.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.who { font-size: 12.5px; color: var(--text-muted); text-align: right; line-height: 1.35; }
.who b { color: var(--text); display: block; font-weight: 600; }

main.app { max-width: 1280px; margin: 0 auto; padding: 22px 20px 48px; }

/* ── Primitives ─────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
}
h2.section { font-size: 17px; margin: 0 0 4px; }
p.section-note { margin: 0 0 18px; font-size: 13px; color: var(--text-muted); }

label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
input, select, textarea {
  background: var(--bg-sunken); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px; font-size: 14px; font-family: inherit; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button {
  cursor: pointer; font-family: inherit; font-size: 14px;
  border-radius: 9px; padding: 9px 15px; border: 1px solid var(--border);
  background: var(--bg-sunken); color: var(--text);
}
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: var(--accent-ink); border: none; font-weight: 700;
}
button.danger { background: var(--err); border: none; color: #fff; font-weight: 600; }
button.subtle { background: transparent; }

.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.grid { display: grid; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; padding: 0 12px 9px 0; font-size: 11px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-wrap { overflow-x: auto; }

.pill {
  display: inline-block; padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.pill-ok    { background: rgba(16,185,129,.16); color: var(--ok); }
.pill-warn  { background: rgba(245,158,11,.16); color: var(--warn); }
.pill-err   { background: rgba(239,68,68,.16);  color: var(--err); }
.pill-muted { background: var(--bg-sunken); color: var(--text-muted); }
.pill-gold  { background: rgba(245,197,24,.16); color: #f5c518; }

.empty { padding: 34px; text-align: center; color: var(--text-muted); font-size: 14px; }
.muted { color: var(--text-muted); font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

/* ── Toasts ─────────────────────────────────────────────── */
#toasts {
  position: fixed; bottom: 20px; right: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
  padding: 10px 16px; border-radius: 10px; font-size: 13px; max-width: 340px;
  background: var(--bg-card); border: 1px solid var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,.5); word-break: break-word;
  animation: toast-in .18s ease;
}
.toast.err { border-color: var(--err); color: #fecaca; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

/* ── Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 16px; font-size: 16px; }
.modal .row { margin-top: 18px; justify-content: flex-end; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
