/* Layout only. ATLAS 3.3 LIGHT tokens stay as they are. */

.shift-form {
  display: grid !important;
  grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.7fr) minmax(160px, 0.8fr) !important;
  grid-template-areas:
    "date name color"
    "start end actions" !important;
  align-items: end;
  gap: 14px 16px;
}
.shift-form > label:nth-of-type(1) { grid-area: date; }
.shift-form > label.shift-name { grid-area: name; }
.shift-form > label:nth-of-type(3) { grid-area: start; }
.shift-form > label:nth-of-type(4) { grid-area: end; }
.shift-form > label.color-field { grid-area: color; }
.shift-form > .edit-form-actions { grid-area: actions; align-self: end; }
.shift-form .atlas-time-slot {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.shift-form input:not(.atlas-time-native),
.shift-form select.atlas-time-ru,
.shift-form .atlas-date-field input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 400 15px/1 Inter, system-ui, sans-serif;
  padding: 0 12px;
}
.shift-form .atlas-staff-palette { max-width: none; width: 100%; }
.shift-form .atlas-staff-palette summary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 400 15px/1 Inter, system-ui, sans-serif;
}
.shift-form .atlas-staff-palette summary i {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  align-self: center;
}
.shift-form .atlas-staff-palette summary .atlas-staff-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shift-form .atlas-staff-palette summary .atlas-staff-arrow {
  flex: 0 0 auto;
  margin-left: auto;
  line-height: 1;
}
.shift-form .edit-form-actions { display: flex; align-items: end; gap: 8px; min-height: 44px; }
.shift-form .edit-form-actions .primary {
  box-sizing: border-box;
  width: auto;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0;
  padding: 0 18px;
  border-radius: 10px;
  font: 750 15px/1 Inter, system-ui, sans-serif;
}
@media (max-width: 900px) {
  .shift-form {
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "date name"
      "start end"
      "color actions" !important;
  }
}
@media (max-width: 640px) {
  .shift-form {
    grid-template-columns: 1fr !important;
    grid-template-areas: "date" "name" "start" "end" "color" "actions" !important;
  }
}

.calendar-scroll:has(.department-calendar) { overflow: visible; }
[data-atlas-dept-pin] { box-shadow: 0 1px 0 var(--line); }
.department-calendar > .weekday { position: sticky; }

