/* ============================================================
   STAG Admin — Stylesheet
   Theme: dark #0d0d1a  |  accent #e0302a
   Font: Inter
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:          #0b0b18;
  --bg-card:     #12121f;
  --bg-elevated: #18182a;
  --bg-sidebar:  #0d0d1c;
  --red:         #e0302a;
  --red-dim:     rgba(224,48,42,0.14);
  --red-mid:     rgba(224,48,42,0.28);
  --white:       #f0f0ff;
  --muted:       rgba(240,240,255,0.45);
  --muted-mid:   rgba(240,240,255,0.65);
  --border:      rgba(255,255,255,0.07);
  --border-mid:  rgba(255,255,255,0.12);
  --radius:      12px;
  --radius-lg:   18px;
  --sidebar-w:   240px;
  --header-h:    58px;
  --trans:       0.18s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: 'Inter', 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { text-decoration:none; color:inherit; }
img { display:block; max-width:100%; }
button { cursor:pointer; border:none; background:none; font-family:inherit; }
input, select, textarea { font-family:inherit; }

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════════════════ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.login-wrap { width:100%; max-width:420px; padding:24px; }
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.login-logo { width:72px; margin-bottom:12px; }
.login-logo img { width:100%; object-fit:contain; }
.login-title { font-size:1.45rem; font-weight:700; letter-spacing:0.4px; }
.login-sub   { font-size:0.84rem; color:var(--muted); margin-bottom:24px; }
.login-card form { width:100%; display:flex; flex-direction:column; gap:16px; }
.field-group { display:flex; flex-direction:column; gap:6px; }
.field-group label { font-size:0.75rem; font-weight:500; color:var(--muted); text-transform:uppercase; letter-spacing:0.7px; }
.field-group input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--white);
  outline: none;
  transition: border-color var(--trans), background var(--trans);
}
.field-group input:focus { border-color: var(--red); background: rgba(255,255,255,0.06); }
.field-group input::placeholder { color: var(--muted); }
.login-error {
  background: rgba(224,48,42,0.12);
  border: 1px solid rgba(224,48,42,0.35);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #ff7070;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════════════════════════ */
.dash-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ── Mobile overlay ─────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  z-index: 98;
}
.sidebar-overlay.visible { display: block; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--trans);
}

/* Logo row */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.logo-icon { width:34px; height:34px; flex-shrink:0; }
.logo-icon img { width:100%; object-fit:contain; }
.logo-name { display:block; font-size:1rem; font-weight:700; letter-spacing:1.2px; line-height:1.1; }
.logo-sub  { display:block; font-size:0.68rem; color:var(--muted); text-transform:uppercase; letter-spacing:0.8px; }

/* Admin profile pill */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  margin: 12px 10px 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
}
.profile-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0302a 0%, #7b1fa2 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  flex-shrink: 0;
}
.profile-name { font-size:0.82rem; font-weight:600; line-height:1.2; }
.profile-role { font-size:0.7rem; color:var(--muted); text-transform:capitalize; }
.online-dot {
  position:absolute; top:12px; right:14px;
  width:7px; height:7px;
  background:#50c878;
  border-radius:50%;
  box-shadow: 0 0 0 2px rgba(80,200,120,0.25);
}

/* Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 10px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.nav-group-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted-mid);
  transition: background var(--trans), color var(--trans);
  position: relative;
}
.nav-icon { width:18px; height:18px; flex-shrink:0; display:flex; align-items:center; }
.nav-icon svg { width:18px; height:18px; }
.nav-label { flex: 1; }

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--white);
}
.nav-item.active {
  background: var(--red-dim);
  color: var(--red);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--red);
  border-radius: 0 3px 3px 0;
}

/* Logout */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
  border-top: 1px solid var(--border);
  width: 100%;
  transition: color var(--trans), background var(--trans);
}
.btn-logout svg { width:17px; height:17px; }
.btn-logout:hover { color: #ff6b6b; background: rgba(224,48,42,0.07); }

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════════ */
.dash-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* Header */
.dash-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(11,11,24,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dash-header-left { display:flex; align-items:center; gap:14px; }

.sidebar-toggle {
  color: var(--muted);
  display: none;
  align-items: center;
  padding: 6px;
  border-radius: 7px;
  transition: background var(--trans), color var(--trans);
}
.sidebar-toggle:hover { background: var(--bg-elevated); color: var(--white); }

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
}
.breadcrumb-root { color: var(--muted); font-weight: 400; }
.breadcrumb-root + svg { color: var(--muted); }
.breadcrumb-current { font-weight: 600; color: var(--white); }

.header-admin {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0302a, #7b1fa2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  flex-shrink: 0;
}
.header-admin-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.header-admin-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}
.admin-badge {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid var(--red-mid);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

/* ═══════════════════════════════════════════════════════════
   SECTIONS
══════════════════════════════════════════════════════════════ */
.section {
  padding: 28px 28px;
  flex: 1;
  animation: fadeUp 0.22s ease both;
}
.section.hidden { display: none; }

@keyframes fadeUp {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

.section-intro { margin-bottom: 22px; }
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.section-desc {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Stats grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
  cursor: default;
}
.stat-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width:20px; height:20px; }

.users-icon    { background:rgba(100,149,237,0.14); color:#6495ed; }
.active-icon   { background:rgba(80,200,120,0.14);  color:#50c878; }
.blocked-icon  { background:var(--red-dim);         color:#ff6b6b; }
.requests-icon { background:rgba(255,165,0,0.14);   color:#ffa500; }
.pending-icon  { background:rgba(255,215,0,0.14);   color:#ffd700; }
.completed-icon{ background:rgba(80,200,120,0.14);  color:#50c878; }
.reports-icon  { background:rgba(255,100,100,0.14); color:#ff7070; }
.tickets-icon  { background:rgba(170,100,255,0.14); color:#b070ff; }

.stat-body { min-width:0; }
.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  font-weight: 500;
}
.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
}

/* Skeleton loader */
.skel {
  display: inline-block;
  width: 48px; height: 28px;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, rgba(255,255,255,0.06) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
  vertical-align: middle;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Table toolbar ──────────────────────────────────────────── */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px 9px 36px;
  font-size: 0.85rem;
  color: var(--white);
  outline: none;
  transition: border-color var(--trans);
}
.search-input:focus { border-color: rgba(255,255,255,0.2); }
.search-input::placeholder { color: var(--muted); }

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.84rem;
  color: var(--white);
  outline: none;
  cursor: pointer;
  transition: border-color var(--trans);
}
.filter-select:focus { border-color: rgba(255,255,255,0.2); }
.filter-select option { background: #1a1a2e; }

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.data-table thead {
  background: rgba(255,255,255,0.03);
}
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--muted-mid);
}
.data-table td:first-child { color: var(--white); font-weight: 500; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr {
  transition: background var(--trans);
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.025); }

.table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 24px;
  color: var(--muted);
}
.table-empty svg { width:40px; height:40px; opacity:0.4; }
.table-empty p { font-size:0.9rem; }
.table-empty.hidden { display: none; }

/* ── Status badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge-active    { background:rgba(80,200,120,0.14);  color:#50c878; }
.badge-blocked   { background:var(--red-dim);          color:#ff7070; }
.badge-inactive  { background:rgba(150,150,150,0.12);  color:#999; }
.badge-premium   { background:rgba(255,215,0,0.14);    color:#ffd700; }
.badge-deleted   { background:rgba(120,120,120,0.15);  color:#888; }
.badge-banned    { background:rgba(180,0,0,0.18);      color:#ff3333; }
.badge-basic     { background:rgba(100,149,237,0.14);  color:#6495ed; }
.badge-pending   { background:rgba(255,165,0,0.14);    color:#ffa500; }
.badge-accepted  { background:rgba(100,149,237,0.14);  color:#6495ed; }
.badge-confirmed { background:rgba(80,200,120,0.14);   color:#50c878; }
.badge-completed { background:rgba(80,200,120,0.18);   color:#40c070; }
.badge-cancelled { background:rgba(150,150,150,0.12);  color:#999; }
.badge-rejected  { background:var(--red-dim);          color:#ff7070; }
.badge-expired   { background:rgba(150,150,150,0.12);  color:#999; }
.badge-open      { background:rgba(80,200,120,0.14);   color:#50c878; }
.badge-closed    { background:rgba(150,150,150,0.12);  color:#999; }
.badge-male      { background:rgba(100,149,237,0.14);  color:#6495ed; }
.badge-female    { background:rgba(255,105,180,0.14);  color:#ff69b4; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 34px; height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--trans);
  cursor: pointer;
}
.page-btn:hover:not(:disabled) { color: var(--white); border-color: var(--border-mid); }
.page-btn.active { background: var(--red); color: #fff; border-color: var(--red); }
.page-btn:disabled { opacity:0.3; cursor:not-allowed; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  transition: background var(--trans), transform var(--trans);
}
.btn-primary:hover  { background: #c4251f; }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger {
  background: #d63946;
  color: #fff;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  transition: background var(--trans), transform var(--trans);
}
.btn-danger:hover  { background: #c2303a; }
.btn-danger:active { transform: scale(0.97); }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-sm {
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 9px;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--trans);
}

.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--white);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: background var(--trans);
}
.btn-ghost:hover { background: rgba(255,255,255,0.11); }

.btn-danger {
  background: var(--red-dim);
  color: #ff7070;
  border: 1px solid rgba(224,48,42,0.28);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: background var(--trans);
}
.btn-danger:hover { background: var(--red-mid); }

.btn-success {
  background: rgba(80,200,120,0.12);
  color: #50c878;
  border: 1px solid rgba(80,200,120,0.28);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: background var(--trans);
}
.btn-success:hover { background: rgba(80,200,120,0.22); }

/* ── Availability toggle switch ──────────────────────────────── */
.avail-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 6px 0 4px;
}
.avail-toggle-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted-mid);
  min-width: 90px;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-mid);
  transition: background 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--muted-mid);
  transition: transform 0.22s ease, background 0.22s ease;
}
.toggle-switch input:checked + .toggle-track {
  background: rgba(80,200,120,0.25);
  border-color: rgba(80,200,120,0.5);
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(24px);
  background: #50c878;
}
.toggle-switch input:disabled + .toggle-track { opacity: 0.4; cursor: not-allowed; }
.avail-status-text {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width:18px; height:18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner[hidden] { display: none; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  padding: 20px;
  animation: fadeUp 0.2s ease;
}
.modal-overlay.hidden { display: none; }

.modal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-card.modal-wide {
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-wide .modal-body {
  overflow-y: auto;
  flex: 1;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: background var(--trans), color var(--trans);
}
.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { background: rgba(255,255,255,0.07); color: var(--white); }
.modal-title { font-size:1.05rem; font-weight:700; margin-bottom:20px; }
.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 24px;
}
.modal-body.form-body {
  grid-template-columns: 1fr;
  padding: 12px 0;
}
.modal-field { display:flex; flex-direction:column; gap:4px; }
.modal-field .mf-label { font-size:0.7rem; color:var(--muted); text-transform:uppercase; letter-spacing:0.5px; font-weight:500; }
.modal-field .mf-value { font-size:0.87rem; font-weight:500; word-break:break-all; color:var(--white); }
.modal-actions { display:flex; gap:10px; flex-wrap:wrap; }

/* ── Form Styles ────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  padding: 8px 0;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-group label {
  font-size: 0.85rem;
  color: var(--white);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--white);
  font-size: 0.95rem;
  transition: background var(--trans), border-color var(--trans);
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  background: rgba(255,255,255,0.08);
  border-color: var(--red);
}
.form-group input::placeholder {
  color: var(--muted);
}

/* ── Venue Autocomplete Dropdown ─────────────────────────────────── */
#venueSuggestionsDropdown {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 400px;
  overflow-y: scroll;
  width: 100%;
  z-index: 1001;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  top: 100%;
  left: 0;
  right: 0;
}

