/* =========================================================================
   TestSphere — Stylesheet
   Design tokens: circuit blue primary, amber signal accent, slate neutrals.
   Display type: Space Grotesk. Body: Inter. Data/mono: JetBrains Mono.
   ========================================================================= */

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

:root {
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --c-primary: #3A5FF7;
  --c-primary-dark: #2C48D9;
  --c-primary-light: #EAEEFF;
  --c-accent: #F2A93B;
  --c-success: #1FA971;
  --c-success-bg: #E4F7EE;
  --c-danger: #E5484D;
  --c-danger-bg: #FDECEC;
  --c-warning: #F2A93B;
  --c-warning-bg: #FDF3E1;
  --c-info: #3A5FF7;

  --bg-body: #F5F6FA;
  --bg-sidebar: #161B2E;
  --bg-sidebar-hover: #232A45;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-hover: #F0F2F9;
  --border: #E3E6F0;
  --text-main: #1B2140;
  --text-muted: #6B7189;
  --text-inverse: #F5F6FA;
  --shadow-sm: 0 1px 2px rgba(20, 24, 50, 0.06);
  --shadow-md: 0 6px 20px rgba(20, 24, 50, 0.08);
  --radius: 10px;
  --radius-lg: 16px;
}

html.dark {
  --bg-body: #0E1220;
  --bg-sidebar: #0A0E1A;
  --bg-sidebar-hover: #171D30;
  --bg-card: #161B2C;
  --bg-input: #121726;
  --bg-hover: #1D2338;
  --border: #262D45;
  --text-main: #E7E9F5;
  --text-muted: #9096B5;
  --text-inverse: #0E1220;
  --c-primary-light: #1B2648;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 6px; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); background: var(--bg-hover); padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------------- Buttons ---------------- */
.btn { border: 1px solid transparent; padding: 10px 18px; border-radius: var(--radius); font-weight: 600; font-size: 0.92rem; transition: 0.15s; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-secondary { background: var(--c-primary-light); color: var(--c-primary-dark); }
.btn-secondary:hover { filter: brightness(0.96); }
.btn-ghost { background: transparent; color: var(--text-main); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.92); }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }

.icon-btn { background: transparent; border: none; font-size: 1.1rem; padding: 8px; border-radius: 8px; color: var(--text-main); position: relative; }
.icon-btn:hover { background: var(--bg-hover); }
.icon-btn.sm { font-size: 0.95rem; padding: 5px 7px; }
.icon-btn.danger:hover { background: var(--c-danger-bg); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--c-danger); }

/* ---------------- Auth screen ---------------- */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1fr 460px; }
.auth-panel { background: linear-gradient(160deg, #161B2E, #263063 65%, #3A5FF7); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand .brand-mark { font-size: 2.2rem; }
.auth-brand h1 { font-size: 2rem; margin: 0; }
.auth-brand p { margin: 0; opacity: 0.8; }
.auth-tagline { font-size: 1.15rem; max-width: 420px; opacity: 0.92; font-family: var(--font-display); }
.feature-strip { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; font-family: var(--font-mono); font-size: 0.85rem; opacity: 0.85; }
.auth-card { background: var(--bg-card); padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; }
.auth-card h2 { margin-bottom: 18px; }
.auth-alt { text-align: center; margin-top: 14px; font-size: 0.9rem; color: var(--text-muted); }
.auth-alt a { color: var(--c-primary); font-weight: 600; }
.test-creds { margin-top: 24px; border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px 14px; }
.test-creds summary { cursor: pointer; font-weight: 600; color: var(--c-primary-dark); }
.creds-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.82rem; }
.creds-table th, .creds-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }

