/* ==========================================================================
   PhysicsBook Solver - Editorial STEM / Academic Modern Stylesheet
   ========================================================================== */

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-base: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #141d2f;
  --bg-card-hover: #19243a;
  --bg-subtle: #1e293b;
  
  --border-subtle: #1f2937;
  --border-card: #27354a;
  --border-active: #3b82f6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-primary-light: rgba(59, 130, 246, 0.12);

  --color-teal: #14b8a6;
  --color-teal-light: rgba(20, 184, 166, 0.12);

  --color-accent: #8b5cf6;
  --color-accent-light: rgba(139, 92, 246, 0.12);

  --color-success: #10b981;
  --color-success-light: rgba(16, 185, 129, 0.12);

  --color-warning: #f59e0b;
  --color-warning-light: rgba(245, 158, 11, 0.12);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);

  --header-height: 64px;
  --sidebar-width: 320px;
}

[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-subtle: #f1f5f9;

  --border-subtle: #e2e8f0;
  --border-card: #cbd5e1;
  --border-active: #2563eb;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: rgba(37, 99, 235, 0.08);

  --color-teal: #0d9488;
  --color-teal-light: rgba(13, 148, 136, 0.08);

  --color-accent: #7c3aed;
  --color-accent-light: rgba(124, 58, 237, 0.08);

  --color-success: #059669;
  --color-success-light: rgba(5, 150, 105, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography Helpers */
h1, h2, h3, h4, h5 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

code, kbd {
  font-family: var(--font-mono);
}

/* App Layout */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-teal));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Search Box */
.header-center {
  flex: 1;
  max-width: 540px;
  margin: 0 20px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px var(--color-primary-light);
  background: var(--bg-surface);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 10px;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-kbd {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
}

.btn-text:hover {
  text-decoration: underline;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.badge-accent {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: rgba(59, 130, 246, 0.3);
}

.badge-success {
  background: var(--color-success-light);
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Theme Toggle Icons */
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Workspace Layout */
.workspace {
  display: flex;
  flex: 1;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  overflow: hidden;
  flex-shrink: 0;
  z-index: 20;
}

.sidebar-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Parts Horizontal Navigation */
.parts-nav {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: none;
}

.parts-nav::-webkit-scrollbar {
  display: none;
}

.part-tab {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.part-tab:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.part-tab.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: rgba(59, 130, 246, 0.3);
  font-weight: 600;
}

/* Chapters Tree */
.chapters-tree {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}

.part-group {
  margin-bottom: 14px;
}

.part-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-subtle);
  cursor: pointer;
  user-select: none;
  margin-bottom: 4px;
}

.part-header:hover {
  background: var(--bg-card-hover);
}

.chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}

.chapter-item:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.chapter-item.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 600;
}

.chapter-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 10px;
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-base);
}

