/* ════════════════════════════════════════════════════════════════════════════
   AUTH — login, signup, account, admin
════════════════════════════════════════════════════════════════════════════ */

/* ── Login / Signup page ─────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 20px;
}
.auth-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.auth-logo-icon { font-size: 32px; }
.auth-logo-text { font-family: var(--font-display); font-size: 22px; color: var(--accent); line-height: 1.2; }
.auth-title { font-family: var(--font-display); font-size: 28px; margin-bottom: 4px; }
.auth-sub   { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.auth-error {
  background: var(--danger-lt); border: 1.5px solid var(--danger);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--danger); font-size: 14px; margin-bottom: 18px;
}
.auth-pending {
  background: var(--amber-lt, #fffbeb); border: 1.5px solid var(--amber, #f59e0b);
  border-radius: var(--radius-sm); padding: 24px 20px;
  text-align: center; color: var(--text); font-size: 14px;
  display: flex; flex-direction: column; align-items: center;
}
.auth-form { display: flex; flex-direction: column; }
.auth-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px;
}
.auth-input {
  padding: 12px 14px; font-family: var(--font-body); font-size: 15px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); outline: none;
  margin-bottom: 16px; transition: border-color .18s;
}
.auth-input:focus { border-color: var(--accent); background: var(--surface); }
.auth-btn-row { display: flex; gap: 10px; margin-top: 4px; }
.auth-btn { flex: 1; justify-content: center; }
.auth-footer {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: center; align-items: center;
}

/* ── Theme toggle button (login page) ────────────────────────────────────── */
.theme-toggle-btn {
  background: none; border: 1.5px solid var(--border);
  border-radius: 99px; padding: 8px 20px;
  font-size: 18px; cursor: pointer; transition: .18s;
  display: flex; align-items: center; gap: 8px;
  color: var(--text);
}
.theme-toggle-btn:hover { border-color: var(--accent); }

/* ── Sidebar theme toggle ────────────────────────────────────────────────── */
.sidebar-theme-btn {
  width: 100%; padding: 10px 16px;
  border-radius: var(--radius-sm); border-color: rgba(255,255,255,.15);
  color: rgba(255,255,255,.7); font-size: 14px;
  display: flex; align-items: center; gap: 6px;
}
.sidebar-theme-btn:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.theme-track { flex: 1; height: 2px; background: rgba(255,255,255,.2); border-radius: 99px; }

/* ── Account page ────────────────────────────────────────────────────────── */
.account-page { padding: 0 32px 60px; }
.acct-banner {
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 14px; margin-bottom: 20px;
}
.acct-error   { background: var(--danger-lt); color: var(--danger); border: 1.5px solid var(--danger); }
.acct-success { background: var(--accent-lt); color: var(--accent-dark); border: 1.5px solid var(--accent); }

.acct-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.acct-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.acct-card-header {
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 18px;
}
.acct-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }

/* Avatar — shared geometry */
.acct-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
}
/* Letter fallback (div) */
div.acct-avatar {
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 26px;
}
/* Photo (img) */
img.acct-avatar { object-fit: cover; display: block; }

/* Clickable wrapper with camera-overlay on hover */
.acct-avatar-wrap {
  position: relative; width: 64px; height: 64px;
  border-radius: 50%; cursor: pointer; flex-shrink: 0;
}
.acct-avatar-wrap .acct-avatar { width: 100%; height: 100%; }
.acct-avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s; font-size: 20px;
}
.acct-avatar-wrap:hover .acct-avatar-overlay { opacity: 1; }

/* Crop-modal handle dots */
.crop-handle {
  position: absolute; width: 12px; height: 12px;
  background: #fff; border: 1.5px solid rgba(0,0,0,.35);
  border-radius: 2px;
}
.crop-handle[data-dir="nw"] { top: -6px; left: -6px; cursor: nw-resize; }
.crop-handle[data-dir="ne"] { top: -6px; right: -6px; cursor: ne-resize; }
.crop-handle[data-dir="sw"] { bottom: -6px; left: -6px; cursor: sw-resize; }
.crop-handle[data-dir="se"] { bottom: -6px; right: -6px; cursor: se-resize; }

.acct-display-name { font-family: var(--font-display); font-size: 18px; }
.acct-username { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.acct-role-badge {
  display: inline-block; margin-top: 5px;
  font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 99px;
  background: var(--bg); border: 1.5px solid var(--border); color: var(--text-muted);
}
.badge-admin { background: var(--accent-lt); border-color: var(--accent); color: var(--accent-dark); }
.acct-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.acct-input {
  width: 100%; padding: 10px 14px; font-family: var(--font-body); font-size: 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); outline: none;
  margin-bottom: 14px; transition: border-color .18s;
}
.acct-input:focus { border-color: var(--accent); background: var(--surface); }

/* Theme picker */
.theme-picker { display: flex; gap: 12px; }
.theme-option { cursor: pointer; }
.theme-option input { display: none; }
.theme-swatch {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px;
  border-radius: var(--radius-md); border: 2px solid var(--border);
  font-size: 14px; font-weight: 500; transition: .18s;
}
.theme-option input:checked ~ .theme-swatch { border-color: var(--accent); background: var(--accent-lt); }
.swatch-light { background: #faf8f4; color: #1c1a17; }
.swatch-dark  { background: #1a1f2e; color: #e2e8f0; }

/* ── Admin page ──────────────────────────────────────────────────────────── */
.admin-page { padding: 0 32px 60px; }
.admin-header-bar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.admin-table-wrap { overflow-x: auto; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  padding: 10px 16px; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); background: var(--surface-alt); border-bottom: 1.5px solid var(--border);
}
.admin-table td {
  padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg); }
.row-suspended td { opacity: .55; }
.role-badge, .status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700; border: 1.5px solid var(--border);
}
.badge-active    { background: var(--accent-lt); border-color: var(--accent); color: var(--accent-dark); }
.badge-suspended { background: var(--danger-lt); border-color: var(--danger); color: var(--danger); }
.badge-none      { background: var(--surface-alt); border-color: var(--border); color: var(--text-muted); }
.badge-immune    { background: var(--accent-lt); border-color: var(--accent); color: var(--accent-dark); }
.ruleexempt-none   { color: var(--text-muted); }
.ruleexempt-immune { color: var(--accent-dark); }
.admin-actions { display: flex; gap: 6px; }
.btn-xs { font-size: 12px; padding: 5px 12px; }

/* ── Instatus dropdown ─────────────────────────────────────────────────────── */
.instatus-wrap { position: relative; display: inline-block; }
.instatus-btn {
  cursor: pointer; border: none; background: inherit;
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  letter-spacing: .02em; padding: 3px 10px; border-radius: 99px;
  border: 1.5px solid var(--border); white-space: nowrap;
}
.instatus-btn:hover { filter: brightness(.93); }
.instatus-dropdown {
  display: none; position: absolute; top: calc(100% + 4px); left: 0;
  z-index: 200; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  min-width: 130px; overflow: hidden;
}
.instatus-wrap.open .instatus-dropdown { display: block; }
.instatus-option {
  padding: 9px 14px; font-size: 13px; cursor: pointer;
  transition: background .12s; white-space: nowrap;
}
.instatus-option:hover { background: var(--bg); }
.instatus-active   { color: var(--accent-dark); }
.instatus-suspended { color: var(--danger); }

/* Sidebar user block styles live in base.css so they apply on every page. */
