/* ── VIEWS ── */
.view { display: none; }
.view.active { display: block; }

#proj-shoot-days, #prod-setup-indicator { display: none !important; }
.dropdown-item.hide, .dropdown-divider.hide { display: none !important; }

  /* Sortable table headers */
  .sortable-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
  }

  .sortable-header:hover {
    color: #f0cf70;
  }

  .sort-indicator {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.7;
  }

  /* ── DASHBOARD ── */
  .page-header { margin-bottom: 22px; overflow: hidden; }
  .page-header h2 {
    font-family: var(--font-display);
    font-size: 42px;
    letter-spacing: 4px;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .page-header p { color: var(--text3); font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase; font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 22px;
    max-width: 100%;
    overflow: hidden;
  }
  /* ── DASHBOARD ── */
  .dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0 24px;
    flex-wrap: wrap;
  }

  .dashboard-stats-line {
    font-size: 12px;
    color: var(--text3);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .dash-stat-total { color: var(--text2); font-weight: 500; }
  .dash-stat-sep   { color: var(--border); }
  .dash-stat-item  { color: var(--text3); }
  .dash-stat-item.prod { color: var(--accent); }
  .dash-stat-item.pre  { color: #7dd0f5; }
  .dash-stat-item.done { color: var(--green); }
  .dash-stat-item.released { color: #b88af0; }
  .dash-stat-empty { color: var(--text3); font-style: italic; }

  .dashboard-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .dash-filter-pill {
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--text3);
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.12s;
  }
  .dash-filter-pill:hover { border-color: var(--text3); color: var(--text2); }
  .dash-filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0a0a10;
    font-weight: 600;
  }

  /* ── DASHBOARD NEW UI ── */
  .dash-greeting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0 24px;
    gap: 16px;
  }
  .dash-greeting {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 2px;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
  }
  .dash-sub { font-size: 12px; color: var(--text3); }
  .dash-resume-btn {
    background: var(--accent-dim);
    border: 1px solid rgba(230,188,60,0.3);
    color: var(--accent);
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.12s;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .dash-resume-btn:hover { background: rgba(230,188,60,0.2); }

  /* Pipeline */
  .dash-pipeline {
    display: flex;
    gap: 6px;
    margin-bottom: 32px;
  }
  .dash-pipe-stage {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.12s;
  }
  .dash-pipe-stage:hover { border-color: var(--border); }
  .dash-pipe-stage.active { border-color: var(--sc); }
  .dash-pipe-label {
    font-size: 9px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-mono);
    margin-bottom: 6px;
  }
  .dash-pipe-count {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
  }
  .dash-pipe-stage.active .dash-pipe-count { color: var(--sc); }
  .dash-pipe-bar {
    height: 2px;
    border-radius: 1px;
    margin-top: 10px;
    background: var(--sc);
    opacity: 0.3;
  }
  .dash-pipe-stage.active .dash-pipe-bar { opacity: 1; }

  /* Section labels */
  .dash-section-label {
    font-size: 10px;
    color: var(--sc);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-mono);
    margin-bottom: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .dash-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border2);
  }

  /* Featured card (prod/post) */
  .dash-featured-card {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
    cursor: pointer;
    transition: border-color 0.15s;
    position: relative;
    overflow: hidden;
  }
  .dash-featured-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--sc);
    border-radius: 0;
  }
  .dash-featured-card:hover { border-color: var(--border); }
  .dash-featured-eyebrow {
    font-size: 9px;
    color: var(--text3);
    font-family: var(--font-mono);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
  }
  .dash-featured-title {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 2px;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.1;
  }
  .dash-featured-meta { font-size: 11px; color: var(--text3); margin-bottom: 10px; }
  .dash-featured-tags { display: flex; gap: 6px; flex-wrap: wrap; }
  .dash-tag {
    font-size: 10px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text3);
    padding: 2px 8px;
    border-radius: 3px;
  }
  .dash-featured-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .dash-featured-badge {
    font-size: 9px;
    padding: 4px 10px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--sc) 15%, transparent);
    color: var(--sc);
    border: 1px solid color-mix(in srgb, var(--sc) 25%, transparent);
  }
  .dash-featured-time { font-size: 10px; }

  /* Card grid (pre/done/released) */
  .dash-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
  }
  .dash-proj-card {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.12s, transform 0.12s;
    position: relative;
    overflow: hidden;
  }
  .dash-proj-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--sc);
  }
  .dash-proj-card:hover { border-color: var(--border); transform: translateY(-1px); }
  .dash-proj-num {
    font-size: 9px;
    color: var(--text3);
    font-family: var(--font-mono);
    margin-bottom: 5px;
  }
  .dash-proj-title {
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 1.5px;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 3px;
  }
  .dash-proj-dir { font-size: 11px; color: var(--text3); margin-bottom: 8px; }
  .dash-proj-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .dash-proj-time { font-size: 10px; }
  .dash-edit-btn {
    background: transparent;
    border: none;
    color: var(--border);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    transition: color 0.1s;
    margin-left: auto;
  }
  .dash-proj-card:hover .dash-edit-btn,
  .dash-featured-card:hover .dash-edit-btn { color: var(--text3); }
  .dash-edit-btn:hover { color: var(--accent) !important; }

  .dash-new-card {
    background: transparent;
    border: 1px dashed var(--border2);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--text3);
    transition: border-color 0.12s, background 0.12s, color 0.12s;
  }
  .dash-new-card:hover { border-color: var(--border); background: var(--surface); color: var(--text2); }

  .dash-empty {
    padding: 80px 24px;
    text-align: center;
  }
  .dash-empty-title { font-size: 16px; color: var(--text2); margin-bottom: 6px; }
  .dash-empty-sub { font-size: 13px; color: var(--text3); }

  /* ── DASHBOARD STAT CARDS ── */
  .stat-card {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 16px 18px 14px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.12s;
  }
  .stat-card:hover { border-color: var(--border); transform: translateY(-1px); }
  .stat-card.active { border-color: rgba(255,255,255,0.18); background: var(--surface2); }
  .stat-card.total-card { cursor: default; }
  .stat-card.total-card:hover { transform: none; border-color: var(--border2); }
  .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  }
  .stat-card .label {
    font-size: 8.5px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-family: var(--font-mono);
    margin-bottom: 8px;
  }
  .stat-card .value {
    font-family: var(--font-display);
    font-size: 48px;
    letter-spacing: 2px;
    color: var(--text);
    line-height: 1;
  }
  .stat-card .sub { font-size: 10px; color: var(--text3); margin-top: 3px; }

  /* ── DASHBOARD TRAYS ── */
  .projects-trays {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .tray {
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
  }

  .tray-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
  }
  .tray-header:hover { background: var(--surface2); }

  .tray-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
  }

  .tray-count {
    font-size: 11px;
    color: var(--text3);
    background: var(--surface2);
    padding: 2px 8px;
    border-radius: 99px;
  }

  .tray-arrow {
    font-size: 10px;
    color: var(--text3);
    transition: transform 0.2s;
  }

  .tray.open .tray-arrow { transform: rotate(180deg); }

  .tray-content {
    display: none;
    padding: 0 12px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .tray.open .tray-content {
    display: flex;
  }

  /* Tray status colors */
  .tray[data-status="pre"] .tray-title { color: #7dd0f5; }
  .tray[data-status="prod"] .tray-title { color: var(--accent); }
  .tray[data-status="post"] .tray-title { color: #e08095; }
  .tray[data-status="done"] .tray-title { color: var(--green); }
  .tray[data-status="released"] .tray-title { color: #b88af0; }

  /* ── PROJECT CARDS ── */
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }

  .project-card {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
  }
  .project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .project-card.status-pre::before   { background: #5bc0eb; }
  .project-card.status-prod::before  { background: var(--accent); }
  .project-card.status-post::before  { background: #e08095; }
  .project-card.status-done::before  { background: var(--green); }
  .project-card.status-released::before { background: #b88af0; }
  .project-card:hover { border-color: var(--border); }

  .project-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .project-card-timestamp {
    font-size: 10px;
    font-family: var(--font-mono);
  }
  .project-card-title {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 1.5px;
    color: var(--text);
    line-height: 1.15;
    margin-bottom: 4px;
  }
  .project-card-dir {
    font-size: 12px;
    color: var(--text2);
  }
  .project-card-company {
    font-size: 11px;
    color: var(--text3);
  }
  .project-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
  }
  .project-card-tag {
    font-size: 10px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text3);
    padding: 2px 8px;
    border-radius: 3px;
  }
  .project-card-lastedit {
    font-size: 10px;
    font-family: var(--font-mono);
  }
  .project-card-edit {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text3);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity 0.12s, color 0.12s;
  }
  .project-card:hover .project-card-edit { opacity: 1; }
  .project-card-edit:hover { color: var(--accent); }

  /* ── EMPTY STATE ── */
  .dashboard-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
    color: var(--text3);
  }
  .dashboard-empty-icon {
    margin: 0 auto 20px;
    color: var(--text3);
    opacity: 0.4;
  }
  .dashboard-empty-title { font-size: 16px; color: var(--text2); margin-bottom: 6px; }
  .dashboard-empty-sub   { font-size: 13px; color: var(--text3); }

  .new-project-card {
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    gap: 7px;
    color: var(--text3);
  }
  .new-project-card:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
  .new-project-card .plus { font-size: 22px; }
  .new-project-card span { font-size: 11.5px; font-weight: 500; letter-spacing: 0.5px; }

  /* ── PROJECT VIEW ── */
  .project-header {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: var(--shadow);
    position: relative;
    overflow: visible;
    max-width: 100%;
  }
  .project-header::after { display: none; }
  .project-header-left { padding-left: 8px; overflow: hidden; }
  .project-header-left h2 {
    font-family: var(--font-display);
    font-size: 40px;
    letter-spacing: 3px;
    color: var(--text);
    line-height: 1;
    margin-bottom: 8px;
    overflow-wrap: break-word;
  }
  .project-header-meta { display: flex; gap: 16px; color: var(--text3); font-size: 11px; flex-wrap: wrap; font-family: var(--font-mono); letter-spacing: 0.5px; overflow: hidden; }
  .project-header-meta span { display: flex; align-items: center; gap: 4px; }
  .project-header-logline { font-size: 12px; color: var(--text2); font-style: italic; margin-top: 8px; line-height: 1.5; opacity: 0.85; cursor: pointer; }
  .project-header-logline:hover { opacity: 1; color: var(--text); }
  .project-header-logline.empty { color: var(--text3); font-size: 11px; opacity: 0.5; font-style: normal; font-family: var(--font-mono); }

  .section-tabs { display: none; }
  .section-tab {
    padding: 9px 14px;
    cursor: pointer;
    color: var(--text3);
    font-size: 11.5px;
    font-weight: 500;
    transition: all 0.1s;
    border-right: 1px solid var(--border2);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    letter-spacing: 0.2px;
  }
  .section-tab:last-child { border-right: none; }
  .section-tab:hover { color: var(--text2); background: var(--surface2); }
  .section-tab.active {
    color: var(--accent);
    background: var(--surface2);
    border-bottom-color: var(--accent);
  }

  /* ── DOC CARDS (overview) ── */
  .documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-width: 100%;
  }
  #overview-docs {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .documents-grid { display: block; }
  .doc-card {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: grab;
    transition: all 0.14s;
    overflow: visible;
    position: relative;
    user-select: none;
    touch-action: none;
  }
  .doc-card:active, .doc-card.ov-dragging { cursor: grabbing; }
  .doc-card:hover {
    border-color: var(--border);
    background: var(--surface2);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
  }
  .doc-card.ov-selected { border-color: var(--accent); background: rgba(56,168,212,0.06); }
  .doc-card.ov-drag-over { border-color: var(--accent); background: rgba(56,168,212,0.1); transform: scale(1.03); }
  .doc-card.ov-dragging { opacity: 0.35; transform: none; }
  .ov-checkbox {
    position: absolute; top: 7px; left: 7px;
    width: 14px; height: 14px; cursor: pointer; z-index: 2;
    opacity: 0; transition: opacity .12s;
  }
  .ov-remove-btn {
    position: absolute; top: 5px; right: 5px;
    background: rgba(220,60,60,0.12); border: none;
    color: #e06060; cursor: pointer; font-size: 10px;
    width: 18px; height: 18px; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .12s; z-index: 2; padding: 0;
  }
  .doc-card:hover .ov-checkbox,
  .doc-card:hover .ov-remove-btn,
  .doc-card.ov-selected .ov-checkbox,
  .doc-card.ov-selected .ov-remove-btn { opacity: 1; }
  .picker-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 7px; cursor: pointer;
    font-size: 12px; color: var(--text); transition: background .1s;
  }
  .picker-row:hover { background: var(--surface3, var(--surface)); }
  .doc-card-icon { font-size: 20px; margin-bottom: 8px; opacity: 0.85; }
  .doc-card-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .doc-card-sub { font-size: 11px; color: var(--text3); }
  .doc-card-status {
    margin-top: 10px;
    font-size: 9.5px;
    font-family: var(--font-mono);
    color: var(--text3);
    display: flex; align-items: center; gap: 5px;
    letter-spacing: 0.5px;
  }
  .doc-card-status.filled { color: var(--green); }
  .doc-card-status.empty { color: var(--text3); }

  .layout-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border2);
    border-radius: 7px;
    background: var(--surface);
    margin-bottom: 3px;
    cursor: grab;
    user-select: none;
    transition: border-color .1s, background .1s;
  }
  .layout-row.layout-hidden { opacity: 0.45; }
  .layout-row.drag-over { border-color: var(--accent); background: rgba(56,168,212,0.08); }
  .layout-drag-handle { color: var(--text3); font-size: 15px; cursor: grab; }
  .layout-eye-btn { background: none; border: none; cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }

  .new-doc-card {
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.14s;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 110px;
    gap: 7px;
    color: var(--text3);
  }
  .new-doc-card:hover { border-color: var(--accent2); color: var(--accent2); }

  /* ── FILES PAGE ── */
  
  /* Quick Access Bar */
  .files-quick-access {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border2);
  }
  .quick-access-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    color: var(--text2);
    transition: all 0.15s;
  }
  .quick-access-item:hover {
    background: var(--surface3);
    color: var(--text);
  }
  .quick-access-icon {
    font-size: 14px;
  }
  
  /* Storage Usage */
  .files-storage {
    margin-bottom: 16px;
    padding: 10px 12px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border2);
  }
  .storage-bar {
    height: 6px;
    background: var(--surface3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
  }
  .storage-bar-used {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
  }
  .storage-text {
    font-size: 11px;
    color: var(--text3);
  }
  
  /* Toolbar */
  .files-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
  }
  .files-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .files-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  /* Search */
  .files-search {
    position: relative;
    display: flex;
    align-items: center;
  }
  .files-search-icon {
    position: absolute;
    left: 10px;
    font-size: 12px;
    color: var(--text3);
  }
  .files-search-input {
    padding: 6px 10px 6px 30px;
    font-size: 12px;
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    width: 180px;
    transition: width 0.2s, border-color 0.2s;
  }
  .files-search-input:focus {
    outline: none;
    border-color: var(--accent);
    width: 220px;
  }
  .files-search-input::placeholder {
    color: var(--text3);
  }
  
  /* Sort */
  .files-sort {
    display: flex;
    align-items: center;
  }
  
  /* View Toggle */
  .files-view-toggle {
    display: flex;
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .view-toggle-btn {
    padding: 6px 10px;
    font-size: 14px;
    background: var(--surface);
    border: none;
    cursor: pointer;
    color: var(--text3);
    transition: all 0.15s;
  }
  .view-toggle-btn:hover {
    background: var(--surface3);
    color: var(--text2);
  }
  .view-toggle-btn.active {
    background: var(--accent-dim);
    color: var(--text);
  }
  
  .file-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  .file-tab {
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text3);
    background: var(--surface2);
    border: 1px solid var(--border2);
    transition: all 0.12s;
  }
  .file-tab:hover { color: var(--text2); border-color: var(--border); }
  .file-tab.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(230,188,60,0.3);
  }

  .file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    max-width: 100%;
  }
  .file-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    font-size: 11px;
    position: relative;
    cursor: pointer;
    transition: all 0.14s;
  }
  .file-card:hover {
    border-color: var(--border);
    background: var(--surface2);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
  }
  .file-card-preview {
    width: 100%;
    height: 100px;
    background: var(--surface2);
    border-radius: var(--radius);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
  }
  .file-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .file-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .file-card-meta {
    font-size: 10px;
    color: var(--text3);
    font-family: var(--font-mono);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .file-card-type {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    background: var(--surface3);
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .file-card-date {
    font-size: 10px;
    color: var(--text3);
    margin-left: auto;
  }
  .file-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.12s;
  }
  .file-card:hover .file-card-actions { opacity: 1; }
  .file-card.selected .file-card-actions { opacity: 1; }

  .file-select-check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    opacity: 0;
    transition: opacity 0.12s, background 0.1s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
    z-index: 2;
  }
  .file-card:hover .file-select-check { opacity: 1; }
  .file-card.selected .file-select-check {
    opacity: 1;
    background: var(--accent);
    border-color: var(--accent);
  }
  .file-card.selected {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  }

  .file-bulk-bar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--text2);
  }
  .file-bulk-bar.visible { display: flex; }
  .file-bulk-bar-count { font-weight: 600; color: var(--text); margin-right: 4px; }
  .file-bulk-sep { flex: 1; }
  .file-bulk-clear { cursor: pointer; color: var(--text3); font-size: 11px; text-decoration: underline; }

  /* Folder styles */
  .folder-card {
    aspect-ratio: 1 / 0.85;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    color: var(--text2);
    transition: background 0.15s, border-color 0.15s;
    position: relative;
    overflow: hidden;
  }
  .folder-card:hover {
    border-color: var(--border);
    background: color-mix(in srgb, var(--surface2) 80%, var(--accent) 5%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
  .folder-card.drop-target {
    border-color: var(--accent);
    border-style: dashed;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface2));
  }
  .folder-icon {
    font-size: 48px;
    line-height: 1;
  }
  .folder-card-preview {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
  }
  .folder-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    padding: 0 8px;
  }
  .folder-card-meta {
    font-size: 10px;
    color: var(--text3);
    text-align: center;
  }
  .folder-card-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.12s;
  }
  .folder-card:hover .folder-card-actions { opacity: 1; }
  .folder-card .file-action-btn {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: none;
    background: var(--surface3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
  }
  .folder-card .file-action-btn:hover {
    background: var(--surface);
  }
  .folder-card .file-action-btn.delete:hover {
    background: var(--danger);
    color: #fff;
  }

  /* Folder breadcrumb navigation */
  .folder-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  .folder-nav-item {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text2);
    transition: all 0.12s;
  }
  .folder-nav-item:hover {
    background: var(--surface3);
    color: var(--text);
  }
  .folder-nav-item.current {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 600;
  }
  .folder-nav-sep {
    color: var(--text3);
    font-size: 10px;
  }

  /* Draggable file cards */
  .file-card[draggable="true"] {
    cursor: grab;
  }
  .file-card[draggable="true"]:active {
    cursor: grabbing;
  }
  .file-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
  }
  .file-action-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.12s;
  }
  .file-action-btn:hover { background: var(--surface3); color: var(--text2); }
  .file-action-btn.delete:hover { background: rgba(196,68,68,0.15); border-color: rgba(196,68,68,0.3); color: var(--red); }

  .file-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.14s;
    margin-bottom: 20px;
    background: var(--surface);
  }
  .file-upload-zone:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
  }
  .file-upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-dim);
  }
  /* Generic drop-zone highlight used on sections/panels */
  .drop-zone { position: relative; }
  .drop-zone.dragover::after {
    content: '⬇ Drop files here';
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; color: var(--accent);
    background: rgba(0,0,0,0.45); border-radius: 10px;
    border: 2px dashed var(--accent); pointer-events: none; z-index: 10;
    letter-spacing: .04em;
  }
  .file-upload-icon {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.6;
  }
  .file-upload-text {
    color: var(--text2);
    font-size: 13px;
    margin-bottom: 4px;
  }
  .file-upload-hint {
    color: var(--text3);
    font-size: 11px;
    font-family: var(--font-mono);
  }

  .file-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text3);
  }
  .file-empty-icon { font-size: 48px; opacity: 0.3; margin-bottom: 16px; }
  .file-empty-text { font-size: 14px; margin-bottom: 8px; color: var(--text2); }
  .file-empty-hint { font-size: 12px; font-family: var(--font-mono); }

  /* ── LIST VIEW ── */
  .file-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .file-list-header {
    display: grid;
    grid-template-columns: 30px 30px 20px 1fr 80px 80px 100px 80px;
    gap: 8px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border2);
    margin-bottom: 4px;
  }
  .file-list-header-star {}
  .file-list-header-name {}
  .file-list-header-type { text-align: center; }
  .file-list-header-size { text-align: right; }
  .file-list-header-date { text-align: right; }
  
  .file-list-item {
    display: grid;
    grid-template-columns: 30px 30px 20px 1fr 80px 80px 100px 80px;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
  }
  .file-list-item:hover {
    border-color: var(--border);
    background: var(--surface2);
  }
  .file-list-item.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
  }
  .file-list-item .file-select-check {
    position: static;
    opacity: 0;
    width: 16px;
    height: 16px;
  }
  .file-list-item:hover .file-select-check,
  .file-list-item.selected .file-select-check {
    opacity: 1;
  }
  .file-list-star {
    font-size: 14px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s;
  }
  .file-list-item:hover .file-list-star,
  .file-list-item .file-list-star.starred {
    opacity: 1;
  }
  .file-list-icon {
    font-size: 18px;
  }
  .file-list-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .file-list-meta {
    text-align: center;
  }
  .file-list-type {
    font-size: 11px;
  }
  .file-list-size {
    font-size: 11px;
    color: var(--text3);
    text-align: right;
  }
  .file-list-date {
    font-size: 11px;
    color: var(--text3);
    text-align: right;
  }
  .file-list-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .file-list-item:hover .file-list-actions {
    opacity: 1;
  }

  /* Folder list item (same as file-list-item) */
  .folder-list-item {
    display: grid;
    grid-template-columns: 30px 30px 20px 1fr 80px 80px 100px 80px;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
  }
  .folder-list-item:hover {
    border-color: var(--border);
    background: var(--surface2);
  }
  .folder-list-star {
    font-size: 14px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s;
  }
  .folder-list-item:hover .folder-list-star {
    opacity: 1;
  }
  .folder-list-icon {
    font-size: 18px;
  }
  .folder-list-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .folder-list-type {
    font-size: 11px;
  }
  .folder-list-size {
    font-size: 11px;
    color: var(--text3);
    text-align: right;
  }
  .folder-list-date {
    font-size: 11px;
    color: var(--text3);
    text-align: right;
  }
  .folder-list-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .folder-list-item:hover .folder-list-actions {
    opacity: 1;
  }

  /* Star indicator in grid view */
  .file-card-star {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 5;
  }
  .file-card:hover .file-card-star,
  .file-card.starred .file-card-star {
    opacity: 0.7;
  }
  .file-card-star:hover {
    opacity: 1 !important;
    transform: scale(1.2);
  }
  .file-card.starred .file-card-star {
    opacity: 1;
  }
  
  /* Context Menu */
  .context-menu {
    position: fixed;
    z-index: 1000;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 4px 0;
  }
  .context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 12px;
    color: var(--text2);
    cursor: pointer;
    transition: background 0.1s;
  }
  .context-menu-item:hover {
    background: var(--surface3);
    color: var(--text);
  }
  .context-menu-item.danger:hover {
    background: rgba(196, 68, 68, 0.15);
    color: var(--red);
  }
  .context-menu-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
  }
  .context-menu-sep {
    height: 1px;
    background: var(--border2);
    margin: 4px 0;
  }

  /* ── MODAL ── */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }
  .modal-overlay.open { display: flex !important; }
  
  .modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    animation: none;
    box-shadow: var(--shadow-lg);
  }
  .modal-lg { max-width: 780px; }
  .modal-xl { max-width: 1020px; width: 95%; }
  @keyframes modalIn {
    from { opacity: 1; transform: scale(0.97) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border2);
  }
  .modal-header h3 {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 2px;
    color: var(--text);
  }
  .modal-close {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text3);
    width: 26px; height: 26px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.12s;
  }
  .modal-close:hover { background: var(--surface3); color: var(--text2); }
  .modal-close:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

  /* ── FORMS ── */
  .form-group { margin-bottom: 14px; overflow: hidden; }
  .form-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    display: block;
    font-family: var(--font-mono);
  }
  .form-input, .form-select, .form-textarea {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 11px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    transition: border-color 0.12s, box-shadow 0.12s;
    outline: none;
  }
  .form-input:focus-visible, .form-select:focus-visible, .form-textarea:focus-visible {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(56,168,212,0.4);
    outline: none;
  }
  .form-input-sm {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 12px;
    outline: none;
  }
  .form-input-sm:focus-visible {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(56,168,212,0.4);
    outline: none;
  }
  .form-textarea-sm {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 12px;
    resize: vertical;
    min-height: 40px;
    line-height: 1.4;
    outline: none;
  }
  .form-textarea-sm:focus-visible {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(56,168,212,0.4);
    outline: none;
  }
  .form-input-minimal {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 4px 0;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
  }
  .form-input-minimal:focus-visible {
    border-bottom-color: var(--accent2);
    box-shadow: 0 2px 0 0 var(--accent2);
    outline: none;
  }
  .form-input-minimal::placeholder { color: var(--text3); }
  .form-input::placeholder { color: var(--text3); }
  .form-textarea { resize: vertical; min-height: 78px; line-height: 1.55; }
  .form-select option { background: var(--surface2); }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 100%; }
  .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; max-width: 100%; }
  .form-actions {
    display: flex;
    gap: 7px;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border2);
  }

  /* ── TABLES ── */
  .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    min-width: 600px;
  }
  .data-table th {
    text-align: left;
    padding: 8px 14px;
    font-size: 8.5px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text3);
    border-bottom: 1px solid var(--border2);
    background: var(--surface2);
    position: sticky;
    top: 0;
    font-weight: 500;
  }
  .data-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border2);
    vertical-align: middle;
    color: var(--text2);
  }
  .data-table td strong { color: var(--text); font-weight: 500; }
  .data-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.012); }
  .data-table tbody tr:hover td { background: var(--surface3); color: var(--text); cursor: pointer; }
  .data-table tr:last-child td { border-bottom: none; }
  .data-table td { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .data-table td[title] { cursor: help; }
  .data-table tr.expand-row td { background: var(--surface2) !important; padding: 0; }
  .data-table tr.expand-row td { border-bottom: 1px solid var(--border2); }
  .expand-photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
  }
  .expand-photo-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface3);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: 1px solid var(--border2);
    transition: transform 0.1s;
    position: relative;
  }
  .expand-photo-thumb:hover { transform: scale(1.02); }
  .expand-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .expand-photo-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.72);
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 3px 2px;
    gap: 1px;
  }
  .expand-photo-thumb:hover .expand-photo-actions { display: flex; }
  .expand-photo-action-btn {
    font-size: 13px;
    line-height: 1;
    padding: 2px 3px;
    background: none;
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    opacity: 0.85;
  }
  .expand-photo-action-btn:hover { opacity: 1; background: rgba(255,255,255,0.18); }
  .expand-photo-action-btn.danger:hover { background: rgba(220,60,60,0.4); }
  .photos-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--accent);
    cursor: pointer;
    white-space: nowrap;
  }
  .photos-badge:hover { text-decoration: underline; }

  /* ── BUDGET ── */
  .budget-summary-bar {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px;
  }
  .bsb-card {
    flex: 1; min-width: 140px; background: var(--surface); border: 1px solid var(--border2);
    border-radius: 10px; padding: 12px 16px; display: flex; flex-direction: column; gap: 3px;
    box-shadow: var(--shadow);
  }
  .bsb-card .bsb-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text3); font-weight: 600; }
  .bsb-card .bsb-amount { font-size: 20px; font-weight: 700; font-family: var(--font-mono); color: var(--text); }
  .bsb-card.atl { border-top: 3px solid var(--accent); }
  .bsb-card.atl .bsb-amount { color: var(--accent); }
  .bsb-card.btl { border-top: 3px solid var(--accent2); }
  .bsb-card.btl .bsb-amount { color: var(--accent2); }
  .bsb-card.grand { border-top: 3px solid var(--text2); }
  .budget-section-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 14px; border-radius: 8px 8px 0 0; margin-top: 20px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  }
  .budget-section-head.atl { background: rgba(230,188,60,0.15); border: 1px solid rgba(230,188,60,0.35); border-bottom: none; color: var(--accent); }
  .budget-section-head.btl { background: rgba(91,192,235,0.1); border: 1px solid rgba(91,192,235,0.25); border-bottom: none; color: var(--accent2); }
  .budget-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border2); border-radius: 0 0 8px 8px; overflow: hidden; margin-bottom: 4px; }
  .budget-table th { padding: 8px 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text3); text-align: left; background: var(--surface2); border-bottom: 1px solid var(--border2); }
  .budget-table th.num { text-align: right; }
  .budget-table td { padding: 8px 10px; font-size: 12px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; }
  .budget-table td.num { text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--text); }
  .budget-table td.variance-pos { text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--red); }
  .budget-table td.variance-neg { text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--green); }
  .budget-table td.variance-zero { text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--text3); }
  .budget-table tr:last-child td { border-bottom: none; }
  .budget-table tr:hover td { background: var(--surface2); }
  .budget-total-row td { font-weight: 700; background: var(--surface2) !important; color: var(--text) !important; font-size: 12px; border-top: 1px solid var(--border2); }
  .dept-pill { display: inline-block; border-radius: 3px; padding: 1px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
  .bud-handle { cursor: grab; color: var(--text3); font-size: 14px; padding: 0 4px 0 0; user-select: none; opacity: 0.4; }
  .bud-handle:hover { opacity: 1; }
  .bud-handle:active { cursor: grabbing; }
  .bud-dragging td { opacity: 0.35; }
  .bud-drag-over td { border-top: 2px solid var(--accent) !important; }
  .budget-dept-header td { background: var(--surface2) !important; font-size: 11px; font-weight: 600; cursor: pointer; user-select: none; border-top: 2px solid var(--border2); padding: 6px 10px; }
  .budget-dept-header:hover td { background: var(--surface3, var(--border)) !important; }
  .budget-dept-subtotal td { font-size: 11px; font-style: italic; color: var(--text3) !important; background: var(--surface2) !important; border-top: 1px dashed var(--border2); border-bottom: 1px dashed var(--border2); text-align: right; }
  .budget-dept-subtotal td.num { color: var(--text2) !important; font-family: var(--font-mono); text-align: right; }
  .budget-dept-subtotal:hover td { background: var(--surface2) !important; }
  .bsb-divider { width: 1px; background: var(--border2); align-self: stretch; margin: 0 2px; flex-shrink: 0; }
  .bsb-card.bsb-config { background: var(--surface2); border-style: dashed; }
  .bsb-card.bsb-remain { border-top: 3px solid var(--green); }
  .bsb-card.bsb-remain .bsb-amount { color: var(--green); }
  .bsb-card.bsb-over { border-top: 3px solid var(--red); }
  .bsb-card.bsb-over .bsb-amount { color: var(--red); }
  .bsb-input { background: var(--surface); border: 1px solid var(--border2); border-radius: 4px; color: var(--text); padding: 3px 6px; font-size: 12px; font-family: var(--font-mono); outline: none; }
  .bsb-input:focus { border-color: var(--accent); }
  .tpl-pick-card { background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px; padding: 12px 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
  .tpl-pick-card:hover { border-color: var(--accent); background: var(--surface); }
  .bud-editable { cursor: text !important; }
  .bud-editable:hover { background: var(--surface2) !important; outline: 1px dashed var(--border2); outline-offset: -2px; }
  .bud-cell-input { width: 90px; background: var(--surface); border: 1px solid var(--accent); border-radius: 4px; color: var(--text); padding: 2px 5px; font-size: 12px; font-family: var(--font-mono); text-align: right; outline: none; }
  .pct-badge { display: inline-block; margin-left: 6px; font-size: 10px; color: var(--text3); font-family: var(--font-mono); opacity: 0.8; }
  .bud-dept-filter-pill { cursor: pointer !important; }
  .bud-dept-filter-pill:hover { filter: brightness(1.15); }
  .budget-table th { cursor: default; }
  .budget-table th[onclick] { cursor: pointer; }
  .budget-table th[onclick]:hover { color: var(--text); }
  .bud-row-over td { background: rgba(220,60,60,0.07) !important; }
  .bud-row-over:hover td { background: rgba(220,60,60,0.13) !important; }
  .bud-row-under td { background: rgba(60,180,100,0.07) !important; }
  .bud-row-under:hover td { background: rgba(60,180,100,0.13) !important; }
  .bud-search-row { margin: 6px 0 4px; }
  .bud-search-row input { width: 100%; max-width: 340px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 6px; color: var(--text); padding: 5px 10px; font-size: 12px; outline: none; }
  .bud-search-row input:focus { border-color: var(--accent); }
  .bud-quick-add-bar { display: flex; align-items: center; gap: 6px; padding: 6px 4px; margin: 2px 0 12px; background: var(--surface2); border: 1px dashed var(--border2); border-radius: 6px; }
  .bud-quick-add-bar .baq-dept { background: var(--surface); border: 1px solid var(--border2); border-radius: 4px; color: var(--text2); font-size: 12px; padding: 4px 6px; width: 130px; }
  .bud-quick-add-bar .baq-desc { flex: 1; background: var(--surface); border: 1px solid var(--border2); border-radius: 4px; color: var(--text); font-size: 12px; padding: 4px 8px; min-width: 0; }
  .bud-quick-add-bar .baq-num  { width: 80px; background: var(--surface); border: 1px solid var(--border2); border-radius: 4px; color: var(--text); font-size: 12px; padding: 4px 8px; font-family: var(--font-mono); }
  .bud-quick-add-bar input:focus, .bud-quick-add-bar select:focus { outline: none; border-color: var(--accent); }

  .table-container {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: var(--shadow);
    max-width: 100%;
    position: relative;
    scrollbar-width: none;
  }
  .table-container::-webkit-scrollbar { display: none; }
  .tc-scrollbar-track {
    position: absolute; bottom: 0; left: 0; right: 0; height: 6px;
    background: var(--surface2); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    opacity: 0; transition: opacity 0.15s; pointer-events: none;
  }
  .table-container:hover .tc-scrollbar-track { opacity: 1; pointer-events: auto; }
  .tc-scrollbar-thumb {
    position: absolute; top: 1px; height: 4px;
    background: var(--text3); border-radius: 99px;
    cursor: grab; transition: background 0.15s; min-width: 30px;
  }
  .tc-scrollbar-thumb:hover, .tc-scrollbar-thumb.dragging { background: var(--text2); cursor: grabbing; }
  .tc-nav { display:none;justify-content:flex-end;gap:5px;margin-top:5px; }
  .tc-nav.tc-nav-vis { display:flex; }
  .tc-nav-btn { width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:var(--surface3);border:1px solid var(--border2);border-radius:var(--radius);cursor:pointer;color:var(--text2);font-size:17px;user-select:none;transition:background 0.1s,opacity 0.15s;opacity:0;pointer-events:none; }
  .tc-nav-btn.tc-btn-vis { opacity:1;pointer-events:auto; }
  .tc-nav-btn:hover { background:var(--surface4);color:var(--text); }
  .col-hide-btn { display:inline-flex;align-items:center;opacity:0;margin-left:4px;cursor:pointer;transition:opacity 0.15s;vertical-align:middle;color:var(--text3); }
  th:hover .col-hide-btn { opacity:0.5; }
  .col-hide-btn:hover { opacity:1 !important;color:var(--text2); }

  /* Sticky first column for contacts + locations tables */
  .contacts-table th:first-child,.locations-table th:first-child { position:sticky;left:0;z-index:3;background:var(--surface2); }
  .contacts-table td:first-child,.locations-table td:first-child { position:sticky;left:0;z-index:1;background:var(--surface); }
  .contacts-table tbody tr:nth-child(even) td:first-child,.locations-table tbody tr:nth-child(even) td:first-child { background:var(--surface) !important; }
  .contacts-table tbody tr:hover td:first-child,.locations-table tbody tr:hover td:first-child { background:var(--surface3) !important; }
  .contacts-table tr.expand-row td:first-child,.locations-table tr.expand-row td:first-child { background:var(--surface2) !important; }

  /* Hover tooltip */
  #global-tip { position:fixed;z-index:9999;background:var(--surface3);border:1px solid var(--border2);border-radius:var(--radius);padding:8px 12px;font-size:12px;color:var(--text);max-width:300px;white-space:pre-wrap;line-height:1.5;box-shadow:var(--shadow);pointer-events:none;display:none;word-break:break-word; }
  .table-toolbar {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border2);
    gap: 10px;
    background: var(--surface2);
  }
  .table-toolbar-left { display: flex; gap: 8px; align-items: center; }
  .table-toolbar-right { display: flex; gap: 8px; }

  .search-input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 12px 5px 28px;
    color: var(--text);
    font-size: 12px;
    font-family: var(--font-body);
    outline: none;
    width: 190px;
    transition: border-color 0.12s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233a3a52' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 9px center;
  }
  .search-input:focus-visible { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(56,168,212,0.4); outline: none; }
  #global-search:focus-visible { border-color: var(--accent2) !important; box-shadow: 0 0 0 3px rgba(56,168,212,0.4); outline: none; }

  /* ── CONFIRMED DOTS ── */
  .conf-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .conf-green { background: var(--green); box-shadow: 0 0 5px rgba(46,168,100,0.6); }
  .conf-orange { background: var(--orange); box-shadow: 0 0 5px rgba(212,136,58,0.6); }
  .conf-red { background: var(--red); box-shadow: 0 0 5px rgba(196,68,68,0.6); }

  /* ── DOCUMENT EDITOR (breakdown/scouting cards) ── */
  .doc-editor {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  .doc-editor-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface2);
  }
  .doc-editor-header h3 { font-family: var(--font-display); font-size: 20px; letter-spacing: 1.5px; }
  .doc-editor-body { padding: 20px; }

  /* ── SCRIPT BREAKDOWN ── */
  .bd-layout {
    display: flex;
    gap: 14px;
    align-items: stretch;
    min-height: 0;
  }
  .bd-layout > div:first-child {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .bd-layout > div:last-child {
    width: 290px;
    flex-shrink: 0;
  }
  @media (max-width: 720px) { .bd-layout { flex-direction: column; } .bd-layout > div:last-child { width: 100%; } }
  .bd-script-view {
    flex: 1;
    min-height: 0;
    max-height: 842px;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.85;
    color: var(--text);
    cursor: text;
    user-select: text;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 22px;
    overflow-y: auto;
  }
  .bd-scene-heading { font-weight: 700; color: var(--accent); }

  /* ── Stripboard ─────────────────────────────────────────── */
  /* ── Stripboard ── */
  .sb-wrap { display:flex;flex-direction:column; }
  .sb-toolbar { display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap; }
  .sb-area { display:flex;flex-wrap:wrap;gap:10px;overflow:visible;padding-bottom:20px;align-items:flex-start; }
  /* Columns */
  .sb-col { width:235px;min-width:235px;flex-shrink:0;display:flex;flex-direction:column;background:var(--surface2);border:1px solid var(--border);border-radius:10px;overflow:hidden;transition:border-color .15s,box-shadow .15s; }
  .sb-col.drag-over { border-color:var(--accent);box-shadow:0 0 0 2px rgba(56,168,212,.22); }
  .sb-col-unscheduled { border-color:rgba(255,255,255,.12);border-style:dashed;background:rgba(0,0,0,.12); }
  /* Column header */
  .sb-col-head { padding:10px 11px 8px;background:rgba(0,0,0,.28);border-bottom:1px solid var(--border); }
  .sb-col-head-top { display:flex;align-items:center;gap:5px;margin-bottom:5px; }
  .sb-col-daynum { font-size:22px;font-weight:900;color:var(--text);line-height:1;font-variant-numeric:tabular-nums;margin-right:2px; }
  .sb-col-title { font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text);flex:1;background:transparent;border:none;outline:none;cursor:text;min-width:0; }
  .sb-col-title:focus { background:rgba(255,255,255,.07);border-radius:3px;padding:0 3px; }
  .sb-col-del { opacity:0;font-size:15px;cursor:pointer;color:var(--text3);background:none;border:none;padding:0 2px;line-height:1;transition:opacity .15s;flex-shrink:0; }
  .sb-col:hover .sb-col-del { opacity:.45; }
  .sb-col-del:hover { opacity:1 !important;color:#e74c3c; }
  .sb-col-meta { display:flex;align-items:center;gap:6px; }
  .sb-col-date { font-size:11px;color:var(--text2);background:transparent;border:none;outline:none;cursor:pointer;flex:1;min-width:0; }
  .sb-col-date:focus { background:rgba(255,255,255,.07);border-radius:3px; }
  .sb-col-count { font-size:9px;font-weight:600;color:var(--text3);white-space:nowrap;background:rgba(255,255,255,.07);padding:2px 6px;border-radius:9px; }
  /* Drops area */
.sb-drops { padding:5px;display:flex;flex-direction:column;gap:3px;min-height:80px;position:relative; }
.sb-empty-drop { font-size:10px;color:var(--text3);text-align:center;padding:22px 8px;opacity:.4;pointer-events:none;letter-spacing:.04em; }
.sb-drop-zone { font-size:10px;color:var(--text3);text-align:center;padding:8px;margin-top:auto;opacity:.35;pointer-events:none;letter-spacing:.04em;border:1px dashed transparent;border-radius:4px;transition:all .15s; }
.sb-col.drag-over .sb-drop-zone { opacity:.6;border-color:rgba(56,168,212,.3);background:rgba(56,168,212,.05); }
.sb-insert-line { position:absolute;left:5px;right:5px;height:3px;background:var(--accent);border-radius:2px;pointer-events:none;z-index:10;transition:top .08s; }
.sb-insert-line::before { content:'';position:absolute;left:-3px;top:-4px;border:5px solid transparent;border-right-color:var(--accent); }
.sb-insert-line::after { content:'';position:absolute;right:-3px;top:-4px;border:5px solid transparent;border-left-color:var(--accent); }
  /* Add column */
  .sb-add-col { width:46px;min-width:46px;border:2px dashed var(--border);border-radius:10px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text3);font-size:22px;transition:all .15s;min-height:72px;flex-shrink:0;align-self:flex-start; }
  .sb-add-col:hover { border-color:var(--accent);color:var(--accent); }
  .sb-col-selected { border-color:var(--accent) !important;box-shadow:0 0 0 2px rgba(56,168,212,.22) !important;background:rgba(56,168,212,.05) !important; }
  .sb-sel-cb { width:16px;height:16px;border-radius:4px;border:2px solid var(--border);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;font-size:10px;font-weight:800;transition:all .12s; }
  .sb-sel-cb.checked { background:var(--accent);border-color:var(--accent);color:#fff; }
  /* Strips — left swatch + body */
  .strip { border-radius:5px;border:1px solid rgba(255,255,255,.06);cursor:grab;user-select:none;overflow:hidden;transition:opacity .12s,box-shadow .12s,transform .1s;display:flex;min-height:52px; }
  .strip:hover { box-shadow:0 2px 10px rgba(0,0,0,.45);transform:translateY(-1px); }
  .strip.dragging { opacity:.18;cursor:grabbing;transform:scale(.96); }
  .strip-swatch { width:8px;flex-shrink:0; }
  .strip-body { padding:10px 12px 10px 11px;flex:1;min-width:0; }
  .strip-r1 { display:flex;align-items:center;gap:6px;margin-bottom:3px; }
  .strip-num { font-size:18px;font-weight:800;color:var(--text);font-family:'Courier New',monospace;line-height:1;flex-shrink:0; }
  .strip-loc { font-size:13px;font-weight:600;color:var(--text);line-height:1.3;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .strip-ie { font-size:9px;font-weight:800;padding:2px 5px;border-radius:3px;line-height:1.7;flex-shrink:0;letter-spacing:.04em; }
  .strip-r2 { display:flex;align-items:center;gap:8px;margin-top:3px; }
  .strip-tod { font-size:11px;color:var(--text3);flex:1;font-style:italic; }
  .strip-pages { font-size:11px;color:var(--text3);white-space:nowrap; }
  .strip-cast { font-size:11px;color:var(--text3);line-height:1.4;border-top:1px solid rgba(255,255,255,.06);padding-top:4px;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  /* Scene detail modal */
  .sb-scene-meta { display:flex;align-items:center;gap:7px;margin-bottom:8px;flex-wrap:wrap; }
  .sb-scene-num { font-size:20px;font-weight:900;font-family:'Courier New',monospace;color:var(--text);line-height:1; }
  .sb-scene-badge { font-size:9px;font-weight:800;padding:2px 7px;border-radius:4px;letter-spacing:.05em; }
  .sb-scene-extract { font-size:11px;color:var(--text3);line-height:1.75;font-family:'Courier New',monospace;background:rgba(0,0,0,.25);border-radius:6px;padding:10px 13px;max-height:96px;overflow:hidden;position:relative; }
  .sb-scene-extract::after { content:'';position:absolute;bottom:0;left:0;right:0;height:30px;background:linear-gradient(transparent,rgba(10,10,14,.92));pointer-events:none; }
  .sb-cast-chips { display:flex;flex-wrap:wrap;gap:4px;min-height:26px;align-content:flex-start; }
  .sb-cast-chip { display:inline-flex;align-items:center;background:rgba(72,152,216,.14);color:#5ba8f0;border-radius:10px;padding:3px 10px;font-size:11px;font-weight:600;border:1px solid rgba(72,152,216,.2); }
  .sb-no-cast { font-size:11px;color:var(--text3);opacity:.55; }
  .strip-shots { font-size:10px;color:var(--text3);background:rgba(255,255,255,.08);border-radius:8px;padding:2px 6px;white-space:nowrap;flex-shrink:0; }
  .sb-shots-list { display:flex;flex-direction:column;gap:3px;margin-top:2px; }
  .sb-shot-item { display:flex;align-items:center;gap:7px;padding:5px 8px;background:rgba(0,0,0,.18);border-radius:5px;font-size:11px;line-height:1.3; }
  .sb-shot-num { font-weight:700;color:var(--text2);white-space:nowrap;font-family:'Courier New',monospace;flex-shrink:0; }
  .sb-shot-type { font-size:9px;color:var(--accent);background:rgba(56,168,212,.12);padding:1px 5px;border-radius:3px;flex-shrink:0; }
  .sb-shot-desc { color:var(--text3);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .sb-loc-list { position:fixed;z-index:2000;background:var(--surface2);border:1px solid var(--accent);border-radius:6px;overflow:hidden;max-height:180px;overflow-y:auto;box-shadow:0 6px 24px rgba(0,0,0,.6);min-width:200px; }
  .sb-loc-item { padding:9px 13px;font-size:12px;color:var(--text);cursor:pointer;border-bottom:1px solid var(--border); }
  .sb-loc-item:last-child { border-bottom:none; }
  .sb-loc-item:hover { background:rgba(56,168,212,.15);color:var(--accent); }
  .bd-scene-badge { display:inline-block;font-size:9px;font-weight:700;padding:1px 5px;border-radius:3px;margin-left:5px;vertical-align:middle;line-height:1.7;letter-spacing:.03em; }
  .bd-filter-bar { display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-bottom:8px;padding:6px 10px;background:var(--surface2);border:1px solid var(--border);border-radius:8px; }
  .bd-filter-label { font-size:10px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:.05em;margin-right:2px;white-space:nowrap; }
  .bd-filter-chip { font-size:10px;font-weight:700;padding:2px 9px;border-radius:10px;cursor:pointer;border:1px solid var(--border);background:var(--surface);color:var(--text3);transition:all .15s;user-select:none; }
  .bd-filter-chip:hover { color:var(--text);border-color:var(--text3); }
  .bd-filter-chip.active { border-color:var(--accent);color:var(--accent);background:rgba(56,168,212,.12); }
  .bd-tag { border-radius: 3px; padding: 0 2px; cursor: pointer; transition: opacity 0.1s; }
  .bd-tag:hover { opacity: 0.72; outline: 2px solid rgba(255,255,255,0.35); }
  .bd-popover {
    position: fixed;
    z-index: 9500;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 340px;
  }

  /* ── CALLSHEET ── */
  /* Wrapper card in the dark app */
  .cs-wrap {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
  }
  .cs-header-bar {
    background: var(--surface2);
    border-bottom: 1px solid var(--border2);
    padding: 13px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .cs-header-bar h3 { font-family: var(--font-display); font-size: 20px; letter-spacing: 1.5px; }

  /* The white paper page */
  .cs-page {
    background: #fff;
    color: #1a1a1a;
    margin: 0 auto 32px;
    max-width: 1000px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    box-sizing: border-box;
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
  }

  /* TOP BAR: logo | header info | date box */
  .cs-top-bar {
    display: flex;
    align-items: stretch;
    border-bottom: 3px solid #1a1a1a;
    background: #fff;
  }
  .cs-logo-section {
    width: 130px;
    min-width: 130px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  .cs-logo-drop {
    width: 90px;
    height: 90px;
    border: 2px dashed #555;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.2s;
    overflow: hidden;
  }
  .cs-logo-drop:hover { border-color: #888; background: #333; }
  .cs-logo-drop img { width: 100%; height: 100%; object-fit: contain; border-radius: 2px; }
  .cs-header-main {
    flex: 1;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .cs-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  .cs-header-info { flex: 1; }
  .cs-header-info h1 {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 3px;
    color: #1a1a1a;
    text-transform: uppercase;
    line-height: 1.1;
  }
  .cs-prod-info { font-size: 12px; color: #666; font-weight: 500; margin-bottom: 2px; }
  .cs-header-meta {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
  }
  .cs-meta-item { display: flex; flex-direction: column; gap: 2px; }
  .cs-meta-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    font-weight: 700;
  }
  .cs-meta-value { font-size: 13px; font-weight: 700; color: #1a1a1a; }
  .cs-meta-input {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    outline: none;
    padding: 1px 2px;
    width: auto;
  }
  .cs-meta-input:focus { border-bottom-color: #1a1a1a; }
  .cs-header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .cs-date-box {
    background: #1a1a1a;
    color: #fff;
    padding: 16px 20px;
    text-align: center;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
  }
  .cs-date-box input[type="date"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
  }
  .cs-date-day { font-size: 30px; font-weight: 900; line-height: 1; }
  .cs-date-month { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; margin-top: 3px; opacity: 0.8; }
  .cs-date-year { font-size: 11px; opacity: 0.6; margin-top: 1px; }

  /* SECTION TOGGLE BAR */
  .cs-toggle-bar {
    display: flex;
    flex-wrap: wrap;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
  }
  .cs-ctrl-btn {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-right: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    transition: all 0.15s;
    white-space: nowrap;
  }
  .cs-ctrl-btn:last-child { border-right: none; }
  .cs-ctrl-btn:hover { background: #eee; color: #333; }
  .cs-ctrl-btn.active { background: #1a1a1a; color: #fff; }
  .cs-ctrl-btn.right { margin-left: auto; }
  .cs-ctrl-btn.danger { color: #c44444; }
  .cs-ctrl-btn.danger:hover { background: #fee; }

  /* CONTENT AREA */
  .cs-content {
    padding: 24px 28px;
    background: #fff;
  }

  /* DRAGGABLE SECTION */
  .cs-draggable-section {
    margin-bottom: 28px;
    position: relative;
  }
  .cs-draggable-section.dragging {
    opacity: 0.4;
  }
  .cs-draggable-section.drag-over {
    border-top: 2px solid #d4aa2c;
  }

  /* SECTION HEADINGS */
  .cs-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1a1a1a;
    cursor: grab;
    user-select: none;
  }
  .cs-heading:active { cursor: grabbing; }
  .cs-heading::before {
    content: '';
    display: block;
    width: 4px;
    height: 16px;
    background: #d4aa2c;
    border-radius: 2px;
    flex-shrink: 0;
  }
  .cs-drag-handle {
    color: #ccc;
    font-size: 14px;
    cursor: grab;
    margin-right: 2px;
    flex-shrink: 0;
  }
  .cs-drag-handle:hover { color: #999; }
  .cs-section-actions { margin-left: auto; display: flex; gap: 4px; }
  .cs-section-btn {
    padding: 3px 8px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    transition: all 0.12s;
  }
  .cs-section-btn:hover { background: #eee; color: #333; }

  /* CALL TIME CARDS */
  .cs-call-times {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }
  .cs-call-card {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 12px 14px;
    text-align: center;
  }
  .cs-call-card.highlight {
    background: #1a1a1a;
    border-color: #1a1a1a;
  }
  .cs-call-card.highlight .cs-call-label { color: rgba(255,255,255,0.65); }
  .cs-call-card.highlight .cs-call-value { color: #fff; }
  .cs-call-card.editable { cursor: pointer; }
  .cs-call-card.editable:hover { border-color: #999; }
  .cs-call-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 5px;
    font-weight: 700;
  }
  .cs-call-value {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a1a;
  }
  .cs-call-input {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a1a;
    border: none;
    background: transparent;
    text-align: center;
    width: 100%;
    outline: none;
  }
  .cs-call-card.highlight .cs-call-input { color: #fff; background: transparent; }

  /* WEATHER ROW */
  .cs-weather-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  .cs-weather-item { display: flex; align-items: center; gap: 8px; }
  .cs-weather-icon {
    width: 22px;
    height: 22px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    flex-shrink: 0;
  }
  .cs-weather-input {
    border: none;
    background: transparent;
    font-size: 12px;
    color: #555;
    outline: none;
    width: 130px;
  }

  /* CREW GRID */
  .cs-crew-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
  }
  .cs-crew-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-left: 3px solid #5bc0eb;
    border-radius: 0 4px 4px 0;
    min-width: 0;
  }
  .cs-crew-role {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    color: #5bc0eb;
    letter-spacing: 0.8px;
    min-width: 80px;
    max-width: 100px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cs-crew-inputs { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .cs-crew-field {
    border: none;
    border-bottom: 1px solid #e8e8e8;
    background: transparent;
    font-size: 12px;
    color: #1a1a1a;
    font-weight: 500;
    outline: none;
    width: 100%;
    padding: 2px 0;
  }
  .cs-crew-field:focus { border-bottom-color: #1a1a1a; }
  .cs-crew-field::placeholder { color: #bbb; font-style: italic; font-weight: 400; }

  /* CREW DEPARTMENT TABLES */
  .cs-dept-section {
    margin-bottom: 16px;
  }
  .cs-dept-header {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #5bc0eb;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e8e8e8;
  }
  .cs-crew-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 12px;
  }
  .cs-crew-table th {
    text-align: left;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    padding: 6px 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
  }
  .cs-crew-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
  }
  .cs-crew-table tr:hover {
    background: #fafafa;
  }
  .cs-crew-role-cell {
    font-size: 10px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .cs-crew-table .cs-crew-field {
    width: 100%;
    min-width: 80px;
  }
  .cs-crew-phone {
    max-width: 100px;
  }
  .cs-remove-btn {
    color: #c44444;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
  }
  .cs-remove-btn:hover {
    color: #a33;
  }

  @media print {
    .cs-dept-header { color: #333; }
    .cs-crew-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cs-crew-table td { border-bottom: 1px solid #ccc; }
  }

  /* TABLES */
  .cs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
    table-layout: auto;
  }
  .cs-table th {
    text-align: left;
    padding: 9px 11px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #666;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
  }
  .cs-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
  }
  .cs-table tr:last-child td { border-bottom: none; }
  .cs-table tbody tr:hover td { background: #fafafa; }
  .cs-table tbody tr:nth-child(even) td { background: #fdfdfd; }
  .cs-table-input {
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    font-size: 12.5px;
    color: #1a1a1a;
    font-weight: 500;
    outline: none;
    width: 100%;
    padding: 3px 0;
    font-family: 'Arial', sans-serif;
  }
  .cs-table-input:focus { border-bottom-color: #1a1a1a; background: rgba(0,0,0,0.01); }
  .cs-table-input::placeholder { color: #aaa; font-style: italic; font-weight: 400; }
  .cs-table td:last-child { width: 32px; text-align: center; }

  /* ADD ROW BUTTON */
  .cs-add-row-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background: transparent;
    border: 1px dashed #ccc;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.15s;
    margin-top: 4px;
  }
  .cs-add-row-btn:hover { border-color: #999; color: #333; background: #fafafa; }

  /* NOTES */
  .cs-notes-area {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fafafa;
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
  }
  .cs-notes-area:focus { border-color: #1a1a1a; background: #fff; }

  /* HIGHLIGHTED NOTE */
  .cs-note {
    font-size: 12px;
    color: #555;
    font-weight: 500;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #d4aa2c;
    border-radius: 0 4px 4px 0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .cs-note-input {
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    font-size: 12px;
    color: #1a1a1a;
    font-weight: 600;
    outline: none;
    flex: 1;
    min-width: 120px;
    padding: 1px 2px;
  }
  .cs-note-input:focus { border-bottom-color: #1a1a1a; }
  .cs-note-input::placeholder { color: #aaa; font-style: italic; font-weight: 400; }

  /* SPACER */
  .cs-spacer { height: 16px; }

  /* PRINT */
  @media print {
    .cs-ctrl-btn, .cs-add-row-btn, .cs-section-btn, .cs-drag-handle,
    .cs-header-controls, .pdf-hide { display: none !important; }
    .cs-page { box-shadow: none; border: 1px solid #ddd; margin: 0; }
    .cs-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cs-call-card.highlight { background: #1a1a1a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cs-crew-item { border-left: 3px solid #5bc0eb !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cs-note { border-left: 3px solid #d4aa2c !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cs-logo-drop { border: none !important; background: transparent !important; }
    input, textarea { border: none !important; background: transparent !important; }
  }

  /* Callsheet responsive */
  @media (max-width: 768px) {
    .cs-top-bar { flex-direction: column; }
    .cs-logo-section, .cs-date-box { width: 100% !important; min-width: 0 !important; }
    .cs-call-times { grid-template-columns: 1fr 1fr; }
    .cs-crew-grid { grid-template-columns: 1fr; }
    .cs-content { padding: 16px; }
  }

/* ── CALLSHEET ADDITIONS (overhaul) ── */

  /* Column hide button — appears in table headers */
  .cs-col-hide {
    display: inline-block;
    margin-left: 4px;
    font-size: 9px;
    color: #ccc;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s;
    vertical-align: middle;
    line-height: 1;
  }
  .cs-table th:hover .cs-col-hide { opacity: 1; }
  .cs-col-hide:hover { color: #c44444 !important; opacity: 1; }
  .cs-col-head { white-space: nowrap; }

  /* Tooltip on abbreviated headers — browsers show title on hover natively,
     but we enhance it with a subtle underline hint */
  .cs-table th[title] {
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #bbb;
    text-underline-offset: 2px;
  }

  /* Department tables inside crew section */
  .cs-dept-section {
    margin-bottom: 14px;
  }
  .cs-dept-header {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #5bc0eb;
    margin-bottom: 6px;
    padding-bottom: 3px;
    border-bottom: 1px solid #e8e8e8;
  }
  .cs-crew-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 6px;
    font-size: 11.5px;
  }
  .cs-crew-table th {
    text-align: left;
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    padding: 5px 7px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
  }
  .cs-crew-table td {
    padding: 5px 7px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
  }
  .cs-crew-table tr:hover td { background: #fafafa; }
  .cs-crew-role-cell {
    font-size: 10px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cs-crew-field {
    border: none;
    border-bottom: 1px solid #e8e8e8;
    background: transparent;
    font-size: 12px;
    color: #1a1a1a;
    font-weight: 500;
    outline: none;
    width: 100%;
    padding: 2px 0;
  }
  .cs-crew-field:focus { border-bottom-color: #1a1a1a; }
  .cs-crew-field::placeholder { color: #bbb; font-style: italic; font-weight: 400; }
  .cs-crew-phone { max-width: 120px; }
  .cs-remove-btn {
    color: #c44444;
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 7px;
    font-size: 13px;
    line-height: 1;
  }
  .cs-remove-btn:hover { color: #a33; }

  /* Two-logo header layout tweaks */
  .cs-logo-section {
    min-width: 120px;
    width: 120px;
  }

  /* Wider scrollable tables for cast/extras */
  .cs-table th, .cs-table td {
    white-space: nowrap;
  }
  .cs-table th:nth-child(5),
  .cs-table td:nth-child(5) {
    white-space: normal;
  }

  /* Notices section rows */
  .cs-notice-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
  }
  .cs-notice-row:last-child { border-bottom: none; }

  /* Print overrides for new sections */
  @media print {
    .cs-crew-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cs-dept-header { color: #333 !important; }
    .cs-logo-section { background: #1a1a1a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  }

  /* Context menu */
  #ctx-menu { display:none; position:fixed; z-index:99999; background:var(--surface); border:1px solid var(--border2); border-radius:9px; box-shadow:0 8px 28px rgba(0,0,0,0.45); padding:4px; min-width:180px; max-width:280px; user-select:none; }
  #ctx-submenu { display:none; position:fixed; z-index:99999; background:var(--surface); border:1px solid var(--border2); border-radius:9px; box-shadow:0 8px 28px rgba(0,0,0,0.45); padding:4px; min-width:180px; max-width:260px; user-select:none; margin-left:-4px; }
  .ctx-item { padding:7px 13px; cursor:pointer; font-size:13px; color:var(--text); border-radius:5px; display:flex; align-items:center; gap:9px; white-space:nowrap; user-select:none; }
  .ctx-item:hover { background:var(--surface2); }
  .ctx-item.ctx-danger { color:var(--red); }
  .ctx-item.ctx-danger:hover { background:rgba(220,60,60,0.1); }
  .ctx-item.ctx-has-sub { justify-content:space-between; }
  .ctx-arrow { color:var(--text3); font-size:11px; margin-left:8px; }
  .ctx-sep { height:1px; background:var(--border); margin:3px 5px; }
  .ctx-icon { font-size:13px; width:16px; text-align:center; flex-shrink:0; opacity:0.75; }
  [data-ctx] { cursor:context-menu; }

  /* ===== EQUIPMENT / TECH SCOUT CHECKBOXES ===== */
  .equip-check { width:16px; height:16px; border-radius:4px; border:2px solid var(--border2); background:var(--surface3); flex-shrink:0; cursor:pointer; transition:background .15s, border-color .15s; }
  .equip-check.checked { background:var(--accent2); border-color:var(--accent2); background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:center; background-size:10px; }

  /* ── GEAR BOARD (GEAR LIST) ── */
  .gear-board { display: flex; gap: 24px; padding: 20px 0; overflow-x: auto; min-height: 80vh; align-items: flex-start; }
  .gear-day { min-width: 480px; flex-shrink: 0; background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; overflow: hidden; }
  .gear-day-header { padding: 16px 20px; background: var(--surface2); border-bottom: 1px solid var(--border); }
  .gear-day-title { font-family: var(--font-display); font-size: 20px; margin-bottom: 8px; color: var(--text); }
  .gear-day-shoots { font-size: 11px; color: var(--text3); display: flex; flex-direction: column; gap: 4px; }
  .gear-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; background: var(--surface); }
  .gear-col { display: flex; flex-direction: column; gap: 12px; }
  .gear-col-header { padding: 12px; text-align: center; border-radius: 8px 8px 0 0; border-top: 4px solid var(--border); background: var(--surface2); position: relative; }
  .gear-col-header.pre { border-top-color: var(--green); }
  .gear-col-header.post { border-top-color: var(--orange); }
  .gear-col-label { font-family: var(--font-display); font-size: 14px; color: var(--text); text-transform: uppercase; letter-spacing: 1px; }
  .gear-col-stats { font-size: 9px; color: var(--text3); margin-top: 2px; }
  .gear-cat-card { background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px; padding: 12px; }
  .gear-cat-name { font-family: var(--font-display); font-size: 12px; color: var(--text); margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
  .gear-item-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border2); }
  .gear-item-row:last-child { border-bottom: none; }
  .gear-item-check { width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--border2); background: var(--surface3); cursor: pointer; flex-shrink: 0; position: relative; }
  .gear-item-check.checked { background: var(--accent); border-color: var(--accent); }
  .gear-item-check.checked::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #000; font-weight: bold; }
  .gear-item-name { font-size: 11px; color: var(--text2); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gear-item-name.checked { opacity: 0.5; text-decoration: line-through; }
  .gear-item-row .btn-remove { opacity: 0; transition: opacity .2s; }
  .gear-item-row:hover .btn-remove { opacity: 0.6; }
  .gear-item-row .btn-remove:hover { opacity: 1; color: var(--red); }
  .gear-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }

  /* ===== UTILITY CLASSES ===== */
  /* Text colors */
  .text-accent { color: var(--accent); }
  .text-accent2 { color: var(--accent2); }
  .text-accent3 { color: var(--accent3); }
  .text-red { color: var(--red); }
  .text-green { color: var(--green); }
  .text-text { color: var(--text); }
  .text-text2 { color: var(--text2); }
  .text-text3 { color: var(--text3); }

  /* Background colors */
  .bg-surface { background: var(--surface); }
  .bg-surface2 { background: var(--surface2); }
  .bg-surface3 { background: var(--surface3); }

  /* Border */
  .border-border { border: 1px solid var(--border); }
  .border-border2 { border: 1px solid var(--border2); }

  /* Font */
  .font-mono { font-family: var(--font-mono); }
  .font-display { font-family: var(--font-display); }

  /* Danger zone button */
  .btn-danger-zone {
    background: var(--red);
    color: white;
    border: none;
  }
  .btn-danger-zone:hover {
    opacity: 0.9;
  }

  /* Card with danger border */
  .card-danger {
    border: 2px solid var(--red);
    margin-top: 20px;
  }
  .card-danger h3 {
    color: var(--red);
    margin-top: 0;
  }

  /* Modal body text */
  .modal-warning {
    margin: 16px 0;
    color: var(--text2);
    font-size: 14px;
  }

  /* Code snippet */
  .code-snippet {
    background: var(--surface2);
    padding: 2px 6px;
    border-radius: 3px;
  }

  /* Storage stats */
  .storage-stats {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text3);
  }

  /* Flex utilities */
  .flex { display: flex; }
  .flex-col { flex-direction: column; }
  .flex-wrap { flex-wrap: wrap; }
  .flex-1 { flex: 1; }
  .flex-shrink-0 { flex-shrink: 0; }
  .flex-align-center { align-items: center; }
  .flex-align-start { align-items: flex-start; }
  .flex-justify-between { justify-content: space-between; }
  .flex-justify-end { justify-content: flex-end; }

  /* Gap utilities */
  .gap-20 { gap: 20px; }
  .gap-16 { gap: 16px; }
  .gap-14 { gap: 14px; }
  .gap-12 { gap: 12px; }
  .gap-10 { gap: 10px; }
  .gap-8 { gap: 8px; }
  .gap-7 { gap: 7px; }
  .gap-6 { gap: 6px; }
  .gap-5 { gap: 5px; }
  .gap-4 { gap: 4px; }
  .gap-3 { gap: 3px; }

  /* Grid utilities */
  .grid-90-1fr {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
  }
  .grid-1fr-1fr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* Padding utilities */
  .p-20 { padding: 20px; }
  .p-16 { padding: 16px; }
  .p-14 { padding: 14px; }
  .p-12 { padding: 12px; }
  .p-10 { padding: 10px; }
  .p-8 { padding: 8px; }
  .p-6 { padding: 6px; }

  /* Margin utilities */
  .mb-22 { margin-bottom: 22px; }
  .mb-16 { margin-bottom: 16px; }
  .mb-14 { margin-bottom: 14px; }
  .mb-10 { margin-bottom: 10px; }
  .mb-8 { margin-bottom: 8px; }
  .mb-6 { margin-bottom: 6px; }
  .mb-4 { margin-bottom: 4px; }
  .mb-2 { margin-bottom: 2px; }
  .mt-16 { margin-top: 16px; }
  .mt-8 { margin-top: 8px; }
  .mt-6 { margin-top: 6px; }
  .mt-4 { margin-top: 4px; }

  /* Font size utilities */
  .fs-16 { font-size: 16px; }
  .fs-14 { font-size: 14px; }
  .fs-13 { font-size: 13px; }
  .fs-12 { font-size: 12px; }
  .fs-11 { font-size: 11px; }
  .fs-10 { font-size: 10px; }

  /* Font weight */
  .fw-500 { font-weight: 500; }
  .fw-600 { font-weight: 600; }
  .fw-700 { font-weight: 700; }

  /* Display */
  .hidden { display: none; }
  .block { display: block; }

  /* Width */
  .w-full { width: 100%; }

  /* Badge colors */
  .badge-pre { background: rgba(125,208,245,0.15); color: #7dd0f5; }
  .badge-prod { background: var(--accent-dim); color: var(--accent); }
  .badge-post { background: rgba(224,128,149,0.15); color: #e08095; }
  .badge-done { background: rgba(96,208,144,0.15); color: #60d090; }
  .badge-released { background: rgba(184,138,240,0.15); color: #b88af0; }

  /* Project status select */
  .proj-status-select {
    padding: 6px 28px 6px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
  }
  .proj-status-select:focus {
    outline: none;
    border-color: var(--accent);
  }
  .proj-status-select option {
    background: var(--surface);
    color: var(--text);
  }
  .proj-status-select:hover {
    border-color: var(--text3);
  }

  /* Checkbox */
  input[type="checkbox"] { accent-color: var(--accent2); }
  input[type="checkbox"].accent-accent { accent-color: var(--accent); }

  /* Form row grid */
  .form-row-grid {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    gap: 12px;
  }
  .form-row-grid label {
    margin: 0;
    font-weight: 500;
    color: var(--text2);
  }

  /* Checkbox label */
  .checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text2);
  }

  /* Checkbox row */
  .checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--text2);
    cursor: pointer;
    padding: 12px 14px;
    background: var(--surface2);
    border-radius: var(--radius);
    margin-bottom: 22px;
  }

  /* Input group label */
  .input-group-label {
    display: block;
    font-weight: 500;
    color: var(--text2);
    margin-bottom: 8px;
  }

  /* Section label */
  .section-label {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }

  /* Tag/chip */
  .chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 3px 8px;
    background: var(--surface3);
    border-radius: 12px;
    color: var(--text2);
  }

  /* Tag input for project modal */
  .tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    min-height: 38px;
    align-items: center;
  }
  .tag-input-container:focus-within {
    border-color: var(--accent);
    outline: 1px solid var(--accent);
  }
  .tag-input-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .tag-input-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(56,168,212,0.15);
    color: var(--accent2);
    border-radius: 10px;
    border: 1px solid rgba(56,168,212,0.2);
  }
  .tag-input-tag-remove {
    cursor: pointer;
    color: var(--text3);
    font-size: 10px;
    line-height: 1;
  }
  .tag-input-tag-remove:hover {
    color: var(--text);
  }
  .tag-input-field {
    flex: 1;
    min-width: 120px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    outline: none;
    padding: 2px 4px;
  }
  .tag-input-field::placeholder {
    color: var(--text3);
  }
  .tag-input-add-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--accent);
    color: var(--surface);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    margin-left: 4px;
    flex-shrink: 0;
  }
  .tag-input-add-btn:hover {
    background: var(--accent2);
  }

  /* Tag styles */
  .tag-cast {
    background: rgba(91,192,235,0.15);
    color: var(--accent2);
    border: 1px solid rgba(91,192,235,0.2);
  }
  .tag-crew {
    background: rgba(196,86,110,0.15);
    color: #e08095;
    border: 1px solid rgba(196,86,110,0.2);
  }

  /* Empty state */
  .empty-state-icon { font-size: 48px; opacity: 0.3; margin-bottom: 16px; }
  .empty-state-text { font-size: 14px; margin-bottom: 8px; color: var(--text2); }
  .empty-state-hint { font-size: 12px; font-family: var(--font-mono); }

  /* Rating stars */
  .star-rating { cursor: pointer; font-size: 15px; }
  .star-filled { color: var(--accent); }
  .star-empty { color: var(--border2); }

  /* Rounded */
  .rounded { border-radius: var(--radius); }
  .rounded-sm { border-radius: 3px; }
  .rounded-md { border-radius: 6px; }
  .rounded-lg { border-radius: 8px; }
  .rounded-xl { border-radius: 12px; }

  /* Cursor */
  .cursor-pointer { cursor: pointer; }

  /* White space */
  .whitespace-nowrap { white-space: nowrap; }

  /* Opacity */
  .opacity-60 { opacity: 0.6; }
  .opacity-50 { opacity: 0.5; }

  /* Text align */
  .text-center { text-align: center; }

  /* Line height */
  .leading-15 { line-height: 1.5; }
  .leading-16 { line-height: 1.6; }
  .leading-17 { line-height: 1.7; }

  /* ── SCRIPT EDITOR ── */
  .script-editor-overlay {
    position: fixed; inset: 0; background: #0c0c12; z-index: 9999;
    display: flex; flex-direction: column;
  }
  [data-font-size="bigger"]     .script-editor-overlay { zoom: 0.9091; }
  [data-font-size="evenbigger"] .script-editor-overlay { zoom: 0.8333; }
  [data-font-size="huge"]       .script-editor-overlay { zoom: 0.7407; }
  [data-font-size="double"]     .script-editor-overlay { zoom: 0.5;    }

  /* Stripboard location dropdown */
  [data-font-size="bigger"]     .sb-loc-list { zoom: 0.9091; }
  [data-font-size="evenbigger"] .sb-loc-list { zoom: 0.8333; }
  [data-font-size="huge"]       .sb-loc-list { zoom: 0.7407; }
  [data-font-size="double"]     .sb-loc-list { zoom: 0.5;    }

  /* Breakdown popover */
  [data-font-size="bigger"]     .bd-popover { zoom: 0.9091; }
  [data-font-size="evenbigger"] .bd-popover { zoom: 0.8333; }
  [data-font-size="huge"]       .bd-popover { zoom: 0.7407; }
  [data-font-size="double"]     .bd-popover { zoom: 0.5;    }

  /* Script editor time-of-day dropdown */
  [data-font-size="bigger"]     .se-tod-drop { zoom: 0.9091; }
  [data-font-size="evenbigger"] .se-tod-drop { zoom: 0.8333; }
  [data-font-size="huge"]       .se-tod-drop { zoom: 0.7407; }
  [data-font-size="double"]     .se-tod-drop { zoom: 0.5;    }

  /* Moodboard fullscreen button */
  [data-font-size="bigger"]     .mb-fs-btn { zoom: 0.9091; }
  [data-font-size="evenbigger"] .mb-fs-btn { zoom: 0.8333; }
  [data-font-size="huge"]       .mb-fs-btn { zoom: 0.7407; }
  [data-font-size="double"]     .mb-fs-btn { zoom: 0.5;    }

  /* Budget toolbar overflow fix at 2x zoom */
  [data-font-size="double"] #section-budget > div:nth-child(2) { flex-wrap: wrap !important; }
  [data-font-size="double"] #section-budget > div:nth-child(2) > div { flex-wrap: wrap !important; }

  /* Crew toolbar overflow fix at 2x zoom */
  [data-font-size="double"] #section-crew > div:nth-child(2) { flex-wrap: wrap !important; }
  [data-font-size="double"] #section-crew > div:nth-child(2) > div { flex-wrap: wrap !important; }

  /* Cast toolbar overflow fix at 2x zoom */
  [data-font-size="double"] #section-cast > div:nth-child(2) { flex-wrap: wrap !important; }
  [data-font-size="double"] #section-cast > div:nth-child(2) > div { flex-wrap: wrap !important; }

  /* Budget quick-add bars - allow wrapping at 2x zoom */
  [data-font-size="double"] .bud-quick-add-bar { flex-wrap: wrap !important; gap: 8px !important; }

  /* Storyboard frame modal - counter-zoom for 2x site view */
  [data-font-size="double"] #_sb-frame-modal { zoom: 0.5; }
  [data-font-size="double"] #_sb-frame-modal > div { zoom: 2; max-height: 45vh !important; }

  /* Storyboard bulk action bar - allow wrapping at 2x zoom */
  [data-font-size="double"] #sb-bulk-bar { flex-wrap: wrap !important; gap: 6px !important; }

  /* Storyboard toolbar - allow wrapping at 2x zoom */
  [data-font-size="double"] #section-storyboard > div:nth-child(1) { flex-wrap: wrap !important; gap: 8px !important; }

  /* Storyboard frame cards - ensure proper sizing at 2x */
  [data-font-size="double"] .sb-frames-grid { gap: 8px; }
  [data-font-size="double"] .sb-frame-card { min-width: 140px; }

  /* Storyboard frame image zone - adjust height at 2x */
  [data-font-size="double"] .sb-frame-image-zone { height: 100px; }

  /* Storyboard add card - adjust min-height at 2x */
  [data-font-size="double"] .sb-add-card { min-height: 130px; }

  /* Storyboard group - allow wrapping at 2x */
  [data-font-size="double"] .sb-group > div:first-child { flex-wrap: wrap !important; gap: 6px !important; }

  /* Storyboard batch add modal - counter-zoom for 2x site view */
  [data-font-size="double"] #_sb-batch-modal { zoom: 0.5; }
  [data-font-size="double"] #_sb-batch-modal > div { zoom: 2; max-height: 45vh !important; }

  /* Storyboard custom scene modal - counter-zoom for 2x site view */
  [data-font-size="double"] #_sb-custom-scene-modal { zoom: 0.5; }
  [data-font-size="double"] #_sb-custom-scene-modal > div { zoom: 2; max-height: 45vh !important; }

  /* Storyboard sync modal - counter-zoom for 2x site view */
  [data-font-size="double"] #_sb-sync-modal { zoom: 0.5; }
  [data-font-size="double"] #_sb-sync-modal > div { zoom: 2; max-height: 45vh !important; }

  /* Storyboard move modal - counter-zoom for 2x site view */
  [data-font-size="double"] #_sb-move-modal { zoom: 0.5; }
  [data-font-size="double"] #_sb-move-modal > div { zoom: 2; max-height: 45vh !important; }
  [data-font-size="double"] .bud-quick-add-bar > * { flex-shrink: 0; }

  .script-editor-topbar {
    display: flex; align-items: center; gap: 10px; padding: 8px 16px;
    background: var(--surface2); border-bottom: 1px solid var(--border); flex-shrink: 0;
  }
  .script-editor-title { font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
  .script-editor-sub   { font-size: 11px; color: var(--text3); white-space: nowrap; }
  .script-editor-badge {
    font-size: 10px; color: var(--text3); background: var(--surface3);
    padding: 2px 7px; border-radius: 3px; letter-spacing: .5px; white-space: nowrap;
  }
  .script-editor-status { font-size: 11px; white-space: nowrap; min-width: 80px; text-align: right; }
  .script-editor-body { flex: 1; overflow: hidden; display: flex; }
  .script-editor-nav { width: 190px; flex-shrink: 0; overflow-y: auto; background: #080810; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
  .script-editor-nav-header { padding: 8px 12px 6px; font-size: 10px; color: var(--text3); letter-spacing: .5px; text-transform: uppercase; border-bottom: 1px solid var(--border2); flex-shrink: 0; }
  .script-editor-main { flex: 1; overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; padding: 40px 24px; background: #13131d; }
  .script-editor-page {
    background: #f7f6f0; border-radius: 1px; position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 16px 56px rgba(0,0,0,0.55);
    width: 100%; max-width: 800px; min-height: 1056px; flex-shrink: 0;
    padding: 96px 80px 120px 108px; box-sizing: border-box;
  }
  .se-page-break { position: absolute; left: 0; right: 0; height: 32px; background: #13131d; pointer-events: none; display: flex; align-items: center; justify-content: center; }
  .se-ta-wrap { position: relative; width: 100%; }
  .se-render-layer {
    position: absolute; top: 0; left: 0; right: 0; pointer-events: none;
    font-family: 'Courier New', Courier, monospace; font-size: 13.5px; line-height: 1.9;
    color: #1a1820; white-space: pre-wrap; word-break: break-word;
    padding: 0; box-sizing: border-box; z-index: 1;
  }
  .se-scene-line { font-weight: 700; }
  .se-mk { opacity: 0.3; }
  .se-nav-item { display: flex; align-items: flex-start; gap: 5px; padding: 5px 10px 5px 12px; cursor: pointer; font-size: 11px; color: var(--text2); line-height: 1.35; }
  .se-nav-item:hover { background: var(--surface2); color: var(--text); }
  .se-nav-item.se-nav-active { background: rgba(56,168,212,0.12); color: var(--accent2); }
  .se-nav-num { font-size: 9px; color: var(--text3); flex-shrink: 0; min-width: 20px; padding-top: 2px; }
  .se-nav-empty { padding: 12px; font-size: 11px; color: var(--text3); font-style: italic; }
  .script-editor-ta {
    width: 100%; min-height: 840px;
    resize: none; outline: none; border: none; overflow-y: hidden;
    background: transparent; color: transparent;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13.5px; line-height: 1.9; padding: 0;
    box-sizing: border-box; caret-color: #1a1820;
    tab-size: 4;
  }
  .script-editor-ta:focus { outline: none; }
  .script-editor-ta::selection { background: rgba(56,168,212,0.3); }
  .se-tod-drop { position: fixed; z-index: 10001; background: var(--surface); border: 1px solid var(--border2); border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); overflow: hidden; min-width: 160px; }
  .se-tod-item { padding: 6px 14px; cursor: pointer; font-size: 12px; font-family: 'Courier New', monospace; color: var(--text2); white-space: nowrap; }
  .se-tod-item:hover, .se-tod-item.active { background: var(--accent2); color: #0a0a10; }
  .script-editor-footer {
    padding: 4px 16px; flex-shrink: 0;
    background: var(--surface2); border-top: 1px solid var(--border2);
    font-size: 11px; color: var(--text3);
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
  }

  /* Font size scaling - must be last to override */
  body { font-size: calc(13.5px * var(--font-scale, 1)) !important; }

  /* ── PRODUCTION PLAN ── */
  .plan-toolbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; gap:10px; }
  .plan-section {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); margin-bottom: 10px; overflow: hidden;
  }
  .plan-section-header {
    display: flex; align-items: center; gap: 10px; padding: 11px 16px;
    background: var(--surface2); cursor: pointer; user-select: none;
  }
  .plan-section-header:hover { background: var(--surface3); }
  .plan-color-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--surface3); border: 1px solid var(--border2);
    border-radius: 10px; padding: 2px 8px 2px 3px;
    cursor: pointer; flex-shrink: 0;
    transition: border-color .15s, background .15s;
    font-size: 10px; color: var(--text3); letter-spacing: .3px; line-height: 1;
    user-select: none;
  }
  .plan-color-btn:hover { border-color: var(--border); background: var(--surface4); color: var(--text2); }
  .plan-color-dot {
    -webkit-appearance: none; appearance: none;
    width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.25); border-radius: 50%;
    padding: 0; cursor: pointer; background: transparent; flex-shrink: 0;
    transition: border-color .15s, transform .15s;
  }
  .plan-color-dot:hover { border-color: rgba(255,255,255,0.8); transform: scale(1.15); }
  .plan-color-dot::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; overflow: hidden; }
  .plan-color-dot::-webkit-color-swatch { border: none; border-radius: 50%; }
  .plan-section-title-input {
    background: transparent; border: none; outline: none;
    color: var(--text); font-family: var(--font-display);
    font-size: 13px; letter-spacing: 1.5px; flex: 1; cursor: text; min-width: 0;
  }
  .plan-section-title-input:focus { background: var(--surface); border-radius: 3px; padding: 1px 5px; }
  .plan-section-meta { color: var(--text3); font-size: 11px; white-space: nowrap; }
  .plan-section-body { padding: 6px 16px 14px; }
  .plan-item {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 0; border-bottom: 1px solid var(--border2);
  }
  .plan-item:last-of-type { border-bottom: none; }
  .plan-item-check {
    width: 18px; height: 18px; border-radius: 4px;
    border: 2px solid var(--border2); background: var(--surface3);
    flex-shrink: 0; cursor: pointer;
    transition: background .15s, border-color .15s;
    background-repeat: no-repeat; background-position: center; background-size: 11px;
  }
  .plan-item-check.checked {
    background-color: var(--accent); border-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%230a0a10' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  }
  .plan-item-text {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--text); font-size: 13px; font-family: var(--font-body);
    transition: color .15s; min-width: 0;
  }
  .plan-item-text.done { color: var(--text3); text-decoration: line-through; }
  .plan-item-text:focus-visible { background: var(--surface2); border-radius: 3px; padding: 1px 5px; outline: none; }
  .plan-item-del {
    background: transparent; border: none; color: var(--text3);
    cursor: pointer; font-size: 12px; opacity: 0; padding: 2px 6px;
    transition: opacity .1s, color .1s; flex-shrink: 0;
  }
  .plan-item:hover .plan-item-del { opacity: 1; }
  .plan-item-del:hover { color: var(--red); }
  .plan-add-row { display: flex; gap: 8px; align-items: center; padding-top: 8px; margin-top: 2px; }
  .plan-new-input {
    flex: 1; background: var(--surface2); border: 1px solid var(--border2);
    border-radius: var(--radius); padding: 5px 10px;
    color: var(--text); font-size: 12px; font-family: var(--font-body); outline: none;
  }
  .plan-new-input:focus-visible { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(56,168,212,0.4); outline: none; }

  /* ── OVERVIEW GROUPS ── */
  .ov-group { margin-bottom: 24px; }
  .ov-group-label {
    font-size: 9px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-mono);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .ov-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border2);
  }
  .ov-group-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
  }
  .doc-card-empty { opacity: 0.5; }
  .doc-card-empty:hover { opacity: 1; }

  /* ── Moodboards ─────────────────────────────────────────── */
  .mb-boards-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:18px; }
  .mb-board-card { background:var(--surface2); border:1px solid var(--border2); border-radius:10px; overflow:hidden; cursor:pointer; transition:border-color 0.15s,box-shadow 0.15s; }
  .mb-board-card:hover { border-color:var(--accent2); box-shadow:0 4px 18px rgba(0,0,0,0.35); }
  .mb-board-thumb { width:100%; aspect-ratio:16/9; background:var(--surface3); display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative; }
  .mb-board-thumb img { width:100%; height:100%; object-fit:cover; }
  .mb-board-thumb-placeholder { font-size:36px; opacity:0.18; }
  .mb-board-info { padding:12px 14px; }
  .mb-board-title { font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mb-board-meta { font-size:11px; color:var(--text3); margin-top:3px; }
  .mb-board-actions { display:flex; gap:6px; margin-top:10px; }
  /* Canvas mode — pull the full flex chain so mb-canvas-wrap fills all available height */
  #content.mb-content-canvas { padding:0; overflow:hidden; display:flex; flex-direction:column; }
  #view-moodboards.mb-canvas-mode { display:flex; flex-direction:column; flex:1; min-height:0; }
  #view-moodboards.mb-canvas-mode #moodboards-container { display:flex; flex-direction:column; flex:1; min-height:0; }
  .mb-canvas-toolbar { position:relative; z-index:20; display:flex; flex-wrap:wrap; gap:7px; align-items:center; padding:8px 14px; background:rgba(16,16,22,0.93); backdrop-filter:blur(10px); border-bottom:1px solid var(--border2); flex-shrink:0; }
  .mb-canvas-wrap { flex:1; overflow:hidden; position:relative; cursor:grab; user-select:none; min-height:0; }
  .mb-canvas-wrap.mb-canvas-default {
    background-color: #2a2a3d;
    background-image: radial-gradient(circle, rgba(255,255,255,0.18) 1px, transparent 1px);
    background-size: 24px 24px;
  }
  [data-theme="light"] .mb-canvas-wrap.mb-canvas-default {
    background-color: #e8e8f0;
    background-image: radial-gradient(circle, rgba(0,0,0,0.18) 1px, transparent 1px);
    background-size: 24px 24px;
  }
  .mb-canvas-wrap.panning { cursor:grabbing; }
  .mb-canvas-wrap.mb-drop-over::after { content:'Drop to add'; position:absolute; inset:0; background:rgba(99,102,241,0.13); border:2px dashed var(--accent,#6366f1); border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:22px; color:var(--accent,#6366f1); font-weight:600; pointer-events:none; z-index:100; }
  .mb-canvas { position:absolute; top:0; left:0; transform-origin:0 0; will-change:transform; }
  .mb-item { position:absolute; background:var(--surface2); border:1px solid rgba(255,255,255,0.09); border-radius:10px; box-shadow:0 3px 14px rgba(0,0,0,0.45); cursor:grab; overflow:visible; }
  .mb-item:hover { border-color:rgba(255,255,255,0.22); box-shadow:0 8px 28px rgba(0,0,0,0.6); }
  .mb-item.mb-active { cursor:grabbing; box-shadow:0 14px 44px rgba(0,0,0,0.75); border-color:rgba(91,168,212,0.6); z-index:999; }
  .mb-item-inner { border-radius:10px; overflow:hidden; }
  .mb-item img { width:100%; display:block; pointer-events:none; border-radius:10px 10px 0 0; }
  .mb-item audio { width:100%; display:block; }
  .mb-item iframe { width:100%; border:none; display:block; aspect-ratio:16/9; }
  .mb-canvas-wrap.mb-bg-reposition-mode { cursor:move !important; }
  .mb-canvas-wrap.mb-bg-reposition-mode .mb-canvas { pointer-events:none; }
  .mb-drag-tab { position:absolute; top:-15px; left:50%; transform:translateX(-50%); width:38px; height:15px; background:var(--surface4); border:1px solid var(--border2); border-bottom:none; border-radius:5px 5px 0 0; cursor:grab; z-index:10; display:flex; align-items:center; justify-content:center; font-size:11px; color:var(--text3); letter-spacing:1px; user-select:none; }
  .mb-drag-tab:active { cursor:grabbing; }
  .mb-drag-tab:hover { background:var(--surface5,var(--surface3)); color:var(--text2); }
  .mb-video-wrap { position:relative; }
  .mb-item-body { padding:9px 11px; }
  .mb-item-caption { font-size:12px; width:100%; background:transparent; border:none; outline:none; resize:none; font-family:var(--font-body); color:var(--text3); line-height:1.5; cursor:text; display:block; }
  .mb-item-caption:focus { color:var(--text2); }
  .mb-item-caption::placeholder { opacity:0.35; }
  .mb-item-note-text { font-size:13px; line-height:1.65; color:var(--text); white-space:pre-wrap; }
  .mb-item-color-block { width:100%; border-radius:10px 10px 0 0; }
  .mb-item-color-hex { font-size:11px; font-family:var(--font-mono); color:var(--text3); }
  .mb-item-controls { position:absolute; top:-10px; right:-10px; display:flex; gap:4px; opacity:0; transition:opacity 0.15s; z-index:10; pointer-events:none; }
  .mb-item:hover .mb-item-controls { opacity:1; pointer-events:auto; }
  .mb-toggles { position:absolute; top:-10px; left:-10px; display:flex; gap:4px; opacity:0; transition:opacity 0.15s; z-index:10; pointer-events:none; }
  .mb-item:hover .mb-toggles { opacity:1; pointer-events:auto; }
  .mb-toggle { padding:2px 5px !important; font-size:10px !important; }
  .mb-toggle-off { opacity:0.35 !important; }
  .mb-no-caption .mb-item-caption { display:none; }
  .mb-no-name .mb-item-name { display:none; }
  .mb-no-frame { background:transparent !important; border-color:transparent !important; box-shadow:none !important; }
  .mb-no-frame:hover { border-color:rgba(255,255,255,0.08) !important; }
  .mb-no-frame .mb-item-inner { border-radius:0; }
  .mb-no-frame img { border-radius:0; }
  .mb-item-resize { position:absolute; bottom:-6px; right:-6px; width:16px; height:16px; cursor:se-resize; background:var(--surface3); border:1px solid var(--border2); border-radius:4px; opacity:0; transition:opacity 0.15s; z-index:10; display:flex; align-items:center; justify-content:center; font-size:9px; color:var(--text3); }
  .mb-item:hover .mb-item-resize { opacity:0.7; }
  .mb-zoom-controls { position:absolute; bottom:14px; right:14px; display:flex; gap:5px; align-items:center; z-index:15; background:rgba(14,14,20,0.85); border:1px solid var(--border2); border-radius:8px; padding:5px 10px; backdrop-filter:blur(6px); font-size:12px; }
  /* Fullscreen mode */
  body.mb-fullscreen aside,
  body.mb-fullscreen #topbar,
  body.mb-fullscreen .mb-canvas-toolbar { display:none !important; }
  body.mb-fullscreen #content.mb-content-canvas { flex:1; }
  body.mb-hide-navbar aside { display:none !important; }
  body.mb-hide-header #topbar { display:none !important; }
  body.mb-hide-captions .mb-item-caption { display:none !important; }
  body.mb-hide-frames .mb-item { background:transparent !important; border-color:transparent !important; box-shadow:none !important; }
  body.mb-hide-frames .mb-item:hover { border-color:rgba(255,255,255,0.08) !important; }
  body.mb-hide-frames .mb-item img { border-radius:0; }
  .mb-view-toggle-on { background:var(--accent-dim) !important; color:var(--accent) !important; }
  .mb-view-dropdown { position:absolute; top:calc(100% + 6px); left:0; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); padding:6px; min-width:140px; z-index:200; }
  .mb-view-row { display:flex; align-items:center; gap:8px; padding:6px 10px; border-radius:var(--radius); cursor:pointer; font-size:12px; color:var(--text2); user-select:none; }
  .mb-view-row:hover { background:var(--surface3); color:var(--text); }
  .mb-view-check { width:14px; font-size:11px; color:var(--red); flex-shrink:0; }
  .mb-fs-btn { position:fixed; top:14px; right:14px; z-index:99999; opacity:0; pointer-events:none; transition:opacity 0.3s; }
  body.mb-fullscreen .mb-fs-btn { opacity:0.3; pointer-events:auto; }
  body.mb-fullscreen .mb-fs-btn:hover { opacity:1; }
  .mb-fs-btn .mb-fs-label { display:none; }
  body.mb-fullscreen .mb-fs-btn:hover .mb-fs-label { display:inline; }
  @media (max-width:700px) { .mb-boards-grid { grid-template-columns:1fr 1fr; } }


/* ── QUICK TASKS WIDGET ── */
.quick-tasks-widget { transition: border-color 0.15s; }
.quick-tasks-widget:hover { border-color: var(--border) !important; }
#quick-tasks-list::-webkit-scrollbar { width: 6px; }
#quick-tasks-list::-webkit-scrollbar-track { background: transparent; }
#quick-tasks-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
.qt-item { transition: opacity 0.15s, background 0.15s; }
.qt-item:hover { background: var(--surface3) !important; }
.qt-item input[type="checkbox"] { accent-color: var(--green); cursor: pointer; }
#quick-task-input::placeholder { color: var(--text3); }
#quick-task-input:focus { outline: none; border-color: var(--accent) !important; }
#quick-task-deadline { cursor: pointer; }
#quick-task-deadline::-webkit-calendar-picker-indicator { filter: invert(0.5); cursor: pointer; }


/* ── GEAR POOL ── */
.gear-pool-item:hover { background: var(--surface3); }
.gear-pool-item:active { background: var(--surface); }
.gear-pool-item .btn-ghost { opacity: 0; transition: opacity 0.1s; }
.gear-pool-item:hover .btn-ghost { opacity: 1; }


/* ── SCHEDULE VIEW - DAY HEADERS ── */
.day-header-row td {
  background: var(--bg2) !important;
  border-left: 3px solid var(--accent);
  padding: 10px 12px !important;
}

/* ══════════════════════════════════════════
   MY FOUNTAIN — v2
   ══════════════════════════════════════════ */

.mf-layout {
  display: flex;
  height: calc(100vh - 46px);
  overflow: hidden;
}

/* ── Sidebar ── */
.mf-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mf-sidebar-header {
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--border2);
}

.mf-sidebar-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 3px;
}

.mf-sidebar-sub {
  font-size: 10px;
  color: var(--text3);
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

.mf-nav { padding: 10px 8px; flex: 1; }

.mf-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text3);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  user-select: none;
}
.mf-nav-item:hover  { background: var(--surface2); color: var(--text2); }
.mf-nav-item.active { background: var(--accent-dim); color: var(--accent); }

.mf-nav-icon {
  flex-shrink: 0;
  color: currentColor;
  opacity: 0.75;
}

.mf-nav-sep {
  height: 1px;
  background: var(--border2);
  margin: 8px 12px;
}

/* ── Main ── */
.mf-main {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Hero ── */
.mf-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}

.mf-hero-inner {
  display: flex;
  gap: 0;
  align-items: flex-end;
  padding: 28px 28px 0 28px;
  gap: 20px;
}

/* Photo */
.mf-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.mf-photo {
  width: 120px;
  height: 150px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.12s;
}
.mf-photo-wrap:hover .mf-photo { border-color: var(--accent); }

.mf-photo-hint {
  font-size: 9px;
  color: var(--text3);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

/* Hero info */
.mf-hero-info {
  flex: 1;
  min-width: 0;
  padding-bottom: 20px;
}

.mf-hero-roles {
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 1px;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.mf-hero-name {
  font-family: var(--font-display);
  font-size: 52px;
  letter-spacing: 3px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.mf-hero-stagename {
  font-size: 13px;
  color: var(--text3);
  font-style: italic;
  margin-bottom: 10px;
  min-height: 18px;
}

.mf-hero-companies {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  min-height: 22px;
}

.mf-hero-company {
  font-size: 10px;
  color: var(--text3);
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 3px 10px;
  border-radius: 3px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.mf-hero-style {
  font-size: 12px;
  color: var(--text2);
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  line-height: 1.55;
  max-width: 540px;
  min-height: 18px;
}

/* Stats strip */
.mf-stats-strip {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border2);
  margin-top: 20px;
}

.mf-stat-pill {
  flex: 1;
  padding: 12px 16px;
  border-right: 1px solid var(--border2);
  text-align: center;
}
.mf-stat-pill:last-child { border-right: none; }

.mf-stat-n {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--text);
  line-height: 1;
}

.mf-stat-l {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: var(--font-mono);
  margin-top: 4px;
}

/* ── Body (section content) ── */
.mf-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 100px;
}

.mf-body-section { max-width: 760px; }

.mf-body-heading { margin-bottom: 24px; }

.mf-body-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.mf-body-title::before {
  content: '';
  display: block;
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 0;
  flex-shrink: 0;
}

.mf-body-sub { font-size: 11px; color: var(--text3); font-family: var(--font-mono); padding-left: 13px; }

/* Role labels between credit groups */
.mf-role-label {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.mf-divider {
  height: 1px;
  background: var(--border2);
  margin: 20px 0;
}

/* ── Credit rows ── */
.mf-credit-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }

.mf-credit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s;
}
.mf-credit-row:hover { background: var(--surface2); }

.mf-credit-thumb {
  width: 36px;
  height: 50px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mf-thumb-abbr {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--border);
  text-align: center;
  padding: 2px;
  line-height: 1.2;
  word-break: break-all;
}

.mf-credit-info { flex: 1; min-width: 0; }

.mf-credit-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.mf-credit-role  { font-size: 11px; color: var(--text3); }
.mf-credit-note  { font-size: 10px; color: var(--text3); font-style: italic; margin-top: 1px; }
.mf-credit-year  { font-size: 12px; color: var(--text3); font-family: var(--font-mono); flex-shrink: 0; }

.mf-credit-badge {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.badge-pre      { background: rgba(91,192,235,0.12);  color: #7dd0f5; }
.badge-prod     { background: rgba(230,188,60,0.12);  color: #e6bc3c; }
.badge-post     { background: rgba(224,128,149,0.12); color: #e08095; }
.badge-done     { background: rgba(46,168,100,0.12);  color: #2ea864; }
.badge-released { background: rgba(184,138,240,0.12); color: #b88af0; }

/* Expanded film detail */
.mf-film-detail {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 2px 0 4px 48px;
}

/* Collaborator avatar */
.mf-collab-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text3);
  flex-shrink: 0;
}

/* Stats grid */
.mf-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 6px;
}

.mf-stat-block {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.mf-stat-big {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 1px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 5px;
}

.mf-stat-lbl {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: var(--font-mono);
}

/* ── Fields ── */
.mf-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 4px;
}

.mf-field-label {
  font-size: 10px;
  color: var(--text3);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.mf-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border2);
  color: var(--text);
  font-size: 13px;
  padding: 5px 0;
  outline: none;
  font-family: var(--font-body);
  transition: border-color 0.12s;
}
.mf-input:focus { border-bottom-color: var(--accent); }
.mf-input::placeholder { color: var(--text3); }

select.mf-input { cursor: pointer; background: transparent; }

.mf-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12.5px;
  padding: 10px 12px;
  outline: none;
  font-family: var(--font-body);
  resize: vertical;
  line-height: 1.6;
  transition: border-color 0.12s;
}
.mf-textarea:focus { border-color: var(--border); }
.mf-textarea::placeholder { color: var(--text3); }

/* ── Buttons ── */
.mf-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.mf-btn:hover { border-color: var(--accent); color: var(--accent); }

.mf-ghost-btn {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text3);
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.mf-ghost-btn:hover { border-color: var(--red); color: var(--red); }

.mf-inline-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mf-inline-btn:hover { opacity: 0.75; }

/* ── Goal select ── */
.mf-goal-sel {
  font-size: 10px;
  background: transparent;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 0;
  outline: none;
  font-family: var(--font-body);
  margin-top: 2px;
}

.mf-strikethrough { text-decoration: line-through; color: var(--text3) !important; }

/* ── CV preview ── */
.mf-cv-preview {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  font-size: 13px;
  line-height: 1.65;
}

.mf-cv-name    { font-family: var(--font-display); font-size: 30px; letter-spacing: 2px; color: var(--text); margin-bottom: 3px; }
.mf-cv-company { font-size: 12px; color: var(--text3); margin-bottom: 2px; }
.mf-cv-style   { font-size: 12px; color: var(--text3); font-style: italic; margin-bottom: 8px; }
.mf-cv-meta    { font-size: 11px; color: var(--text3); margin-bottom: 2px; }

.mf-cv-section-title {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  margin: 20px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border2);
}

.mf-cv-body         { font-size: 12px; color: var(--text2); line-height: 1.7; }
.mf-cv-credit       { margin-bottom: 12px; }
.mf-cv-credit-title { font-size: 13px; color: var(--text); font-weight: 500; }
.mf-cv-credit-meta  { font-size: 11px; color: var(--text3); }
.mf-cv-credit-note  { font-size: 11px; color: var(--text3); font-style: italic; }

/* ── Empty state ── */
.mf-empty-state {
  padding: 32px 0;
  font-size: 13px;
  color: var(--text3);
  font-style: italic;
}
