/* ═══════════════════════════════════════════════════════════════
   Analytics Practice Platform — Design System v3 (Light Only)
   White base + Deep Violet (#0C0C48) UI + Orange-Red (#FD4C44) CTA
═══════════════════════════════════════════════════════════════ */

/* ── Tokens + Color Palette ──────────────────────────────────── */
:root {
  --transition: 0.18s ease;
  --radius:     10px;
  --radius-sm:  6px;
  --font-mono:  'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-ui:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --sidebar-w:  300px;
  --header-h:   54px;

  --bg-base:       #f2f4f7;
  --bg-primary:    #f7f8fa;
  --bg-surface:    #ffffff;
  --bg-elevated:   #f0f1f4;
  --bg-hover:      #e8eaee;
  --code-bg:       #fafafa;
  --violet:        #0c0c48;
  --accent:        #FD4C44;
  --accent-hover:  #e03030;
  --accent-dim:    rgba(253,76,68,0.1);
  --accent-glow:   0 0 10px rgba(253,76,68,0.18);
  --text-1:        #0c0c48;
  --text-2:        #3a3a6a;
  --text-3:        #888899;
  --border:        #dde0e8;
  --border-soft:   #ebedf2;
  --shadow-sm:     0 1px 4px rgba(12,12,72,0.07);
  --shadow-md:     0 4px 16px rgba(12,12,72,0.10);
  --shadow-lg:     0 8px 32px rgba(12,12,72,0.13);
  --pass-bg:       #e8f8ef;
  --pass-text:     #156830;
  --fail-bg:       #ffeaea;
  --fail-text:     #b01010;
  --warn-bg:       #fffae8;
  --warn-text:     #7a5500;
  --badge-r:       #e8f3ff;
  --badge-r-t:     #0c0c48;
  --badge-x:       #f3e8ff;
  --badge-x-t:     #5a1a90;
  --locked-bg:     #f5f5fa;
  --locked-text:   #aaaacc;
  --done-text:     #156830;
  --scrollbar:     #d0d2da;
  --header-section:#f0f1f5;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font-ui);
  font-size: 14.5px;
  background: var(--bg-base);
  color: var(--text-1);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
  overflow: hidden;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }

/* ── Password Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--violet);
  border-radius: 16px;
  padding: 52px 44px;
  width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.modal-logo { font-size: 2.8rem; margin-bottom: 18px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15)); }
.modal-box h2 { font-size: 1.55rem; font-weight: 800; color: var(--text-1); margin-bottom: 6px; }
.modal-sub { color: var(--text-3); font-size: 0.85rem; margin-bottom: 32px; }
#pwd-form { display: flex; flex-direction: column; gap: 12px; }
#pwd-input {
  padding: 13px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 1rem;
  outline: none;
  text-align: center;
  letter-spacing: 0.18em;
  transition: border-color var(--transition), box-shadow var(--transition);
}
#pwd-input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(12,12,72,0.12); }
#pwd-input::placeholder { letter-spacing: normal; color: var(--text-3); }
.error-msg { color: var(--fail-text); font-size: 0.8rem; min-height: 20px; margin-top: 4px; }
.modal-notice { margin-top: 24px; font-size: 0.72rem; color: var(--text-3); line-height: 1.6; }
.modal-notice a { color: var(--violet); text-decoration: none; }
.modal-notice a:hover { text-decoration: underline; }

/* ── Loading Screen ──────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
}
.loading-overlay.hidden { display: none; }
.loading-content { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.loading-content h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-1); }
.loading-content p { font-size: 0.84rem; color: var(--text-2); max-width: 320px; line-height: 1.5; }

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.spinner-sm {
  display: inline-block; width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle; margin-right: 5px;
}

/* ── App Shell ───────────────────────────────────────────────── */
.app-shell { display: flex; flex-direction: column; height: 100vh; }
.app-shell.hidden { display: none; }

/* ── Header ──────────────────────────────────────────────────── */
.app-header {
  height: var(--header-h);
  background: #ffffff;
  border-bottom: 2px solid var(--violet);
  display: flex; align-items: center;
  padding: 0 18px; gap: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 10px; }
.header-brand { line-height: 1.25; }
.brand-title { font-size: 0.96rem; font-weight: 800; color: var(--violet); display: block; letter-spacing: 0.01em; }
.brand-sub   { font-size: 0.7rem;  color: var(--text-3); display: block; }
.header-center { flex: 1; display: flex; justify-content: center; }
.header-brand-center { line-height: 1.25; text-align: center; }
.brand-title-center { font-size: 0.96rem; font-weight: 800; color: var(--violet); display: block; letter-spacing: 0.01em; }
.header-right  { display: flex; align-items: center; gap: 10px; }

