/* =============================================
   ArenaZone Dashboard — Visual Overhaul
   ============================================= */

:root {
  color-scheme: dark;
  --bg: #0b0f13;
  --surface: #11161e;
  --surface-hover: #1a2230;
  --card-bg: #131c28;
  --border: #1e2a36;
  --border-muted: #16212e;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-faint: #334155;
  --accent: #3b82f6;
  --accent-subtle: #1e293b;
  --green: #22c55e;
  --green-subtle: #0a2e1a;
  --red: #ef4444;
  --red-subtle: #2a1215;
  --amber: #f59e0b;
  --amber-subtle: #271e0b;
  --purple: #8b5cf6;
  --purple-subtle: #1e1635;
  --radius: 10px;
  --radius-sm: 6px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   Layout
   ============================================= */

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.main {
  padding: 28px 36px 48px;
  overflow-y: auto;
}

/* =============================================
   Sidebar
   ============================================= */

.sidebar {
  background: #090d13;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(59,130,246,0.25);
}

.logo h1 { font-size: 18px; font-weight: 700; line-height: 1.2; }
.logo-sub { font-size: 11px; color: var(--text-muted); }

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  position: relative;
}

.nav-item:hover { background: var(--surface); color: var(--text); }

.nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-item svg {
  opacity: 0.65;
  transition: opacity var(--transition);
}

.nav-item.active svg,
.nav-item:hover svg {
  opacity: 1;
}

.sidebar-footer {
  margin: 0 12px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
}

.sidebar-footer .badge {
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
  padding: 3px 10px;
}

.sidebar-footer span {
  font-size: 12px;
}

#sidebarTimer {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.muted { color: var(--text-muted); }

/* =============================================
   View Header
   ============================================= */

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.view-header h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.3px; }

.view-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* =============================================
   Buttons
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: -0.1px;
}

.btn:hover { background: var(--surface-hover); border-color: #2a3a4e; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(59,130,246,0.3);
}

