/* CLICKSPIRE — admin.css (staff page + auth + editor) */

.staff-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* auth area */
.auth-area { display: flex; align-items: center; gap: 12px; }
.auth-user {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  backdrop-filter: blur(var(--panel-blur));
}
.auth-user .who { display: flex; flex-direction: column; line-height: 1.2; }
.auth-user .who b { font-family: var(--font-display); font-size: 14px; }
.auth-user .who small { color: var(--muted); font-size: 11px; }
.mode-pill {
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 1px; padding: 7px 12px;
  border-radius: 999px; border: 1px solid var(--border); color: var(--muted);
}
.mode-pill.demo { color: #ffcf4d; border-color: rgba(255,207,77,0.4); }
.mode-pill.live { color: #5cff9e; border-color: rgba(92,255,158,0.4); }

/* avatar */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #160320;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); flex: none;
  background-size: cover; background-position: center; overflow: hidden;
}
.avatar.lg { width: 76px; height: 76px; font-size: 30px; }

/* staff grid */
.staff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 46px; }
@media (max-width: 900px) { .staff-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .staff-grid { grid-template-columns: 1fr; } }

.staff-card {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); backdrop-filter: blur(var(--panel-blur));
  box-shadow: var(--card-shadow); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .25s;
  --accent: var(--brand);
}
.staff-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--card-shadow), 0 0 40px -8px var(--accent); }
.staff-card.is-me { border-color: var(--accent); box-shadow: var(--card-shadow), 0 0 36px -10px var(--accent); }
.staff-card .bar { height: 5px; background: linear-gradient(90deg, var(--accent), var(--brand-2)); }
.staff-card .inner { padding: 24px; }
.staff-card .top { display: flex; align-items: center; gap: 14px; }
.staff-card .avatar { background: linear-gradient(135deg, var(--accent), var(--brand-2)); }
.staff-card .name { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.staff-card .mc { font-family: var(--font-pixel); font-size: 9px; color: var(--muted); margin-top: 4px; letter-spacing: 0.5px; }
.staff-card .bio { color: var(--muted); font-size: 14.5px; margin-top: 16px; min-height: 42px; text-wrap: pretty; }
.role-badge {
  display: inline-block; margin-top: 10px; font-family: var(--font-display); font-weight: 700;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px;
  border-radius: 999px; color: var(--accent); border: 1px solid currentColor;
}
.me-tag {
  position: absolute; top: 14px; right: 14px; font-family: var(--font-pixel); font-size: 8px;
  letter-spacing: 1px; padding: 5px 9px; border-radius: 999px; background: var(--accent); color: #160320;
}
.socials { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.socials a {
  font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: 0.04em;
  padding: 7px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  color: var(--muted); transition: .15s; display: inline-flex; gap: 6px; align-items: center;
}
.socials a:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.edit-mine {
  width: 100%; margin-top: 18px; justify-content: center;
}

/* modal */
.modal-scrim {
  position: fixed; inset: 0; z-index: 300; background: rgba(6,3,10,0.72);
  backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-scrim.open { display: flex; }
.modal {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--bg-2); box-shadow: 0 30px 80px -20px #000, var(--glow); padding: 30px;
}
.modal.wide { max-width: 560px; }
.modal h3 { font-size: 24px; }
.modal .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.modal .close-x {
  position: absolute; top: 0; right: 0;
}
.modal-hd { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.icon-btn { background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  width: 38px; height: 38px; border-radius: var(--radius-sm); cursor: pointer; font-size: 18px; flex: none; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-display); font-weight: 600; font-size: 12px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-body); font-size: 15px; transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 80px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 6px; opacity: .8; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.swatch.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 14px currentColor; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px;
  margin: 18px 0; text-transform: uppercase; letter-spacing: 0.1em; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.form-err { color: #ff6b8b; font-size: 13px; margin-top: 4px; min-height: 18px; }
.modal-actions { display: flex; gap: 12px; margin-top: 22px; }
.modal-actions .btn { flex: 1; justify-content: center; }

.config-note {
  margin-top: 40px; padding: 20px 22px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: rgba(var(--brand-rgb)/0.04); color: var(--muted); font-size: 14px;
}
.config-note b { color: var(--text); font-family: var(--font-display); }
.config-note code { font-family: var(--font-pixel); font-size: 11px; color: var(--brand);
  background: var(--bg); padding: 2px 7px; border-radius: 5px; }

.btn-google {
  background: #fff; color: #1a1a1a; width: 100%; justify-content: center; border: none;
}
.btn-google:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -10px #000; }

/* ---------- dashboard ---------- */
.dash {
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface); backdrop-filter: blur(var(--panel-blur));
  box-shadow: var(--card-shadow); padding: 32px;
}
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.dash-title { font-size: clamp(24px, 3.5vw, 34px); margin-top: 4px; }
.dash-note { color: var(--muted); margin-top: 18px; font-size: 15px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
@media (max-width: 820px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); padding: 22px; }
.dash-card-hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.dash-card-hd h3 { font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase; }

.adm-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding-right: 4px; }
.adm-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.adm-main b { font-family: var(--font-display); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.adm-main span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.self-chip { font-family: var(--font-pixel); font-size: 7px; letter-spacing: 1px; padding: 3px 6px;
  border-radius: 999px; background: var(--brand); color: #160320; }
.adm-role {
  padding: 7px 10px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 13px; cursor: pointer;
}
.adm-role:disabled { opacity: .45; cursor: not-allowed; }
.adm-del { width: 34px; height: 34px; font-size: 15px; flex: none; }
.adm-del:disabled { opacity: .3; cursor: not-allowed; }
.adm-edit { flex: none; }

.cat-checks { display: flex; gap: 18px; flex-wrap: wrap; }
.cat-check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px;
  font-family: var(--font-body); cursor: pointer; }
.cat-check input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }

/* ============================================================
   PRIVATE ADMIN — slim bar, login screen, publisher
   ============================================================ */
:root { --admin-bar-h: 64px; }

/* ---------- slim admin bar ---------- */
.admin-bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--admin-bar-h); z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.admin-bar .brand { display: flex; align-items: center; gap: 11px; }
.admin-bar .brand img { width: 32px; height: auto; image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(var(--brand-rgb)/0.5)); }
.admin-bar .brand .name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.06em; }
.admin-chip {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--brand); border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 5px 9px; margin-left: 2px;
}
.admin-bar-right { display: flex; align-items: center; gap: 12px; }
.admin-back { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.03em;
  color: var(--muted); transition: color .15s; }
.admin-back:hover { color: var(--text); }
.who-pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--text);
}
.who-dot { width: 8px; height: 8px; border-radius: 50%; background: #5cff9e;
  box-shadow: 0 0 10px #5cff9e; flex: none; }

/* ---------- login screen ---------- */
.login-screen[hidden], .publisher[hidden] { display: none !important; }
.login-screen {
  min-height: 100vh; display: grid; place-items: center;
  padding: calc(var(--admin-bar-h) + 30px) 24px 40px;
}
.login-loading { display: flex; flex-direction: column; align-items: center; gap: 16px;
  color: var(--muted); font-family: var(--font-display); letter-spacing: 0.03em; }
.spinner { width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
:root[data-motion='off'] .spinner { animation: none; }

.login-card {
  width: 100%; max-width: 420px; text-align: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface); backdrop-filter: blur(var(--panel-blur));
  box-shadow: var(--card-shadow), 0 0 60px -20px rgba(var(--brand-rgb)/0.5);
  padding: 40px 34px 34px;
}
.login-lock {
  width: 58px; height: 58px; margin: 0 auto 20px; display: grid; place-items: center;
  border-radius: var(--radius); color: #160320;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: var(--glow);
}
.login-card .eyebrow { margin-bottom: 14px; }
.login-card h1 { font-family: var(--font-display); font-size: 30px; letter-spacing: 0.01em; }
.login-sub { color: var(--muted); font-size: 14.5px; margin: 10px 0 26px; text-wrap: pretty; }
.login-card .field { text-align: left; }
.login-submit { width: 100%; justify-content: center; margin-top: 4px; }
.login-card .form-err { text-align: left; }
.login-demo {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 12.5px; line-height: 1.6; text-wrap: pretty;
}
.login-demo code { font-family: var(--font-pixel); font-size: 10px; color: var(--brand);
  background: var(--bg); padding: 2px 6px; border-radius: 5px; }

/* ---------- publisher ---------- */
.pub-section { padding-top: calc(var(--admin-bar-h) + 56px); }
.pub-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.pub-head .section-lead a { color: var(--brand); }
.pub-head .section-lead a:hover { text-decoration: underline; }
.pub-head .btn { flex: none; }

.pub-panel {
  margin-top: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface); backdrop-filter: blur(var(--panel-blur));
  box-shadow: var(--card-shadow); padding: 26px;
}
.pub-panel-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.pub-panel-hd h3 { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase; }
.pub-count { font-family: var(--font-pixel); font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.pub-list { max-height: none; }
.pub-list .adm-row { padding: 14px 16px; }
.pub-list .adm-main b { font-size: 15px; }
.ver-chip { font-family: var(--font-pixel); font-size: 9px; color: var(--brand);
  border: 1px solid var(--border-strong); border-radius: 5px; padding: 3px 6px; letter-spacing: 0.5px; }
.mini-cat { font-family: var(--font-display); font-weight: 700; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.mini-cat.feature { color: var(--brand); }
.mini-cat.balance { color: #4dd6ff; }
.mini-cat.fix { color: #5cff9e; }

.pub-empty { text-align: center; padding: 46px 20px; color: var(--text); }
.pub-empty p { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.pub-empty .dim { font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 8px; }
.pub-empty .dim b { color: var(--brand); }

@media (max-width: 560px) {
  .admin-bar .brand .name { display: none; }
  .pub-head .btn { width: 100%; justify-content: center; }
}