#venueSuggestionsDropdown::-webkit-scrollbar {
  width: 10px;
}

#venueSuggestionsDropdown::-webkit-scrollbar-track {
  background: var(--bg-elevated);
}

#venueSuggestionsDropdown::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}

#venueSuggestionsDropdown::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ── Delete Confirmation Modal ──────────────────────────────────── */
.modal-delete {
  max-width: 420px;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(224, 48, 42, 0.02) 100%);
  border: 1px solid rgba(224, 48, 42, 0.1);
}

.delete-icon-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: rgba(214, 57, 70, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
}

.delete-icon-wrapper svg {
  width: 32px;
  height: 32px;
}

.delete-title {
  text-align: center;
  color: var(--white);
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.delete-body {
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.delete-warning {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.delete-event-name {
  padding: 12px 14px;
  background: rgba(224, 48, 42, 0.08);
  border-left: 3px solid var(--red);
  border-radius: 4px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
  margin: 0;
}

.delete-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-delete-confirm {
  background: var(--red) !important;
  color: white !important;
  font-weight: 600 !important;
  border: none !important;
  transition: all 0.2s ease;
}

.btn-delete-confirm:hover {
  background: #c5262a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(214, 57, 70, 0.4) !important;
}

.btn-delete-confirm:active {
  transform: translateY(0);
}

/* ── Photo Upload ─────────────────────────────────────────────────── */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-elevated);
}

.photo-upload-area:hover {
  border-color: var(--red);
  background: rgba(224, 48, 42, 0.05);
}

.photo-upload-area.drag-active {
  border-color: var(--red);
  background: rgba(224, 48, 42, 0.1);
}

.photo-upload-placeholder {
  color: var(--muted);
}

.photo-upload-placeholder svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--border-mid);
}