.filter-bar {
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.filter-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

.content-container {
  padding: 24px 28px;
  flex: 1;
}

/* Tasks Grid View */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.task-card-mini {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.task-card-mini:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

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

.task-number-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.card-mini-chapter {
  font-size: 0.775rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.card-mini-condition {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-mini-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.card-mini-answer {
  font-family: var(--font-mono);
  color: var(--color-success);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

/* Task Detail View */
.task-detail-view {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

/* ==========================================================================
   Notebook Sheet Layout (Physics Workbook / Blackboard Aesthetic)
   ========================================================================== */

:root {
  --notebook-bg: #111827;
  --notebook-grid: rgba(59, 130, 246, 0.07);
  --board-line: #3b82f6;
  --board-heading: #60a5fa;
  --formula-text: #e2e8f0;
}

[data-theme="light"] {
  --notebook-bg: #fafcff;
  --notebook-grid: rgba(99, 102, 241, 0.12);
  --board-line: #2563eb;
  --board-heading: #1d4ed8;
  --formula-text: #0f172a;
}

.notebook-sheet {
  background-color: var(--notebook-bg);
  background-image: 
    linear-gradient(var(--notebook-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--notebook-grid) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 2px solid var(--board-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  margin-top: 10px;
}

.notebook-meta-bar {
  padding: 16px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.notebook-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badge-example-lg {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: #f59e0b !important;
}

.badge-example {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
}

/* Textbook Example Clean View (Exact as printed in Textbook) */
.textbook-example-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: 10px;
}

.textbook-example-body {
  padding: 32px 36px;
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.example-condition {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.75;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.example-textbook-solution {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.example-textbook-solution p {
  margin-bottom: 16px;
}

.example-textbook-answer {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--color-success-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  font-size: 1.15rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* 1. Condition on top */
.notebook-condition-box {
  padding: 24px 32px;
  border-bottom: 2px solid var(--board-line);
  background: rgba(37, 99, 235, 0.03);
}

.notebook-condition-text {
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--text-primary);
  font-weight: 500;
}

/* 2. Two-column Grid Layout */
.notebook-grid-layout {
  display: flex;
  min-height: 480px;
}

/* Left Column: Дано & Найти */
.notebook-left-column {
  width: 320px;
  min-width: 280px;
  max-width: 360px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

.notebook-heading {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--board-heading);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.notebook-dano-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--formula-text);
  flex-grow: 1;
}

.notebook-dano-row {
  line-height: 1.4;
  word-break: break-word;
}

.notebook-horizontal-line {
  height: 2px;
  background-color: var(--board-line);
  width: 100%;
  margin: 20px 0 16px 0;
}

.notebook-to-find-block {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--board-heading);
  padding-bottom: 12px;
}

/* Vertical separating line between columns */
.notebook-vertical-line {
  width: 2px;
  background-color: var(--board-line);
  flex-shrink: 0;
}

/* Right Column: Решение & Ответ */
.notebook-right-column {
  flex: 1;
  min-width: 0;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
}

.notebook-solution-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

/* 2 Solution Mode Switch Tabs */
.solution-mode-tabs {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.sol-tab-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sol-tab-btn:hover {
  color: var(--text-primary);
}

.sol-tab-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.notebook-solution-body {
  flex-grow: 1;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--formula-text);
  margin-bottom: 24px;
}

.formula-line {
  margin: 10px 0;
  overflow-x: auto;
}

.text-subtle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

.solution-step {
  margin-bottom: 16px;
  line-height: 1.75;
}

/* Bottom Answer under solution */
.notebook-bottom-answer {
  border-top: 2px solid var(--board-line);
  padding-top: 18px;
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.notebook-answer-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-success);
}

.notebook-answer-text {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Responsive adjustment for Mobile */
@media (max-width: 860px) {
  .notebook-grid-layout {
    flex-direction: column;
  }
  .notebook-left-column {
    width: 100%;
    max-width: 100%;
    border-bottom: 2px solid var(--board-line);
  }
  .notebook-vertical-line {
    display: none;
  }
  .notebook-right-column {
    padding: 20px 24px;
  }
}

.answer-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-success);
}

/* Scan Modal Viewer */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 90vw;
  max-width: 1040px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
}

.modal-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05070c;
  padding: 20px;
}

.scan-image-wrapper {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.scan-image-wrapper img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.modal-info {
  max-width: 620px;
  height: auto;
  max-height: 85vh;
}

.info-body {
  background: var(--bg-surface);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.book-card-info {
  display: flex;
  gap: 18px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.book-cover-mini {
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-meta h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.book-meta p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.info-features h4 {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.info-features ul {
  padding-left: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  max-width: 440px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 280px;
  }

  .sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    top: var(--header-height);
    background: rgba(0, 0, 0, 0.5);
    z-index: 15;
    display: none;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .desktop-only {
    display: none !important;
  }

  .tasks-grid {
    grid-template-columns: 1fr;
  }

  .dano-container {
    grid-template-columns: 1fr;
  }

  .to-find-box {
    border-left: none;
    border-top: 2px dashed var(--border-card);
    padding-left: 0;
    padding-top: 14px;
  }

  .detail-header {
    flex-direction: column;
  }
}