@media (min-width: 1051px) {
  .kpi-grid:not(:has(> :nth-child(4))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.atlas-v49-view[data-view="equipment"] .atlas-v49-body {
  font-family: Inter, system-ui, sans-serif;
}
.atlas-v49-view[data-view="equipment"] .equipment-grid,
.atlas-v49-view[data-view="equipment"] .atlas-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  align-items: stretch;
}
.atlas-v49-view[data-view="equipment"] .statistics-fact,
.atlas-v49-view[data-view="equipment"] .equipment-asset,
.atlas-v49-view[data-view="equipment"] .equipment-card,
.atlas-v49-view[data-view="equipment"] .atlas-v49-card {
  box-sizing: border-box;
  height: auto;
  min-height: 112px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: 400 14px/1.4 Inter, system-ui, sans-serif;
}
.atlas-v49-view[data-view="equipment"] .statistics-fact:not(.equipment-asset) { min-height: 0; }
.atlas-v49-view[data-view="equipment"] .equipment-grid { align-items: start; }
.atlas-v49-view[data-view="equipment"] .statistics-metric {
  box-sizing: border-box;
  display: grid;
  align-content: start;
  gap: 6px;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.atlas-v49-view[data-view="equipment"] .statistics-metric > span {
  display: block;
  color: var(--muted);
  font: 600 13px/1.3 Inter, system-ui, sans-serif;
}
.atlas-v49-view[data-view="equipment"] .statistics-metric > strong {
  display: block;
  color: var(--ink);
  font: 700 28px/1.1 Inter, system-ui, sans-serif;
}
.atlas-v49-view[data-view="equipment"] .equipment-asset strong {
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
}
.atlas-v49-view[data-view="equipment"] .equipment-asset small,
.atlas-v49-view[data-view="equipment"] .panel-note { font-size: 13px; color: var(--muted); }
.atlas-v49-view[data-view="equipment"] h1,
.atlas-v49-view[data-view="equipment"] h2,
.atlas-v49-view[data-view="equipment"] h3 {
  margin: 0 0 8px;
  font: 700 20px/1.2 Inter, system-ui, sans-serif;
}
.atlas-v49-view[data-view="equipment"] .panel-form,
.atlas-v49-view[data-view="equipment"] .equipment-card {
  min-height: 0;
}
.atlas-v49-view[data-view="equipment"] input:not([type="checkbox"]):not([type="radio"]),
.atlas-v49-view[data-view="equipment"] select,
.atlas-v49-view[data-view="equipment"] .atlas-v49-button,
.atlas-v49-view[data-view="equipment"] .atlas-v49-secondary,
.atlas-v49-view[data-view="equipment"] .atlas-v49-primary {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 400 14px/1 Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.atlas-v49-view[data-view="equipment"] .equipment-asset .atlas-v49-button { width: 100%; }

.booking-controls,
.schedule-toolbar,
.panel-controls,
.statistics-controls,
.panel-form {
  align-items: end;
}
.booking-controls input,
.booking-controls select,
.booking-controls .atlas-v49-button,
.booking-controls .atlas-v49-primary,
.booking-controls .atlas-v49-secondary,
.schedule-toolbar input,
.schedule-toolbar select,
.schedule-toolbar .atlas-v49-button,
.panel-controls input,
.panel-controls select,
.panel-controls .atlas-v49-button,
.panel-controls .atlas-v49-primary,
.panel-controls .atlas-v49-secondary,
.statistics-controls input,
.statistics-controls select,
.statistics-controls .atlas-v49-button,
.panel-form input:not([type="checkbox"]):not([type="radio"]),
.panel-form select,
.panel-form > .atlas-v49-button,
.panel-form > .atlas-v49-primary,
.panel-form > .atlas-v49-secondary,
.panel-form > button {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 400 14px/1 Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.booking-controls .atlas-v49-button,
.schedule-toolbar .atlas-v49-button,
.panel-controls .atlas-v49-button,
.statistics-controls .atlas-v49-button,
.panel-form > .atlas-v49-button,
.panel-form > button {
  font-weight: 650;
  padding: 0 16px;
}
.schedule-chip,
.schedule-more,
.schedule-times,
.schedule-times div,
.schedule-card-time,
.schedule-slot-time,
.schedule-fit-time,
.schedule-fit-mark strong,
.schedule-fit-mark span,
.schedule-load-num,
.schedule-load-count,
.schedule-load-mark,
.schedule-month-day strong,
.booking-slot-time,
.booking-day-more,
.booking-day-number,
.booking-day-count,
.atlas-date-ru,
.atlas-time-ru,
.atlas-datetime-ru,
.clinic-date,
.col-time,
.col-date,
.personal-hero .clinic-date,
.snake-score,
.kpi,
.kpi strong,
.atlas-finance-kpi strong {
  font-variant-numeric: tabular-nums;
}
.schedule-shell .schedule-toolbar input,
.schedule-shell .schedule-toolbar select,
.schedule-shell .schedule-step,
.schedule-shell .schedule-today,
.schedule-shell .schedule-hint,
.schedule-shell .schedule-extra > summary {
  font-size: 16px;
}
.schedule-shell .schedule-span-btn,
.schedule-shell .schedule-back-month {
  font-size: 18px;
}
input.atlas-date-ru,
input.atlas-time-ru,
input.atlas-datetime-ru {
  font-variant-numeric: tabular-nums;
}
.auth-brand .brand-mark {
  position: relative;
  overflow: hidden;
}
.auth-brand .creator-mark {
  right: 2px;
  bottom: 2px;
  width: 20px;
  height: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
}

.account-switcher.is-personal {
  border-color: #e8b39a;
  box-shadow: inset 0 0 0 2px #d9765e;
}
.account-switcher.is-work {
  border-color: #8fd0cc;
  box-shadow: inset 0 0 0 2px #2d7776;
}
.account-switcher label select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.atlas-mode-switch {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.atlas-mode-switch button {
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, .28);
  background: transparent;
  color: #e7eef8;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}
.atlas-mode-personal.is-current {
  background: #f8e6dc;
  border-color: #d9765e;
  color: #7a341f;
}
.atlas-mode-work.is-current {
  background: #d9f3f1;
  border-color: #2d7776;
  color: #134846;
}