.photo-upload-placeholder p {
  margin: 0;
  font-size: 0.9rem;
}

.photo-upload-placeholder p:first-of-type {
  color: var(--white);
  font-weight: 500;
  margin-bottom: 4px;
}

.photo-upload-hint {
  font-size: 0.8rem;
  color: var(--muted) !important;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.photo-preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  aspect-ratio: 1;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 4px;
  color: var(--red);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.photo-preview-remove:hover {
  background: var(--red);
  color: white;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 0.86rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s, transform 0.28s;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 6px 0 30px rgba(0,0,0,0.5);
  }
  .dash-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .header-admin-info { display: none; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 18px 16px; }
  .dash-header { padding: 0 16px; }
  .modal-body { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── User cell (avatar + name + email) ───────────────────────── */
.ucell { display: flex; align-items: center; gap: 11px; }
.ucell-avatar {
  position: relative;
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), #7a1714);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-mid);
}
.ucell-avatar::before {
  content: attr(data-initial);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ucell-avatar img {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.ucell-avatar-lg {
  width: 96px; height: 96px;
  font-size: 2.2rem;
  border-radius: 24px;
}
.ucell-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.user-name-link {
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.user-name-link:hover { color: var(--red); text-decoration: underline; }
.ucell-email {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* ── User detail page ────────────────────────────────────────── */
.detail-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}
.detail-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-mid);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: var(--trans);
}
.back-link:hover { color: var(--white); border-color: var(--border-mid); background: var(--bg-elevated); }
.detail-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 22px;
}
.detail-hero-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.detail-hero-name { font-size: 1.5rem; font-weight: 700; color: var(--white); }
.detail-hero-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.detail-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-card-value {
  font-size: 0.95rem;
  color: var(--white);
  word-break: break-word;
}
.detail-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted-mid);
  margin: 26px 0 12px;
}
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-loading, .detail-error {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 0.95rem;
}

