/* Filmetrics Productivity Matrix — design system
   Palette: Navy #1E2761, Ice #CADCFC, Ice-soft #EEF3FC, Accent (Filmetrics cyan) #0098C8, Text #232946, Muted #6B7A99 */

:root {
  --navy: #1E2761;
  --navy-dark: #141B4D;
  --navy-soft: #283178;
  --ice: #CADCFC;
  --ice-soft: #EEF3FC;
  --accent: #0098C8;
  --text: #232946;
  --muted: #6B7A99;
  --white: #FFFFFF;
  --good: #2C8C5A;
  --warn: #B8860B;
  --bad: #C0392B;
  --border: #E2E8F5;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(30, 39, 97, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Calibri, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--ice-soft);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: Georgia, "Cambria", "Times New Roman", serif; color: var(--navy); margin: 0 0 4px; }
h1 { font-size: 26px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; margin-bottom: 8px; }
p { line-height: 1.5; }
a { color: var(--navy); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 30px; padding: 0 6px; }
.brand-logo-card { background: var(--white); border-radius: 8px; padding: 8px 12px; display: inline-flex; align-items: center; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-logo-lg { height: 44px; width: auto; display: block; margin: 0 auto; }
.brand-name { font-weight: 700; font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ice); }

.workspace-switcher { margin-bottom: 16px; position: relative; }
.workspace-switcher summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.06);
  font-size: 12.5px; font-weight: 700; color: var(--white);
}
.workspace-switcher summary::-webkit-details-marker { display: none; }
.workspace-switcher summary:hover { background: rgba(255,255,255,0.1); }
.workspace-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-caret { flex-shrink: 0; opacity: 0.7; font-size: 10px; }
.workspace-menu {
  margin-top: 4px; display: flex; flex-direction: column; gap: 2px; background: var(--navy-soft);
  border-radius: 8px; padding: 4px; position: absolute; z-index: 20; width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.workspace-option {
  display: block; width: 100%; text-align: left; background: none; border: none; color: #CFD6EE;
  font-size: 12.5px; font-weight: 600; padding: 8px 10px; border-radius: 6px; cursor: pointer; text-decoration: none;
}
.workspace-option:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.workspace-option.active { background: rgba(255,255,255,0.14); color: var(--white); }
.workspace-option.workspace-new { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2px; padding-top: 10px; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: #CFD6EE; text-decoration: none; font-size: 13.5px; font-weight: 600;
}
.nav-link:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-link.active { background: var(--navy-soft); color: var(--white); }
.nav-icon { width: 18px; height: 18px; display: inline-flex; }
.nav-icon svg { width: 100%; height: 100%; }

.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 14px; margin-top: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; text-decoration: none; color: inherit; border-radius: 8px; padding: 4px; margin-left: -4px; }
.user-chip:hover { background: rgba(255,255,255,0.06); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 12.5px; font-weight: 700; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10.5px; color: #A9B4D0; text-transform: capitalize; }

.main { flex: 1; padding: 30px 40px; max-width: 980px; }
.main-wide { max-width: 1240px; }

/* ---------- Auth screens ---------- */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--navy); }
.auth-card {
  background: var(--white); border-radius: 14px; padding: 36px 34px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 50px rgba(20,27,77,0.35);
}
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-brand h1 { font-size: 20px; margin-bottom: 2px; }
.auth-brand p { color: var(--muted); font-size: 13px; margin: 0; }
.auth-switch { text-align: center; font-size: 13px; margin-top: 16px; color: var(--muted); }
.auth-switch .inline-form { display: inline; }
.link-button { background: none; border: none; padding: 0; margin: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.auth-hint { text-align: center; font-size: 11.5px; margin-top: 14px; color: var(--muted); }
.auth-hint code { background: var(--ice-soft); padding: 1px 5px; border-radius: 4px; }

/* ---------- Forms ---------- */
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.stack-form.compact { gap: 10px; margin-top: 10px; }
.stack-form label, .form-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.form-row { display: flex; gap: 12px; }
.form-row > label { flex: 1; }
input, select, textarea, button { font: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  border: 1px solid var(--border); border-radius: 7px; padding: 9px 11px; font-size: 13.5px; color: var(--text); background: var(--white);
  width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.btn-primary, .btn-secondary, .btn-danger, .btn-ghost, .btn-tiny, .btn-danger-text {
  border: none; border-radius: 7px; cursor: pointer; font-weight: 700; font-size: 13px; padding: 9px 16px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-soft); }
.btn-secondary { background: var(--ice-soft); color: var(--navy); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--ice); }
.btn-danger { background: #FBEAEA; color: var(--bad); }
.btn-ghost { background: transparent; color: #CFD6EE; border: 1px solid rgba(255,255,255,0.2); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.btn-tiny { padding: 4px 9px; font-size: 11px; background: var(--ice-soft); color: var(--navy); }
.btn-danger-text { background: none; color: var(--bad); padding: 4px 0; font-size: 12px; }
.btn-block { width: 100%; }
.inline-form { display: inline; margin: 0; }

/* ---------- Flash ---------- */
.flash { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; font-weight: 600; }
.flash-success { background: #E8F6EE; color: var(--good); }
.flash-error { background: #FBEAEA; color: var(--bad); }

/* ---------- Page head / stats ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; gap: 16px; }
.page-sub { color: var(--muted); font-size: 13.5px; margin: 0; max-width: 60ch; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-tile { background: var(--white); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-value { display: block; font-size: 26px; font-weight: 700; color: var(--navy); font-family: Georgia, serif; }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--white); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.manual-toc { margin-bottom: 16px; }
.manual-toc-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.manual-toc-links a { font-size: 12.5px; font-weight: 700; color: var(--navy); text-decoration: none; }
.manual-toc-links a:hover { text-decoration: underline; }
.manual-section { margin-bottom: 16px; scroll-margin-top: 20px; }
.manual-section p, .manual-section li { font-size: 13.5px; line-height: 1.55; color: var(--text); }
.manual-section ul, .manual-section ol { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.manual-section code { background: var(--ice-soft); padding: 1px 5px; border-radius: 4px; }
.manual-steps { margin: 12px 0; }
.manual-steps li { padding-left: 2px; }
.manual-tips-label { margin: 14px 0 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.manual-figure { margin: 14px 0; }
.manual-figure img {
  width: 100%; max-width: 100%; border-radius: 8px; border: 1px solid var(--border); box-shadow: var(--shadow); display: block;
}
.manual-figure figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.panel-link { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 700; text-decoration: none; }

/* ---------- View toggle / filters ---------- */
.view-toggle-group { display: flex; align-items: center; gap: 10px; }
.view-toggle { display: flex; background: var(--ice-soft); border-radius: 8px; padding: 3px; border: 1px solid var(--border); }
.view-toggle a { padding: 6px 14px; border-radius: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-decoration: none; }
.view-toggle a.active { background: var(--navy); color: var(--white); }
.view-toggle-group a.btn-secondary { text-decoration: none; font-size: 12.5px; }
.view-toggle-group a.btn-secondary.active { background: var(--navy); color: var(--white); }

.filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { max-width: 160px; }

/* ---------- Quadrant matrix ---------- */
.quadrant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quadrant { background: var(--white); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); min-height: 260px; }
.quadrant header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.quadrant header h2 { font-size: 15px; margin: 0; }
.quadrant-sub { font-size: 11px; color: var(--muted); }
.quadrant-count {
  margin-left: auto; background: var(--ice-soft); color: var(--navy); font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 20px;
}
.quadrant.q1 { border-top: 3px solid var(--navy); }
.quadrant.q2 { border-top: 3px solid var(--navy-soft); }
.quadrant.q3 { border-top: 3px solid var(--accent); }
.quadrant.q4 { border-top: 3px solid var(--ice); }

.quadrant-drop { min-height: 60px; display: flex; flex-direction: column; gap: 8px; }
.quadrant-drop.drag-over { background: var(--ice-soft); border-radius: 8px; outline: 2px dashed var(--accent); }

.quick-add { display: flex; gap: 6px; margin-bottom: 10px; }
.quick-add input { flex: 1; padding: 7px 10px; font-size: 12.5px; }
.quick-add-picker { flex: 0 0 auto; max-width: 120px; padding: 7px 6px; font-size: 11.5px; color: var(--muted); }
.quick-add button {
  width: 32px; border: none; background: var(--navy); color: var(--white); border-radius: 7px; font-size: 16px; cursor: pointer;
}
.quick-add.compact { margin-bottom: 0; }
.quick-add.compact input { padding: 5px 8px; font-size: 12px; }
.quick-add.compact button { width: 26px; font-size: 14px; border-radius: 6px; }

/* ---------- Task cards ---------- */
.task-card {
  background: var(--ice-soft); border-radius: 8px; padding: 10px 12px; cursor: grab; border: 1px solid transparent;
}
.task-card:active { cursor: grabbing; }
.task-card.is-done { opacity: 0.55; }
.task-card.is-done .task-title { text-decoration: line-through; }
.task-card-top { display: flex; align-items: center; gap: 8px; }
.task-select { margin-right: 2px; }
.task-title { flex: 1; font-size: 13px; font-weight: 600; }
.task-priority { font-size: 10px; color: var(--muted); background: var(--white); padding: 1px 6px; border-radius: 10px; }
.task-desc { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.task-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pill { font-size: 10px; background: var(--white); color: var(--navy); padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.pill-muted { color: var(--muted); }
.pill-dept { background: var(--ice-soft); color: var(--navy); border: 1px solid var(--border); }
.pill-project { background: var(--accent); color: var(--navy-dark); }
.pill-assignee { background: var(--navy); color: var(--white); }
.pill-subtasks { background: var(--white); color: var(--muted); border: 1px solid var(--border); }
.invite-link { background: var(--ice-soft); padding: 2px 6px; border-radius: 4px; font-size: 11.5px; }

.subtask-section { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.subtask-label { font-size: 11px; color: var(--navy); font-weight: 700; display: block; margin-bottom: 6px; }
.subtask-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.subtask-row { display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.subtask-row:last-child { border-bottom: none; }
.subtask-row-main { display: flex; align-items: center; gap: 8px; }
.subtask-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding-left: 24px; }
.subtask-row.is-done .subtask-title { text-decoration: line-through; color: var(--muted); }
.subtask-title { flex: 1; font-size: 12.5px; }
.subtask-due.overdue { color: var(--bad); font-weight: 700; }
.subtask-toggle {
  width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--muted); background: var(--white);
  color: var(--good); font-size: 10px; line-height: 1; cursor: pointer; flex-shrink: 0; padding: 0;
}
.subtask-remove {
  width: 16px; height: 16px; border: none; background: none; color: var(--muted); font-size: 14px; line-height: 1;
  cursor: pointer; flex-shrink: 0; padding: 0;
}
.subtask-remove:hover { color: var(--bad); }
.subtask-hours-form { display: flex; gap: 4px; margin-left: auto; }
.subtask-hours-form input { width: 64px; padding: 3px 6px; font-size: 11px; }
.task-hours-form { display: flex; align-items: flex-end; gap: 8px; margin-top: -4px; margin-bottom: 10px; }
.task-hours-form label { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.task-hours-form input { width: 100px; padding: 5px 7px; font-size: 12px; margin-top: 2px; }
.subtask-add-form { margin-top: 6px; }
.subtask-add-form .form-row label { font-size: 10.5px; }
.subtask-add-form .form-row input, .subtask-add-form .form-row select { padding: 5px 7px; font-size: 12px; }

.status-select {
  margin-top: 6px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; border: none;
  cursor: pointer; appearance: none; -webkit-appearance: none;
}
.status-select.status-neutral { background: var(--ice-soft); color: var(--navy); }
.status-select.status-warn { background: #FFF6E0; color: var(--warn); }
.status-select.status-bad { background: #FBEAEA; color: var(--bad); }
.status-select.status-good { background: #E8F6EE; color: var(--good); }
.status-select.status-readonly { cursor: default; display: inline-block; }
.task-table .status-select { margin-top: 0; }
.task-readonly-hint { margin-top: 10px; font-size: 11px; color: var(--muted); font-style: italic; }

.assignee-picker { margin-top: 4px; }
.assignee-summary {
  list-style: none; cursor: pointer; padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--white); font-size: 12.5px; color: var(--text); user-select: none;
}
.assignee-summary::-webkit-details-marker { display: none; }
.assignee-summary::after { content: "▾"; float: right; color: var(--muted); }
.assignee-summary:hover { border-color: var(--navy-soft); }
.assignee-picker-panel {
  margin-top: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--white);
}
.assignee-picker-controls { display: flex; gap: 6px; margin-bottom: 6px; }
.assignee-search { flex: 1; padding: 5px 8px; font-size: 12px; }
.assignee-dept-filter { padding: 5px 8px; max-width: 150px; font-size: 12px; }
.assignee-checkboxes {
  display: flex; flex-direction: column; gap: 4px; font-weight: 500;
  max-height: 160px; overflow-y: auto; padding: 2px;
}
.assignee-checkbox { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text); }
.assignee-checkbox[hidden] { display: none; }
.assignee-checkbox input { width: auto; }
.assignee-empty-hint { margin: 4px 0 0; font-size: 12px; }
.due { font-size: 10px; color: var(--muted); background: var(--white); padding: 2px 8px; border-radius: 20px; }
.due.overdue { color: var(--bad); background: #FBEAEA; font-weight: 700; }

.task-edit { margin-top: 8px; }
.task-edit summary { font-size: 11px; color: var(--navy); cursor: pointer; font-weight: 700; }

.empty-hint { color: var(--muted); font-size: 12.5px; font-style: italic; }

/* ---------- List view / table ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.task-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.task-table th, .task-table td { text-align: left; padding: 10px 12px; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.task-table th { background: var(--ice-soft); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
.task-table tr.is-done td:nth-child(2) { text-decoration: line-through; color: var(--muted); }

.bulk-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; background: var(--white); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 12.5px; }
.bulk-bar select { max-width: 180px; }

/* ---------- New item disclosure ---------- */
.new-item-form { margin-bottom: 20px; }
.new-item-form summary { list-style: none; cursor: pointer; display: inline-block; }
.new-item-form summary::-webkit-details-marker { display: none; }
.new-item-form form { background: var(--white); border-radius: var(--radius); padding: 18px; margin-top: 10px; box-shadow: var(--shadow); max-width: 480px; }

/* ---------- Common task templates ---------- */
.template-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.template-group { background: var(--white); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.template-group h3 { font-size: 13px; margin: 0 0 8px; color: var(--navy); }
.template-list { list-style: none; padding: 0; margin: 0; }
.template-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.template-list li:last-child { border-bottom: none; }

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.kpi-card { background: var(--white); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.kpi-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.kpi-category { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
.kpi-values { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 8px; }
.kpi-current { font-size: 22px; font-weight: 700; color: var(--navy); font-family: Georgia, serif; }
.kpi-target { font-size: 11.5px; color: var(--muted); }
.kpi-trend { margin-top: 10px; }
.kpi-summary-row { margin-bottom: 14px; }
.kpi-summary-top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.kpi-summary-val { font-size: 11px; color: var(--muted); }
.kpi-report-row { margin-bottom: 18px; }

.status-badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.status-good { background: #E8F6EE; color: var(--good); }
.status-warn { background: #FFF6E0; color: var(--warn); }
.status-bad { background: #FBEAEA; color: var(--bad); }
.status-neutral { background: var(--ice-soft); color: var(--navy); }

/* ---------- Individual report ---------- */
.report-stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.report-progress-cell { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.report-progress-cell .meter { flex: 1; }
.report-progress-text { font-size: 11px; color: var(--muted); white-space: nowrap; }

.meter { height: 8px; background: var(--ice-soft); border-radius: 6px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 6px; transition: width 0.3s ease; }

/* ---------- Reports / activity ---------- */
.due-list, .activity-list { list-style: none; padding: 0; margin: 0; }
.due-list li { display: flex; justify-content: space-between; font-size: 12.5px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.due-list li.overdue { color: var(--bad); font-weight: 700; }
.due-date { color: var(--muted); }
.activity-list li { display: flex; gap: 8px; align-items: baseline; font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.activity-icon { color: var(--accent); font-weight: 700; width: 14px; flex-shrink: 0; }
.activity-time { margin-left: auto; color: var(--muted); font-size: 10.5px; white-space: nowrap; }

.report-header-print { display: none; }

/* ---------- Print mode ---------- */
@media print {
  .sidebar, .no-print, .task-edit, .quick-add { display: none !important; }
  .main { max-width: 100%; padding: 10px; }
  .report-header-print { display: block; margin-bottom: 16px; }
  .dash-grid { grid-template-columns: 1fr; }
  body { background: white; }
}
body.print-mode .sidebar,
body.print-mode .no-print { display: none !important; }
body.print-mode .report-header-print { display: block; }
body.print-mode .main { max-width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; padding: 14px 16px; }
  .brand { margin-bottom: 12px; }
  .workspace-switcher { margin-bottom: 12px; }
  .nav {
    flex-direction: row; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    gap: 4px; padding-bottom: 6px; margin: 0 -4px 4px;
  }
  .nav-link { flex-shrink: 0; padding: 8px 10px; font-size: 12px; }
  .sidebar-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.12); margin-top: 4px; padding-top: 10px;
  }
  .user-chip { margin-bottom: 0; }
  .sidebar-footer form { width: auto; }
  .sidebar-footer .btn-block { width: auto; }
  .main { padding: 16px; }
  .quadrant-grid, .dash-grid, .stat-row { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .filter-bar select, .filter-bar input { max-width: none; flex: 1 1 140px; }
}