/* ---------------- Forms / fields ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input); color: var(--text-main); font-size: 0.92rem;
}
.field input:focus, .field select:focus, .field textarea:focus, input:focus, select:focus, textarea:focus { outline: 2px solid var(--c-primary); outline-offset: 1px; border-color: var(--c-primary); }
.input-invalid { border-color: var(--c-danger) !important; }
.field-error { color: var(--c-danger); min-height: 16px; font-size: 0.8rem; }
.field-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 0.88rem; }
.field-row a { color: var(--c-primary); font-weight: 600; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.span-2 { grid-column: 1 / -1; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon input { flex: 1; padding-right: 40px; }
.icon-toggle { position: absolute; right: 8px; background: none; border: none; font-size: 1rem; }
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; }
.radio-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.radio-group.cards { gap: 10px; }
.payment-option { border: 1px solid var(--border); padding: 10px 14px; border-radius: 8px; }
.checkbox-group { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.9rem; }
.checkbox-group label { display: flex; align-items: center; gap: 6px; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 14px; }
.alert-error { background: var(--c-danger-bg); color: var(--c-danger); }
.alert-success { background: var(--c-success-bg); color: var(--c-success); }
.alert-warning { background: var(--c-warning-bg); color: #92650E; }

/* ---------------- Toggle switch & slider ---------------- */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: 0.2s; cursor: pointer; }
.toggle-slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.toggle-switch input:checked + .toggle-slider { background: var(--c-primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
input[type="range"] { width: 100%; }

/* ---------------- Shell layout ---------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--bg-sidebar); color: var(--text-inverse); display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 22px 20px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.brand-mark { color: var(--c-accent); font-size: 1.4rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #C4C9E0; font-size: 0.9rem; font-weight: 500; position: relative; }
.nav-link:hover { background: var(--bg-sidebar-hover); color: #fff; }
.nav-link.active { background: var(--c-primary); color: #fff; }
.nav-icon { font-size: 1.05rem; width: 20px; text-align: center; }
.nav-count { margin-left: auto; background: var(--c-accent); color: #1B2140; font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,0.08); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--c-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }
.user-chip-name { font-size: 0.86rem; font-weight: 600; color: #fff; }
.user-chip-role { font-size: 0.75rem; color: #9096B5; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px 26px; background: var(--bg-card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-search { flex: 1; max-width: 460px; position: relative; }
.topbar-search input { width: 100%; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-body); }
.topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.mobile-only { display: none; }
.content { padding: 26px; flex: 1; }

/* ---------------- Suggest list / notifications ---------------- */
.suggest-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md); z-index: 30; max-height: 280px; overflow-y: auto; }
.suggest-item { display: block; padding: 10px 14px; font-size: 0.88rem; cursor: pointer; }
.suggest-item:hover { background: var(--bg-hover); }
.suggest-empty, .empty-cell { padding: 14px; color: var(--text-muted); font-size: 0.88rem; text-align: center; }
.notif-panel { position: fixed; top: 60px; right: 24px; width: 320px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); z-index: 100; overflow: hidden; }
.notif-header { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 10px 16px; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.notif-item small { color: var(--text-muted); }
.notif-empty { padding: 16px; color: var(--text-muted); font-size: 0.85rem; }

/* ---------------- Cards / page structure ---------------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; gap: 14px; flex-wrap: wrap; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.link { color: var(--c-primary); font-weight: 600; }
.back-link { display: inline-block; margin-bottom: 14px; }

/* ---------------- Stat cards / dashboard ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm); }
.stat-icon { font-size: 1.6rem; width: 46px; height: 46px; border-radius: 12px; background: var(--c-primary-light); display: flex; align-items: center; justify-content: center; }
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 22px; }
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 100px 1fr 30px; align-items: center; gap: 10px; font-size: 0.85rem; }
.bar-track { background: var(--bg-hover); border-radius: 6px; height: 10px; overflow: hidden; }
.bar-fill { background: var(--c-primary); height: 100%; border-radius: 6px; }
.activity-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.activity-list li { display: flex; gap: 10px; font-size: 0.86rem; }
.activity-list small { color: var(--text-muted); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { text-align: left; padding: 10px 12px; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--c-primary); }
.row-actions { display: flex; gap: 4px; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input); font-size: 0.88rem; }
.toolbar input[type="text"], .toolbar input[type="search"] { flex: 1; min-width: 220px; }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; flex-wrap: wrap; gap: 10px; }
.page-info { font-size: 0.82rem; color: var(--text-muted); }
.page-controls { display: flex; gap: 4px; }
.page-btn { min-width: 32px; height: 32px; border: 1px solid var(--border); background: var(--bg-card); border-radius: 6px; font-size: 0.85rem; }
.page-btn.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.page-btn:disabled { opacity: 0.4; }
.page-ellipsis { padding: 0 4px; color: var(--text-muted); }

/* ---------------- Badges ---------------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-green { background: var(--c-success-bg); color: var(--c-success); }
.badge-red { background: var(--c-danger-bg); color: var(--c-danger); }
.badge-amber { background: var(--c-warning-bg); color: #92650E; }
.badge-blue { background: #E5EDFF; color: #2C48D9; }
.badge-indigo { background: #ECE7FE; color: #6D3FD1; }
.badge-gray { background: var(--bg-hover); color: var(--text-muted); }
html.dark .badge-blue { background: #1D2A54; color: #90A8FF; }
html.dark .badge-indigo { background: #2A2251; color: #C3ADFF; }

/* ---------------- Products / cart ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.product-thumb { display: flex; align-items: center; justify-content: center; font-size: 3rem; height: 130px; background: var(--bg-hover); }
.product-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.product-name { font-weight: 700; font-size: 0.95rem; }
.product-meta { font-size: 0.78rem; color: var(--text-muted); }
.product-price { font-family: var(--font-display); font-weight: 700; }
.product-actions { display: flex; gap: 8px; margin-top: 6px; }
.product-manage-row { display: flex; gap: 6px; padding: 0 14px 12px; }
.thumb-sm { font-size: 1.4rem; margin-right: 8px; }
.cart-prod { display: flex; align-items: center; }
.qty-stepper { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; }
.qty-stepper.sm { padding: 2px 8px; gap: 8px; }
.qty-stepper button { background: none; border: none; font-size: 1rem; }
.qty-stepper input { width: 40px; border: none; text-align: center; }
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.cart-summary h3 { margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
.summary-row.total { font-weight: 700; font-size: 1.05rem; border-bottom: none; padding-top: 12px; }
.cart-toolbar { display: flex; justify-content: space-between; margin-top: 16px; }
.empty-state { text-align: center; padding: 60px 20px; }

/* ---------------- Detail pages ---------------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 12px 0; }
.detail-grid label { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.detail-grid span { font-size: 0.92rem; }
.detail-hero { display: grid; grid-template-columns: 260px 1fr; gap: 26px; }
.detail-thumb { background: var(--bg-hover); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.detail-price { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; margin: 8px 0; }
.detail-desc { color: var(--text-muted); line-height: 1.6; }

/* ---------------- Checkout ---------------- */
.stepper-nav { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.step-pill { padding: 8px 14px; border-radius: 999px; background: var(--bg-hover); font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.step-pill.active { background: var(--c-primary); color: #fff; }
.step-pill.done { background: var(--c-success-bg); color: var(--c-success); }
.checkout-card h3 { margin-bottom: 16px; }
.step-actions { display: flex; justify-content: space-between; margin-top: 20px; }
.step-actions.center { justify-content: center; gap: 12px; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.review-grid h4 { font-size: 0.85rem; margin-bottom: 4px; }
.review-grid p { font-size: 0.86rem; color: var(--text-muted); margin: 0; }
.confirmation { text-align: center; padding: 40px 20px; }
.confirm-icon { font-size: 3.5rem; margin-bottom: 10px; }

/* ---------------- Modals ---------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 18, 32, 0.55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-box { background: var(--bg-card); border-radius: var(--radius-lg); width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-md); }
.modal-box.modal-lg { max-width: 640px; }
.modal-header { padding: 20px 24px 0; }
.modal-body { padding: 16px 24px; }
.modal-footer { padding: 16px 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }

/* ---------------- Toasts ---------------- */
#toast-host { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 300; max-width: 340px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow-md); font-size: 0.86rem; animation: toast-in 0.2s ease; }
.toast-out { animation: toast-out 0.2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
.toast-close { margin-left: auto; background: none; border: none; font-size: 1rem; color: var(--text-muted); }
.toast-success { border-left: 4px solid var(--c-success); }
.toast-error { border-left: 4px solid var(--c-danger); }
.toast-info { border-left: 4px solid var(--c-primary); }
.toast-warning { border-left: 4px solid var(--c-warning); }

/* ---------------- Advanced Selenium practice ---------------- */
.adv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.practice-frame { width: 100%; height: 120px; border: 1px solid var(--border); border-radius: 8px; }
.mouse-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
.hover-menu { position: relative; padding: 10px 16px; background: var(--bg-hover); border-radius: 8px; text-align: center; font-weight: 600; cursor: pointer; }
.hover-dropdown { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-md); z-index: 10; }
.hover-menu:hover .hover-dropdown { display: block; }
.hover-dropdown a { display: block; padding: 8px 14px; font-size: 0.85rem; }
.hover-dropdown a:hover { background: var(--bg-hover); }
.rightclick-area { background: var(--bg-hover); border: 1px dashed var(--border); border-radius: 8px; padding: 20px; text-align: center; font-size: 0.85rem; }
.drag-drop-wrap { display: flex; gap: 14px; align-items: center; }
.drag-item { padding: 10px 14px; background: var(--c-primary-light); border-radius: 8px; cursor: grab; font-size: 0.85rem; }
.drop-zone { flex: 1; border: 2px dashed var(--border); border-radius: 8px; padding: 16px; text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.hidden-el { display: none; color: var(--c-success); font-weight: 600; }
.wait-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--c-primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-top: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Calendar ---------------- */
.calendar-card { max-width: 420px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-title-row { display: flex; gap: 6px; }
.calendar-title-row select { border: 1px solid var(--border); border-radius: 6px; padding: 6px; background: var(--bg-input); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 0.75rem; color: var(--text-muted); font-weight: 700; padding: 6px 0; }
.cal-cell { aspect-ratio: 1; border: none; background: var(--bg-hover); border-radius: 8px; font-size: 0.85rem; }
.cal-cell.empty { background: transparent; }
.cal-cell.today { outline: 2px solid var(--c-primary); }
.cal-cell.selected { background: var(--c-primary); color: #fff; }
.cal-cell:disabled { opacity: 0.35; }

/* ---------------- Upload ---------------- */
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 40px; text-align: center; margin-bottom: 16px; }
.dropzone.drag-over { border-color: var(--c-primary); background: var(--c-primary-light); }
.progress-track { background: var(--bg-hover); border-radius: 999px; height: 10px; overflow: hidden; margin-bottom: 6px; }
.progress-fill { background: var(--c-primary); height: 100%; width: 0; transition: width 0.2s; }
.upload-file-list { list-style: none; padding: 0; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 0.86rem; }
.upload-info { margin-top: 8px; font-size: 0.85rem; }
.text-error { color: var(--c-danger); }

/* ---------------- Autosuggest ---------------- */
.autosuggest-wrap { position: relative; }

/* ---------------- Challenges / bugs ---------------- */
.challenge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.challenge-card { margin-bottom: 0; }
.challenge-answer { margin-top: 10px; font-size: 0.85rem; background: var(--bg-hover); padding: 10px 12px; border-radius: 8px; }
.bug-list { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; }
.bug-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.bug-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }

/* ---------------- Tabs (admin) ---------------- */
.tabs { display: flex; gap: 4px; margin-bottom: -1px; flex-wrap: wrap; }
.tab-btn { padding: 10px 16px; border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; background: var(--bg-hover); font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.tab-btn.active { background: var(--bg-card); color: var(--c-primary); }

/* ---------------- Locator inspector ---------------- */
.locator-tip { position: fixed; z-index: 999; background: #161B2E; color: #F2A93B; font-family: var(--font-mono); font-size: 0.72rem; padding: 4px 10px; border-radius: 6px; pointer-events: none; box-shadow: var(--shadow-md); }
body.show-locators [data-testid] { outline: 1px dashed rgba(58, 95, 247, 0.35); outline-offset: 1px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .dash-grid, .cart-layout, .adv-grid, .mouse-actions-grid, .detail-hero { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
}
@media (max-width: 760px) {
  .mobile-only { display: inline-flex; }
  .sidebar { position: fixed; left: -260px; top: 0; z-index: 150; transition: left 0.2s; box-shadow: var(--shadow-md); }
  .sidebar.open { left: 0; }
  .topbar-search { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .wait-grid { grid-template-columns: 1fr; }
}