/* ── Request detail: info + payment side by side ─────────────── */
.req-info-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.req-info-col {
  flex: 1;
  min-width: 0;
}
.req-info-grid {
  grid-template-columns: 1fr !important;
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .req-info-row { flex-direction: column; }
}

/* ── Clickable table rows ────────────────────────────────────── */
.clickable-row:hover td { background: rgba(255,255,255,0.03); }

/* ── Payout detail: mini request cards grid ─────────────────── */
.req-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
a.req-card-mini {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
a.req-card-mini:hover {
  border-color: var(--red);
  background: rgba(231,76,60,0.05);
}
.req-card-error {
  background: rgba(239,83,80,0.06);
  border: 1px solid rgba(239,83,80,0.2);
  border-radius: 10px;
  padding: 14px 16px;
  color: #ef5350;
  font-size: 0.82rem;
}
.req-card-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.req-card-mini-club {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.req-card-mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   REPORTS MANAGEMENT
══════════════════════════════════════════════════════════════ */

/* ── Report status badges ───────────────────────────────────── */
.badge-rpt-pending  { background: rgba(255,165,0,0.14);   color: #ffa500; }
.badge-rpt-resolved { background: rgba(80,200,120,0.14);  color: #50c878; }
.badge-rpt-closed   { background: rgba(150,150,150,0.12); color: #888;    }

/* ── Quick-filter chips ─────────────────────────────────────── */
.report-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.rpt-chip {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted-mid);
  cursor: pointer;
  transition: all var(--trans);
}
.rpt-chip:hover { border-color: var(--border-mid); color: var(--white); }
.rpt-chip.active { color: #fff; }
.rpt-chip-all.active     { background: rgba(255,255,255,0.1);   border-color: rgba(255,255,255,0.2); color: var(--white); }
.rpt-chip-pending.active  { background: rgba(255,165,0,0.16);   border-color: rgba(255,165,0,0.4);   color: #ffa500; }
.rpt-chip-resolved.active { background: rgba(80,200,120,0.16);  border-color: rgba(80,200,120,0.4);  color: #50c878; }
.rpt-chip-closed.active   { background: rgba(150,150,150,0.12); border-color: rgba(150,150,150,0.3); color: #999;    }

/* ── Reason cell truncation ─────────────────────────────────── */
.rpt-reason-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-mid);
  cursor: default;
}

/* ── Report detail slide panel ──────────────────────────────── */
.rpt-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 400;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}
.rpt-panel-overlay.hidden { display: none; }

.rpt-panel {
  width: min(640px, 100vw);
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-mid);
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-shadow: -16px 0 56px rgba(0,0,0,0.5);
  animation: slideInRight 0.24s ease;
}
@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.rpt-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}
.rpt-panel-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.rpt-panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rpt-panel-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
  transition: background var(--trans), color var(--trans);
}
.rpt-panel-close svg { width: 16px; height: 16px; }
.rpt-panel-close:hover { background: rgba(255,255,255,0.07); color: var(--white); }

.rpt-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Panel content blocks ───────────────────────────────────── */
.rpt-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.rpt-block-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rpt-block-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* info grid inside blocks */
.rpt-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}
.rpt-info-item { display: flex; flex-direction: column; gap: 3px; }
.rpt-info-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 600;
}
.rpt-info-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
  word-break: break-word;
}

/* ── Reporter cards ─────────────────────────────────────────── */
.reporter-list { display: flex; flex-direction: column; gap: 10px; }
.reporter-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.reporter-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  gap: 10px;
}
.reporter-name { font-size: 0.85rem; font-weight: 600; color: var(--white); }
.reporter-date { font-size: 0.72rem; color: var(--muted); flex-shrink: 0; }
.reporter-reason {
  font-size: 0.84rem;
  color: var(--muted-mid);
  line-height: 1.55;
  word-break: break-word;
}

