:root {
  --bg: #f6f8f8;
  --surface: #ffffff;
  --surface-muted: #f8faf9;
  --ink: #122a2c;
  --ink-soft: #526466;
  --muted: #7b8a8b;
  --border: #dfe7e5;
  --border-strong: #cbd8d5;
  --primary: #00665d;
  --primary-dark: #004c46;
  --primary-soft: #e7f3f0;
  --terracotta: #c65f38;
  --success: #1e8a58;
  --success-soft: #e9f7ef;
  --warning: #a96513;
  --warning-soft: #fff5df;
  --danger: #b04444;
  --danger-soft: #fff0f0;
  --shadow: 0 14px 40px rgba(22, 52, 53, 0.08);
  --radius-sm: 7px;
  --radius: 11px;
  --radius-lg: 15px;
  --sidebar: 222px;
  --topbar: 72px;
  --statusbar: 42px;
  --ease: 180ms ease;
  color-scheme: light;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  flex: 0 0 auto;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  grid-template-rows: var(--topbar) minmax(0, 1fr) var(--statusbar);
}

.sidebar {
  grid-column: 1;
  grid-row: 1 / 4;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: transform var(--ease), width var(--ease);
}

.brand {
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
}

.brand-name {
  font-size: 19px;
  font-weight: 730;
  letter-spacing: -0.025em;
}

.brand-mark {
  position: relative;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  color: var(--ink);
}

.brand-mark span {
  position: absolute;
  border: 1.6px solid currentColor;
  background: var(--surface);
}

.brand-mark span:nth-child(1) {
  inset: 0 10px 10px 0;
}

.brand-mark span:nth-child(2) {
  inset: 10px 0 0 10px;
}

.brand-mark span:nth-child(3) {
  width: 11px;
  height: 11px;
  left: 0;
  bottom: 0;
  border-top: 0;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 25px 12px;
}

.nav-item {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-radius: 8px;
  color: #3f5253;
  font-weight: 560;
  transition: color var(--ease), background var(--ease), transform var(--ease);
}

.nav-item:hover {
  color: var(--primary);
  background: var(--surface-muted);
}

.nav-item.is-active {
  color: #fff;
  background: linear-gradient(135deg, #006c62 0%, #00544d 100%);
  box-shadow: 0 8px 18px rgba(0, 92, 84, 0.16);
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.sidebar-collapse {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 8px 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}

.sidebar-collapse:hover {
  background: var(--surface-muted);
}

.topbar {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 190px;
  font-size: 13px;
}

.breadcrumb a {
  color: var(--ink-soft);
}

.breadcrumb span {
  color: var(--border-strong);
}

.breadcrumb strong {
  color: var(--ink);
  font-weight: 650;
}

.global-search {
  width: min(410px, 38vw);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 0 10px 0 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  transition: border var(--ease), box-shadow var(--ease);
}

.global-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 93, 0.1);
}

.global-search input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.global-search kbd {
  padding: 2px 6px;
  color: var(--muted);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: inherit;
  font-size: 10px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.icon-button:hover {
  color: var(--primary);
  background: var(--surface-muted);
}

.icon-button > i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--terracotta);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 3px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  cursor: pointer;
}

.user-menu > span {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.mobile-menu {
  display: none;
}

.content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: calc(100vh - var(--topbar) - var(--statusbar));
}

.service-workspace {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 370px;
}

.workspace-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 26px 0;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.stepper li {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
}

.stepper li:not(:last-child)::after {
  content: "";
  height: 1px;
  flex: 1;
  margin: 0 12px 0 5px;
  background: var(--border-strong);
}

.stepper li span {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
  transition: all var(--ease);
}

.stepper li strong {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 570;
}

.stepper li.is-active {
  color: var(--primary-dark);
}

