:root {
  --navy: #1f3864;
  --navy-deep: #172c50;
  --blue: #2e5496;
  --blue-soft: #e9f0fb;
  --ink: #1e2734;
  --muted: #687588;
  --line: #dfe5ee;
  --surface: #ffffff;
  --background: #f3f6fa;
  --green: #257a4c;
  --amber: #a46711;
  --red: #aa4038;
  --sidebar-width: 252px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--background); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font: 14px/1.45 "Segoe UI", Inter, Arial, sans-serif;
}

button, input, select { font: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 15px 13px 18px;
  overflow-y: auto;
  color: #fff;
  background: var(--navy-deep);
  box-shadow: 4px 0 20px rgba(19, 35, 63, .14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 3px 7px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.brand strong, .brand span { display: block; }
.brand strong { font-size: 13px; }
.brand span { margin-top: 2px; color: #aebbd0; font-size: 10px; }
.nav-group { margin-top: 6px; }
.nav-label { padding: 9px 10px 5px; color: #8394ae; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.nav-link {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  margin: 2px 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: #c7d2e2;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: color .15s ease, background .15s ease;
}

.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-link.active { color: var(--navy); background: #fff; box-shadow: 0 5px 14px rgba(7, 20, 42, .18); }
.nav-icon { display: inline-grid; width: 20px; place-items: center; font-size: 15px; }
.sidebar-footer { margin-top: auto; padding: 18px 9px 0; }

.topbar {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-left: var(--sidebar-width);
  padding: 17px 30px;
  color: #fff;
  background: linear-gradient(118deg, var(--navy), var(--blue));
}

.topbar h1 { margin: 0; font-size: 21px; line-height: 1.2; }

.workspace {
  position: relative;
  min-height: calc(100vh - 82px);
  margin-left: var(--sidebar-width);
  padding: 25px 28px 42px;
  transition: opacity .12s ease;
}

.workspace.loading { opacity: .58; pointer-events: none; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 3px 0 4px; color: var(--navy); font-size: 22px; line-height: 1.25; }
.section-heading p { max-width: 660px; margin: 0; color: var(--muted); font-size: 12px; }
.section-actions { flex: 0 0 auto; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; margin-bottom: 17px; }
.metric { min-height: 108px; padding: 16px 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 2px 5px rgba(20, 35, 58, .035); }
.metric-label, .metric-hint { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin: 4px 0 2px; color: var(--navy); font-size: 25px; line-height: 1.2; }

.panel { margin-bottom: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 2px 5px rgba(20, 35, 58, .035); }
.panel h3 { margin: 0 0 14px; color: var(--navy); font-size: 14px; }
.panel > p { color: var(--muted); }
.filters { display: grid; grid-template-columns: minmax(210px, 1fr) repeat(4, minmax(125px, 165px)) auto auto; align-items: end; gap: 10px; margin-bottom: 14px; }
.search-field span, .select-field span { display: block; margin-bottom: 5px; color: #566377; font-size: 10px; font-weight: 700; }
.filters input, .filters select { width: 100%; height: 39px; border: 1px solid #cbd4e1; border-radius: 8px; padding: 8px 10px; color: var(--ink); background: #fff; outline: none; }
.filters input:focus, .filters select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46, 84, 150, .1); }
.primary-button, .secondary-button, .ghost-button { display: inline-flex; height: 39px; align-items: center; justify-content: center; border-radius: 8px; padding: 0 13px; cursor: pointer; text-decoration: none; font-size: 11px; font-weight: 700; }
.primary-button { border: 1px solid var(--navy); color: #fff; background: var(--navy); }
.secondary-button { border: 1px solid #cbd5e4; color: var(--navy); background: #fff; }
.ghost-button { border: 1px solid transparent; color: var(--muted); background: #f0f3f7; }
.primary-button:hover { background: #294a7d; }
.secondary-button:hover, .ghost-button:hover { border-color: #b9c6d8; background: #f8fafd; }
.panel-caption { display: flex; justify-content: space-between; gap: 12px; margin: 4px 2px 9px; color: var(--muted); font-size: 10px; }
.panel-caption strong { color: #45536a; }

.table-shell { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; min-width: 820px; border-collapse: collapse; }
th { padding: 9px 11px; color: #576479; background: #edf1f7; text-align: left; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
td { padding: 10px 11px; border-top: 1px solid var(--line); color: #334055; font-size: 11px; vertical-align: top; }
td strong { display: block; color: #27364b; }
td small { display: block; margin-top: 2px; color: var(--muted); }
.code-cell { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.date-cell { white-space: nowrap; }
.status-pill { display: inline-flex; padding: 3px 7px; border-radius: 999px; white-space: nowrap; font-size: 9px; font-weight: 800; }
.status-work { color: #8a5b0a; background: #fff3cf; }
.status-done { color: var(--green); background: #e7f5ec; }
.status-plan { color: #355b91; background: #e8f0fb; }
.status-neutral { color: #5f6b7d; background: #edf0f4; }

.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bar-list, .status-list { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 48px 1fr 28px; align-items: center; gap: 10px; font-size: 11px; }
.bar-track { height: 7px; overflow: hidden; border-radius: 99px; background: #edf1f6; }
.bar-track span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--blue); }
.status-line { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.status-line:last-child { border: 0; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.person-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--navy); background: var(--blue-soft); font-weight: 800; }
.person-card strong, .person-card span { display: block; }
.person-card span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.date-tags, .object-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.date-tags span, .object-tags span { padding: 5px 8px; border: 1px solid #d8e0eb; border-radius: 7px; color: #425069; background: #f7f9fc; font-size: 10px; }
.version-list { display: grid; gap: 8px; }
.version-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; }
.version-row span { color: var(--muted); font-size: 10px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step-number { display: grid; width: 27px; height: 27px; place-items: center; margin-bottom: 11px; border-radius: 8px; color: #fff; background: var(--navy); font-size: 11px; font-weight: 800; }
.empty-state { padding: 34px 16px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--navy); }
.empty-state p { margin: 4px 0 0; font-size: 11px; }
.error-banner { margin-bottom: 14px; padding: 10px 12px; border: 1px solid #efc5c1; border-radius: 9px; color: var(--red); background: #fff1f0; font-size: 11px; }
.admin-metrics { grid-template-columns: repeat(2, minmax(180px, 240px)); }
.admin-grid { display: grid; grid-template-columns: minmax(290px, 380px) minmax(0, 1fr); align-items: start; gap: 16px; }
.panel-description { margin: -7px 0 16px; color: var(--muted); font-size: 11px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; margin-bottom: 5px; color: #566377; font-size: 10px; font-weight: 700; }
.field input, .field select { width: 100%; height: 39px; border: 1px solid #cbd4e1; border-radius: 8px; padding: 8px 10px; color: var(--ink); background: #fff; outline: none; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46, 84, 150, .1); }
.full-button { width: 100%; }
.feedback { min-height: 0; margin-top: 11px; font-size: 11px; }
.feedback.ok, .feedback.error { padding: 9px 10px; border-radius: 8px; }
.feedback.ok { border: 1px solid #bee1cb; color: var(--green); background: #edf8f1; }
.feedback.error { border: 1px solid #efc3be; color: var(--red); background: #fff2f0; }
.users-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.count-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: var(--navy); background: #edf2f9; font-size: 10px; font-weight: 800; }
.person { color: #27364b; font-weight: 700; }
.email { color: var(--muted); }
.role-pill { display: inline-flex; padding: 3px 7px; border-radius: 999px; color: #315488; background: #eaf0fa; font-size: 9px; font-weight: 800; }
.skeleton { height: 132px; border-radius: 10px; background: linear-gradient(100deg, #f2f4f7 20%, #e7ecf3 40%, #f2f4f7 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sidebar-user { margin-top: auto; padding: 13px 15px; border-top: 1px solid rgba(255,255,255,.1); color: #fff; }
.sidebar-user strong, .sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user span { margin: 2px 0 8px; color: #aebdd2; font-size: 9px; }
.sidebar-user .ghost-button { width: 100%; height: 31px; }
.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: #edf2f8; }
.auth-card { width: min(100%, 390px); padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 20px 50px rgba(20,35,58,.12); }
.auth-card h1 { margin: 8px 0 20px; color: var(--navy); font-size: 22px; }
.auth-card .brand-mark { margin-bottom: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.object-metrics { grid-template-columns: repeat(3, minmax(160px, 240px)); }
.flash { margin-bottom: 14px; padding: 10px 12px; border: 1px solid #bee1cb; border-radius: 9px; color: var(--green); background: #edf8f1; font-size: 11px; }
.flash.error { border-color: #efc3be; color: var(--red); background: #fff2f0; }
.editor-panel { margin-bottom: 16px; padding: 18px; border: 1px solid #cbd6e6; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(22, 43, 77, .08); }
.editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.editor-heading h3, .delete-confirmation h3 { margin: 3px 0 3px; color: var(--navy); font-size: 17px; }
.editor-heading p, .delete-confirmation p { margin: 0; color: var(--muted); font-size: 11px; }
.icon-button { display: grid; width: 32px; height: 32px; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; cursor: pointer; font-size: 20px; }
.icon-button:hover { color: var(--navy); background: #f4f7fb; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.field-wide { grid-column: 1 / -1; }
.field textarea { width: 100%; resize: vertical; border: 1px solid #cbd4e1; border-radius: 8px; padding: 9px 10px; color: var(--ink); background: #fff; outline: none; }
.field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46, 84, 150, .1); }
.form-actions { display: flex; align-items: center; gap: 9px; margin-top: 14px; }
.form-spacer { flex: 1; }
.form-secondary-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.object-history td { color: var(--muted); background: #f6f7f9; }
.history-badge { display: block; width: fit-content; margin-top: 4px; padding: 2px 7px; border-radius: 999px; background: #dde2e8; color: #5f6975; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.danger-button { display: inline-flex; height: 39px; align-items: center; justify-content: center; border: 1px solid #ddb7b3; border-radius: 8px; padding: 0 13px; color: var(--red); background: #fff5f4; cursor: pointer; font-size: 11px; font-weight: 700; }
.danger-button:hover { border-color: #cc8f89; background: #ffeceb; }
.form-feedback { min-height: 0; color: var(--muted); font-size: 11px; }
.form-feedback.error { margin-top: 4px; padding: 9px 10px; border: 1px solid #efc3be; border-radius: 8px; color: var(--red); background: #fff2f0; }
.table-action { border: 1px solid #cbd5e4; border-radius: 7px; padding: 5px 8px; color: var(--navy); background: #fff; cursor: pointer; font-size: 10px; font-weight: 700; }
.table-action:hover { background: #edf3fb; }
.action-cell { width: 1%; white-space: nowrap; }
.delete-confirmation { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 13px; border-color: #efc3be; background: #fffafa; }
.confirm-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #fff; background: var(--red); font-weight: 900; }

/* Server-rendered Gantt */
.gantt-panel { padding: 14px; overflow: hidden; }
.gantt-shell {
  max-height: min(72vh, 820px);
  overflow: auto;
  border: 1px solid #d5deea;
  border-radius: 10px;
  background: #fff;
  scrollbar-color: #aebbd0 #eef2f7;
}
.gantt-board {
  width: max(100%, calc(430px + var(--units) * var(--unit-width)));
  min-width: calc(430px + var(--units) * var(--unit-width));
  background: #fff;
}
.gantt-head, .gantt-row, .gantt-group-row {
  display: grid;
  grid-template-columns: 430px calc(var(--units) * var(--unit-width));
}
.gantt-head {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 54px;
  color: #526177;
  background: #edf2f8;
  box-shadow: 0 1px 0 #cfd9e7;
}
.gantt-columns {
  position: sticky;
  left: 0;
  z-index: 23;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 52px 50px;
  align-items: end;
  border-right: 2px solid #c6d2e2;
  background: #e9eff7;
}
.gantt-columns span { padding: 9px 7px; font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.gantt-axis, .gantt-track {
  display: grid;
  grid-template-columns: repeat(var(--units), var(--unit-width));
}
.gantt-axis-cell {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6px 7px 7px;
  border-left: 1px solid #d9e1ec;
  white-space: nowrap;
}
.gantt-axis-cell strong { color: #34445c; font-size: 10px; }
.gantt-axis-cell span { overflow: hidden; color: #8491a3; font-size: 8px; text-overflow: ellipsis; }
.gantt-group { border-bottom: 1px solid #dbe3ee; }
.gantt-group > summary { list-style: none; cursor: pointer; }
.gantt-group > summary::-webkit-details-marker { display: none; }
.gantt-group-row {
  position: relative;
  min-height: 48px;
  color: var(--navy);
  background: #f1f5fa;
}
.gantt-group-row:hover { background: #eaf0f8; }
.gantt-object-info {
  position: sticky;
  left: 0;
  z-index: 12;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-right: 2px solid #c6d2e2;
  background: inherit;
}
.gantt-object-info strong, .gantt-object-info span { display: block; }
.gantt-object-info strong { font-size: 12px; }
.gantt-object-info span { margin-top: 1px; color: #77869a; font-size: 9px; }
.gantt-chevron { margin: 0 !important; color: #66768d !important; font-size: 20px !important; transform: rotate(90deg); transition: transform .15s ease; }
.gantt-group:not([open]) .gantt-chevron { transform: rotate(0); }
.gantt-zone { background: #fff; }
.gantt-zone-row {
  position: sticky;
  left: 0;
  z-index: 11;
  display: flex;
  width: 430px;
  height: 27px;
  align-items: center;
  justify-content: space-between;
  padding: 4px 11px 4px 31px;
  border-right: 2px solid #c6d2e2;
  border-top: 1px solid #dde5f0;
  border-bottom: 1px solid #e6ebf2;
  color: #5e6e84;
  background: #f7f9fc;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gantt-zone-row small { color: #95a0b0; font-size: 8px; font-weight: 600; text-transform: none; }
.gantt-row { min-height: 44px; border-top: 1px solid #edf0f5; }
.gantt-row:hover .gantt-task-info, .gantt-row:hover .gantt-track { background-color: #f9fbfe; }
.gantt-row.undated .gantt-task-info { box-shadow: inset 3px 0 0 #c3ccd8; }
.gantt-task-info {
  position: sticky;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 52px 52px 50px;
  min-width: 0;
  align-items: center;
  border-right: 2px solid #c6d2e2;
  background: #fff;
}
.gantt-row-tools { display: grid; height: 100%; place-items: center; }
.gantt-row-tools input { width: 13px; height: 13px; margin: 3px 0 0; }
.gantt-edit { width: 100%; min-height: 20px; border: 0; color: #8b98aa; background: transparent; cursor: pointer; font-size: 16px; }
.gantt-edit:hover { color: var(--navy); background: #eef3fa; }
.gantt-task-name { min-width: 0; padding: 6px 7px 6px 2px; }
.gantt-task-name strong, .gantt-task-name span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gantt-task-name strong { color: #2c3a4e; font-size: 10px; }
.gantt-task-name span { margin-top: 1px; color: #8995a6; font: 8px ui-monospace, SFMono-Regular, Menlo, monospace; }
.gantt-department, .gantt-hours, .gantt-load { padding: 4px; color: #69778b; text-align: center; font-size: 9px; }
.gantt-load { display: inline-flex; width: 39px; justify-content: center; justify-self: center; border-radius: 99px; color: #40618e; background: #e9f0fa; font-weight: 800; }
.gantt-load.overload { color: #9b3e35; background: #fbe7e5; }
.gantt-track {
  position: relative;
  min-height: 44px;
  overflow: hidden;
  background: #fff;
}
.gantt-group-row .gantt-track { min-height: 48px; background: #f1f5fa; }
.gantt-cell { grid-row: 1; border-left: 1px solid #edf0f4; }
.gantt-cell.month-start { border-left-color: #c8d3e2; }
.gantt-bar {
  z-index: 4;
  grid-row: 1;
  grid-column: var(--column) / span var(--span);
  align-self: center;
  height: 26px;
  min-width: 11px;
  margin: 0 3px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 8px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 2px 4px rgba(21, 43, 75, .12);
}
.gantt-bar span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; font-weight: 800; }
.gantt-bar.work { border-color: #d49b2d; color: #664607; background: #f5c861; }
.gantt-bar.done { border-color: #4d9a71; color: #fff; background: #5cae82; }
.gantt-bar.planned { border-color: #6389bd; color: #fff; background: #7197cc; }
.gantt-bar.stopped { border-color: #c66b63; color: #fff; background: #d17b72; }
.gantt-bar.overdue { box-shadow: 0 0 0 2px rgba(177, 57, 48, .22), 0 2px 4px rgba(21, 43, 75, .12); }
.gantt-bar.critical { outline: 2px solid #7e3fa3; outline-offset: 1px; }
.gantt-bar.dragging { z-index: 8; opacity: .82; cursor: grabbing; }
.gantt-resize { position: absolute; inset-block: 0; width: 7px; cursor: ew-resize; }
.gantt-resize.left { left: 0; }
.gantt-resize.right { right: 0; }
.bulk-toolbar { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9fc; }
.bulk-toolbar .field { margin: 0; }
.gantt-bar.milestone { width: 24px; padding: 0; transform: rotate(45deg); }
.gantt-bar.milestone span { text-align: center; transform: rotate(-45deg); }
.gantt-marker {
  position: absolute;
  inset: 0 auto 0 calc(var(--marker) * var(--unit-width));
  z-index: 3;
  width: 1px;
  pointer-events: none;
  background: #d65449;
}
.gantt-marker.expertise { width: 2px; background: #6d5db0; }
.gantt-marker span { display: none; }
.gantt-group-row .gantt-marker span {
  display: block;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 3px;
  padding: 1px 4px;
  color: #fff;
  background: inherit;
  font-size: 7px;
  white-space: nowrap;
}
.gantt-month .gantt-axis-cell strong { font-size: 11px; }
.task-editor { scroll-margin-top: 12px; }
.burger, .nav-overlay { display: none; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .object-metrics { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .filters button { width: 100%; }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .sidebar { width: min(286px, 86vw); transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .burger { display: grid; position: fixed; top: 14px; left: 13px; z-index: 60; width: 39px; height: 39px; place-items: center; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; color: #fff; background: rgba(18, 41, 77, .9); font-size: 20px; }
  .nav-overlay { position: fixed; inset: 0; z-index: 30; background: rgba(10, 20, 38, .44); }
  .nav-overlay[style*="display: none"] { pointer-events: none; }
  .topbar { min-height: 68px; margin-left: 0; padding: 13px 13px 13px 64px; }
  .topbar h1 { font-size: 18px; }
  .workspace { min-height: calc(100vh - 68px); margin-left: 0; padding: 18px 12px 30px; }
  .section-heading { display: block; }
  .section-actions { margin-top: 12px; }
  .metrics { gap: 8px; }
  .metric { min-height: 94px; padding: 13px; }
  .metric strong { font-size: 21px; }
  .panel { padding: 13px; }
  .two-columns, .guide-grid { grid-template-columns: 1fr; }
  .editor-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .gantt-board { width: max(100%, calc(300px + var(--units) * var(--unit-width))); min-width: calc(300px + var(--units) * var(--unit-width)); }
  .gantt-head, .gantt-row, .gantt-group-row { grid-template-columns: 300px calc(var(--units) * var(--unit-width)); }
  .gantt-zone-row { width: 300px; }
  .gantt-columns { grid-template-columns: minmax(0, 1fr) 44px 44px; }
  .gantt-columns span:last-child, .gantt-load { display: none; }
  .gantt-task-info { grid-template-columns: 24px minmax(0, 1fr) 44px 44px; }
}

@media (max-width: 560px) {
  .metrics, .filters, .object-metrics { grid-template-columns: 1fr; }
  .panel-caption { display: block; }
  .panel-caption span { display: block; margin-top: 2px; }
}