/* ── Admin notes timeline ───────────────────────────────────── */
.admin-notes-list { display: flex; flex-direction: column; gap: 14px; }
.admin-note-item { display: flex; gap: 12px; align-items: flex-start; }
.admin-note-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 0 3px rgba(224,48,42,0.14);
}
.admin-note-content { flex: 1; min-width: 0; }
.admin-note-meta {
  font-size: 0.71rem;
  color: var(--muted);
  margin-bottom: 5px;
}
.admin-note-text {
  font-size: 0.84rem;
  color: var(--muted-mid);
  line-height: 1.55;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  word-break: break-word;
}

/* ── Respond form ───────────────────────────────────────────── */
.rpt-respond-form { display: flex; flex-direction: column; gap: 12px; }
.rpt-respond-form select,
.rpt-respond-form textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.85rem;
  color: var(--white);
  outline: none;
  transition: border-color var(--trans);
  width: 100%;
}
.rpt-respond-form select:focus,
.rpt-respond-form textarea:focus { border-color: rgba(255,255,255,0.2); }
.rpt-respond-form select option { background: #1a1a2e; }
.rpt-respond-form textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}
.rpt-respond-form textarea::placeholder { color: var(--muted); }

/* Loading state inside panel */
.rpt-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .rpt-panel { width: 100vw; }
  .rpt-info-grid { grid-template-columns: 1fr; }
}

/* ── Request detail: participants row ───────────────────────── */
.req-users-row {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.req-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 130px;
}
.req-user-avatar-wrap {
  position: relative;
  display: inline-block;
  text-decoration: none;
}
.req-user-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  color: var(--white);
}
.req-user-avatar-wrap:hover .req-user-avatar-overlay { opacity: 1; }
.req-user-role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.req-user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  text-align: center;
}
a.req-user-name { text-decoration: none; }
a.req-user-name:hover { color: var(--red); }
.req-user-phone {
  font-size: 0.78rem;
  color: var(--muted-mid);
}
.req-users-divider {
  color: var(--muted);
  flex-shrink: 0;
}
@media (max-width: 500px) {
  .req-users-row { flex-direction: column; }
  .req-users-divider { transform: rotate(90deg); }
}

/* ── User detail tabs ────────────────────────────────────────── */
.user-tabs {
  display: flex;
  gap: 4px;
  margin: 24px 0 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.user-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted-mid);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 20px;
  margin-bottom: -1px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.user-tab:hover { color: var(--white); background: var(--bg-elevated); }
.user-tab.active {
  color: var(--white);
  border-bottom-color: var(--red);
  background: var(--bg-elevated);
}
.user-tab-panel {
  padding-top: 22px;
}

/* ── Clickable avatar ────────────────────────────────────────── */
.avatar-clickable { cursor: zoom-in; }
.avatar-clickable:hover { opacity: 0.85; }

/* ── Photo lightbox ──────────────────────────────────────────── */
.photo-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.photo-lightbox.open { display: flex; }
.photo-lightbox-img {
  max-width: min(520px, 90vw);
  max-height: 80vh;
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.photo-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.photo-lightbox-close:hover { opacity: 1; }

/* ── Three-dot action menu ───────────────────────────────────── */
.action-menu-wrap {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.action-menu-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-mid);
  cursor: pointer;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  transition: color 0.15s, border-color 0.15s;
}
.action-menu-btn:hover { color: var(--white); border-color: var(--border-mid); }
.action-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 50;
  overflow: hidden;
}
.action-menu.open { display: block; }
.action-menu-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 11px 16px;
  text-align: left;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.12s;
}
.action-menu-item:hover { background: var(--bg-elevated); }
.action-menu-item.item-danger  { color: var(--red); }
.action-menu-item.item-success { color: #50c878; }

@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; }
  #tab-details .detail-grid { grid-template-columns: 1fr; }
  .detail-hero { flex-direction: column; text-align: center; }
  .action-menu-wrap { margin-left: 0; align-self: flex-end; }
  .user-tab { font-size: 0.8rem; padding: 8px 12px; }
}