.stepper li.is-active span,
.stepper li.is-complete span {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.stepper li.is-complete {
  color: var(--primary);
}

.page-heading,
.page-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-heading {
  margin-bottom: 19px;
}

.page-heading h1,
.page-title-row h1 {
  margin: 0;
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 670;
}

.page-heading p,
.page-title-row p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.autosave {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.autosave svg {
  color: var(--success);
}

.wizard-step {
  display: none;
  animation: reveal 220ms ease both;
}

.wizard-step.is-active {
  display: block;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-card {
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.summary-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 660;
}

.summary-title svg {
  color: var(--primary);
}

.compact-field,
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compact-field + .compact-field {
  margin-top: 10px;
}

.compact-field > span,
.field > span,
.art-fields label > span,
.coordinate-group label > span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 560;
}

.compact-field input,
.compact-field select {
  width: 100%;
  height: 28px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: 0;
  font-size: 13px;
  font-weight: 530;
}

.compact-field input:focus,
.compact-field select:focus {
  border-bottom-color: var(--primary);
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.field-pair .compact-field {
  margin-top: 0;
}

.coordinates-panel {
  display: grid;
  grid-template-columns: 1.05fr 1.45fr 1.45fr;
  gap: 18px;
  align-items: center;
  margin-top: 12px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.coordinates-panel h2,
.section-heading h2,
.art-panel h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.coordinates-panel p,
.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.coordinate-group {
  display: grid;
  grid-template-columns: auto repeat(3, 1fr) 48px;
  gap: 7px;
  align-items: end;
}

.coordinate-group > strong {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 650;
}

.coordinate-group label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.coordinate-group input,
.coordinate-group select,
.field input,
.field select,
.field textarea,
.art-fields input,
.art-fields textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  transition: border var(--ease), box-shadow var(--ease);
}

.coordinate-group input:focus,
.coordinate-group select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.art-fields input:focus,
.art-fields textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 93, 0.09);
}

.coordinate-group select {
  padding-inline: 7px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 640;
  cursor: pointer;
  transition: transform var(--ease), background var(--ease), border var(--ease), box-shadow var(--ease);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn--primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(0, 102, 93, 0.16);
}

.btn--primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn--secondary {
  color: var(--primary-dark);
  background: var(--surface);
  border-color: var(--border-strong);
}

.btn--secondary:hover:not(:disabled),
.btn--ghost:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.btn--ghost {
  min-height: 34px;
  color: var(--primary);
  background: transparent;
  border-color: transparent;
}

.btn--block {
  width: 100%;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.attachment-slot {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.attachment-slot__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 8px;
}

.attachment-slot strong,
.attachment-slot span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-slot strong {
  display: -webkit-box;
  min-height: 28px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11.5px;
  line-height: 1.2;
}

.attachment-slot span {
  margin-top: 3px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 9.5px;
}

.attachment-slot > button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.attachment-slot > button:hover {
  background: var(--primary-soft);
}

.upload-zone {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 11px 0;
  padding: 13px 16px;
  color: var(--primary);
  background: #f8fbfa;
  border: 1px dashed #9ebbb6;
  border-radius: 10px;
}

.upload-zone.is-dragging {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 93, 0.08);
}

.upload-zone > div {
  min-width: 0;
  flex: 1;
}

.upload-zone strong,
.upload-zone span {
  display: block;
}

.upload-zone strong {
  color: var(--ink);
  font-size: 12px;
}

.upload-zone span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.art-panel {
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.art-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.art-panel__head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 20px;
  color: var(--ink-soft);
  background: #eef2f1;
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.status-badge--success {
  color: #146a44;
  background: var(--success-soft);
}

.status-badge--warning {
  color: #8b5309;
  background: var(--warning-soft);
}

.status-badge--neutral {
  color: #5c6c6d;
  background: #eef2f1;
}

.art-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.art-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.art-fields input,
.art-fields textarea {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 11.5px;
}

.art-fields .span-2 {
  grid-column: span 2;
}

.art-fields textarea {
  resize: vertical;
}

.service-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.check-card,
.document-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border var(--ease), background var(--ease), box-shadow var(--ease);
}

.check-card {
  min-height: 54px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 580;
}

.check-card:has(input:checked),
.document-option:has(input:checked) {
  background: #f7fbfa;
  border-color: #77aaa3;
  box-shadow: inset 0 0 0 1px rgba(0, 102, 93, 0.06);
}

.check-card input,
.document-option input,
.tree-checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.custom-check,
.tree-checkbox > span {
  width: 18px;
  height: 18px;
  display: grid;
  flex: 0 0 18px;
  place-items: center;
  color: transparent;
  background: var(--surface);
  border: 1px solid #759690;
  border-radius: 4px;
}

.check-card input:checked + .custom-check,
.document-option input:checked + .custom-check,
.tree-checkbox input:checked + span {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.field--wide {
  margin-top: 18px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.field small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.materials-panel {
  margin-top: 12px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.materials-panel summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
}

.materials-panel summary::-webkit-details-marker {
  display: none;
}

.materials-panel summary strong,
.materials-panel summary small {
  display: block;
}

.materials-panel summary strong {
  font-size: 12px;
}

.materials-panel summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.materials-panel[open] summary {
  border-bottom: 1px solid var(--border);
}

.materials-panel[open] summary > svg {
  transform: rotate(180deg);
}

.materials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px 16px;
}

.materials-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.materials-grid label > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 620;
}

.materials-grid textarea {
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  resize: vertical;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  outline: 0;
  font-size: 11px;
}

.materials-grid textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 93, 0.08);
}