.mcq-link-btn {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(253,76,68,0.15);
  color: var(--accent);
  border: 1px solid rgba(253,76,68,0.3);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.mcq-link-btn:hover { background: rgba(253,76,68,0.25); border-color: var(--accent); }

/* WebR Status */
.webrStatus { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-2); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.loading { background: var(--warn-text); animation: pulse 1.2s ease-in-out infinite; }
.status-dot.ready   { background: var(--pass-text); }
.status-dot.error   { background: var(--fail-text); }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* Hamburger */
.hamburger-btn {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: 5px;
}
.hamburger-btn span { display: block; width: 20px; height: 2px; background: var(--text-2); border-radius: 2px; transition: all var(--transition); }
.hamburger-btn:hover span { background: var(--text-1); }

/* Icon Button */
.icon-btn {
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: var(--radius-sm);
  color: var(--text-2); display: flex; align-items: center;
  transition: all var(--transition);
}
.icon-btn:hover { color: var(--violet); background: #f0f1f5; }
.icon-btn svg  { width: 18px; height: 18px; }

/* ── Notice Bar ──────────────────────────────────────────────── */
.notice-bar {
  background: var(--violet);
  border-bottom: 1px solid var(--violet);
  padding: 7px 20px;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.8);
  text-align: center;
  flex-shrink: 0;
}
.notice-bar a { color: #ffffff; text-decoration: underline; opacity: 0.9; }
.notice-bar a:hover { opacity: 1; }

/* ── App Body ────────────────────────────────────────────────── */
.app-body { flex: 1; display: flex; overflow: hidden; position: relative; }

/* ════════════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto; overflow-x: hidden;
  transition: transform var(--transition);
}
.sidebar-inner { padding-bottom: 28px; }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* Week Section */
.sidebar-week { margin-top: 6px; }

.week-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 8px;
}
.week-header-label {
  font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--violet);
  white-space: nowrap;
}
.week-header-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}
.week-header-count {
  font-size: 0.66rem; font-weight: 600;
  color: var(--text-3);
  background: var(--bg-elevated);
  padding: 2px 7px; border-radius: 10px;
  white-space: nowrap;
}

.week-locked-msg {
  font-size: 0.75rem; color: var(--text-3);
  padding: 6px 4px 10px;
  display: flex; align-items: center; gap: 5px;
}

/* Set Header */
.sidebar-set { margin-bottom: 4px; }

.set-header {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  margin: 0 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}
.set-header:hover { background: var(--bg-elevated); }

.set-chevron {
  width: 12px; height: 12px; flex-shrink: 0;
  stroke: var(--text-3);
  transition: transform var(--transition);
}
.set-header.collapsed .set-chevron { transform: rotate(-90deg); }

.set-title-text {
  flex: 1;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-2);
}
.set-count {
  font-size: 0.66rem; font-weight: 600;
  color: var(--text-3);
}

/* Q Item */
.q-list { list-style: none; padding: 0 8px; display: flex; flex-direction: column; gap: 2px; }
.q-list.hidden { display: none; }

.q-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
  position: relative;
}
.q-item:hover:not(.locked-item) {
  background: var(--bg-elevated);
  border-color: var(--border-soft);
}
.q-item.active {
  background: rgba(12,12,72,0.06);
  border-color: rgba(12,12,72,0.25);
}
.q-item.locked-item { opacity: 0.5; cursor: not-allowed; }

/* Circular Number Badge */
.q-num-badge {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800;
  flex-shrink: 0;
  background: #f0f1f5;
  color: #555577;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.q-item.active .q-num-badge {
  background: var(--violet);
  color: white;
  border-color: var(--violet);
  box-shadow: 0 2px 8px rgba(12,12,72,0.3);
}
.q-item.done .q-num-badge {
  background: var(--pass-bg);
  color: var(--pass-text);
  border-color: var(--pass-text);
}

/* Title */
.q-item-title {
  font-size: 0.83rem; color: var(--text-2);
  flex: 1; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.35;
  transition: color var(--transition);
}
.q-item:hover:not(.locked-item) .q-item-title { color: var(--text-1); }
.q-item.active .q-item-title { color: var(--violet); font-weight: 700; }

