/* ─── Admin Layout ──────────────────────────────────────────────────────────── */
.admin-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ─── Login ─────────────────────────────────────────────────────────────────── */
.login-wrap {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 0 20px rgba(148,67,239,.6));
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: .25rem;
}

.admin-label {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

.login-card > p {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 1.75rem;
}

.login-card form { display: flex; flex-direction: column; gap: .85rem; }
.login-card form .btn { margin-top: .25rem; }

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  width: 220px;
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.25rem 1.25rem 1rem;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: .75rem 0;
  gap: .15rem;
}

.nav-item {
  display: block;
  padding: .6rem 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  border-radius: 0;
  transition: color .15s, background .15s;
  border-left: 3px solid transparent;
}

.nav-item:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav-item.active { color: var(--purple2); border-left-color: var(--purple); background: rgba(148,67,239,.08); }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8rem;
  color: var(--muted);
}

/* ─── Main content ──────────────────────────────────────────────────────────── */
.admin-main {
  flex: 1;
  min-width: 0;
  padding: 2.5rem;
  max-width: 1100px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
}

.admin-header p {
  color: var(--muted);
  font-size: .875rem;
  margin-top: .2rem;
}

.admin-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.admin-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.section-sub {
  font-size: .825rem;
  color: var(--muted);
  margin-bottom: .85rem;
}

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.field input,
.field select,
.admin-input,
.admin-textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .55rem .8rem;
  font-size: .9rem;
  font-family: inherit;
  width: 100%;
  transition: border-color .15s;
}

.field input:focus,
.field select:focus,
.admin-input:focus,
.admin-textarea:focus {
  outline: none;
  border-color: var(--purple);
}

.admin-textarea { resize: vertical; min-height: 100px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .85rem;
}

.day-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .25rem;
}

.day-cb {
  display: flex;
  align-items: center;
  gap: .35rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .35rem .65rem;
  font-size: .8rem;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s;
}

.day-cb:has(input:checked) {
  border-color: var(--purple);
  background: rgba(148,67,239,.1);
  color: var(--purple2);
}

.day-cb input { display: none; }

/* ─── Server rows ────────────────────────────────────────────────────────────── */
.admin-server-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-server-row:last-child { border-bottom: none; }

.asr-info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.asr-info strong { font-size: .95rem; }
.asr-info span   { font-size: .78rem; color: var(--muted); }

.asr-actions { display: flex; gap: .5rem; flex-shrink: 0; }

/* ─── Accounts table ────────────────────────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.admin-table th {
  text-align: left;
  padding: .6rem .75rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: .65rem .75rem;
  border-bottom: 1px solid rgba(42,42,69,.5);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }

.steam-link {
  color: var(--cyan);
  text-decoration: none;
  font-family: monospace;
}
.steam-link:hover { text-decoration: underline; }

.booster-pill {
  background: rgba(255,115,250,.1);
  border: 1px solid rgba(255,115,250,.3);
  color: #ff73fa;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 99px;
}

/* ─── Stats ─────────────────────────────────────────────────────────────────── */
.stats-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .75rem; }

.stat-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  min-width: 120px;
}

.stat-pill span  { font-size: 2rem; font-weight: 800; }
.stat-pill label { font-size: .75rem; color: var(--muted); }

/* ─── Search bar ────────────────────────────────────────────────────────────── */
.search-row {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.search-row .admin-input { flex: 1; }

/* ─── Save indicator ────────────────────────────────────────────────────────── */
.save-indicator {
  font-size: .85rem;
  color: var(--success);
  margin-left: .75rem;
}

/* ─── Admin shell flex ───────────────────────────────────────────────────────── */
#admin-shell { display: flex; width: 100%; min-height: 100vh; }

/* ─── Verify modal ───────────────────────────────────────────────────────────── */
.verify-status {
  padding: .75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .25rem;
}
.verify-status-ok   { background: rgba(61,220,132,.12); border: 1px solid rgba(61,220,132,.3); color: var(--success); }
.verify-status-warn { background: rgba(255,91,91,.1);   border: 1px solid rgba(255,91,91,.3);  color: var(--error); }

.verify-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .875rem;
}

.verify-list li::before { content: '· '; color: var(--muted); }
.verify-list-err li { color: var(--error); }
.verify-list-err li::before { content: '✗ '; }

/* ─── Actions dropdown ───────────────────────────────────────────────────────── */
.actions-cell { position: relative; }

.actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 200;
  min-width: 190px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  overflow: hidden;
}

.actions-menu button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: .85rem;
  padding: .6rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}

.actions-menu button:hover { background: rgba(255,255,255,.05); }
.actions-menu button.danger { color: var(--error); }