.document-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.document-option {
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 9px;
}

.document-option strong,
.document-option small {
  display: block;
}

.document-option strong {
  font-size: 12px;
}

.document-option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.generation-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 13px;
  padding: 16px;
  background: var(--primary-soft);
  border: 1px solid #c9e2dc;
  border-radius: var(--radius);
}

.generation-summary > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.generation-summary svg {
  color: var(--primary);
}

.generation-summary small,
.generation-summary strong {
  display: block;
}

.generation-summary small {
  color: var(--ink-soft);
  font-size: 9.5px;
}

.generation-summary strong {
  margin-top: 2px;
  font-size: 11.5px;
}

.generation-summary em {
  font-style: normal;
}

.format-pill {
  padding: 5px 8px;
  color: var(--primary-dark);
  background: var(--surface);
  border: 1px solid #b6d3cd;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 720;
}

.wizard-footer {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 14px 0;
}

.wizard-footer .btn--primary,
.wizard-footer [data-submit-service] {
  justify-self: end;
  min-width: 184px;
}

.wizard-footer [data-prev-step] {
  justify-self: start;
}

.is-hidden {
  display: none !important;
}

.drive-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
}

.drive-panel__header {
  min-height: 63px;
  display: grid;
  grid-template-columns: 1fr auto 36px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border-bottom: 1px solid var(--border);
}

.drive-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.drive-logo {
  position: relative;
  width: 25px;
  height: 23px;
}

.drive-logo i {
  position: absolute;
  width: 7px;
  height: 23px;
  border-radius: 2px;
  transform-origin: center;
}

.drive-logo i:nth-child(1) {
  left: 3px;
  top: 0;
  background: #0f9d58;
  transform: rotate(29deg);
}

.drive-logo i:nth-child(2) {
  right: 3px;
  top: 0;
  background: #f4b400;
  transform: rotate(-29deg);
}

.drive-logo i:nth-child(3) {
  width: 19px;
  height: 7px;
  left: 3px;
  bottom: 0;
  background: #4285f4;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--success);
  font-size: 9px;
  white-space: nowrap;
}

.sync-status i,
.status-dot,
.drive-panel__footer i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--success);
}

.drive-search {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.drive-search label {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
}

.drive-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 11px;
}

.drive-search > button {
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  cursor: pointer;
}

.drive-breadcrumb {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 15px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 630;
}

.drive-tree {
  min-height: 420px;
  flex: 1;
  overflow: auto;
  padding: 8px 0;
}

.tree-row {
  min-height: 39px;
  display: grid;
  grid-template-columns: 18px 20px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 0 13px 0 calc(13px + var(--depth, 0) * 19px);
  color: #405354;
  font-size: 10.5px;
  cursor: default;
}

.tree-row:not(.tree-row--root):hover {
  background: var(--surface-muted);
}

.tree-row:has(.tree-checkbox input:checked) {
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 620;
}

.tree-row--root {
  min-height: 42px;
  padding-left: 12px;
}