/* Status Icon */
.q-status {
  flex-shrink: 0; font-size: 0.8rem;
  display: flex; align-items: center;
}
.q-status.done    { color: var(--pass-text);  font-size: 0.95rem; }
.q-status.tried   { color: #f0a020;           font-size: 0.88rem; }
.q-status.skipped { color: var(--text-3);      font-size: 0.82rem; }
.q-status.locked  { color: var(--locked-text); font-size: 0.82rem; }

/* ════════════════════════════════════════════════════════════════
   MAIN PANEL
════════════════════════════════════════════════════════════════ */
.main-panel {
  flex: 1; overflow-y: auto;
  background: var(--bg-primary);
  padding: 16px 20px;
}

/* Welcome */
.welcome-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: calc(100vh - var(--header-h) - 48px);
  text-align: center; gap: 14px;
}
.welcome-icon { font-size: 3.5rem; filter: drop-shadow(0 4px 12px rgba(253,76,68,0.2)); }
.welcome-state h2 { color: var(--text-1); font-size: 1.5rem; font-weight: 800; }
.welcome-state p  { color: var(--text-3); font-size: 0.9rem; }

/* Question View — vertical scroll layout */
.question-view.hidden { display: none; }
.question-view {
  display: flex; flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 1600px;
}

/* Row 2: Task | Environment */
.q-mid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

/* Environment panel */
.env-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(12,12,72,0.07);
  display: flex; flex-direction: column;
}
.env-panel-body {
  overflow-y: auto;
  max-height: 280px;
}

/* Question Header */
.question-header { display: flex; flex-direction: column; gap: 8px; }
.question-meta   { display: flex; gap: 8px; align-items: center; }
.q-badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em;
  padding: 3px 11px; border-radius: 20px;
  background: #f0f1f5; color: #3a3a6a;
  border: 1px solid var(--border);
}
.q-type-badge {
  font-size: 0.7rem; font-weight: 800; padding: 3px 11px;
  border-radius: 20px; letter-spacing: 0.05em;
}
.q-type-badge.r-type { background: var(--badge-r); color: var(--badge-r-t); }

#q-title { font-size: 1.35rem; font-weight: 800; color: var(--text-1); line-height: 1.3; }

/* ── Scenario / Task Panels ──────────────────────────────────── */
.scenario-panel, .task-panel, .expected-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 2px 12px rgba(12,12,72,0.07);
  overflow: hidden;
}

.panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--violet);
  border-bottom: 1px solid var(--violet);
}
.panel-icon  { font-size: 0.95rem; filter: brightness(10); }
.panel-label {
  font-size: 0.71rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
}

.panel-body { padding: 14px 16px; }

.expected-output {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #2a2a5a;
  white-space: pre-wrap;
  word-break: break-all;
  background: #f7f8fb;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid #e4e6ef;
}

.scenario-content, .task-content {
  font-size: 0.9rem; color: var(--text-2);
  line-height: 1.7;
}
.task-content code {
  background: var(--bg-elevated); color: var(--accent);
  padding: 1px 7px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.85em;
  border: 1px solid var(--border);
}
.task-content strong { color: var(--text-1); }
.task-content ul, .task-content ol { padding-left: 20px; margin-top: 6px; }
.task-content li { margin-bottom: 5px; }

/* ── Code Area ───────────────────────────────────────────────── */
.code-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 800px) { .code-area { grid-template-columns: 1fr; } }

.editor-section, .console-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(12,12,72,0.08);
}

/* Section Headers */
.section-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.editor-section  .section-header { background: var(--violet); border-bottom-color: var(--violet); }
.console-section .section-header { background: var(--violet); border-bottom-color: var(--violet); }
.solution-panel  .section-header { background: #f0faf5; border-bottom-color: rgba(21,104,48,0.2); }

.section-label {
  font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  display: flex; align-items: center; gap: 6px;
}
.section-label svg { stroke: rgba(255,255,255,0.7); }

/* Solution section label overrides (light bg) */
.solution-panel .section-label { color: #156830; }
.solution-panel .section-label svg { stroke: #156830; }

.editor-actions { display: flex; gap: 8px; align-items: center; }

/* Ghost buttons inside dark headers */
.section-header .btn-ghost {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.25);
  background: transparent;
}
.section-header .btn-ghost:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.1);
}