.btn-primary:hover { background: #2563eb; border-color: #2563eb; }

.btn-accent {
  background: var(--accent-subtle);
  border-color: var(--border);
  color: var(--accent);
}

.btn-accent:hover { background: #233250; border-color: #2a3f5a; }

.btn-danger { background: var(--red-subtle); border-color: #3a1f25; color: var(--red); }
.btn-danger:hover { background: #3a1f25; }

.btn-success { background: var(--green-subtle); border-color: #1a3a28; color: var(--green); }

.btn-sm { padding: 5px 11px; font-size: 12px; }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover { background: var(--surface); color: var(--text); }

/* =============================================
   Badges
   ============================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  letter-spacing: 0.2px;
}

.badge-open { color: var(--green); background: var(--green-subtle); border-color: #1a3a28; }
.badge-closed { color: var(--text-muted); background: var(--surface); }
.badge-running { color: var(--green); background: var(--green-subtle); }
.badge-paused { color: var(--amber); background: var(--amber-subtle); }
.badge-stopped { color: var(--amber); background: var(--amber-subtle); }
.badge-error { color: var(--red); background: var(--red-subtle); }
.badge-starting { color: var(--accent); background: var(--accent-subtle); }
.badge-claimed { color: var(--green); background: var(--green-subtle); }
.badge-pending { color: var(--text-muted); }

.badge-warning { color: var(--amber); background: var(--amber-subtle); }

/* =============================================
   Stats Row
   ============================================= */

.stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}

.stat-card:nth-child(1)::before { background: var(--accent); }
.stat-card:nth-child(2)::before { background: var(--green); }
.stat-card:nth-child(3)::before { background: var(--amber); }
.stat-card:nth-child(4)::before { background: var(--green); }
.stat-card:nth-child(5)::before { background: var(--accent); }
.stat-card:nth-child(6)::before { background: #f97316; }

.stat-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-card:nth-child(1) .stat-value { color: var(--accent); }
.stat-card:nth-child(2) .stat-value { color: var(--green); }
.stat-card:nth-child(3) .stat-value { color: var(--amber); }
.stat-card:nth-child(4) .stat-value { color: var(--green); }
.stat-card:nth-child(5) .stat-value { color: var(--accent); }
.stat-card:nth-child(6) .stat-value { color: #f97316; }

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.stat-label-detail {
  text-transform: none;
  font-size: 10px;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.advent-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.advent-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #facc15);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.stat-sub-label { display: block; font-size: 10px; font-weight: 600; margin-top: 2px; }
.stat-sub-warn { color: var(--red); }
.stat-sub-ok { color: var(--green); }

.sce-acct-list { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; }
.sce-acct-list span { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border); }
.sce-acct-complete { color: var(--green); background: var(--green-subtle, rgba(34,197,94,0.12)); border-color: rgba(34,197,94,0.35); }
.sce-acct-incomplete { color: var(--red); background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); }

.stat-icon {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 18px;
  opacity: 0.25;
}

/* =============================================
   Account Sections (by region)
   ============================================= */

.account-section {
  margin-bottom: 28px;
}

.account-section-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

/* =============================================
   Account Cards
   ============================================= */

.account-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.account-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.card-us::before { background: linear-gradient(90deg, var(--accent), #60a5fa); }
.card-uk::before { background: linear-gradient(90deg, var(--purple), #a78bfa); }

.account-card:hover {
  transform: translateY(-1px);
  border-color: #2a3a4e;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-title h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.card-title .region {
  font-size: 12px;
  color: var(--text-muted);
}

.card-profile {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  overflow: hidden;
}

.profile-username {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 0 1 auto;
}

.profile-arp {
  color: var(--amber);
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}

.profile-dell {
  color: var(--purple);
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}

.profile-expiry {
  color: var(--gray);
  font-weight: 500;
  white-space: nowrap;
  flex: 0 0 auto;
}

.clickable {
  cursor: pointer;
  transition: opacity var(--transition);
}

.clickable:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ---- Quest summary pill ---- */

.card-quest-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
  transition: background var(--transition);
}

.card-quest-summary:hover {
  filter: brightness(1.1);
}

.quests-all-done {
  color: var(--green);
  background: var(--green-subtle);
  border: 1px solid #1a3a28;
}

.quests-partial {
  color: var(--amber);
  background: var(--amber-subtle);
  border: 1px solid #3d3109;
}

.quest-summary-icon {
  font-size: 15px;
}

/* ---- Compact status row (quests + steam) ---- */

.card-status-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  overflow: hidden;
}

.card-status-row .card-quest-summary,
.card-status-row .card-steam-quest,
.card-status-row .card-twitch-quest,
.card-status-row .card-discord-quest {
  font-size: 10px;
  padding: 2px 6px;
  white-space: nowrap;
  min-width: 0;
  gap: 3px;
}

.card-status-row .card-quest-summary .quest-summary-icon {
  font-size: 10px;
}

.card-status-row .card-steam-quest .steam-icon,
.card-status-row .card-twitch-quest .twitch-quest-icon,
.card-status-row .card-discord-quest .discord-quest-icon {
  font-size: 10px;
}

.card-status-row .card-steam-quest .steam-status {
  display: none;
}

/* ---- Steam quest display ---- */

.card-steam-quest {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
  transition: background var(--transition);
}

.card-steam-quest .steam-icon {
  font-size: 15px;
}

.card-steam-quest .steam-status {
  font-size: 11px;
  opacity: 0.8;
  margin-left: auto;
}

.twitch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.twitch-dot.dot-running {
  background: var(--green);
}
.twitch-dot.dot-paused {
  background: var(--text-muted);
}

.twitch-vps-label {
  font-size: 10px;
  font-weight: 600;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1.2;
}

.steam-scheduled {
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

.steam-running {
  color: var(--amber);
  background: var(--amber-subtle);
  border: 1px solid #3d3109;
}

.steam-verifying {
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid #1e3a5f;
}

.steam-completed {
  color: var(--green);
  background: var(--green-subtle);
  border: 1px solid #1a3a28;
}

.steam-failed {
  color: var(--red);
  background: var(--red-subtle);
  border: 1px solid var(--red);
}

/* ---- SCE (Steam Community Event) quest display ---- */

 /* ---- Twitch quest display ---- */

.card-twitch-quest {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
  white-space: nowrap;
  transition: background var(--transition);
}

.twitch-quest-icon {
  font-size: 12px;
}

.twitch-scheduled {
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

.twitch-running {
  color: var(--purple);
  background: #1a0a2e;
  border: 1px solid #3a1a48;
}

.twitch-completed {
  color: var(--green);
  background: var(--green-subtle);
  border: 1px solid #1a3a28;
}

.twitch-failed {
  color: var(--red);
  background: var(--red-subtle);
  border: 1px solid #3a1a1a;
}

.twitch-retry {
  color: var(--orange);
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid #3a2a1a;
}

/* ---- Discord quest display ---- */

.card-discord-quest {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
  white-space: nowrap;
  transition: background var(--transition);
}

.discord-quest-icon {
  font-size: 12px;
}

.discord-scheduled {
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

.discord-running {
  color: #5865F2;
  background: #111a33;
  border: 1px solid #1e2d5a;
}

.discord-completed {
  color: var(--green);
  background: var(--green-subtle);
  border: 1px solid #1a3a28;
}

.discord-failed {
  color: var(--red);
  background: var(--red-subtle);
  border: 1px solid #3a1a1a;
}

.discord-skipped {
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

.card-status-row .card-discord-quest {
  font-size: 10px;
  padding: 2px 6px;
}

.card-status-row .card-discord-quest .discord-quest-icon {
  font-size: 10px;
}

/* ---- Discord vote button ---- */

.btn-quest-discord {
  background: linear-gradient(135deg, #111a33, #1a2648);
  color: #5865F2;
  border-color: #1e2d5a;
}

.btn-quest-discord:hover {
  border-color: #5865F2;
  box-shadow: 0 0 12px rgba(88,101,242,0.15);
}

.card-status-row .card-twitch-quest {
  font-size: 10px;
  padding: 2px 6px;
}

.card-status-row .card-twitch-quest .twitch-quest-icon {
  font-size: 10px;
}

/* ---- Card meta (IP, VPN) ---- */

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.card-meta span {
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 999px;
  border: 1px solid var(--border-muted);
  color: var(--text-muted);
  font-size: 11px;
}

.card-meta .ip-unique { color: var(--green); border-color: #1a3a28; }
.card-meta .ip-duplicate { color: var(--red); border-color: #3a1f25; }

/* ---- Quest action buttons row ---- */

.card-quest-buttons {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.btn-quest-mini {
  flex: 1;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.btn-quest-mini-icon {
  font-size: 14px;
}

.btn-quest-daily {
  background: linear-gradient(135deg, #0a2e1a, #0f3a22);
  color: var(--green);
  border-color: #1a3a28;
}

.btn-quest-daily:hover {
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(34,197,94,0.15);
}

.btn-quest-twitch {
  background: linear-gradient(135deg, #2a0a30, #3a1040);
  color: #a855f7;
  border-color: #3a1a48;
}

.btn-quest-twitch:hover {
  border-color: #a855f7;
  box-shadow: 0 0 12px rgba(168,85,247,0.15);
}

.btn-quest-steam {
  background: linear-gradient(135deg, #0a1a38, #0f2248);
  color: #60a5fa;
  border-color: #1a3050;
}

.btn-quest-steam:hover {
  border-color: #60a5fa;
  box-shadow: 0 0 12px rgba(96,165,250,0.15);
}

.btn-onboarding {
  width: 100%;
  padding: 12px 18px;
  border: 2px solid #3a5f1e;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #234010, #284818);
  color: #4ade80;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  margin-top: 2px;
}

.btn-onboarding:hover {
  border-color: #4ade80;
  background: linear-gradient(135deg, #284818, #305a20);
  box-shadow: 0 0 20px rgba(74,222,128,0.15);
}

.btn-onboarding-icon {
  font-size: 18px;
}

/* ---- Icon bar at card bottom ---- */

.card-icon-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin-top: 2px;
}

.card-icon-group {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  gap: 1px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-muted);
  padding: 2px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  text-decoration: none;
  vertical-align: middle;
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.icon-btn-delete {
  flex: 0 0 auto;
  color: var(--text-faint);
}

.icon-btn-delete:hover {
  background: var(--red-subtle);
  color: var(--red);
}

/* =============================================
   Account List (table view)
   ============================================= */

.account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
}

.account-row:hover { border-color: #2a3a4e; }

.account-row .row-info h3 { font-size: 15px; font-weight: 600; }
.account-row .row-info p { font-size: 12px; color: var(--text-muted); }
.account-row .row-actions { display: flex; gap: 6px; }

/* =============================================
   History Table
   ============================================= */

.history-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
}

.history-table th {
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
}

.history-table td { border-bottom: 1px solid var(--border-muted); }
.history-table tr:last-child td { border-bottom: none; }

.history-table .reward-badge {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
}

/* =============================================
   Quest History
   ============================================= */

.quests-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.quest-day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.quest-day-account {
  font-weight: 700;
  font-size: 14px;
}

.quest-day-date {
  font-size: 12px;
  color: var(--text-muted);
}

.quest-day-stats {
  margin-left: auto;
  display: flex;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}

.stat-completed { color: var(--green); }
.stat-skipped { color: var(--text-muted); }
.stat-failed { color: var(--red); }

.quest-day-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quest-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-muted);
  background: var(--bg);
  font-weight: 500;
}

.quest-chip.badge-claimed {
  background: var(--green-subtle);
  border-color: #1a3a28;
  color: var(--green);
}

.quest-chip.badge-closed {
  color: var(--text-muted);
}

.quest-chip.badge-error {
  background: var(--red-subtle);
  border-color: #3a1f25;
  color: var(--red);
}

/* =============================================
   Quest Filter Bar
   ============================================= */

.quest-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* =============================================
   Settings
   ============================================= */

.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.settings-change-gate {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 360px);
  align-items: center;
  gap: 10px 20px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(100deg, var(--surface-2), var(--surface));
  border: 1px solid #274365;
  border-radius: var(--radius);
}
.settings-change-gate strong { color: var(--text); }
.settings-change-gate p { margin-top: 2px; color: var(--text-muted); font-size: 12px; }
.settings-change-gate label { grid-column: 2; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.settings-change-gate input { grid-column: 2; grid-row: 1 / span 2; padding: 10px 12px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.settings-nav { display: flex; gap: 6px; margin: 0 0 20px; overflow-x: auto; padding-bottom: 2px; }
.settings-nav button { background: transparent; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); cursor: pointer; font-size: 12px; font-weight: 700; padding: 8px 13px; white-space: nowrap; }
.settings-nav button:hover { background: var(--surface-hover); color: var(--text); }
.settings-nav button.active { background: var(--accent-subtle); border-color: #285b99; color: #93c5fd; }

.settings-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.form-group input,
.form-group select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.form-msg {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.form-msg-success { color: var(--green); background: var(--green-subtle); }
.form-msg-error { color: var(--red); background: var(--red-subtle); }

/* =============================================
   Modal & Overlay
   ============================================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal.show { display: flex; }

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 440px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.modal-card h2 { font-size: 18px; font-weight: 700; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label { font-size: 13px; font-weight: 500; color: var(--text-muted); }

.field input,
.field select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Overlay (delete confirm + trend modal) */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.overlay:not(.hidden) { display: flex; }

.overlay .modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 440px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.overlay .modal-card h2 { font-size: 18px; font-weight: 700; }

.field-input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* ---- Trend Modal ---- */

.trend-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
}

.trend-range-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-muted);
}

.trend-range-btn {
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.trend-range-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.trend-range-btn.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

.trend-modal-body svg {
  max-width: 100%;
  height: auto;
}

.delete-confirm-input {
  width: 100%;
}

/* =============================================
   Job Progress Banner
   ============================================= */

.job-banner {
  margin-bottom: 20px;
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--accent);
  position: relative;
  overflow: hidden;
  animation: jobBannerPulse 2s ease-in-out infinite;
}

.job-banner.hidden { display: none; }

.job-banner[data-job="dailyQuests"] {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(34,197,94,0.15);
}
.job-banner[data-job="dellScrape"] {
  border-color: #8b5cf6;
  box-shadow: 0 0 20px rgba(139,92,246,0.15);
}
.job-banner[data-job="weeklyCheck"] {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245,158,11,0.15);
}
.job-banner[data-job="raincheck"] {
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34,197,94,0.15);
}
.job-banner[data-job="steamQuests"] {
  border-color: #60a5fa;
  box-shadow: 0 0 20px rgba(96,165,250,0.15);
}
.job-banner[data-job="twitchQuests"] {
  border-color: #a855f7;
  box-shadow: 0 0 20px rgba(168,85,247,0.15);
}
.job-banner[data-job="steamClaim"] {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245,158,11,0.15);
}

.job-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  flex-wrap: wrap;
}

.job-banner-icon {
  font-size: 18px;
  animation: spin 1.5s linear infinite;
}

.job-banner-title {
  color: var(--text);
}

.job-banner-elapsed {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.job-banner-progress {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.job-banner-cancel {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  margin-left: 8px;
  transition: all 0.2s;
}

.job-banner-cancel:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239,68,68,0.1);
}

.job-banner-cancel:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.job-banner-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.job-banner-detail {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Account timeline dots */
.job-timeline {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  padding: 4px 0;
}

.timeline-dot {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid var(--border-muted);
  color: var(--text-muted);
  background: var(--bg);
  white-space: nowrap;
}

.timeline-dot.done {
  color: var(--green);
  background: var(--green-subtle);
  border-color: #1a3a28;
}

.timeline-dot.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  animation: timelineActivePulse 1.5s ease-in-out infinite;
}

.timeline-dot.pending {
  opacity: 0.5;
}

@keyframes timelineActivePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(59,130,246,0.3); }
  50% { box-shadow: 0 0 16px rgba(59,130,246,0.6); }
}

.job-banner-bar {
  height: 4px;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
}

.job-banner-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

.job-banner[data-job="dailyQuests"] .job-banner-fill { background: var(--green); }
.job-banner[data-job="dellScrape"] .job-banner-fill { background: var(--purple); }
.job-banner[data-job="weeklyCheck"] .job-banner-fill { background: var(--amber); }
.job-banner[data-job="raincheck"] .job-banner-fill { background: var(--green); }
.job-banner[data-job="steamQuests"] .job-banner-fill { background: #60a5fa; }
.job-banner[data-job="twitchQuests"] .job-banner-fill { background: #a855f7; }
.job-banner[data-job="steamClaim"] .job-banner-fill { background: #f59e0b; }
.job-banner[data-job="discordVote"] .job-banner-fill { background: #5865F2; }
.job-banner[data-job="steamCommunityEvent"] .job-banner-fill { background: #00adb5; }

.job-banner[data-job="steamCommunityEvent"] {
  border-color: #00adb5;
  box-shadow: 0 0 20px rgba(0,173,181,0.15);
  animation-name: jobBannerPulseTeal;
}

@keyframes jobBannerPulseTeal {
  0%, 100% { box-shadow: 0 0 12px rgba(0,173,181,0.12); }
  50% { box-shadow: 0 0 24px rgba(0,173,181,0.25); }
}

@keyframes jobBannerPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(34,197,94,0.12); }
  50% { box-shadow: 0 0 24px rgba(34,197,94,0.25); }
}

.job-banner[data-job="dellScrape"] { animation-name: jobBannerPulsePurple; }
.job-banner[data-job="weeklyCheck"] { animation-name: jobBannerPulseAmber; }
.job-banner[data-job="raincheck"] { animation-name: jobBannerPulseGreen; }
.job-banner[data-job="steamQuests"] { animation-name: jobBannerPulseBlue; }
.job-banner[data-job="twitchQuests"] { animation-name: jobBannerPulsePurple; }

@keyframes jobBannerPulsePurple {
  0%, 100% { box-shadow: 0 0 12px rgba(139,92,246,0.12); }
  50% { box-shadow: 0 0 24px rgba(139,92,246,0.25); }
}
@keyframes jobBannerPulseAmber {
  0%, 100% { box-shadow: 0 0 12px rgba(245,158,11,0.12); }
  50% { box-shadow: 0 0 24px rgba(245,158,11,0.25); }
}
@keyframes jobBannerPulseGreen {
  0%, 100% { box-shadow: 0 0 12px rgba(34,197,94,0.12); }
  50% { box-shadow: 0 0 24px rgba(34,197,94,0.25); }
}
@keyframes jobBannerPulseBlue {
  0%, 100% { box-shadow: 0 0 12px rgba(96,165,250,0.12); }
  50% { box-shadow: 0 0 24px rgba(96,165,250,0.25); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =============================================
   Account Card — Job Active State
   ============================================= */

.account-card.job-active {
  border: 2px solid transparent;
  background: var(--card-bg);
  position: relative;
  z-index: 1;
}

.account-card.job-active::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--accent));
  background-size: 200% 100%;
  animation: borderGlow 2s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
  pointer-events: none;
}

@keyframes borderGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.card-job-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
  background: var(--accent-subtle);
  border: 1px solid #1e3a5f;
  color: var(--accent);
  animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-state.hidden { display: none; }

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.empty-state h3 { font-size: 18px; }
.empty-state p { color: var(--text-muted); max-width: 320px; }

/* =============================================
   Utility
   ============================================= */

.hidden { display: none !important; }

/* =============================================
   Task Logs
   ============================================= */

.log-filter {
  padding: 6px 10px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #1a1a2e;
  color: #e0e0e0;
  font-size: 13px;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.log-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-left: 3px solid #555;
  background: #1a1a2e;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
}

.log-entry:hover {
  background: #222244;
}

.log-time {
  color: #888;
  font-family: monospace;
  font-size: 12px;
  white-space: nowrap;
  min-width: 70px;
}

.log-type-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  color: #fff;
  white-space: nowrap;
}

.log-account {
  font-weight: 600;
  color: #ccc;
  white-space: nowrap;
}

.log-level-icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
}

.log-msg {
  flex: 1;
  color: #ddd;
}

.log-detail {
  color: #888;
  font-size: 12px;
  font-style: italic;
}

.log-entry.log-error {
  background: #2a1515;
}

.log-entry.log-warn {
  background: #2a2510;
}

.log-entry.log-expandable {
  cursor: pointer;
}

.log-entry.log-expandable:hover {
  background: #222244;
}

.log-detail-body {
  margin-top: 6px;
  padding: 8px 10px;
  background: #111122;
  border-radius: 4px;
  color: #aaa;
  font-size: 12px;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-all;
  border-left: 2px solid #444;
}

.log-detail-body.hidden {
  display: none;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats-row { flex-wrap: wrap; }
  .stat-card { min-width: 120px; }
  .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .main { padding: 16px; }
  .stats-row { flex-direction: column; }
  .stat-card { min-width: 0; }
  .account-row { grid-template-columns: 1fr; }
}

/* Operations shell overhaul */
:root {
  --surface-2: #161e29;
  --focus: #93c5fd;
  --shadow: 0 12px 36px rgba(0, 0, 0, .24);
  --gray: var(--text-muted);
  --orange: #fb923c;
}

body { min-width: 320px; }
.main { max-width: 1720px; width: 100%; margin: 0 auto; }
.eyebrow { color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 3px; }
.view-header { margin-bottom: 28px; }
.connection-notice { background: var(--amber-subtle); border: 1px solid #6b4c0a; border-radius: var(--radius-sm); color: #fcd34d; margin: -8px 0 18px; padding: 10px 14px; }
.stats-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; gap: 12px; }
.stat-card { min-width: 0; padding: 16px 18px; }
.account-section { margin-top: 32px; }
.account-section-header { justify-content: space-between; }
.account-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.account-card { background: linear-gradient(145deg, var(--card-bg), var(--surface)); box-shadow: 0 1px 0 rgba(255,255,255,.025); }
.card-status-row { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 6px; }
.card-status-row .card-quest-summary, .card-status-row .card-steam-quest, .card-status-row .card-twitch-quest, .card-status-row .card-discord-quest { overflow: hidden; text-overflow: ellipsis; }
.card-quest-buttons { gap: 8px; }
.btn-quest-mini { min-height: 42px; }
.icon-btn { min-width: 40px; min-height: 40px; }
.card-tools { border-top: 1px solid var(--border-muted); margin-top: 2px; padding-top: 10px; }
.card-tools summary { align-items: center; color: var(--text-muted); cursor: pointer; display: flex; font-size: 12px; font-weight: 700; justify-content: space-between; list-style: none; }
.card-tools summary::-webkit-details-marker { display: none; }
.card-tools summary::after { content: '+'; font-size: 17px; font-weight: 400; }
.card-tools[open] summary { color: var(--text); margin-bottom: 10px; }
.card-tools[open] summary::after { content: '−'; }
.card-tools summary span { font-size: 10px; font-weight: 500; }
.btn:focus-visible, .nav-item:focus-visible, .icon-btn:focus-visible, .btn-quest-mini:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: none; }
.log-filter, .log-entry, .log-detail-body { background: var(--surface); border-color: var(--border); color: var(--text); }
.log-entry:hover, .log-entry.log-expandable:hover { background: var(--surface-hover); }
.log-expand-icon { margin-left: auto; color: var(--text-muted); font-size: 18px; font-weight: 700; }
.mobile-nav { display: none; }
.toast { position: fixed; z-index: 200; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 40px)); padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 600; }
.toast-error { background: var(--red-subtle); border-color: #78313a; color: #fecaca; }
.toast-success { background: var(--green-subtle); border-color: #25683e; color: #bbf7d0; }
.toast-warning { background: var(--amber-subtle); border-color: #795916; color: #fde68a; }
.btn.is-loading { cursor: progress; opacity: .72; pointer-events: none; }
.btn.is-loading::before { animation: spin 1s linear infinite; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ''; display: inline-block; height: 12px; width: 12px; }

@media (max-width: 1150px) {
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .main { padding: 22px 22px 96px; }
  .sidebar { display: none; }
  .mobile-nav { position: fixed; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; z-index: 80; inset: auto 0 0; padding: 8px max(12px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)); background: rgba(9, 13, 19, .94); border-top: 1px solid var(--border); backdrop-filter: blur(16px); }
  .mobile-nav .nav-item { justify-content: center; flex-direction: column; gap: 3px; min-height: 52px; padding: 6px; font-size: 11px; text-align: center; }
  .mobile-nav .nav-item span:first-child { font-size: 18px; line-height: 1; }
  .nav-item.active::before { display: none; }
  .toast { bottom: 78px; right: 14px; }
}

@media (max-width: 600px) {
  .main { padding: 18px 14px 96px; }
  .view-header { align-items: flex-start; }
  .view-header h2 { font-size: 23px; }
  .view-actions { width: 100%; }
  .view-actions .btn { flex: 1; justify-content: center; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 25px; }
  .account-grid { grid-template-columns: 1fr; }
  .account-card { padding: 18px; }
  .card-quest-buttons { display: grid; grid-template-columns: repeat(2, 1fr); }
  .card-icon-bar { align-items: stretch; flex-wrap: wrap; }
  .card-icon-group { flex: 1; justify-content: space-around; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .card-tools summary span { display: none; }
  .settings-section { padding: 18px; }
  .settings-change-gate { grid-template-columns: 1fr; padding: 16px; }
  .settings-change-gate label, .settings-change-gate input { grid-column: 1; grid-row: auto; }
  .modal-card, .overlay .modal-card { width: calc(100vw - 28px); max-height: calc(100dvh - 28px); overflow-y: auto; padding: 20px; }

  #view-logs .view-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #view-logs .log-filter { min-width: 0; width: 100%; }
  #logTypeFilter { grid-column: 1 / -1; }
  #view-logs .view-actions .btn { min-width: 0; }
  .log-list { max-height: calc(100dvh - 300px); }
  .log-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 8px; padding: 10px 12px; }
  .log-time { grid-column: 1; grid-row: 1; min-width: 0; }
  .log-level-icon { grid-column: 2; grid-row: 1; }
  .log-type-badge { grid-column: 1; grid-row: 2; justify-self: start; }
  .log-account { grid-column: 2; grid-row: 2; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
  .log-msg { grid-column: 1 / -1; grid-row: 3; min-width: 0; overflow-wrap: anywhere; }
  .log-entry:has(.log-expand-icon) .log-msg { grid-column: 1; }
  .log-expand-icon { grid-column: 2; grid-row: 3; }
  .log-detail-body { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .btn:focus-visible, .nav-item:focus-visible, .icon-btn:focus-visible, .btn-quest-mini:focus-visible, input:focus-visible, select:focus-visible { outline-color: Highlight; }
}