.tree-toggle {
  width: 18px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.tree-checkbox {
  display: block;
  cursor: pointer;
}

.tree-checkbox > span {
  width: 16px;
  height: 16px;
  border-color: #a9bab7;
  border-radius: 3px;
}

.file-type {
  width: 19px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #e14f45;
  border-radius: 3px;
  font-size: 5.5px;
  font-weight: 800;
}

.file-type--dwg {
  background: #277ed2;
}

.file-type--doc,
.file-type--docx {
  background: #2e65b0;
}

.drive-empty {
  display: none;
  max-width: 220px;
  margin: 48px auto;
  text-align: center;
  color: var(--muted);
}

.drive-empty svg {
  margin: 0 auto 10px;
}

.drive-empty strong,
.drive-empty span {
  display: block;
}

.drive-empty strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.drive-empty span {
  margin-top: 4px;
  font-size: 9px;
}

body:not([data-demo="true"]) .drive-tree > .tree-row:not(.tree-row--root) {
  display: none;
}

body:not([data-demo="true"]) .drive-empty {
  display: block;
}

.drive-panel__footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.drive-panel__footer > span {
  display: grid;
  grid-template-columns: 9px 1fr;
  gap: 0 6px;
  align-items: center;
}

.drive-panel__footer strong,
.drive-panel__footer small {
  font-size: 9px;
}

.drive-panel__footer small {
  grid-column: 2;
  color: var(--muted);
}

.drive-panel__footer a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: var(--primary);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 650;
}

.statusbar {
  grid-column: 2;
  grid-row: 3;
  position: sticky;
  bottom: 0;
  z-index: 31;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--border);
  font-size: 9px;
  backdrop-filter: blur(12px);
}

.statusbar > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.statusbar strong {
  color: var(--ink-soft);
  font-weight: 560;
}

.statusbar-spacer {
  flex: 1;
}

.page-section {
  min-height: 100%;
  padding: 30px 34px;
}

.page-title-row {
  align-items: center;
  margin-bottom: 26px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.metric-strip > div {
  min-height: 108px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  padding: 18px 20px;
}

.metric-strip > div:not(:last-child) {
  border-right: 1px solid var(--border);
}

.metric-strip span {
  color: var(--ink-soft);
  font-size: 11px;
}

.metric-strip strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.metric-strip small {
  align-self: end;
  color: var(--muted);
  font-size: 9px;
}

.metric-strip .status-text {
  color: var(--success);
  font-size: 15px;
  letter-spacing: 0;
}

.project-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.list-toolbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.list-toolbar label {
  width: min(360px, 55%);
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.list-toolbar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  font-size: 11px;
}

.project-row {
  min-height: 75px;
  display: grid;
  grid-template-columns: 38px minmax(220px, 1.5fr) minmax(120px, 0.75fr) minmax(105px, 0.65fr) auto 38px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
}

.project-row + .project-row {
  border-top: 1px solid var(--border);
}

.project-symbol {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 8px;
}

.project-row strong,
.project-row span,
.project-row small {
  display: block;
}

.project-row strong {
  font-size: 12px;
}

.project-row span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
}

.project-row small {
  color: var(--muted);
  font-size: 9px;
}

.project-row > .status-badge {
  display: inline-flex;
  margin: 0;
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 64px 24px;
  text-align: center;
}

.empty-state > div {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 12px;
}

.empty-state h2 {
  margin: 15px 0 6px;
  font-size: 17px;
}

.empty-state p {
  max-width: 390px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
}