/* Solution section ghost button (light bg) */
.solution-panel .section-header .btn-ghost {
  color: #156830; border-color: rgba(21,104,48,0.3); background: transparent;
}
.solution-panel .section-header .btn-ghost:hover {
  background: rgba(21,104,48,0.08); border-color: #156830; color: #156830;
}

/* CodeMirror */
#editor-container .CodeMirror {
  font-family: var(--font-mono);
  font-size: 13px; line-height: 1.65;
  height: 300px; border: none; border-radius: 0;
  background: var(--code-bg) !important;
}
#editor-container .CodeMirror-gutters {
  border-right: 1px solid var(--border);
}
#editor-container .CodeMirror-linenumber {
  padding: 0 8px 0 4px;
  min-width: 16px;
  text-align: right;
}

/* Solution CodeMirror */
#solution-code .CodeMirror {
  font-family: var(--font-mono);
  font-size: 13px; line-height: 1.65;
  height: auto !important; max-height: 520px; overflow-y: auto !important;
  border: none;
  background: var(--code-bg) !important;
}

/* Console */
.console-output {
  flex: 1; min-height: 200px; max-height: 300px;
  overflow-y: auto; padding: 12px 14px;
  font-family: var(--font-mono); font-size: 12.5px;
  line-height: 1.65; background: var(--code-bg);
}

/* Environment content */
.env-content {
  flex: 1; overflow-y: auto;
  background: #fafafa;
}
.env-placeholder {
  display: block;
  padding: 20px 16px;
  color: var(--text-3); font-style: italic; font-size: 0.82rem;
}
.env-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.8rem;
}
.env-table thead th {
  position: sticky; top: 0;
  padding: 7px 12px;
  background: #f0f1f5;
  border-bottom: 1px solid var(--border);
  font-size: 0.67rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: #3a3a6a; text-align: left;
}
.env-table tbody tr { border-bottom: 1px solid var(--border-soft); }
.env-table tbody tr:hover { background: #f0f1f8; }
.env-table td { padding: 6px 12px; vertical-align: top; }
.env-name    { font-family: var(--font-mono); color: var(--text-1); font-weight: 600; white-space: nowrap; }
.env-type    { font-family: var(--font-mono); color: #c0392b; white-space: nowrap; }
.env-size    { color: var(--text-3); white-space: nowrap; }
.env-preview { font-family: var(--font-mono); color: var(--text-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-placeholder { color: var(--text-3); font-style: italic; }
.console-line     { white-space: pre-wrap; word-break: break-word; }
.console-stdout   { color: var(--text-1); }
.console-stderr   { color: var(--warn-text); }
.console-error    { color: var(--fail-text); }
.console-info     { color: var(--text-3); }
.console-muted    { color: var(--text-3); font-style: italic; }
.console-warn     { color: var(--warn-text); }

/* ── Solution Section ────────────────────────────────────────── */
.solution-section { display: flex; flex-direction: column; gap: 12px; }

.solution-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--pass-text);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.solution-panel.hidden { display: none; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px;
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--accent-glow);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary svg { width: 13px; height: 13px; }

.btn-run { padding: 6px 16px; font-size: 0.81rem; }

.btn-ghost {
  display: inline-flex; align-items: center;
  padding: 5px 10px;
  background: transparent; color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.76rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-ghost:hover { color: var(--text-1); border-color: var(--text-3); background: var(--bg-elevated); }
.btn-sm { padding: 4px 9px; font-size: 0.74rem; }

.btn-solution {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: var(--bg-surface); color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.86rem; font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}
.btn-solution:hover:not(.locked) {
  color: var(--violet);
  border-color: var(--violet);
  background: rgba(12,12,72,0.05);
}
.btn-solution svg { width: 15px; height: 15px; }
.btn-solution.locked { color: var(--locked-text); cursor: not-allowed; }
.btn-solution.locked:hover { color: var(--locked-text); border-color: var(--border); background: var(--locked-bg); }

/* ── Utility ─────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hamburger-btn { display: flex; }
  .brand-sub     { display: none; }
  .webrStatus .status-text { display: none; }

  .sidebar {
    position: fixed; top: var(--header-h); left: 0; bottom: 0; z-index: 95;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }
  .sidebar.open { transform: translateX(0); }

  .main-panel { padding: 16px 14px; }
}
@media (max-width: 500px) {
  .modal-box { width: 92vw; padding: 36px 22px; }
  .header-center { display: none; }
}

/* ── Mid-row mobile collapse ─────────────────────────────────── */
@media (max-width: 860px) {
  .q-mid-row { grid-template-columns: 1fr; }
}
