:root {
  --navy: #1d2742;
  --navy-2: #26314f;
  --orange: #e85d04;
  --teal: #33cccc;
  --bg: #f3f5f8;
  --card: #ffffff;
  --line: #e2e7ee;
  --muted: #6b7688;
  --ok: #16a34a;
  --bad: #dc2626;
  --warn: #d97706;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--navy);
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-weight: 400; }
.brand { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.badge { background: var(--orange); color: #fff; width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.login-card { background: var(--card); padding: 32px; border-radius: 16px; width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; }
.login-card .sub { margin: 6px 0 20px; color: var(--muted); }
.login-card label { font-size: 12px; font-weight: 600; margin: 12px 0 4px; }
.login-card input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.note { font-size: 11px; color: var(--muted); margin-top: 14px; }
.err { color: var(--bad); font-size: 13px; margin-top: 10px; min-height: 16px; }

/* buttons */
.btn { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; }
.btn:hover { border-color: #cdd5e0; }
.btn.primary { background: var(--orange); color: #fff; border: none; margin-top: 20px; padding: 11px; font-size: 14px; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.go { background: var(--navy); color: #fff; border: none; }
.btn.promote { background: var(--teal); color: #06373a; border: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 6px 10px; font-size: 12px; }

/* top */
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; background: var(--navy); color: #fff; }
.top .brand { color: #fff; }
.top .muted { color: #b8c0d0; }
.top-right { display: flex; align-items: center; gap: 12px; }
.top-right .btn { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }

.live-ribbon { display: flex; gap: 16px; padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.live-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 220px; }
.live-item .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.live-item .val { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }

.tabs { display: flex; gap: 4px; padding: 16px 24px 0; }
.tab { background: transparent; border: none; padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; border-radius: 8px 8px 0 0; font-family: inherit; }
.tab.active { color: var(--navy); background: #fff; border: 1px solid var(--line); border-bottom: 2px solid var(--orange); }
.tab-body { padding: 20px 24px 60px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(29,39,66,.04); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ver { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-size: 16px; }
.bid { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.changelog { margin: 8px 0 0; font-size: 13px; white-space: pre-wrap; color: #33405c; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pill.dev { background: #eef6ff; color: #1e5fb0; }
.pill.prod { background: #fff1e8; color: var(--orange); }
.pill.ok { background: #e8f7ee; color: var(--ok); }
.pill.bad { background: #fdeaea; color: var(--bad); }
.pill.warn { background: #fef4e6; color: var(--warn); }
.pill.gray { background: #eef1f5; color: var(--muted); }
.stepline { font-size: 12px; color: var(--muted); margin-top: 6px; }

.pending-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 12px; padding: 18px 20px; max-width: 720px; }
.pending-card h3 { margin: 0 0 8px; font-family: 'Plus Jakarta Sans'; }
.pending-card code { background: #f1f4f8; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

table.audit { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.audit th, table.audit td { text-align: left; padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--line); }
table.audit th { background: #f7f9fc; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.modal { position: fixed; inset: 0; background: rgba(15,20,35,.6); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-card { background: #fff; border-radius: 12px; width: min(900px, 92vw); max-height: 82vh; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; }
.modal-card pre { margin: 0; padding: 16px 18px; overflow: auto; font-size: 12px; line-height: 1.5; font-family: ui-monospace, monospace; white-space: pre-wrap; }

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--ok); }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }
