/* ============================================================
   Backlink PRO Web — admin panel stylesheet
   Light theme, no external dependencies.
   ============================================================ */

:root {
  --bg:        #f5f6f8;
  --surface:   #ffffff;
  --surface-2: #fafbfc;
  --border:    #e4e7ec;
  --border-2:  #d5d9e0;
  --text:      #101828;
  --text-2:    #475467;
  --muted:     #98a2b3;
  --accent:    #1d4ed8;
  --accent-2:  #3b6ef6;
  --accent-bg: #eef3ff;
  --success:   #15803d;
  --success-bg:#e9f7ef;
  --warn:      #b45309;
  --warn-bg:   #fdf3e3;
  --danger:    #b91c1c;
  --danger-bg: #fdecec;
  --purple:    #7c3aed;
  --purple-bg: #f3eefe;
  --radius:    10px;
  --radius-lg: 14px;
  --shadow:    0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 8px 24px rgba(16,24,40,.10), 0 2px 6px rgba(16,24,40,.05);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b0b7c3; background-clip: content-box; }

/* ── Layout ─────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px; flex: 0 0 236px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; letter-spacing: .3px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 14px; }
.brand-text span { font-size: 11px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border: 0; background: transparent;
  border-radius: 8px; cursor: pointer; text-align: left;
  font-size: 13.5px; color: var(--text-2); font-weight: 500;
  transition: background .12s, color .12s;
}
.nav-item .ico { width: 16px; text-align: center; opacity: .75; font-size: 13px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-bg); color: var(--accent); }
.nav-item.active .ico { opacity: 1; }

.sidebar-foot { padding: 12px 14px 16px; border-top: 1px solid var(--border); }
.ai-pill {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 7px 9px; border-radius: 8px;
}
.ai-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: 0 0 7px; }
.ai-pill.ok .dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.ai-pill.bad .dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.ai-pill.warn .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.ver { font-size: 10.5px; color: var(--muted); margin-top: 8px; text-align: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 28px 16px; border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.page-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.view { padding: 22px 28px 60px; flex: 1; }

/* ── Cards / grid ───────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 620; }
.card-head .hint { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 14px; }

.grid { display: grid; gap: 14px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { min-width: 0; }
.spacer { flex: 1; }

/* ── KPI ────────────────────────────────────────────────── */
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow);
}
.kpi .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 26px; font-weight: 680; margin-top: 5px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.kpi.ok .v { color: var(--success); }
.kpi.warn .v { color: var(--warn); }
.kpi.bad .v { color: var(--danger); }
.kpi.acc .v { color: var(--accent); }

/* ── Forms ──────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.field .sub { font-size: 11px; color: var(--muted); }
input[type=text], input[type=number], input[type=password], input[type=email], select, textarea {
  font-family: inherit; font-size: 13px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 8px 10px; outline: none; width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-bg); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
textarea.mono { font-family: var(--mono); font-size: 12px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; font-size: 13px; font-weight: 560; border-radius: 8px;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1a45bf; border-color: #1a45bf; }
.btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.btn.success:hover { filter: brightness(.93); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(.93); }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn.warn:hover { filter: brightness(.93); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn.xs { padding: 3px 8px; font-size: 11.5px; border-radius: 6px; }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow: auto; max-height: 640px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2);
  text-align: left; font-weight: 620; font-size: 11.5px; color: var(--text-2);
  padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 8px 12px; border-bottom: 1px solid #f1f2f4; vertical-align: top; }
table.data tr:hover td { background: #fafbfc; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.mono { font-family: var(--mono); font-size: 11.5px; }
table.data .truncate { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; font-size: 13px; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  background: #eef0f3; color: var(--text-2);
}
.badge.posted { background: var(--success-bg); color: var(--success); }
.badge.pending_moderation { background: var(--warn-bg); color: var(--warn); }
.badge.failed, .badge.error { background: var(--danger-bg); color: var(--danger); }
.badge.blocked { background: var(--purple-bg); color: var(--purple); }
.badge.skipped { background: #eef0f3; color: var(--text-2); }
.badge.acc { background: var(--accent-bg); color: var(--accent); }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; }

/* ── Lists editor ───────────────────────────────────────── */
.listgroup + .listgroup { margin-top: 26px; }
.listgroup-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); margin-bottom: 14px;
}
.listgroup-head.own { background: #f3f8ff; border-color: #d3e0fd; }
.listgroup-head.target { background: #fff8f0; border-color: #f6e0b5; }
.listgroup-head strong { display: block; font-size: 13.5px; }
.listgroup-head .tag {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-top: 1px;
}
.listgroup-head.own .tag { background: var(--accent); color: #fff; }
.listgroup-head.target .tag { background: var(--warn); color: #fff; }

.listgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.listcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.listcard.side-own { border-top: 3px solid var(--accent); }
.listcard.side-target { border-top: 3px solid var(--warn); }
.listcard-head { padding: 12px 14px 10px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.listcard-head strong { font-size: 13px; }
.listcard-head .count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.urlnote { padding: 0 14px; font-size: 11px; min-height: 0; }
.urlnote:not(:empty) { padding: 8px 14px 0; }
.listcard textarea { border: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); min-height: 190px; font-family: var(--mono); font-size: 11.5px; background: var(--surface); }
.listcard textarea:focus { box-shadow: inset 0 0 0 2px var(--accent-bg); }
.listcard-foot { padding: 8px 12px; border-top: 1px solid var(--border); display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Progress / engine ──────────────────────────────────── */
.progress { height: 8px; background: #eef0f3; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .3s; }
.runstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.runstat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.runstat .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.runstat .v { font-size: 19px; font-weight: 660; font-variant-numeric: tabular-nums; margin-top: 2px; }

.console {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.65;
  background: #0f172a; color: #cbd5e1; border-radius: var(--radius);
  padding: 12px 14px; height: 280px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}
.console .t-ok { color: #4ade80; }
.console .t-warn { color: #fbbf24; }
.console .t-err { color: #f87171; }
.console .t-dim { color: #64748b; }
.console .t-acc { color: #60a5fa; }

/* ── Toast / modal ──────────────────────────────────────── */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 9px; box-shadow: var(--shadow-lg); padding: 11px 15px;
  font-size: 13px; max-width: 400px; animation: slideIn .18s ease-out;
}
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
@keyframes slideIn { from { transform: translateX(14px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-back {
  position: fixed; inset: 0; background: rgba(16,24,40,.42); z-index: 150;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 640px; max-height: 86vh; display: flex; flex-direction: column;
  animation: pop .16s ease-out;
}
.modal.wide { max-width: 940px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 14.5px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 13px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.x-btn { border: 0; background: transparent; font-size: 18px; color: var(--muted); cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.x-btn:hover { background: var(--surface-2); color: var(--text); }

/* ── Charts ─────────────────────────────────────────────── */
.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 46px; gap: 10px; align-items: center; font-size: 12px; }
.bar-row .lbl { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 16px; background: #f1f2f4; border-radius: 5px; overflow: hidden; }
/* display:block is required: <i> is inline, and an inline box ignores
   width/height, so the fill would render at zero size and the chart would
   look empty while the markup carried the right inline style. */
.bar-fill { display: block; height: 100%; min-width: 2px; border-radius: 5px; transition: width .35s; }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ── Misc ───────────────────────────────────────────────── */
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.note { background: var(--accent-bg); border: 1px solid #d3e0fd; color: #1e3a8a; border-radius: 9px; padding: 11px 14px; font-size: 12.5px; line-height: 1.55; }
.note.warn { background: var(--warn-bg); border-color: #f6e0b5; color: #7c4a04; }
.note.err { background: var(--danger-bg); border-color: #f6c9c9; color: #8b1c1c; }
.note.ok { background: var(--success-bg); border-color: #bfe6cf; color: #14602f; }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; }
.spin.dark { border-color: rgba(16,24,40,.2); border-top-color: var(--accent); }
@keyframes sp { to { transform: rotate(360deg); } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.scroll-y { max-height: 340px; overflow-y: auto; }
code { font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 5px; }

/* ══════════════════════════════════════════════════════════
   Auth — sign-in gate, user chip, admin view
   ══════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }

.auth-gate {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 28px 20px;
  background:
    radial-gradient(900px 500px at 15% 0%, #e6edff 0%, rgba(230,237,255,0) 60%),
    radial-gradient(700px 460px at 90% 100%, #f2ecff 0%, rgba(242,236,255,0) 62%),
    var(--bg);
}

.auth-panel {
  display: grid; grid-template-columns: 1fr 1fr;
  width: 100%; max-width: 880px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 20px 50px rgba(16,24,40,.13), 0 2px 8px rgba(16,24,40,.05);
  overflow: hidden;
}
.auth-panel.shake { animation: authShake .32s cubic-bezier(.36,.07,.19,.97); }
@keyframes authShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.auth-side {
  position: relative; padding: 38px 34px; color: #e8eeff;
  background: linear-gradient(150deg, #16204a 0%, #1d3a86 48%, #5b2ea8 100%);
  display: flex; flex-direction: column;
}
.auth-side::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(255,255,255,.16), transparent 70%),
    radial-gradient(320px 200px at 0% 100%, rgba(120,90,255,.35), transparent 70%);
  pointer-events: none;
}
.auth-side-inner { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }
.auth-logo {
  width: 46px; height: 46px; border-radius: 12px; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; letter-spacing: .4px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(4px);
}
.auth-side h2 { margin: 18px 0 6px; font-size: 22px; letter-spacing: -.015em; color: #fff; }
.auth-tagline { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(232,238,255,.78); max-width: 30ch; }
.auth-points { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.auth-points li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: rgba(232,238,255,.9); }
.auth-points li span {
  width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); color: #fff;
}
.auth-copyright { margin: auto 0 0; padding-top: 26px; font-size: 11px; color: rgba(232,238,255,.55); }

.auth-form-side { padding: 40px 38px; display: flex; flex-direction: column; justify-content: center; }
.auth-form-head h1 { margin: 0; font-size: 20px; font-weight: 660; letter-spacing: -.015em; }
.auth-form-head p { margin: 6px 0 24px; font-size: 12.5px; color: var(--muted); }

.auth-form .field > label { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.auth-form input {
  width: 100%; padding: 11px 13px; font-size: 13.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 9px;
  transition: border-color .15s, box-shadow .15s;
}
.auth-form input:focus {
  outline: none; border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(59,110,246,.14);
}
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 62px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--text-2); font-size: 11.5px;
  font-weight: 600; padding: 6px 8px; border-radius: 6px; cursor: pointer;
}
.pw-toggle:hover { background: var(--surface-2); color: var(--accent); }

.auth-submit { width: 100%; justify-content: center; padding: 11px 14px; font-size: 13.5px; margin-top: 4px; }
.auth-error {
  margin: 0 0 14px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5;
  color: #8b1c1c; background: var(--danger-bg); border: 1px solid #f6c9c9; border-radius: 9px;
}
.auth-hint { margin-top: 12px; font-size: 12px; color: var(--muted); }
.auth-foot {
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 7px;
}
.lock-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }

@media (max-width: 820px) {
  .auth-panel { grid-template-columns: 1fr; max-width: 440px; }
  .auth-side { display: none; }
  .auth-form-side { padding: 32px 26px; }
}

/* ── Sidebar user chip ──────────────────────────────────── */
.nav-sep { height: 1px; background: var(--border); margin: 8px 4px; }
.user-chip {
  display: flex; align-items: center; gap: 9px; margin-top: 9px;
  padding: 7px 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
}
.avatar {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}
.avatar.lg { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; font-size: 18px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.user-meta strong { font-size: 12.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { font-size: 10.5px; color: var(--muted); }
.warn-text { color: var(--warn) !important; }
.icon-btn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  width: 26px; height: 26px; border-radius: 7px; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--danger-bg); color: var(--danger); }

/* ── Admin view ─────────────────────────────────────────── */
.admin-id { display: flex; align-items: center; gap: 13px; }
.pw-meter { height: 5px; border-radius: 4px; background: #eef0f3; overflow: hidden; margin-top: 7px; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--danger); transition: width .25s, background .25s; }
.pw-meter i.s1 { background: #ef4444; }
.pw-meter i.s2 { background: #f59e0b; }
.pw-meter i.s3 { background: #3b82f6; }
.pw-meter i.s4 { background: #16a34a; }