.empty-state--standalone {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toast-container {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 58px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 280px;
  max-width: 390px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: toast-in 220ms ease both;
  font-size: 11px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.auth-body {
  min-height: 100vh;
  background: #edf2f1;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 7vw, 88px);
  color: #fff;
  background: #034f49;
}

.auth-brand::after {
  content: "";
  position: absolute;
  width: 480px;
  height: 480px;
  right: -180px;
  bottom: -190px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 90px rgba(255, 255, 255, 0.025), 0 0 0 180px rgba(255, 255, 255, 0.018);
}

.auth-brand .brand-mark {
  color: #fff;
}

.auth-brand .brand-mark span {
  background: transparent;
}

.brand-mark--large {
  width: 42px;
  height: 42px;
}

.auth-brand-name {
  margin: 14px 0 auto;
  font-size: 20px;
  font-weight: 700;
}

.auth-brand h1 {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: auto 0 18px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 650;
}

.auth-brand > div > p:last-child {
  position: relative;
  z-index: 1;
  max-width: 530px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.7;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--surface);
}

.auth-card {
  width: min(390px, 100%);
}

.auth-card h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.muted {
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 25px;
}

.form-stack .field > span {
  color: var(--ink-soft);
  font-size: 11px;
}

.form-stack .field input {
  min-height: 44px;
}

.notice {
  margin-top: 18px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 11px;
}

.notice--warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.notice--danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.mobile-brand {
  display: none;
}

@media (max-width: 1240px) {
  :root {
    --sidebar: 196px;
  }

  .service-workspace {
    grid-template-columns: minmax(570px, 1fr) 330px;
  }

  .workspace-main {
    padding-inline: 20px;
  }

  .attachment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coordinates-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 1020px) {
  :root {
    --sidebar: 220px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }

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

  .topbar,
  .content,
  .statusbar {
    grid-column: 1;
  }

  .mobile-menu {
    width: 38px;
    height: 38px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 0 10px;
    background: transparent;
    border: 0;
    border-radius: 7px;
  }

  .mobile-menu span {
    height: 1.5px;
    background: currentColor;
  }

  .service-workspace {
    grid-template-columns: 1fr;
  }

  .drive-panel {
    position: fixed;
    inset: var(--topbar) 0 var(--statusbar) auto;
    z-index: 35;
    width: min(390px, 92vw);
    transform: translateX(100%);
    box-shadow: var(--shadow);
    transition: transform var(--ease);
  }

  body.drive-open .drive-panel {
    transform: translateX(0);
  }

  .global-search {
    width: min(370px, 42vw);
  }
}

@media (max-width: 720px) {
  :root {
    --topbar: 62px;
    --statusbar: 36px;
  }

  body {
    font-size: 13px;
  }

  .topbar {
    gap: 10px;
    padding-inline: 12px;
  }

  .breadcrumb {
    min-width: 0;
  }

  .breadcrumb a,
  .breadcrumb span {
    display: none;
  }

  .global-search,
  .top-actions > .icon-button {
    display: none;
  }

  .top-actions {
    margin-left: auto;
  }

  .workspace-main,
  .page-section {
    padding: 18px 14px 0;
  }

  .stepper {
    margin-bottom: 18px;
  }

  .stepper li {
    gap: 0;
  }

  .stepper li strong {
    display: none;
  }

  .stepper li:not(:last-child)::after {
    margin-inline: 7px;
  }

  .page-heading {
    align-items: flex-start;
  }

  .page-heading p {
    max-width: 440px;
  }

  .autosave--top {
    display: none;
  }

  .summary-grid,
  .service-check-grid,
  .document-options {
    grid-template-columns: 1fr;
  }

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

  .coordinates-panel {
    padding: 14px;
  }

  .coordinate-group {
    grid-template-columns: repeat(3, 1fr) 48px;
  }

  .coordinate-group > strong {
    grid-column: 1 / -1;
  }

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

  .upload-zone {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .upload-zone .btn {
    width: 100%;
  }

  .art-panel__head {
    align-items: flex-start;
    gap: 10px;
  }

  .art-panel__head > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .art-fields {
    grid-template-columns: 1fr 1fr;
  }

  .art-fields .span-2 {
    grid-column: 1 / -1;
  }

  .wizard-footer {
    position: sticky;
    bottom: var(--statusbar);
    z-index: 20;
    grid-template-columns: auto 1fr;
    margin-inline: -14px;
    padding: 10px 14px;
    background: rgba(246, 248, 248, 0.96);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(10px);
  }

  .wizard-footer .autosave {
    display: none;
  }

  .wizard-footer .btn--primary {
    min-width: 0;
  }

  .generation-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .statusbar {
    gap: 12px;
    padding-inline: 12px;
  }

  .statusbar > span:nth-child(2),
  .statusbar > span:nth-last-child(2) {
    display: none;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .metric-strip > div:nth-child(2) {
    border-right: 0;
  }

  .metric-strip > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

  .project-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .project-row > div:not(.project-symbol):not(.project-primary),
  .project-row > .status-badge {
    display: none;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 56px;
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .field-pair,
  .art-fields {
    grid-template-columns: 1fr;
  }

  .art-fields .span-2 {
    grid-column: 1;
  }

  .coordinate-group {
    grid-template-columns: 1fr 1fr;
  }

  .coordinate-group select {
    height: 36px;
  }

  .page-title-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
