:root {
  color-scheme: light;
  --ink: #16241d;
  --ink-2: #30443a;
  --muted: #56685f;
  --dim: #63736a;
  --canvas: #f5f6f2;
  --paper: #ffffff;
  --line: #dce3db;
  --line-dark: #c7d3c8;
  --nav: #17241e;
  --nav-deep: #111c17;
  --nav-text: #edf2eb;
  --nav-muted: #b7c6bb;
  --accent: #d5f28f;
  --accent-ink: #243b19;
  --brand: #284733;
  --brand-strong: #1c3928;
  --tint: #eaf2e8;
  --positive: #246039;
  --warning: #795016;
  --error: #8d342e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(24, 41, 29, 0.045);
  --sans: "Inter", "Aptos", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 1rem / 1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { color: inherit; font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--brand); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
svg { flex: none; vertical-align: middle; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.15; }
h1, h2 { letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 4vw, 3.12rem); font-weight: 730; }
h2 { font-size: clamp(1.22rem, 2.1vw, 1.55rem); font-weight: 720; }
h3 { font-size: 1.08rem; font-weight: 690; letter-spacing: -.015em; }
h4 { font-size: .95rem; font-weight: 690; }
small { font-size: .8125rem; }
hr { border: 0; border-top: 1px solid var(--line); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #567d44; outline-offset: 3px; }
::selection { color: #182b17; background: var(--accent); }

.shell, .app-shell {
  width: 100%;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  align-items: start;
}
.sidebar {
  display: flex;
  flex-direction: column;
  align-self: start;
  position: sticky;
  inset-block-start: 0;
  height: 100svh;
  gap: 28px;
  padding: 27px 17px 17px;
  overflow: auto;
  color: var(--nav-text);
  background: var(--nav);
}
.brand, .login-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.sidebar .brand { margin: 0 5px 9px; }
.brand-mark {
  flex: none;
  width: 39px;
  height: 39px;
  padding: 5px;
  object-fit: contain;
  border-radius: 8px;
  background: #f6f0e6;
}
.brand-logo { width: 138px; height: auto; }
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  font-size: .93rem;
  font-weight: 770;
  letter-spacing: .075em;
}
.brand-text small, .brand-text span:not(:first-child) {
  color: var(--nav-muted);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-group, .nav-section { display: grid; gap: 4px; }
.nav-label, .sidebar .eyebrow { margin: 12px 10px 5px; color: var(--nav-muted); }
.nav-link, .nav-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 45px;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  text-decoration: none;
  line-height: 1.25;
  font-size: .9rem;
  font-weight: 570;
  color: var(--nav-muted);
  background: transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-link:hover, .nav-button:hover { color: #fff; background: #22362a; }
.nav-link.active, .nav-button.active, .nav-link[aria-current="page"] {
  color: #e8ffd0;
  background: #2b4233;
  border-color: #415847;
  font-weight: 690;
}
.nav-link svg, .nav-button svg { width: 18px; height: 18px; }
.sidebar-foot {
  display: grid;
  margin-top: auto;
  gap: 12px;
  padding: 13px 6px 0;
  border-top: 1px solid #3b4d40;
  color: var(--nav-muted);
}
.sidebar-foot .button { justify-content: flex-start; color: var(--nav-text); border-color: #455849; }
.sidebar-foot .button:hover { background: #263a2c; }
.sidebar-foot .muted { color: var(--nav-muted); }
.user-chip, .user-row { display: flex; align-items: center; min-width: 0; gap: 10px; }
.user-chip > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #e1ece1;
  color: #2c5438;
  font-size: .76rem;
  font-weight: 760;
  letter-spacing: .02em;
}
.sidebar .avatar { background: #3a5140; color: #f0f8e8; }
.main { min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 11px clamp(20px, 3.3vw, 47px);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-size: .875rem;
}
.topbar a { text-decoration: none; }
.topbar > div, .topbar > nav, .topbar-actions { display: flex; align-items: center; min-width: 0; flex-wrap: wrap; gap: 10px; }
.topbar .breadcrumbs { font-size: .875rem; color: var(--muted); }
.topbar .breadcrumbs :last-child { color: var(--ink); font-weight: 650; }
.mobile-nav, .mobile-only { display: none; }
.content, .main-content {
  display: grid;
  gap: 25px;
  width: 100%;
  max-width: 1470px;
  padding: 34px clamp(20px, 3.3vw, 47px) 54px;
  margin: 0 auto;
}
.page-heading, .dashboard-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 19px;
  margin-bottom: 1px;
}
.page-heading p, .dashboard-intro p { color: var(--muted); margin-top: 7px; overflow-wrap: anywhere; }
.heading-actions { display: flex; align-items: center; flex: none; flex-wrap: wrap; gap: 8px; }
.eyebrow {
  color: #4f6255;
  font-size: .75rem;
  font-weight: 760;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .11em;
}
.eyebrow + h1, .eyebrow + h2 { margin-top: 7px; }
.card, .panel, .stat, .summary-card, .project-card, .report-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.card, .panel, .project-card, .report-card { padding: 19px; }
.card-header, .card-heading, .section-heading, .panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.card-header, .card-heading, .panel-heading { margin-bottom: 13px; }
.section-heading > p, .card-heading > p { color: var(--muted); font-size: .875rem; }
.section-heading h2 + p, .card-heading h2 + p { margin-top: 4px; }
.card-body { min-width: 0; }
.stack, .dashboard-grid, .detail-stack {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}
.stats, .summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  align-items: stretch;
  gap: 13px;
}
.stat, .summary-card { display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 5px 10px; padding: 16px 18px; }
.stat-label, .stat-detail { color: var(--muted); font-size: .875rem; grid-column: 1 / -1; }
.stat-label { color: var(--ink-2); font-weight: 625; }
.stat-value { color: var(--ink); grid-column: 1 / -1; font-size: 2rem; line-height: 1.13; font-weight: 730; letter-spacing: -.055em; }
.stat svg { color: #4e7459; }
.stat.is-overdue .stat-value { color: var(--error); }
.grid, .project-grid, .report-grid {
  display: grid;
  align-items: stretch;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr));
  gap: 14px;
}
.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split, .split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.project-card {
  display: grid;
  align-content: start;
  gap: 11px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.project-card:is(a, button):hover, .project-card:has(a:hover) { border-color: #86a48a; box-shadow: 0 6px 16px #1c392808; transform: translateY(-1px); }
.project-card h2, .project-card h3 { color: var(--ink); }
.project-card a { color: var(--ink); text-decoration: none; }
.project-card a:hover { color: var(--positive); }
.project-card p, .report-card p { overflow-wrap: anywhere; }
.project-card .description { color: var(--muted); font-size: .875rem; }
.project-symbol {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid #d8e7d4;
  border-radius: 8px;
  color: #335c39;
  background: #eff5ed;
  font-size: .8125rem;
  font-weight: 740;
}
.project-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 11px; color: var(--muted); font-size: .875rem; }
.project-meta svg { width: 16px; height: 16px; }
.project-meta .code, .project-code {
  color: #31583b;
  font-family: var(--mono);
  font-weight: 650;
  font-size: .8rem;
  letter-spacing: .012em;
}
.project-progress { display: grid; gap: 6px; margin-top: 3px; color: var(--muted); font-size: .875rem; }
.project-progress span, .upload-progress { overflow-wrap: anywhere; }
.progress-row, .progress-label { display: flex; justify-content: space-between; gap: 8px; }
.progress-track { height: 6px; border-radius: 10px; background: #e9eee7; overflow: hidden; }
.progress-bar, .progress-track > span { display: block; height: 100%; border-radius: 10px; background: #628a57; }
.item-list, .record-list, .updates-list { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.list-item, .record-row, .update-row { display: flex; gap: 11px; justify-content: space-between; align-items: center; min-width: 0; min-height: 49px; padding: 9px 0; }
.list-item + .list-item, .record-row + .record-row, .update-row + .update-row { border-top: 1px solid var(--line); }
.list-item > div, .record-row > div, .update-row > div { min-width: 0; }
.list-item p, .record-row p, .update-row p { overflow-wrap: anywhere; }
.list-item h3, .record-row h3, .update-row h3 { font-size: .95rem; }
.list-item small, .record-row small, .update-row small { color: var(--muted); }
.list-item a, .record-row a, .update-row a { font-weight: 620; text-decoration: none; }
.list-item a:hover, .record-row a:hover, .update-row a:hover { text-decoration: underline; }

.button, a.button, .icon-button {
  min-height: 42px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--ink-2);
  background: var(--paper);
  text-align: center;
  text-decoration: none;
  line-height: 1.25;
  font-size: .875rem;
  font-weight: 680;
  vertical-align: middle;
  transition: background .15s, color .15s, border-color .15s;
}
.button:hover, .icon-button:hover { border-color: #8da48f; background: var(--tint); }
.button.primary, .button--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}
.button.primary:hover, .button--primary:hover { border-color: var(--brand-strong); background: var(--brand-strong); }
.button.secondary, .button--secondary { background: var(--paper); }
.button.quiet, .button.ghost { border-color: transparent; background: transparent; }
.button.quiet:hover, .button.ghost:hover { background: var(--tint); }
.button.danger { color: var(--error); border-color: #e0c8c2; }
.button.danger:hover { background: #fbefe9; border-color: #ae6758; }
.button:disabled, .icon-button:disabled, button[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.icon-button { width: 42px; padding: 0; flex: none; }
.button.small, .button.compact { padding: 6px 10px; min-height: 36px; }
.button svg, .icon-button svg { width: 17px; height: 17px; }

.pill, .chip, .badge, .role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  width: fit-content;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink-2);
  background: var(--canvas);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.status-done, .status-complete, .status-reviewed, .is-complete, .is-reviewed, .is-success { background: #e7f3e8; color: #245731; border-color: #d1e6d5; }
.status-in-progress, .status-submitted, .is-progress, .is-submitted { background: #e8f1f6; color: #2e5065; border-color: #d6e7ef; }
.status-blocked, .priority-urgent, .is-blocked, .is-overdue { background: #f8eae7; color: #84342e; border-color: #efd4ce; }
.priority-high, .status-upcoming, .is-warning { background: #f9f0dc; color: #785118; border-color: #f0e2bd; }
.priority-medium { background: #f2efeb; color: #5c4c37; border-color: #e8dfd2; }
.priority-low, .status-planned { background: #edf1ed; color: #3c5143; border-color: #e0e8e0; }
.role-badge { font-size: .8rem; color: #395441; background: #eaf1e9; border-color: #dde8dc; }
.sidebar .role-badge { color: #e6f0df; background: #2d4434; border-color: #405747; }
.overdue { color: var(--error) !important; }
.muted, .hint, .helper-text { color: var(--muted); }
.hint, .helper-text { font-size: .875rem; }
.fw-medium { font-weight: 650; }

.tabs, .segmented {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #edf1eb;
}
.tab, .segmented > button {
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #486052;
  background: transparent;
  font-size: .875rem;
  font-weight: 680;
}
.tab:hover, .segmented > button:hover { color: var(--ink); }
.tab.active, .tab[aria-selected="true"], .segmented > button[aria-pressed="true"] { border-color: var(--line); background: white; color: var(--ink); box-shadow: var(--shadow); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-width: 0; gap: 10px; }
.toolbar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.table-wrap { width: 100%; min-width: 0; overflow-x: auto; border-radius: 9px; border: 1px solid var(--line); scrollbar-width: thin; }
.table, .task-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: .875rem; }
.table th, .table td, .task-table th, .task-table td { height: 46px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.table th, .task-table th { height: 39px; color: #3d5545; background: #f1f5ef; text-align: left; font-size: .8125rem; font-weight: 700; }
.table tr:last-child td, .task-table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover, .task-table tbody tr:hover { background: #f8faf7; }
.table td:first-child, .task-table td:first-child { min-width: 160px; max-width: 410px; white-space: normal; overflow-wrap: anywhere; }
.table td:has(.button):last-child, .task-table td:has(.button):last-child { text-align: right; }
.table a, .task-table a { color: var(--ink); text-decoration: none; font-weight: 650; }
.table a:hover, .task-table a:hover { text-decoration: underline; }
.table .button, .task-table .button { min-height: 35px; }
.board, .task-board {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(205px, 1fr));
  gap: 10px;
  overflow: auto;
  scrollbar-width: thin;
  padding: 1px 1px 10px;
  align-items: stretch;
}
.board-column {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 184px;
  align-content: start;
  padding: 10px;
  border: 1px solid #dce6db;
  border-radius: 10px;
  background: #f0f4ef;
}
.board-column > header, .board-heading, .column-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 29px; }
.board-column > h3, .board-column > header h3, .board-heading h3 { font-size: .91rem; }
.board-column .empty { min-height: 85px; padding: 12px; font-size: .84rem; }
.task-card, .board-card {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 11px;
  border: 1px solid #dde6dc;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.task-card a, .board-card a { color: inherit; text-decoration: none; font-weight: 660; }
.task-card a:hover, .board-card a:hover { text-decoration: underline; }
.task-card p, .board-card p { color: var(--muted); font-size: .844rem; }
.task-card .button, .board-card .button { min-height: 36px; }
.task-card footer, .board-card footer, .task-tags { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 6px; }
.task-card strong, .board-card strong { line-height: 1.32; }

.report-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 345px), 1fr)); }
.report-card { display: grid; gap: 12px; align-content: start; }
.report-card header, .report-card footer { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.report-card header p { margin-top: 4px; color: var(--muted); font-size: .875rem; }
.report-fields, .record-fields, .detail-grid { display: grid; gap: 12px; margin: 0; }
.record-field { display: grid; gap: 3px; min-width: 0; }
.record-field dt, .record-field > span:first-child { color: var(--muted); font-size: .8125rem; font-weight: 690; }
.record-field dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.report-fields p, .record-field dd { white-space: pre-wrap; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.photo-grid:empty { display: none; }
.photo-grid a, .photo-preview {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  text-decoration: none;
  color: var(--ink-2);
}
.photo-grid a:hover { text-decoration: underline; }
.photo-grid img, .photo-preview img {
  display: block;
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--canvas);
}
.photo-grid a span, .photo-preview span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .8rem; }
progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  appearance: none;
  color: var(--brand);
  background: var(--tint);
  accent-color: var(--brand);
}
progress::-webkit-progress-bar { border-radius: 8px; background: var(--tint); }
progress::-webkit-progress-value { border-radius: 8px; background: var(--brand); }
progress::-moz-progress-bar { border-radius: 8px; background: var(--brand); }
.upload-progress { display: grid; gap: 5px; color: var(--ink-2); font-size: .875rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 13px; row-gap: 14px; }
.form-grid > .wide, .field.full, .full-width { grid-column: 1 / -1; }
form { min-width: 0; }
form:has(> .field) { display: grid; gap: 14px; }
.field, .form-field { display: grid; min-width: 0; gap: 5px; color: var(--ink-2); font-size: .875rem; font-weight: 665; }
.field small, .form-field small { color: var(--muted); font-weight: 500; }
label input, label select, label textarea, .input, .select, .textarea,
form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
form select, form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 8px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
form input[type="checkbox"], form input[type="radio"] { accent-color: var(--brand); width: 17px; height: 17px; margin: 2px 6px 0 0; vertical-align: text-top; }
form textarea, .field textarea { resize: vertical; min-height: 93px; }
form select, .field select, .select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2.2 4.3 3.8 3.4 3.8-3.4' stroke='%2361584d' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
  padding-right: 31px;
}
form input[type="file"], .field input[type="file"] { padding: 5px; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; }
input::file-selector-button {
  min-height: 32px;
  margin-inline-end: 8px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  color: var(--ink);
  background: var(--tint);
  cursor: pointer;
  font: 650 .85rem / 1.1 var(--sans);
  padding-inline: 10px;
}
.field:has(input[type="checkbox"]), .field:has(input[type="radio"]) { display: flex; align-items: start; }
.form-actions, .modal-actions, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.notice, .form-error, .alert {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #ccdccc;
  border-radius: 8px;
  color: #315039;
  background: #ecf4eb;
  font-size: .9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.notice.error, .form-error, .alert.error { color: var(--error); background: #fcf1ee; border-color: #ebcec8; }
.notice.success { color: #235533; }
.form-error:empty, .notice:empty { display: none; }
.empty, .empty-state {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 106px;
  min-width: 0;
  padding: 17px;
  border: 1px dashed var(--line-dark);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
}
.empty h2, .empty h3, .empty-state h2, .empty-state h3 { color: var(--ink); }
.modal-overlay, .dialog-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(18, 30, 22, .55);
}
dialog, .dialog {
  width: min(590px, calc(100% - 24px));
  max-width: 100%;
  max-height: calc(100svh - 30px);
  min-width: 0;
  margin: auto;
  padding: 21px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 25px 90px #152b2860;
}
dialog::backdrop { background: rgba(18, 30, 22, .58); }
dialog > header, .dialog > header, .modal-header, .dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 13px;
  margin-bottom: 15px;
}
dialog header p, .dialog header p { margin-top: 6px; color: var(--muted); font-size: .875rem; }
.dialog > form, dialog > form { display: grid; gap: 14px; }
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
code { font: .875em / 1.5 var(--mono); color: #32503b; overflow-wrap: anywhere; }
.noscript { padding: 22px; }

.signin-shell, .login-page {
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 23px;
  padding: clamp(20px, 5vw, 58px) 16px;
  background:
    radial-gradient(ellipse at 35% 0%, #3c5942 0, transparent 58%),
    linear-gradient(145deg, #1d2d23, #111e17);
}
.signin-card, .login-card {
  width: min(100%, 540px);
  display: grid;
  gap: 19px;
  padding: clamp(20px, 5vw, 35px);
  border: 1px solid #e0e9de;
  border-radius: 15px;
  background: #fbfdf9;
  color: var(--ink);
  box-shadow: 0 25px 78px #0a160e55;
}
.signin-card h1, .login-card h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.signin-card > p, .login-card > p { color: var(--muted); }
.signin-card > form, .login-card > form { display: grid; gap: 12px; }
.signin-card > form .button[type="submit"], .login-card > form .button[type="submit"] { min-height: 46px; }
.demo-grid, .demo-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; }
.demo-grid .button, .demo-roles .button, .demo-role {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  padding-inline: 10px;
  min-height: 48px;
  text-align: left;
}
.demo-role small, .demo-grid .button small, .demo-roles .button small { color: var(--muted); text-align: left; line-height: 1.2; }
.login-divider { margin: 0; border-top: 1px solid var(--line); }
.login-caption { color: #ccd8cd; font-size: .875rem; }

@media (max-width: 1040px) {
  .shell, .app-shell { grid-template-columns: 176px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .sidebar .brand { margin-inline: 4px; }
  .content, .main-content { padding-inline: 20px; }
  .topbar { padding-inline: 20px; }
  .stats, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  html { scrollbar-gutter: auto; }
  .shell, .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
  .mobile-only { display: initial; }
  .topbar { min-height: 58px; padding: 7px 14px; }
  .topbar .button, .topbar .icon-button { min-height: 40px; }
  .content, .main-content { gap: 18px; padding: 23px 14px 35px; }
  .page-heading, .dashboard-intro { align-items: start; flex-direction: column; gap: 12px; }
  .page-heading h1, .dashboard-intro h1 { overflow-wrap: anywhere; }
  .heading-actions .button { min-height: 44px; }
  .card, .panel, .project-card, .report-card { padding: 14px; }
  .stats, .summary-grid { gap: 8px; }
  .stat, .summary-card { padding: 11px 12px; }
  .stat-value { font-size: 1.65rem; }
  .grid, .project-grid, .report-grid, .split, .split-grid { grid-template-columns: 1fr; gap: 10px; }
  .section-heading > .button { min-height: 40px; }
  .tab, .segmented > button { min-height: 39px; }
  .button, a.button, .icon-button { min-height: 43px; }
  .icon-button { width: 43px; }
  .task-table th, .task-table td { padding-inline: 8px; }
  .task-table .button, .table .button { min-height: 39px; }
  .board, .task-board { grid-template-columns: repeat(4, minmax(178px, 42vw)); }
}
@media (max-width: 430px) {
  .form-grid { grid-template-columns: 1fr; }
  dialog, .dialog { padding: 15px; }
  .form-actions, .modal-actions, .dialog-actions { justify-content: stretch; }
  .form-actions .button, .modal-actions .button, .dialog-actions .button { flex: auto; }
  .topbar .breadcrumbs { display: none; }
  .board, .task-board { grid-template-columns: repeat(4, minmax(178px, 72vw)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 760px) {
  .mobile-nav {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    padding: 5px 12px;
    background: var(--nav);
    border-bottom: 1px solid #26382e;
    overflow-x: auto;
    scrollbar-width: thin;
    flex-wrap: nowrap;
  }
  .mobile-nav .nav-link, .mobile-nav .nav-button {
    width: auto;
    flex: 0 0 auto;
    min-height: 43px;
    padding: 7px 9px;
    border-radius: 7px;
    gap: 6px;
    white-space: nowrap;
  }
  .mobile-nav .icon-button {
    margin-inline-start: auto;
    padding: 0;
    color: var(--nav-text);
    background: transparent;
    border-color: #455849;
  }
  .mobile-nav .icon-button:hover { background: #263a2c; }
  .mobile-nav .brand-mark { width: 29px; height: 29px; }
}

.stat-head, .project-card-top, .project-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-head { grid-column: 1 / -1; }
.stat-head .stat-label { min-width: 0; }
.stat-icon, .item-icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #dce8da;
  border-radius: 7px;
  color: #426049;
  background: #f1f6ef;
}
.stat.is-overdue { background: #fffaf8; border-color: #ead8d1; }
.stat.is-overdue .stat-icon { background: #f8e9e4; border-color: #ebd2cb; }
.stat.is-overdue .stat-icon svg, .text-danger { color: var(--error); }
.project-card-footer {
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 620;
}
.project-meta > span { display: inline-flex; align-items: center; gap: 4px; overflow-wrap: anywhere; }
.project-discipline { margin-top: 4px; font-size: .9rem; }
.list-item, a.list-item { color: var(--ink); text-decoration: none; }
a.list-item:hover .list-primary strong { text-decoration: underline; text-underline-offset: 2px; }
.list-primary { flex: 1; display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.list-primary strong { font-size: .875rem; line-height: 1.3; font-weight: 635; }
.list-meta { flex: none; max-width: min(28%, 120px); color: var(--muted); text-align: right; font-size: .8125rem; line-height: 1.3; font-weight: 580; }
.list-meta.text-danger { color: var(--error); }
.work-row { display: flex; min-width: 0; min-height: 54px; align-items: center; gap: 9px; }
.work-row + .work-row { border-top: 1px solid var(--line); }
.work-row > .list-item { flex: 1; }
.notice:has(.icon-button) { display: flex; justify-content: space-between; align-items: center; gap: 7px; padding-block: 6px; }
.notice .icon-button { border-color: transparent; background: none; width: 34px; min-height: 34px; }
#workspace-notice:empty { display: none; }

@media (max-width: 430px) {
  .work-row { flex-wrap: wrap; padding-bottom: 8px; }
  .work-row > .list-item { flex-basis: 100%; min-height: 43px; }
  .work-row > .button { min-height: 39px; margin-inline-start: 40px; }
}

.topbar-title { font-weight: 665; }
.topbar .today-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.topbar .today-label svg { width: 17px; height: 17px; }
.topbar .mobile-brand, .topbar .mobile-logout { display: none; }
.sidebar .nav-heading {
  padding: 0 9px 5px;
  color: var(--nav-muted);
  font-size: .73rem;
  font-weight: 730;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.sidebar-projects { display: grid; gap: 4px; align-content: start; }
.sidebar-projects .nav-project { min-height: 39px; overflow-wrap: anywhere; }
.sidebar .nav-link.button, .mobile-nav .nav-link.button {
  justify-content: flex-start;
  color: var(--nav-muted);
  background: none;
  border-color: transparent;
}
.sidebar .nav-link.button:hover, .mobile-nav .nav-link.button:hover { color: white; background: #22362a; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { color: var(--nav-text); font-size: .85rem; font-weight: 670; }
.user-chip small { color: var(--nav-muted); font-size: .77rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 7px; color: var(--muted); font-size: .875rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.project-meta-detail { margin-top: 12px; }
.progress-summary .card { height: 100%; }
.progress-title-actions { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.progress-title-actions h2 { padding-top: 3px; font-size: 1.05rem; }
.progress-title-actions .button { min-height: 36px; }
.progress-label strong { color: var(--ink); }
.progress-summary .record-field .project-progress { gap: 9px; font-size: .9rem; }
.progress-summary .record-field .project-progress:first-child .progress-label { color: var(--ink-2); font-weight: 665; }
.task-panel .heading-actions { justify-content: flex-end; }
.text-button {
  max-width: 100%;
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 680;
  text-align: left;
  overflow-wrap: anywhere;
}
.text-button:hover { color: var(--positive); text-decoration: underline; text-underline-offset: 3px; }
.task-blocker { max-width: 220px; white-space: normal; overflow-wrap: anywhere; }
.board-card-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: .8125rem; color: var(--muted); }
.board-empty { padding: 10px 3px; font-size: .875rem; }
.overdue-label { display: inline-block; margin-left: 3px; font-weight: 700; }
.report-heading { display: flex; justify-content: space-between; align-items: start; gap: 9px; }
.report-heading p { margin-top: 4px; font-size: .8125rem; }
.report-notes { display: grid; gap: 10px; margin: 0; }
.report-notes dt { color: var(--muted); font-size: .8125rem; font-weight: 680; }
.report-notes dd { margin: 4px 0 0; font-size: .9375rem; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.report-card > .review-note { padding-top: 8px; border-top: 1px solid var(--line); font-size: .8125rem; }
.report-actions { display: flex; justify-content: flex-end; }
.access-denied { display: grid; justify-items: start; align-content: start; gap: 13px; max-width: 710px; }
.access-denied .empty { width: 100%; }
.loading-state {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 660;
}
#app > .loading-state { min-height: 100svh; }
.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid #cddccc;
  border-top-color: var(--brand);
  animation: spinner .7s linear infinite;
}
@keyframes spinner { to { transform: rotate(360deg); } }

.signin-shell {
  grid-template-columns: minmax(0, 500px) minmax(230px, 335px);
  align-items: stretch;
  justify-content: center;
  justify-items: stretch;
  gap: 0;
  background: #edf0ea;
}
.signin-card { width: 100%; border-radius: 15px 0 0 15px; box-shadow: 0 14px 38px #18362913; background: var(--paper); }
.signin-card:has([data-form="accept"]) { border-radius: 15px 0 0 15px; }
.signin-card .auth-form { align-content: start; gap: 12px; }
.signin-card .login-wordmark { margin-bottom: 1px; }
.signin-card h1 { font-size: clamp(1.8rem, 4.1vw, 2.5rem); }
.signin-card h1 + p { margin-top: -9px; }
.signin-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 100%;
  padding: clamp(19px, 3.4vw, 37px);
  border-radius: 0 15px 15px 0;
  overflow: hidden;
  color: var(--nav-text);
  background:
    linear-gradient(156deg, transparent 44%, #18281cee 75%),
    linear-gradient(90deg, #c6ead01c 1px, transparent 1px) 0 0 / 23px 23px,
    linear-gradient(#c6ead01c 1px, transparent 1px) 0 0 / 23px 23px,
    linear-gradient(141deg, #3b5841, var(--nav-deep) 58%);
}
.signin-visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 14% 14% 34%;
  border: 1px solid #bfd8ba5c;
  border-radius: 5px;
  transform: skewY(-13deg);
  background:
    linear-gradient(90deg, transparent 48%, #bfd8ba5c 48%, #bfd8ba5c 48.7%, transparent 48.7%),
    linear-gradient(transparent 36%, #bfd8ba5c 36%, #bfd8ba5c 36.6%, transparent 36.6%);
}
.signin-visual .eyebrow { color: var(--accent); }
.signin-visual h2 { font-size: clamp(1.45rem, 3.3vw, 2.05rem); }
.login-aside-items { display: grid; gap: 7px; color: #e0ebde; font-size: .875rem; }
.login-aside-items > span { display: flex; align-items: center; gap: 8px; }
.login-aside-items svg { width: 16px; height: 16px; }
.demo-section { display: grid; gap: 6px; padding-top: 13px; border-top: 1px solid var(--line); }
.demo-section h2 { font-size: 1.08rem; }
.demo-section p { font-size: .875rem; }
.demo-roles { margin-top: 5px; }
.demo-roles .demo-role {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid #d5e1d3;
  border-radius: 8px;
  background: #f2f6f0;
  color: var(--ink);
}
.demo-roles .demo-role:hover { background: #e6efe3; border-color: #91ad92; }
.demo-role span:last-child { display: grid; gap: 2px; min-width: 0; }
.demo-role strong { line-height: 1.15; font-size: .86rem; font-weight: 680; }
.demo-role-icon { display: inline-grid; place-items: center; width: 25px; height: 25px; color: #486e4e; flex: none; }
.demo-role-icon svg { width: 17px; height: 17px; }

@media (max-width: 760px) {
  .topbar .mobile-brand, .topbar .mobile-logout { display: inline-flex; }
  .topbar .mobile-logout { align-items: center; justify-content: center; }
  .topbar .mobile-brand .brand-mark { width: 34px; height: 34px; }
  .topbar .mobile-brand .brand-text small { color: var(--muted); }
  .topbar .topbar-title, .topbar .topbar-avatar { display: none; }
  .project-meta-detail { gap: 8px; }
  .signin-shell { grid-template-columns: minmax(0, 490px); padding-inline: 14px; }
  .signin-card, .signin-card:has([data-form="accept"]) { border-radius: 14px; }
  .signin-visual { display: none; }
}
@media (max-width: 550px) {
  .task-panel .card-heading { flex-wrap: wrap; }
  .task-panel .heading-actions { justify-content: flex-start; }
  .task-table { display: block; white-space: normal; }
  .task-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .task-table tbody { display: grid; gap: 8px; }
  .task-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; }
  .task-table td { display: block; height: auto; min-width: 0; padding: 6px 9px; border: 0; }
  .task-table td:first-child { grid-column: 1 / -1; min-width: 0; padding-block: 3px; background: #f2f6ef; border-radius: 7px 7px 0 0; }
  .task-table td.task-blocker { grid-column: 1 / -1; max-width: none; }
  .task-table td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 650;
  }
  .table-wrap:has(.task-table) { border: 0; border-radius: 0; overflow: visible; }
  .task-table .text-button { min-height: 42px; }
}
@media (max-width: 420px) {
  .topbar .today-label { display: none; }
  .mobile-nav { padding-inline: 8px; }
  .mobile-nav .nav-link { gap: 4px; padding-inline: 7px; font-size: .84rem; }
  .mobile-nav .nav-link svg { width: 16px; height: 16px; }
  .demo-roles .demo-role { padding-inline: 7px; gap: 4px; }
  .demo-role-icon { width: 20px; }
}

.form-grid > .span-2 { grid-column: 1 / -1; }
.dialog-header { align-items: center; }
.dialog-header .icon-button { width: 42px; min-height: 42px; }
.dialog-form, .dialog-body { display: grid; min-width: 0; gap: 13px; }
.dialog-form > .modal-actions { padding-top: 12px; margin-top: 2px; border-top: 1px solid var(--line); }
.dialog-form .form-error { margin-top: 4px; }
.report-fields > .record-field, .form-grid > .record-field {
  display: block;
  padding: 9px 11px;
  border: 1px solid #e0e9de;
  border-radius: 7px;
  background: #f3f7f1;
  color: var(--ink-2);
  font-size: .875rem;
}
.photo-picker { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 9px 11px 11px; border: 1px solid var(--line); border-radius: 8px; }
.photo-picker legend { padding-inline: 4px; color: var(--ink-2); font-size: .875rem; font-weight: 685; }
.photo-picker > p { font-size: .8125rem; }
.photo-picker-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.file-button { position: relative; cursor: pointer; }
.file-button:focus-within { outline: 3px solid #567d44; outline-offset: 3px; }
.photo-picker .file-button input.sr-only { width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; border: 0; }
.upload-files { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.upload-files:empty { display: none; }
.upload-files .photo-preview {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) 36px;
  gap: 7px;
  align-items: center;
  padding: 3px 5px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.upload-files .photo-preview img { width: 35px; height: 35px; aspect-ratio: 1; border-radius: 4px; }
.upload-files .photo-preview .icon-button { width: 36px; min-height: 36px; border-color: transparent; border-radius: 5px; }
@media (max-width: 430px) {
  .photo-picker-actions > .button { flex: 1 1 104px; white-space: nowrap; }
  .modal-actions .button, .upload-files .photo-preview .icon-button { min-height: 43px; }
}
.task-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(155px, 220px);
  gap: 12px;
  margin-bottom: 16px;
}
.task-filters :is(input, select), .task-inline {
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}
.task-filters :is(input, select) { min-height: 40px; }
.task-inline-status { font-weight: 650; }
.task-inline-status.status-done { background: #e7f3e8; color: #245731; }
.task-inline-status.status-in-progress { background: #e8f1f6; color: #2e5065; }
.task-inline-status.status-blocked { background: #f8eae7; color: #84342e; }
.task-inline-status.status-planned { background: #edf1ed; color: #3c5143; }
.task-package + .task-package { margin-top: 19px; }
.task-package-heading {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f5ef;
}
.task-package-heading h3 { margin: 0; font-size: .93rem; overflow-wrap: anywhere; }
.task-package-heading .button { min-height: 32px; }
.task-table .hierarchy-name, .task-card .hierarchy-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.hierarchy-name > :last-child { min-width: 0; }
.hierarchy-toggle {
  flex: 0 0 auto;
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-color: transparent;
  background: transparent;
}
.hierarchy-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.hierarchy-count { display: block; padding: 0 0 3px; color: var(--muted); font-size: .76rem; }
.task-table .hierarchy-child > td { background: #f8faf7; }
.task-table .hierarchy-child > td:first-child { padding-left: 24px; border-left: 2px solid #b9ccbd; }
.task-table .task-blocker { white-space: normal; overflow-wrap: anywhere; }
.task-table .task-inline[type="date"] { min-width: 118px; }
.task-table .hierarchy-action-cell { width: 1%; }
.hierarchy-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 4px; }
.hierarchy-actions .button { padding-inline: 7px; }
.hierarchy-actions .archive-task { width: 34px; min-height: 34px; padding: 0; }
.task-table .overdue-label { display: block; margin-top: 4px; }
.board-subtasks {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 4px 0 0 8px;
  border-left: 2px solid #b9ccbd;
  list-style: none;
}
.board-subtasks li { display: grid; justify-items: start; gap: 2px; }
.board-subtasks li + li { padding-top: 5px; border-top: 1px solid var(--line); }
.board-subtasks small { color: var(--muted); }
@media (max-width: 760px) {
  .task-filters { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .task-filters :is(input, select), .task-inline { min-height: 44px; }
  .task-table .task-inline[type="date"] { min-width: 0; }
  .task-table .hierarchy-child { margin-inline-start: 9px; }
  .task-table .hierarchy-child > td:first-child { padding-left: 10px; }
  .task-table .hierarchy-action-cell { grid-column: 1 / -1; width: auto; }
  .task-table .hierarchy-action-cell::before { display: none; }
  .task-package-heading .button, .hierarchy-actions .button, .hierarchy-actions .archive-task, .hierarchy-toggle { min-height: 44px; }
  .hierarchy-actions .archive-task, .hierarchy-toggle { width: 44px; }
}