/* Details tab: 3-column grid to fill the same visual width as the tables */
#tab-details .detail-grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 760px) {
  #tab-details .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Miscellaneous section ────────────────────────────────────────── */
.misc-group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.misc-group-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.misc-gender-row {
  display: flex;
  gap: 20px;
}
.misc-col {
  flex: 1;
  min-width: 0;
}
.misc-col-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.misc-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.misc-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.55;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.misc-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.misc-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

/* ── Text Input Styling ─────────────────────────────────────── */
.text-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  padding: 10px 12px;
  box-sizing: border-box;
  transition: border-color 0.15s;
  margin-bottom: 12px;
}
.text-input:focus {
  outline: none;
  border-color: var(--red);
}
.text-input::placeholder {
  color: var(--muted);
}

/* ── Cockpit Hint ───────────────────────────────────────────── */
.cockpit-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(224,48,42,0.08);
  border-left: 2px solid var(--red);
  border-radius: 4px;
}
.cockpit-hint p {
  margin: 0;
  line-height: 1.4;
}

/* ── Cockpit Tabs ────────────────────────────────────────────── */
.cockpit-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.cockpit-tab {
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cockpit-tab:hover {
  color: var(--text-primary);
}
.cockpit-tab.active {
  color: var(--red);
  border-bottom-color: var(--red);
}
.cockpit-tab-content {
  display: none;
}
.cockpit-tab-content.active {
  display: block;
}

@media (max-width: 700px) {
  .misc-gender-row { flex-direction: column; }
}

/* ══ Activity Timeline ═══════════════════════════════════════════════ */
#req-activity-section { margin-top: 32px; }

.act-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--muted-mid);
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}

.act-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 4px;
  margin-bottom: 16px;
}

.act-item {
  display: flex;
  gap: 18px;
  position: relative;
}

.act-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 18px;
}

.act-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  z-index: 1;
  position: relative;
}

.act-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin: 4px 0;
  min-height: 24px;
}

.act-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  flex: 1;
  min-width: 0;
}

.act-item-last .act-body { margin-bottom: 0; }

.act-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.act-status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

.act-time {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.act-desc {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
}
.act-desc strong { color: var(--white); }
.act-desc code {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: monospace;
  color: var(--white);
}

.act-meta-pill {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 10px;
  font-size: 0.72rem;
  color: var(--muted-mid);
  font-family: monospace;
  margin-left: 4px;
}

.act-empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .act-body { padding: 10px 12px; }
  .act-desc { font-size: 0.82rem; }
}

/* ══ Cancel banner ═════════════════════════════════════════════ */
.cancel-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239,83,80,0.08);
  border: 1px solid rgba(239,83,80,0.25);
  border-radius: 8px;
  color: #ef5350;
  font-size: 0.85rem;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.cancel-banner strong { color: #fff; }

/* ══ Refund banner ═══════════════════════════════════════════════ */
.refund-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(38,198,130,0.08);
  border: 1px solid rgba(38,198,130,0.28);
  border-radius: 8px;
  color: #26c682;
  font-size: 0.85rem;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.refund-banner strong { color: #fff; }

/* ══ Codes section ═══════════════════════════════════════════════ */
.codes-row {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.code-card {
  flex: 1;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.code-card-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}

.code-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
}

.code-card-sublabel {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}

.code-digits-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.code-digit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 48px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  font-family: monospace;
  letter-spacing: 0;
}

.code-card-hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}
.code-card-hint strong { color: var(--muted-mid); }
.code-card-hint em { font-style: normal; color: var(--muted-mid); }

.codes-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 24px;
  padding: 8px 12px;
  background: rgba(255,152,0,0.06);
  border-left: 3px solid #ff9800;
  border-radius: 0 6px 6px 0;
}

