:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #f2f4f7;
  --text: #1d1d1f;
  --muted: #6e7681;
  --line: #dfe3e8;
  --accent: #30d158;
  --accent-2: #007aff;
  --danger: #fb7185;
  --warning: #ffcc00;
  --radius: 8px;
}

body.light {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #f2f4f7;
  --text: #1d1d1f;
  --muted: #6e7681;
  --line: #dfe3e8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .95), transparent 34%),
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 48%, #f0f2f5 100%);
  color: var(--text);
  font: 15px/1.45 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea {
  font: inherit;
}
button {
  border: 0;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 13px;
  cursor: pointer;
}
button:hover { filter: brightness(.98); }
button.primary, .login-panel button[type="submit"] {
  background: var(--accent);
  color: #06140a;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(48, 209, 88, .22);
}
button.secondary {
  border: 1px solid var(--line);
  background: transparent;
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 11px;
}
textarea { min-height: 74px; resize: vertical; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: 0; }
h1 { font-size: 32px; }
h2 { font-size: 26px; }
h3 { font-size: 18px; }
.hidden { display: none !important; }
.eyebrow {
  margin: 0 0 8px;
  color: #7a8491;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.error, .warning { color: var(--danger); margin: 0; }
.warning { color: var(--warning); }
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, #fbfbfd 0%, #f4f5f7 48%, #eceff3 100%);
}
.login-panel {
  width: min(520px, 100%);
  display: grid;
  gap: 22px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 28px;
  background: rgba(255, 255, 255, .58);
  box-shadow:
    0 24px 70px rgba(31, 35, 42, .12),
    inset 0 1px 0 rgba(255, 255, 255, .86);
  backdrop-filter: blur(28px) saturate(150%);
}
.login-panel h1 {
  color: #1c1c1e;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: 0;
}
.login-panel label {
  gap: 9px;
  color: #6b7280;
  font-size: 15px;
  font-weight: 650;
}
.login-panel input {
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid rgba(120, 130, 145, .22);
  border-radius: 18px;
  background: rgba(255, 255, 255, .68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),
    0 1px 2px rgba(15, 23, 42, .04);
}
.login-panel input:focus {
  border-color: rgba(0, 122, 255, .42);
  box-shadow:
    0 0 0 4px rgba(0, 122, 255, .11),
    inset 0 1px 0 rgba(255, 255, 255, .78);
  outline: none;
}
.login-panel button[type="submit"] {
  min-height: 54px;
  border-radius: 18px;
  background: rgba(28, 28, 30, .92);
  color: #fff;
  font-size: 17px;
  font-weight: 760;
  box-shadow:
    0 14px 30px rgba(28, 28, 30, .14),
    inset 0 1px 0 rgba(255, 255, 255, .18);
}
.app {
  min-height: 100vh;
  display: block;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(22px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand small { display: block; color: var(--muted); margin-top: 2px; }
.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(145deg, #34d399, #30d158);
  color: #06140a;
  font-weight: 900;
}
nav { display: grid; gap: 6px; }
nav button {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: #252b33;
}
nav button.active {
  background: #eef1f5;
  border-color: var(--line);
}
.content {
  min-width: 0;
  padding: 34px 40px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.title-stack {
  display: grid;
  gap: 10px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-add {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, #55adff, #007aff);
  box-shadow:
    0 9px 16px rgba(0, 0, 0, .13),
    0 1px 2px rgba(0, 0, 0, .16);
}

.header-add span,
.header-add span::after {
  width: 14px;
  height: 3px;
  display: block;
  border-radius: 999px;
  background: #fff;
  content: "";
}

.header-add span {
  position: relative;
}

.header-add span::after {
  position: absolute;
  inset: 0;
  transform: rotate(90deg);
}

.header-add:hover,
.header-add:focus-visible {
  background: linear-gradient(145deg, #6bb9ff, #0a84ff);
  filter: none;
  transform: translateY(-1px);
}

.top-upload {
  width: min(390px, calc(100vw - 80px));
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, auto);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px dashed rgba(0, 122, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .045);
}

.top-upload.dragging {
  border-color: rgba(0, 122, 255, .42);
  background: #f5faff;
}

.top-upload input {
  display: none;
}

.top-upload-icon {
  position: relative;
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #edf5ff;
  color: #007aff;
}

.top-upload-icon::before,
.top-upload-icon::after {
  content: "";
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.top-upload-icon::before {
  width: 12px;
  height: 2px;
  box-shadow: 0 -5px 0 -1px currentColor;
}

.top-upload-icon::after {
  position: absolute;
  width: 2px;
  height: 11px;
}

.top-upload strong {
  color: #3a4653;
  font-size: 12px;
  line-height: 1.1;
}

.top-upload small {
  color: #8b95a1;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.15;
}

.top-upload-message {
  min-height: 14px;
  margin: -4px 0 0;
  font-size: 10px;
}
.section { display: none; }
.section.active { display: block; }
.grid {
  display: grid;
  gap: 14px;
}
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel, .card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.panel { padding: 18px; }
.card { padding: 14px; }
.metric {
  min-height: 102px;
  display: grid;
  align-content: space-between;
}
.metric small, .muted { color: var(--muted); }
.metric strong {
  margin-top: 10px;
  font-size: 25px;
  letter-spacing: 0;
}
.toolbar {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(130px, .55fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.orders-list { display: grid; gap: 10px; }
.order-row {
  display: grid;
  grid-template-columns: 30px 1.4fr repeat(5, minmax(108px, 1fr)) 98px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.order-row strong { display: block; }
.order-row small { color: var(--muted); }
.badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
}
.badge.new { background: #1f3b35; color: #86efac; }
.badge.production { background: #243652; color: #93c5fd; }
.badge.installation { background: #4a341e; color: #fdba74; }
.badge.completed { background: #1f3b35; color: #86efac; }
.badge.archive, .badge.cancelled { background: #3b2530; color: #fda4af; }
.detail {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}
.positions { display: grid; gap: 10px; }
.position {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.position summary {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(90px, 1fr));
  gap: 10px;
  cursor: pointer;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.preview-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.chart-wrap {
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
  gap: 18px;
  align-items: center;
}
canvas {
  width: 100%;
  min-height: 320px;
  border-radius: var(--radius);
  background: #101318;
}
.legend { display: grid; gap: 8px; }
.legend-row {
  display: grid;
  grid-template-columns: 16px 1fr auto auto;
  gap: 9px;
  align-items: center;
}
.swatch { width: 14px; height: 14px; border-radius: 3px; }

#dashboard.section.active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 460px));
  gap: 14px;
  align-items: start;
  justify-content: start;
}

.sketch-card {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #1d1d1f;
  overflow: visible;
}

.card-shell {
  position: relative;
  z-index: 3;
  padding: 14px;
  border: 1px solid rgba(60, 60, 67, .10);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow:
    0 1px 1px rgba(15, 23, 42, .03),
    0 12px 32px rgba(15, 23, 42, .055);
}

.sketch-card.expanded {
  grid-column: span 2;
  max-width: 920px;
}

.compact-card-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.card-head {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  align-items: center;
  padding: 0;
  background: transparent;
  text-align: left;
  color: #1d1d1f;
}

.card-head strong {
  display: block;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta-head {
  display: grid;
  grid-template-columns: minmax(118px, auto) minmax(80px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: 5px;
}

.card-meta-head span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.card-meta-head b {
  overflow: hidden;
  color: #313842;
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta-head small {
  overflow: hidden;
  color: #8b95a1;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta-head .meta-ready b {
  color: #1d1d1f;
  font-size: 18px;
  font-weight: 900;
}

.compact-upload {
  grid-column: 1;
  grid-row: 2;
  display: block;
  align-self: stretch;
  margin-top: 0;
}

.compact-upload input { display: none; }
.compact-upload button {
  width: 100%;
  height: 100%;
  min-height: 88px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  padding: 10px 8px;
  border: 1px dashed #d5dee7;
  border-radius: 8px;
  background: #fafcfd;
  color: #7d8792;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.compact-upload.dragging button,
.compact-upload button:hover {
  border-color: #a8d7b7;
  background: #f5fbf7;
}
.compact-upload button > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f0f4f7;
  color: #9aa5af;
}

.compact-upload svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.compact-upload button > strong {
  color: #5f6873;
  font-size: 12px;
}
.compact-upload button > small {
  color: #9aa5af;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.collapsed-finance {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.collapsed-finance .finance-line {
  min-height: 22px;
  padding: 3px 8px 3px 11px;
}

.collapsed-finance .finance-line::before {
  inset: 7px auto 7px 5px;
  width: 3px;
}

.collapsed-finance .finance-line span {
  padding-left: 6px;
  font-size: 9px;
}

.collapsed-finance .finance-line strong {
  font-size: 10px;
}

.collapsed-finance .tax-row {
  min-height: 11px;
}

.collapsed-finance .finance-line.blue,
.collapsed-finance .finance-line.profit-summary,
.collapsed-finance .profit-head {
  min-height: 35px;
  padding: 6px 10px 6px 12px;
}

.collapsed-finance .finance-line.blue span,
.collapsed-finance .finance-line.profit-summary span {
  font-size: 12px;
}

.collapsed-finance .finance-line.blue strong,
.collapsed-finance .finance-line.profit-summary strong {
  font-size: 16px;
}

.collapsed-finance .finance-split {
  min-height: 28px;
}

.collapsed-finance .designer-split {
  min-height: 22px;
}

.collapsed-finance .finance-mini {
  min-height: 28px;
  padding: 5px 8px 5px 11px;
}

.collapsed-finance .designer-total,
.collapsed-finance .designer-paid,
.collapsed-finance .designer-due {
  min-height: 22px;
  padding: 3px 7px 3px 11px;
  font-size: 9px;
  line-height: 1;
}

.collapsed-finance .finance-mini::before {
  inset: 7px auto 7px 5px;
  width: 3px;
}

.collapsed-finance .designer-total::before,
.collapsed-finance .designer-due::before {
  inset: 7px auto 7px 5px;
  width: 3px;
}

.collapsed-finance .finance-mini span {
  padding-left: 6px;
  font-size: 11px;
}

.collapsed-finance .designer-total > span,
.collapsed-finance .designer-due > span:not(.designer-check) {
  padding-left: 6px;
  font-size: 9px;
}

.collapsed-finance .finance-mini strong {
  color: #626b76;
  font-size: 11px;
  font-weight: 800;
}

.collapsed-finance .designer-total strong,
.collapsed-finance .designer-paid strong,
.collapsed-finance .designer-due strong {
  font-size: 10px;
  line-height: 1;
}

.collapsed-finance .designer-paid {
  grid-template-columns: 13px minmax(0, auto) auto;
  gap: 4px;
}

.collapsed-finance .designer-due-paid {
  grid-template-columns: 13px minmax(0, 1fr) auto auto;
  gap: 4px;
}

.collapsed-finance .designer-due-paid::before {
  inset: 7px auto 7px 29px;
}

.collapsed-finance .designer-due-paid > span:not(.designer-check) {
  padding-left: 8px;
}

.collapsed-finance .designer-check {
  width: 13px;
  height: 13px;
  border-width: 1.25px;
}

.collapsed-finance .designer-check::after {
  width: 5px;
  height: 3px;
  border-width: 0 0 1.5px 1.5px;
}

.collapsed-finance .designer-paid strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.collapsed-finance .designer-paid strong small {
  font-size: 8px;
  line-height: 1;
}

.collapsed-finance .designer-paid-stamp {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 6px;
  line-height: 1;
}

.collapsed-finance .designer-paid-stamp small {
  min-width: 0;
  padding-top: 0;
  padding-left: 3px;
  border-top: 0;
  border-left: 1px solid rgba(60, 60, 67, .2);
  font-size: 6px;
}

.collapsed-finance .profit-head {
  padding: 6px 10px 6px 12px;
}

.collapsed-finance .profit-head::before {
  inset: 9px auto 9px 5px;
  width: 3px;
}

.collapsed-finance .profit-head span {
  padding-left: 6px;
  font-size: 12px;
}

.collapsed-finance .profit-head strong {
  font-size: 16px;
}

.collapsed-finance .profit-now,
.collapsed-finance .profit-final {
  min-height: 22px;
  padding: 3px 8px 3px 11px;
}

.collapsed-finance .profit-now::before,
.collapsed-finance .profit-final::before {
  inset: 7px auto 7px 5px;
  width: 3px;
}

.collapsed-finance .profit-now span,
.collapsed-finance .profit-final span {
  padding-left: 6px;
  font-size: 9px;
}

.collapsed-finance .profit-now strong,
.collapsed-finance .profit-final strong {
  font-size: 10px;
}

.card-expanded {
  margin-top: 14px;
}

.fold-toggle {
  position: relative;
  z-index: 5;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  justify-self: center;
  margin: 16px auto -36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, #55adff, #007aff);
  color: #fff;
  cursor: pointer;
  text-align: center;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, .16),
    0 1px 2px rgba(0, 0, 0, .18);
}

.fold-toggle small {
  display: none;
}

.fold-chevron {
  width: 23px;
  height: 23px;
  display: block;
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fold-toggle:hover,
.fold-toggle:focus-visible {
  background: linear-gradient(145deg, #6bb9ff, #0a84ff);
  filter: none;
  transform: translateY(-1px);
}

.top-timer {
  position: relative;
  z-index: 1;
  width: min(78%, 360px);
  min-height: 42px;
  display: grid;
  margin: 0 auto -1px;
  padding: 0;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(145deg, #69b4ff, #007aff);
  color: #fff;
  overflow: visible;
  text-align: left;
  box-shadow: 0 10px 22px rgba(0, 122, 255, .18);
}

.top-timer.has-many {
  cursor: pointer;
}

.top-timer:hover,
.top-timer:focus-visible {
  filter: none;
}

.timer-chevron {
  width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  position: absolute;
  z-index: 3;
  top: 0;
  left: 50%;
  border-radius: 999px;
  background: #fff;
  color: #0057c8;
  box-shadow:
    0 9px 22px rgba(0, 35, 84, .34),
    0 2px 5px rgba(0, 35, 84, .16),
    0 0 0 1px rgba(0, 122, 255, .18);
  transform: translate(-50%, -50%);
}

.timer-chevron svg {
  width: 8px;
  height: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timer-strip {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 42px 8px 14px;
  color: inherit;
}

.timer-expanded .timer-strip + .timer-strip {
  border-top: 1px solid rgba(255, 255, 255, .24);
}

.timer-expanded .timer-strip {
  grid-template-columns: minmax(0, 1fr) auto;
}

.top-timer.timer-expanded {
  width: min(78%, 420px);
  margin-bottom: -1px;
}

.timer-strip.overdue {
  background: rgba(255, 59, 48, .22);
}

.timer-title {
  min-width: 0;
  display: grid;
  gap: 2px;
  align-self: stretch;
  align-content: center;
}

.timer-title b {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, .58);
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-title small {
  width: fit-content;
  max-width: 100%;
  color: rgba(255, 255, 255, .74);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.timer-strip strong {
  align-self: center;
  color: #fff;
  font-size: 16px;
  white-space: nowrap;
}

.empty-orders {
  grid-column: 1 / -1;
  min-height: 56vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
}

.empty-add {
  display: grid;
  place-items: center;
  gap: 12px;
  color: #4b5563;
}

.empty-add input { display: none; }
.empty-plus {
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 999px;
  background: #007aff;
  color: white;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 16px 34px rgba(0, 122, 255, .28);
}

.order-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.order-card-head h3 {
  margin-top: 7px;
  font-size: 22px;
  letter-spacing: 0;
}

.sketch-card .muted {
  color: #737a84;
  margin: 6px 0 0;
}

.compact-select {
  width: 190px;
  min-width: 190px;
  color: #737a84;
  font-size: 12px;
}

.compact-select select,
.sketch-card input,
.sketch-card select {
  background: #ffffff;
  color: #1d1d1f;
  border-color: #e1e5ea;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88);
}

.card-main-grid {
  display: grid;
  grid-template-columns: minmax(190px, .86fr) 1.14fr;
  gap: 14px;
  align-items: stretch;
}

.drop-zone {
  min-height: 132px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 18px;
  border: 1px dashed #c8ced6;
  border-radius: 8px;
  background: #fafbfc;
  color: #66707c;
  text-align: center;
  cursor: pointer;
}

.drop-zone.dragging {
  border-color: #007aff;
  background: #f0f7ff;
}

.drop-zone input { display: none; }
.upload-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef1f5;
  color: #8b95a1;
  font-size: 28px;
  font-weight: 900;
}
.drop-zone strong { color: #303641; }
.drop-zone span { max-width: 240px; font-size: 13px; }

.finance-stack {
  display: grid;
  gap: 8px;
  align-content: center;
}

.finance-line {
  position: relative;
  min-height: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 7px 10px 7px 12px;
  border-radius: 8px;
  color: #25303b;
  font-weight: 700;
  background: #f6f7f9;
}

.finance-line::before {
  content: "";
  width: 4px;
  position: absolute;
  inset: 8px auto 8px 7px;
  border-radius: 999px;
  background: currentColor;
}
.finance-line span {
  padding-left: 8px;
  color: #626b76;
  font-size: 12px;
}
.finance-line strong { white-space: nowrap; }
.finance-line.blue { color: #0b63ce; background: #edf5ff; }
.finance-line.navy { color: #c7ddf7; background: #fbfdff; }
.finance-line.purple { color: #c98be9; background: #fdf8ff; }
.finance-line.yellow { color: #b08200; background: #fff8df; }
.finance-line.gold { color: #c79700; background: #fff4c2; }
.finance-line.green { color: #248a3d; background: #effaf2; }
.finance-line.mint { color: #20a84f; background: #eefbf3; }
.finance-line strong { color: #1d1d1f; }
.finance-line.navy span,
.finance-line.navy strong {
  color: #9aaabc;
}

.designer-split {
  display: grid;
  grid-template-columns: 30% .86fr 1fr;
  gap: 4px;
}

.tax-row {
  display: grid;
  justify-content: end;
}

.tax-row span {
  width: fit-content;
  max-width: 120px;
  overflow: hidden;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #9aa3ad;
  font-size: 6px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.designer-total,
.designer-due {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  color: #c98be9;
  font-weight: 700;
  background: #fdf8ff;
}

.designer-due-paid {
  grid-template-columns: 17px minmax(0, 1fr) auto auto;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.designer-total::before,
.designer-due::before {
  content: "";
  width: 4px;
  position: absolute;
  inset: 8px auto 8px 7px;
  border-radius: 999px;
  background: currentColor;
}

.designer-total > span,
.designer-due > span:not(.designer-check) {
  overflow: hidden;
  color: #8d778f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.designer-total strong,
.designer-due strong {
  color: #6f5c76;
  white-space: nowrap;
}

.designer-paid {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  border-radius: 8px;
  background: #faf6fc;
  color: #9c88a5;
  text-align: left;
}

.designer-check {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1.5px solid #d9c6e3;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
}

.designer-check::after {
  content: "";
  width: 7px;
  height: 4px;
  margin-top: -1px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  opacity: 0;
  transform: rotate(-45deg);
}

.designer-paid strong {
  display: grid;
  gap: 1px;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.designer-paid strong small {
  overflow: hidden;
  color: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
}

.designer-paid-stamp {
  display: grid;
  align-content: center;
  gap: 1px;
  color: #424951;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.designer-paid-stamp small {
  width: fit-content;
  min-width: 26px;
  padding-top: 2px;
  border-top: 1px solid rgba(60, 60, 67, .22);
  color: #5f6873;
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
}

.designer-split.is-paid .designer-paid {
  background: #effaf2;
  color: #248a3d;
}

.designer-split.is-paid .designer-paid .designer-check {
  border-color: #55d977;
  background: #55d977;
}

.designer-split.is-paid .designer-paid .designer-check::after {
  opacity: 1;
}

.designer-split.is-due-paid .designer-due-paid {
  background: #effaf2;
  color: #248a3d;
}

.designer-split.is-due-paid .designer-due-paid .designer-check {
  border-color: #55d977;
  background: #55d977;
}

.designer-split.is-due-paid .designer-due-paid .designer-check::after {
  opacity: 1;
}

.designer-split.is-paid .designer-total,
.designer-split.is-paid .designer-due,
.designer-split.is-due-paid .designer-total {
  opacity: .72;
}

.finance-split {
  display: grid;
  grid-template-columns: 30% 1fr;
  gap: 4px;
}

.profit-split {
  display: grid;
  grid-template-columns: 33% 1fr;
  gap: 4px;
}

.profit-head {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 8px;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 8px;
  color: #20a84f;
  font: inherit;
  font-weight: 900;
  background: #e8faee;
  text-align: left;
}

.profit-head::before {
  content: "";
  width: 4px;
  position: absolute;
  inset: 8px auto 8px 7px;
  border-radius: 999px;
  background: currentColor;
}

.profit-now,
.profit-final {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  color: #20a84f;
  font-weight: 800;
  background: #eefbf3;
}

.profit-now::before,
.profit-final::before {
  content: "";
  width: 4px;
  position: absolute;
  inset: 8px auto 8px 7px;
  border-radius: 999px;
  background: currentColor;
}

.profit-now {
  color: #9fceb0;
  background: #f7fcf8;
}

.profit-final {
  color: #42bd69;
  background: #effaf3;
}

.profit-head span,
.profit-now span,
.profit-final span {
  overflow: hidden;
  color: #626b76;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-head strong,
.profit-now strong,
.profit-final strong {
  color: #1d1d1f;
  white-space: nowrap;
}

.profit-toggle {
  cursor: pointer;
}

.profit-chevron {
  width: 16px;
  height: 16px;
  justify-self: end;
  fill: none;
  stroke: #31c85f;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.finance-mini {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  color: #25303b;
  font-weight: 700;
}

.finance-mini::before {
  content: "";
  width: 4px;
  position: absolute;
  inset: 8px auto 8px 7px;
  border-radius: 999px;
  background: currentColor;
}

.finance-mini span {
  overflow: hidden;
  color: #626b76;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-mini strong {
  color: #1d1d1f;
  white-space: nowrap;
}

.finance-mini.prepay {
  color: #d6b844;
  background: #fff9dd;
}

.finance-mini.due {
  color: #b08200;
  background: #fff1b8;
}

.designer-due i {
  color: #c98be9;
  font-style: normal;
  font-weight: 900;
}

.divider {
  height: 1px;
  margin: 20px 0 14px;
  background: #edf0f3;
}

.block-title {
  margin-bottom: 10px;
  font-size: 17px;
  letter-spacing: 0;
}

.simple-positions {
  display: grid;
  gap: 18px;
}

.simple-position {
  overflow: hidden;
  padding: 0 16px 16px;
  border: 1px solid #dfe7f0;
  border-left: 6px solid var(--position-accent, #2f80ed);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .075);
}

.position-title-row {
  display: grid;
  position: relative;
  grid-template-columns: minmax(220px, 1.05fr) auto auto auto minmax(250px, .9fr);
  grid-template-areas:
    "title contract client ready finance"
    "timer . . . ."
    "budget budget budget budget budget"
    "colors colors colors colors colors";
  gap: 10px;
  align-items: center;
  margin: 0 -16px 14px;
  padding: 16px 16px 16px;
  border-bottom: 1px solid #e6edf5;
  background: linear-gradient(180deg, #ffffff, var(--position-soft, #eef6ff));
}

.position-title-block {
  display: grid;
  gap: 8px;
  grid-area: title;
}

.position-contract { grid-area: contract; }
.position-client-name { grid-area: client; }
.position-ready-date { grid-area: ready; }

.pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 42px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--position-accent, #0066cc);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
  box-shadow: none;
}

.pill.blue,
.pill.yellow,
.pill.red,
.pill.gray {
  background: transparent;
  color: var(--position-accent, #0066cc);
}

.position-color-picker {
  grid-area: colors;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
  min-height: 24px;
  padding-right: 6px;
}

.position-color-dot {
  width: var(--dot-size, 8px);
  height: var(--dot-size, 8px);
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--dot-color);
  opacity: var(--dot-opacity, .28);
  box-shadow: 0 2px 7px rgba(15, 23, 42, .16);
}

.position-color-dot.selected {
  --dot-size: 15px;
  --dot-opacity: 1;
  opacity: 1;
  box-shadow: 0 3px 9px rgba(15, 23, 42, .2);
}

.position-color-dot.distance-1 {
  --dot-size: 12px;
  --dot-opacity: .62;
}

.position-color-dot.distance-2 {
  --dot-size: 10px;
  --dot-opacity: .42;
}

.position-color-dot.distance-3 {
  --dot-size: 8px;
  --dot-opacity: .3;
}

.ready-date {
  width: fit-content;
  display: inline-grid;
  gap: 1px;
  min-height: 42px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .78);
  color: #5a6572;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.ready-date small {
  color: #8b95a1;
  font-size: 10px;
  font-weight: 700;
}

.position-finance {
  grid-area: finance;
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 0;
  border-radius: 7px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
}

.position-finance-toggle {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 7px;
  background: transparent;
  color: #4b5563;
  text-align: left;
}

.position-finance-toggle span {
  overflow: hidden;
  color: #6b7280;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.position-finance-toggle strong {
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.position-finance-toggle svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.position-budget {
  grid-area: budget;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-self: stretch;
  min-width: 0;
  width: 100%;
  margin-right: 0;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, .055),
    0 8px 18px rgba(15, 23, 42, .04);
  backdrop-filter: blur(12px);
}

.budget-row {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
}

.budget-row span {
  flex: 1 1 auto;
  min-width: max-content;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
}

.budget-row strong {
  flex: 0 1 auto;
  min-width: 0;
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.budget-row strong small {
  display: inline;
  margin-left: 4px;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  opacity: .62;
}

.budget-row.spend {
  background: #f2f8ff;
  color: #0b63ce;
}

.budget-row.install {
  background: #fbfdff;
  color: #9aaabc;
}

.budget-row.worker {
  background: #fff8e6;
  color: #a16207;
}

.budget-row.profit {
  background: #effaf2;
  color: #248a3d;
}

.note-pad-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 28px 10px;
  color: #8b95a1;
  font-size: 13px;
  font-weight: 800;
}

.position-timer {
  grid-area: timer;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 8px 28px;
  border-radius: 7px;
  background: linear-gradient(145deg, #69b4ff, #007aff);
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 122, 255, .14);
}

.position-timer.overdue {
  background: linear-gradient(145deg, #ff8a8a, #ff453a);
  box-shadow: 0 6px 14px rgba(255, 69, 58, .12);
}

.position-timer strong {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.position-add-goal {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 2px 8px 2px 2px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.position-add-goal:hover {
  background: rgba(49, 200, 95, .08);
}

.position-add-goal > span {
  color: #31c85f;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.round-add {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  position: relative;
  padding: 0;
  border-radius: 999px;
  background: #7ee39b;
  color: #fff;
  font-size: 0;
  box-shadow: 0 8px 18px rgba(126, 227, 155, .32);
}

.round-add::before,
.round-add::after {
  content: "";
  width: 12px;
  height: 2.5px;
  position: absolute;
  inset: 50% auto auto 50%;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.round-add::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.round-add:hover,
.round-add:focus-visible {
  background: #62da83;
  filter: none;
}

.note-pad {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffef8, #fbfcfd);
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .05);
}

.note-editable {
  width: 100%;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1d1d1f;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-editable:focus {
  outline: none;
  box-shadow: none;
}

.note-editable:empty::before {
  content: attr(data-placeholder);
  color: #a1a8b0;
  pointer-events: none;
}

.note-text {
  color: #313842;
}

.check-block {
  display: grid;
  gap: 3px;
  padding: 4px 0 5px;
}

.check-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px 50px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 26px;
  color: #1d1d1f;
  font-size: 15px;
}

.check-toggle-ui {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  background: transparent;
}

.check-dot {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1.5px solid #c7ccd3;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
}

.check-dot::after {
  content: "";
  width: 7px;
  height: 4px;
  margin-top: -1px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  opacity: 0;
  transform: rotate(-45deg);
}

.check-toggle-ui.is-done .check-dot {
  border-color: #55d977;
  background: #55d977;
  box-shadow: 0 4px 12px rgba(85, 217, 119, .24);
}

.check-toggle-ui.is-done .check-dot::after {
  opacity: 1;
}

.check-stamp {
  min-height: 20px;
  display: grid;
  align-content: center;
  gap: 1px;
  color: #424951;
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.check-stamp small {
  width: fit-content;
  min-width: 26px;
  padding-top: 2px;
  border-top: 1px solid rgba(60, 60, 67, .22);
  color: #5f6873;
  font-size: 7px;
  font-weight: 600;
  line-height: 1;
}

.check-stamp span:empty,
.check-stamp small:empty {
  display: none;
}

.check-title {
  min-height: 22px;
  font-size: 15px;
  font-weight: 600;
}

.note-pad .check-detail {
  width: calc(100% - 76px);
  min-height: 18px;
  margin-left: 76px;
  color: #5f6873;
  font-size: 12px;
  line-height: 1.35;
}

.file-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: start;
}

.file-tile-wrap {
  position: relative;
  width: 104px;
}

.file-tile {
  width: 104px;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #25303a;
  text-decoration: none;
  text-align: center;
}

.file-delete {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  position: absolute;
  top: -8px;
  right: 10px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ff3b30;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(255, 59, 48, .28);
  transition: opacity .16s ease, transform .16s ease;
  transform: translateY(2px) scale(.96);
}

.file-delete::before {
  content: "";
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.file-tile-wrap:hover .file-delete,
.file-tile-wrap:focus-within .file-delete {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.file-delete:hover,
.file-delete:focus-visible {
  background: #d70015;
  filter: none;
}

.file-tile > span:not(.xl-icon) {
  max-width: 100%;
  overflow: hidden;
  color: #303641;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.file-tile small {
  max-width: 100%;
  overflow: hidden;
  color: #8b95a1;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.xl-icon {
  width: 58px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #35d96b, #20c653);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow:
    0 10px 18px rgba(32, 198, 83, .18),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.card-footer {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.diagram-btn {
  min-width: 220px;
  background: linear-gradient(145deg, #8be6a4, #55d977);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(85, 217, 119, .26);
}

.client-variants {
  display: block;
  margin-top: 4px;
  color: #7d8793;
  font-size: 12px;
  font-weight: 700;
}

.inline-preview {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  background: #fff;
}

.inline-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.inline-preview-grid span,
.position-section-head,
.server-check-row,
.server-note {
  border-radius: 8px;
  background: #f8fafc;
}

.inline-preview-grid span {
  display: grid;
  gap: 3px;
  padding: 10px;
  color: #111827;
  font-weight: 800;
}

.inline-preview-grid small,
.position-section-head small,
.server-note small {
  color: #7d8793;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.server-checklist,
.server-notes {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.position-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
}

.server-check-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
}

.server-check-row input,
.server-note textarea,
.inline-add input,
.inline-add textarea {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.server-note {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.server-note textarea,
.inline-add textarea {
  min-height: 66px;
  resize: vertical;
}

.inline-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.title-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.title-edit input {
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

@media (max-width: 1040px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
  }
  nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-4, .grid.cols-3, .grid.cols-2, .chart-wrap, .form-grid, .card-main-grid { grid-template-columns: 1fr 1fr; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .order-row { grid-template-columns: 30px 1fr 1fr; }
  .order-row > *:nth-child(n+5):not(:last-child) { display: none; }
}

@media (max-width: 640px) {
  .content { padding: 16px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  nav, .grid.cols-4, .grid.cols-3, .grid.cols-2, .chart-wrap, .form-grid, .toolbar, .card-main-grid, .position-title-row, .inline-preview-grid, .inline-add, .server-check-row, .title-edit { grid-template-columns: 1fr; }
  .position summary { grid-template-columns: 1fr; }
  .sketch-card { padding: 18px; }
  .order-card-head { display: grid; }
  .compact-select { min-width: 0; }
  .check-row { grid-template-columns: 18px 46px 1fr; }
  .note-pad .check-detail {
    width: calc(100% - 72px);
    margin-left: 72px;
  }
  .position-title-row {
    grid-template-areas:
      "title"
      "contract"
      "client"
      "ready"
      "finance"
      "budget"
      "timer"
      "colors";
  }
  .position-color-picker,
  .position-add-goal {
    justify-self: start;
  }
  .position-budget {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 1100px) {
  .position-budget {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .timer-strip,
  .timer-expanded .timer-strip {
    animation: none;
  }
}
