:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --panel-2: #fbfbfd;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #475569;
  --line: #e5e7eb;
  --line-2: #dbe3ee;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-2: #16a34a;
  --accent-2-soft: rgba(22, 163, 74, 0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.18);
  --sticky: #ffffff;
  --left-col: 300px;
  --day-width: 56px;
  --row-height: 52px;
  --bar-height: 32px;
  --bar-top: 10px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.04);
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.page {
  max-width: 1800px;
  margin: 0 auto;
  padding: 14px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar-toolbar {
  flex: 1 1 100%;
  min-width: 0;
}
.topbar-toolbar .timeline-strip {
  width: 100%;
  overflow: hidden;
}

.top-actions,
.nav-links,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel { padding: 14px; }

.btn {
  font-size: 12px;
  font-weight: 900;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn:hover { background: #f8fafc; transform: translateY(-1px); }
.btn.primary { background: #0f172a; color: #fff; border-color: #0f172a; }
.btn.primary:hover { background: #111827; }
.btn.success {
  color: #166534;
  border-color: rgba(22,163,74,0.32);
  background: rgba(22,163,74,0.08);
}
.btn.success:hover { background: rgba(22,163,74,0.13); }
.btn.danger {
  color: #991b1b;
  border-color: rgba(220,38,38,0.32);
  background: rgba(220,38,38,0.06);
}
.btn.danger:hover { background: rgba(220,38,38,0.10); }
.btn.ghost { background: #fff; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
  color: #334155;
  border: 1px solid var(--line);
}
.badge.warn { background: var(--warning-soft); color: #92400e; border-color: rgba(251,191,36,0.35); }
.badge.error { background: var(--danger-soft); color: #991b1b; border-color: rgba(239,68,68,0.35); }
.badge.ok { background: var(--accent-2-soft); color: #166534; border-color: rgba(22,163,74,0.35); }
.badge.accent { background: var(--accent-soft); color: #1d4ed8; border-color: rgba(37,99,235,0.25); }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi {
  padding: 14px;
  min-height: 92px;
}
.kpi .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.kpi .value {
  font-size: 28px;
  font-weight: 900;
  margin-top: 8px;
  line-height: 1.1;
}
.kpi .sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.kpi .note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  font-weight: 700;
}

.board-switch {
  display: inline-flex;
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 999px;
  gap: 4px;
}
.board-switch button {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.board-switch button.active {
  background: #0f172a;
  color: #fff;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}


.timeline-controls {
  display: grid;
  gap: 8px;
}
.timeline-controls .toolbar {
  gap: 6px;
}
.timeline-controls .btn {
  padding: 6px 10px;
  font-size: 11px;
}
.timeline-controls .field {
  min-height: 34px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.timeline-form-row {
  gap: 8px;
}

.field-wrap {
  display: grid;
  gap: 4px;
  min-width: 132px;
}
.field-wrap span {
  font-size: 10px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.field-wrap--small {
  min-width: 118px;
}

.range-presets .btn {
  font-weight: 800;
}

.board-wrap {
  position: relative;
  overflow: hidden;
  max-height: calc(100vh - 165px);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.board {
  width: 100%;
  min-width: 0;
}

.board-row {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.header-row {
  position: sticky;
  top: 0;
  z-index: 14;
}
.header-row .left-cell {
  z-index: 16;
}
.board-row:last-child { border-bottom: 0; }

.left-cell {
  position: sticky;
  left: 0;
  z-index: 12;
  flex: 0 0 var(--left-col);
  width: var(--left-col);
  min-width: var(--left-col);
  max-width: var(--left-col);
  padding: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  border-right: 1px solid var(--line);
  box-shadow: 4px 0 12px rgba(15,23,42,0.03);
}
.left-cell.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
}
.left-caption {
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.left-header-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 68px 44px 44px;
  gap: 8px;
  align-items: center;
}
.left-stat-head {
  font-size: 10px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: right;
}
.left-help {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted-2);
  line-height: 1.25;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 6px 8px;
  box-shadow: var(--shadow-soft);
}
.order-card.compact.quartz { border-left: 4px solid #16a34a; }
.order-card.compact.acrylic { border-left: 4px solid #2563eb; }
.order-card.compact.stopped { border-left-color: #eab308; }
.order-card.compact.overdue { border-left-color: #ef4444; }
.order-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 68px 44px 44px;
  gap: 8px;
  align-items: start;
}
.order-main {
  min-width: 0;
}
.order-number {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}
.order-master {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cut-indicator {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #dbe4ee;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
}
.cut-indicator.cut-done {
  border-color: #86efac;
  background: #f0fdf4;
}
.cut-indicator.cut-pending {
  color: #94a3b8;
  background: #f8fafc;
}
.cut-indicator.cut-pending::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background: #ef4444;
  transform: rotate(-38deg);
  border-radius: 4px;
}
.order-tools {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.order-comment-btn {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #dbe4ee;
  background: #fff;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.order-comment-btn.has-comment {
  background: #fff7ed;
  border-color: #fdba74;
  color: #ea580c;
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.12);
}
.order-subline {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.25;
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
}
.order-stat {
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}
.order-stat.mono {
  font-variant-numeric: tabular-nums;
}
.left-meta,
.left-meta-item,
.left-meta-label,
.left-meta-value {
  display: none;
}

.timeline-cell {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: var(--panel);
}
.timeline-grid,
.day-header-grid {
  display: grid;
  position: relative;
  grid-auto-flow: column;
  grid-auto-columns: var(--day-width);
}

.day-cell,
.day-head {
  box-sizing: border-box;
  width: var(--day-width);
  min-width: var(--day-width);
  border-right: 1px solid #edf2f7;
}
.day-cell {
  height: var(--row-height);
  background: #fff;
}
.day-cell.weekend {
  background: rgb(250 246 238);
}
.day-cell.holiday {
  background: rgb(255 243 238);
  box-shadow: inset 0 0 0 999px rgba(239, 68, 68, 0.035);
}
.day-head.weekend {
  background: rgb(243 233 213);
}
.day-head.holiday {
  background: rgb(255 236 229);
  color: #9f1239;
}
.day-head.weekend.holiday {
  background: linear-gradient(180deg, rgb(255 236 229) 0%, rgb(243 233 213) 100%);
}
.day-head {
  height: 68px;
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}
.day-head .d {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 900;
}
.day-head.today {
  box-shadow: inset 0 -3px 0 #ef4444;
}
.day-head .w {
  display: block;
  font-size: 10px;
  margin-top: 3px;
  color: var(--muted);
}
.holiday-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 6px);
  margin-top: 3px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.12);
  color: #9f1239;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bar {
  position: absolute;
  top: var(--bar-top);
  height: var(--bar-height);
  min-width: 12px;
  border-radius: 10px;
  padding: 4px 8px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(15,23,42,0.18);
  border: 1px solid rgba(255,255,255,0.25);
}
.bar strong {
  font-size: 12px;
  font-weight: 900;
}
.bar small {
  opacity: .95;
  font-size: 10px;
  font-weight: 700;
}
.bar.acrylic { background: linear-gradient(135deg, #2563eb, #38bdf8); }
.bar.quartz { background: linear-gradient(135deg, #16a34a, #22c55e); }
.bar.stopped {
  background: linear-gradient(135deg, #eab308, #facc15);
  color: #3f2f00;
  border-color: rgba(146, 112, 0, 0.35);
}
.bar.overrun {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border-color: rgba(255,255,255,0.18);
  padding: 0;
  gap: 0;
}
.today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ef4444;
  opacity: 0.95;
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.field,
.textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}
.field:focus,
.textarea:focus {
  border-color: rgba(37,99,235,0.40);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
}
.textarea {
  min-height: 250px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.45;
  background: #f8fafc;
}

.table-wrap { overflow: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 12px 10px;
  vertical-align: top;
}
.table th {
  color: #334155;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table td { color: var(--text); font-size: 13px; }
.table tr:hover td { background: #f8fafc; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 14px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 900;
}
.section-subtitle {
  margin: -4px 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.help { color: var(--muted); font-size: 13px; }
.error-text { color: #b91c1c; min-height: 20px; font-size: 12px; font-weight: 800; }
.muted-box {
  padding: 10px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: #fafafa;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #0b1220 0%, #111827 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.login-card h1 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: var(--text);
  font-weight: 900;
}
.login-card .help {
  margin: 0 0 16px 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.login-card form { display: grid; gap: 12px; }
.login-card .field { padding: 10px 12px; font-size: 13px; }
.login-card .btn.primary {
  width: 100%;
  justify-content: center;
  border-radius: 12px;
  padding: 10px 12px;
}

@media (max-width: 1180px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  :root { --left-col: 310px; --day-width: 52px; }
  .page { padding: 12px; }
  .left-meta { display:flex; flex-wrap:wrap; }
  .timeline-form-row { flex-direction: column; align-items: stretch; }
  .field-wrap, .field-wrap--small { min-width: 0; width: 100%; }
}
@media (max-width: 720px) {
  :root { --left-col: 270px; --day-width: 48px; }
  .topbar { padding: 12px; }
  .brand h1 { font-size: 20px; }
  .kpi .value { font-size: 24px; }
  .page { padding: 10px; }
  .board-wrap { max-height: calc(100vh - 165px); }
}

.bar.clipped-left { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.bar.clipped-right { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }


html.fit-tight .left-help { display: none; }
html.fit-tight .order-card { padding: 3px 6px; }
html.fit-tight .order-number { font-size: 11px; }
html.fit-tight .order-master { font-size: 9px; }
html.fit-tight .order-subline { font-size: 9px; }
html.fit-tight .order-grid,
html.fit-tight .left-header-grid { grid-template-columns: minmax(0,1fr) 60px 38px 38px; }
html.fit-tight .order-stat,
html.fit-tight .left-stat-head { font-size: 10px; }
html.fit-tight .bar strong { font-size: 10px; }
html.fit-tight .bar small { display: none; }


.timeline-cell { min-width: 0; }


.board-split {
  display: grid;
  grid-template-columns: var(--left-col) minmax(0, 1fr);
  min-height: 100%;
}
.cards-pane {
  background: var(--panel-alt);
  border-right: 1px solid var(--line);
  min-width: var(--left-col);
  max-width: var(--left-col);
  max-height: calc(100vh - 165px);
  display: flex;
  flex-direction: column;
}
.cards-head {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 8px;
  min-height: 58px;
  background: var(--panel-alt);
  border-bottom: 1px solid var(--line);
}
.cards-body {
  flex: 1 1 auto;
  max-height: calc(100vh - 165px - 58px);
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cards-body::-webkit-scrollbar {
  display: none;
}
.card-row {
  min-height: calc(var(--row-height) + 6px);
  height: auto;
  padding: 4px 8px 8px;
  border-bottom: 0;
  background: var(--panel-alt);
  display: flex;
  align-items: stretch;
}
.card-row .order-card {
  width: 100%;
  height: 100%;
}
.cards-body {
  background: #f8fafc;
}
.timeline-pane {
  overflow: auto;
  min-width: 0;
  max-height: calc(100vh - 165px);
}
.timeline-content {
  min-height: 100%;
}
.timeline-head-row {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--panel-alt);
  border-bottom: 1px solid var(--line);
}
.timeline-row {
  position: relative;
  min-height: var(--row-height);
  height: auto;
  border-bottom: 1px solid var(--line);
}
.timeline-grid,
.bar-layer {
  min-height: inherit;
  height: 100%;
}
.day-cell {
  height: 100%;
  min-height: var(--row-height);
}


.timeline-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.timeline-strip .btn {
  padding: 5px 8px;
  min-height: 34px;
  font-size: 11px;
  white-space: nowrap;
}
.timeline-strip .field {
  min-height: 34px;
  padding: 6px 10px;
}
.compact-date {
  width: 142px;
  min-width: 142px;
}
.compact-zoom {
  width: 126px;
  min-width: 126px;
}


.order-main-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-width: 0;
}
.order-main-row .order-number {
  flex: 1 1 auto;
  min-width: 0;
}
.order-info-btn {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.order-info-btn:hover {
  background: #eef2ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.order-info-floating {
  position: fixed;
  z-index: 9999;
  min-width: 220px;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: none;
}
.order-info-floating.open {
  display: block;
}
.order-info-line {
  font-size: 12px;
  line-height: 1.35;
}
.order-info-line + .order-info-line {
  margin-top: 4px;
}
.order-subline {
  display: none !important;
}


.board-search {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.compact-search {
  width: 160px;
  height: 34px;
  padding: 0 10px;
}
.search-clear {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}
.topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}
.topbar-meta .badge {
  padding: 6px 8px;
  font-size: 11px;
}
.compact-switch button {
  padding: 6px 9px;
  font-size: 11px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
}


.comment-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
}
.comment-modal.open {
  display: block;
}
.comment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
}
.comment-modal-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.16);
  padding: 14px;
}
.comment-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.comment-modal-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.comment-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #dbe4ee;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}
.comment-modal-order {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.comment-modal-text {
  width: 100%;
  min-height: 120px;
  margin-top: 10px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
.comment-modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.comment-modal-btn {
  height: 34px;
  border-radius: 10px;
  border: 1px solid #dbe4ee;
  padding: 0 14px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}
.comment-modal-btn.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.comment-modal-btn.ghost {
  color: #475569;
}

@media (max-width: 1100px) {
  .compact-search { width: 120px; }
}

/* Автоперестройка timeline под выбранный период.
   Ширина ячеек теперь задаётся из app.js по фактическому периоду,
   чтобы сетка дней, красная линия и полосы заказов всегда совпадали. */
.timeline-content.period-short .day-head {
  height: 72px;
  font-size: 12px;
}
.timeline-content.period-short .day-head .d {
  font-size: 18px;
}
.timeline-content.period-wide .day-head {
  height: 62px;
  padding-left: 2px;
  padding-right: 2px;
  font-size: 10px;
}
.timeline-content.period-wide .holiday-mark,
.timeline-content.period-long .holiday-mark,
.timeline-content.period-very-long .holiday-mark {
  display: none;
}
.timeline-content.period-long .day-head,
.timeline-content.period-very-long .day-head {
  height: 54px;
  padding: 6px 1px;
  font-size: 9px;
}
.timeline-content.period-long .day-head .d,
.timeline-content.period-very-long .day-head .d {
  font-size: 12px;
  margin-bottom: 2px;
}
.timeline-content.period-long .day-head .w,
.timeline-content.period-very-long .day-head .w {
  display: none;
}
.timeline-content.period-very-long .day-head {
  font-size: 0;
}
.timeline-content.period-very-long .day-head .d {
  font-size: 11px;
}
