* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fc;
  --shell: #eef2fb;
  --surface: #ffffff;
  --surface-soft: #fafcff;
  --surface-muted: #f3f6fb;
  --line: #dde5f0;
  --line-strong: #d4ddea;
  --text: #121826;
  --muted: #8793a9;
  --muted-strong: #5f6e86;
  --shadow-shell: 0 10px 40px rgba(19, 32, 63, 0.04);
  --radius-shell: 30px;
  --radius-card: 20px;
  --radius-pill: 999px;
}

html,
body {
  min-height: 100%;
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

body[data-page="schedule"] {
  overflow: hidden;
}

body[data-page="doctors"] .topbar {
  display: none;
}

body.has-modal {
  overflow: hidden;
}

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

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

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 0;
  max-width: none;
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  padding: 0;
}

body.is-sidebar-collapsed .app-shell {
  grid-template-columns: 74px minmax(0, 1fr);
}

.content-shell,
.schedule-board,
.topbar,
.page-hero,
.panel {
  background: var(--shell);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-shell);
}

.content-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  padding: 0;
  background: #fff;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100vh;
}

body[data-page="schedule"] .page-content {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 24px;
  padding: 18px 22px;
}

.topbar-caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.topbar-date {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-hero,
.panel {
  border-radius: 24px;
}

.page-hero {
  padding: 22px 28px;
}

.page-hero.compact {
  display: block;
}

.page-hero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 12px 0 0;
  max-width: 760px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.notice {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(360px, calc(100vw - 24px));
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(215, 224, 238, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
  color: #1c2740;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.notice.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notice.is-hiding {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

.notice-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notice-copy strong {
  font-size: 12px;
  line-height: 1.1;
}

.notice-copy span {
  color: #607089;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.notice-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #f5f7fb;
  color: #73829a;
  cursor: pointer;
}

.notice-close svg {
  width: 14px;
  height: 14px;
}

.notice-success {
  border-color: rgba(191, 231, 211, 0.95);
}

.notice-success .notice-copy strong {
  color: #156347;
}

.notice-error {
  border-color: rgba(244, 210, 210, 0.98);
}

.notice-error .notice-copy strong {
  color: #a33d3d;
}

.schedule-stage {
  position: relative;
  min-height: 100vh;
}

body[data-page="schedule"] .schedule-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.schedule-board {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  border-radius: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.schedule-board-top,
.schedule-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-board-top {
  padding: 18px 28px 18px;
}

.schedule-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #92a0b6;
  font-size: 12px;
  font-weight: 700;
}

.schedule-breadcrumb strong {
  color: #1e1e1e;
}

.schedule-range-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.schedule-nav-controls,
.schedule-date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-date-nav {
  gap: 6px;
}

.calendar-nav-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 18px;
}

.schedule-toolbar-row {
  padding: 0 28px 0;
  gap: 14px;
  flex-wrap: nowrap;
  border-top: 0;
}

.schedule-chip-list,
.schedule-action-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 124px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #182338;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.schedule-date-nav .calendar-nav-button {
  width: 26px;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1f2c42;
  font-size: 28px;
  line-height: 1;
}

.schedule-day-view {
  display: flex;
  min-height: 0;
  overflow: hidden;
  padding-top: 10px;
}

.day-view-shell {
  --day-minute-px: 1.12px;
  --day-column-min-width: 170px;
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0;
  isolation: isolate;
}

.day-view-body {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 0;
}

.day-view-time-rail {
  position: relative;
  background: #fff;
  border-right: 1px solid var(--line);
}

.day-view-time-spacer {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 74px;
  background: #fff;
}

.day-view-time-label {
  position: absolute;
  left: 0;
  right: 0;
  padding-right: 12px;
  text-align: right;
  transform: translateY(-50%);
  color: #90a0b8;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.day-view-time-label.is-first {
  transform: none;
}

.day-view-grid-shell {
  position: relative;
  min-width: max-content;
}

.day-view-columns-head,
.day-view-columns-grid {
  display: grid;
  gap: 0;
  width: max-content;
  min-width: 100%;
}

.day-view-columns-head {
  position: sticky;
  top: 0;
  z-index: 6;
  padding-bottom: 0;
  background: linear-gradient(to bottom, #ffffff 0 78%, rgba(255, 255, 255, 0));
}

.day-view-column-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  min-height: 74px;
  padding: 7px 2px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  border-right: 0;
  text-align: left;
}

.day-view-columns-head > .day-view-column-head:last-child {
  border-right: 1px solid var(--line);
}

.day-view-column-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: color-mix(in srgb, var(--doctor-color, #dfe7ff) 20%, white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.day-view-column-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.day-view-column-info {
  display: grid;
  gap: 4px;
  min-width: 0;
  justify-items: start;
  align-items: start;
  text-align: left;
}

.day-view-column-info strong {
  font-size: 12px;
  line-height: 1.25;
}

.day-view-column-info span {
  color: #7d8da7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.day-view-column-grid {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background-color: var(--doctor-column-fill, #fcfdff);
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(94, 119, 164, 0.08) 0,
      rgba(94, 119, 164, 0.08) 1px,
      transparent 1px,
      transparent calc(60 * var(--day-minute-px))
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(94, 119, 164, 0.04) 0,
      rgba(94, 119, 164, 0.04) 1px,
      transparent 1px,
      transparent calc(30 * var(--day-minute-px))
    );
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  border-right: 0;
}

.day-view-columns-grid > .day-view-column-grid:last-child {
  border-right: 1px solid var(--line);
}

.day-view-slot-hint {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.day-view-slot-hint::before {
  content: "+";
  color: rgba(125, 141, 167, 0.56);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.day-view-slot-hint:hover,
.day-view-slot-hint:focus-visible {
  background: rgba(104, 117, 136, 0.06);
  outline: none;
}

.day-view-column-grid.is-drop-target {
  border-color: color-mix(in srgb, var(--doctor-color, #91a7ff) 48%, white);
  background-color: var(--doctor-column-fill-strong, var(--doctor-column-fill, #fafdff));
  box-shadow: inset 0 0 0 1px var(--doctor-column-outline, rgba(145, 167, 255, 0.22));
}

.day-view-drop-preview {
  position: absolute;
  left: 10px;
  right: 10px;
  border: 1px dashed color-mix(in srgb, var(--doctor-color, #5f6e86) 54%, white);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    color-mix(in srgb, var(--doctor-color, #dbe7ff) 18%, white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
  pointer-events: none;
  z-index: 3;
}

.day-view-event-card {
  position: absolute;
  left: 10px;
  right: 10px;
  z-index: 4;
  display: grid;
  gap: 4px;
  padding: 12px 12px 10px;
  border: 1px solid var(--event-border);
  border-radius: 18px;
  background: var(--event-tint);
  color: #202020;
  text-align: left;
  box-shadow: 0 10px 22px rgba(41, 60, 93, 0.05);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease,
    border-color 0.16s ease;
}

.day-view-event-card:hover {
  box-shadow: 0 14px 28px rgba(41, 60, 93, 0.08);
}

.day-view-event-card.is-dragging {
  opacity: 0.18;
  transform: scale(0.985);
}

.day-view-event-card.is-dragging-ghost {
  position: fixed;
  z-index: 80;
  margin: 0;
  opacity: 0.96;
  pointer-events: none;
  box-shadow: 0 24px 48px rgba(30, 45, 80, 0.18);
  transform: rotate(-1deg);
}

.day-view-event-service {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.day-view-event-time,
.day-view-event-client {
  color: #63738d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.day-view-event-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #515151;
  font-size: 9px;
  font-weight: 800;
}

.day-view-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: #111;
  z-index: 3;
  pointer-events: none;
}

.day-view-now-label {
  position: absolute;
  left: -58px;
  transform: translateY(-50%);
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
}

.day-view-empty {
  padding: 28px 10px;
  color: #74829a;
  font-size: 14px;
  font-weight: 700;
}

.schedule-chip,
.view-chip,
.pill-select select,
.button,
.button-dark,
.button-light {
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  color: #243146;
  font-size: 13px;
  font-weight: 700;
}

.schedule-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.schedule-chip.is-active {
  background: #0f0f10;
  border-color: #0f0f10;
  color: #fff;
}

.schedule-chip-icon {
  background: #fff;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pill-select {
  position: relative;
}

.pill-select select {
  padding-right: 28px;
  appearance: none;
}

.calendar-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.view-chip {
  min-height: 42px;
  padding: 0 16px;
  border-color: transparent;
  background: transparent;
  border-radius: var(--radius-pill);
}

.view-chip.is-active {
  background: #111;
  border-color: #111;
  box-shadow: none;
  color: #fff;
}

.button,
.button-dark,
.button-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.button-dark {
  border-color: #111;
  background: #111;
  color: #fff;
  box-shadow: 0 12px 24px rgba(17, 17, 17, 0.12);
}

.button-light {
  background: #fff;
}

.button-primary {
  border-color: #111;
  background: #111;
  color: #fff;
}

.button-secondary {
  background: #fff;
}

.button-ghost {
  background: #fff;
  color: #333;
}

.button-danger {
  border-color: #f1cfcf;
  background: #fff5f5;
  color: #bf4b4b;
}

.schedule-calendar-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-top: 4px;
  padding-inline: 0;
}

.calendar-root {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.fc {
  --fc-border-color: #e4ebf3;
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: transparent;
  --fc-today-bg-color: rgba(32, 52, 91, 0.03);
  font-size: 12px;
}

.fc .fc-scrollgrid {
  border: 0;
}

.fc {
  height: 100%;
}

.fc .fc-view-harness,
.fc .fc-scroller-harness,
.fc .fc-scroller-liquid-absolute,
.fc .fc-scroller {
  min-height: 0;
}

.fc .fc-scroller-liquid-absolute,
.fc .fc-scroller {
  overflow: auto !important;
}

.fc .fc-timegrid-slot {
  height: 30px;
}

.fc .fc-col-header-cell-cushion {
  padding: 0;
}

.fc .fc-timegrid-slot-label-cushion {
  color: #90a0b8;
  font-size: 11px;
  font-weight: 700;
}

.fc .fc-timegrid-axis-cushion {
  color: #90a0b8;
}

.fc .fc-timegrid-now-indicator-line {
  border-color: #111;
  border-width: 1.5px;
}

.fc .fc-timegrid-now-indicator-arrow {
  border-color: #111;
  color: #111;
}

.fc .fc-timegrid-divider {
  padding: 0;
}

.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell {
  color: #6e7e97;
}

.schedule-day-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #6f7f98;
  font-size: 12px;
  font-weight: 700;
}

.schedule-day-number {
  color: #111;
}

.schedule-day-header.is-today {
  background: #111;
  color: #fff;
}

.schedule-day-header.is-today .schedule-day-number {
  color: #fff;
}

.fc .fc-timegrid-col.fc-day-today {
  background: rgba(48, 73, 120, 0.025);
}

.fc .fc-event {
  margin: 0 6px;
  background: transparent !important;
  border: 0 !important;
}

.fc-event-card-inner {
  display: grid;
  gap: 4px;
  padding: 10px 11px 11px;
  border-radius: 16px;
  background: var(--event-tint);
  border: 1px solid var(--event-border);
  color: #2a2a2a;
  min-height: 100%;
  box-shadow: 0 8px 18px rgba(41, 60, 93, 0.05);
}

.fc-event-title-text {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.fc-event-time-text,
.fc-event-client {
  font-size: 10px;
  color: #63738d;
  font-weight: 700;
}

.fc-event-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.fc-event-chip {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  color: #4f4f4f;
  font-size: 9px;
  font-weight: 800;
}

.management-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 14px;
}

.settings-panel {
  padding: 22px;
}

.editor-panel,
.list-panel {
  padding: 22px;
}

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

.panel-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.panel-heading p {
  margin: 10px 0 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

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

.settings-table .table-time-input {
  min-width: 128px;
}

.settings-day-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #38465d;
  font-size: 13px;
  font-weight: 700;
}

.settings-day-toggle input {
  width: auto;
  min-height: 0;
}

.settings-actions {
  display: flex;
  justify-content: flex-start;
}

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

label {
  display: grid;
  gap: 7px;
  color: #666;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #fff;
  color: #1a1a1a;
}

textarea {
  min-height: 110px;
  padding-top: 14px;
  resize: vertical;
}

.switch {
  align-items: center;
}

.switch > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switch input {
  width: auto;
  min-height: 0;
}

.inline-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-search input {
  min-width: 260px;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #7a7a7a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.color-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.table-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
}

.doctors-page {
  padding: 12px 16px 16px;
}

.doctors-board {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border-radius: 0;
  border-color: var(--line);
  box-shadow: none;
  overflow: hidden;
}

.doctors-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.doctors-board-copy {
  min-width: 0;
}

.doctors-kicker {
  color: #92a0b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doctors-board-copy h1 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.doctors-board-copy p {
  margin: 8px 0 0;
  max-width: 520px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.doctors-board-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.doctors-board-tools .button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 12px;
}

.doctors-board-tools .button-dark {
  box-shadow: none;
}

.doctors-search input {
  min-width: 280px;
  min-height: 38px;
  background: #f7f9fc;
  border-color: #e3e9f2;
}

.doctors-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  color: #7b879b;
  font-size: 12px;
  font-weight: 700;
}

.doctors-list-meta strong,
.doctors-list-meta a {
  color: #1f2c42;
}

.doctors-list {
  display: grid;
}

.doctors-list-head,
.doctor-row {
  --doctor-color: #58c4b4;
  display: grid;
  grid-template-columns: minmax(240px, 1.52fr) minmax(138px, 0.72fr) minmax(124px, 0.6fr) minmax(68px, 0.32fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.doctors-list-head {
  color: #96a2b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #fbfcff;
  padding-block: 10px;
}

.doctors-list-head-actions {
  text-align: right;
}

.doctor-row {
  transition: background-color 0.18s ease;
}

.doctor-row:hover {
  background: #fbfcff;
}

.doctor-row.is-inactive {
  background:
    linear-gradient(0deg, rgba(245, 248, 252, 0.5), rgba(245, 248, 252, 0.5)),
    #fff;
}

.doctor-row:last-child {
  border-bottom: 0;
}

.doctor-primary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.doctor-avatar {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  overflow: hidden;
  background: #edf2f8;
}

.doctor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-primary-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.doctor-primary-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.doctor-primary-copy > span {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.doctor-pill-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.doctor-status-pill,
.doctor-color-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.doctor-status-pill.is-active {
  background: #f1f7f4;
  color: #2d7f5a;
}

.doctor-status-pill.is-hidden {
  background: #f4f6f9;
  color: #74849b;
}

.doctor-color-pill {
  background: color-mix(in srgb, var(--doctor-color) 12%, white);
  color: #40516d;
}

.doctor-color-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--doctor-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--doctor-color) 14%, white);
}

.doctor-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.doctor-meta-label {
  color: #96a2b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doctor-meta-value {
  color: #1d2a41;
  font-size: 13px;
  line-height: 1.3;
}

.doctor-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.doctor-actions .button {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 11px;
}

.doctors-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 52px 30px 58px;
  text-align: center;
}

.doctors-empty-state strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.doctors-empty-state span {
  max-width: 460px;
  color: var(--muted-strong);
  line-height: 1.55;
}

.doctor-drawer {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: block;
  padding: 0;
}

.doctor-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.24);
  backdrop-filter: blur(2px);
}

.doctor-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(460px, 100vw);
  padding: 18px 18px 22px;
  background: #fff;
  box-shadow: -20px 0 48px rgba(12, 18, 32, 0.12);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.doctor-drawer-head h2 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.doctor-drawer-head p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.55;
}

.doctor-drawer-card {
  --doctor-color: #58c4b4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.98)),
    color-mix(in srgb, var(--doctor-color) 7%, white);
}

.doctor-drawer-card-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  overflow: hidden;
  background: #ecf1f7;
  color: #223047;
  font-size: 13px;
  font-weight: 800;
}

.doctor-drawer-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-drawer-card-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.doctor-drawer-card-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.doctor-drawer-card-copy span {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.doctor-drawer-card-swatch {
  width: 10px;
  height: 34px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--doctor-color);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--doctor-color) 12%, white);
}

.doctor-drawer-form {
  flex: 1 1 auto;
  align-content: start;
}

.doctor-drawer-form label {
  gap: 6px;
  font-size: 12px;
}

.doctor-drawer-form input,
.doctor-drawer-form select,
.doctor-drawer-form textarea {
  min-height: 42px;
  border-radius: 14px;
}

.doctor-drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.appointment-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: block;
  padding: 0;
}

.appointment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.28);
  backdrop-filter: blur(2px);
}

.appointment-modal-card {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(560px, 100vw);
  padding: 24px 24px 28px;
  border-radius: 0;
  background: #fff;
  box-shadow: -20px 0 48px rgba(12, 18, 32, 0.12);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.appointment-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.appointment-modal-card .stack-form {
  flex: 1 1 auto;
  align-content: start;
}

.appointment-modal-card .delete-form {
  margin-top: 16px;
}

.modal-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.appointment-modal-head h2 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.05;
}

.appointment-modal-head p {
  margin: 10px 0 0;
  color: var(--muted-strong);
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

body.is-dragging-appointment,
body.is-dragging-appointment * {
  cursor: grabbing !important;
}

@media (max-width: 1180px) {
  .schedule-toolbar-row,
  .topbar,
  .panel-heading,
  .management-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .management-layout {
    gap: 14px;
  }

  .schedule-action-strip,
  .schedule-chip-list {
    width: 100%;
  }

  .doctors-board-head {
    display: grid;
    align-items: stretch;
  }

  .doctors-board-tools {
    margin-left: 0;
    justify-content: space-between;
  }

  .doctors-list-head,
  .doctor-row {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 0.8fr));
  }

  .doctor-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.is-sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .content-shell {
    border-radius: 0;
  }

  .schedule-board,
  .page-hero,
  .panel,
  .topbar {
    border-radius: 0;
  }

  .doctors-list-head {
    display: none;
  }

  .doctor-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .page-hero h1,
  .topbar-date,
  .appointment-modal-head h2 {
    font-size: 32px;
  }

  .calendar-root {
    min-height: 0;
  }

  .schedule-toolbar-row,
  .schedule-board-top {
    align-items: flex-start;
  }

  .inline-search {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-search input {
    min-width: 0;
  }

  .doctors-page {
    padding: 0;
  }

  .doctors-board-head,
  .doctors-list-meta,
  .doctor-row {
    padding-inline: 18px;
  }

  .doctors-board-copy h1 {
    font-size: 26px;
  }

  .doctors-board-tools,
  .doctors-search,
  .doctor-row,
  .doctor-actions,
  .doctor-drawer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .doctors-search {
    gap: 10px;
  }

  .doctor-row {
    gap: 14px;
  }

  .doctor-meta,
  .doctor-actions {
    justify-self: stretch;
  }

  .doctor-drawer-panel {
    width: 100vw;
    padding-inline: 18px;
  }

  .day-view-body {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .day-view-column-head,
  .day-view-column-grid {
    min-width: 180px;
  }

  .day-view-now-label {
    left: -50px;
    padding: 0 6px;
    font-size: 9px;
  }

  .schedule-board-top,
  .schedule-toolbar-row {
    padding-inline: 16px;
  }

  .appointment-modal-card {
    width: 100vw;
    padding-inline: 18px;
  }
}

:root {
  --bg: #ffffff;
  --shell: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --surface-muted: #f5f7fb;
  --line: #eaedf2;
  --line-strong: #dde3eb;
  --text: #15171c;
  --muted: #969ba6;
  --muted-strong: #565b66;
  --shadow-shell: none;
  --radius-shell: 0;
  --radius-card: 18px;
}

body {
  background: #fff;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  height: auto;
  background: #fff;
}

body.is-sidebar-collapsed .app-shell {
  grid-template-columns: 74px minmax(0, 1fr);
}

.content-shell,
.shell-toolbar,
.panel {
  background: #fff;
  border: 0;
  box-shadow: none;
}

.content-shell {
  min-height: 100vh;
  background: #fff;
}

.shell-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 26px 14px;
}

.shell-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.shell-crumbs a {
  color: inherit;
  text-decoration: none;
}

.shell-crumbs-sep {
  display: grid;
  place-items: center;
  color: #c4c8d0;
}

.shell-crumbs-sep svg {
  width: 14px;
  height: 14px;
}

.shell-crumbs .is-current {
  color: var(--muted-strong);
  font-weight: 600;
}

.shell-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted-strong);
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: #f8faff;
  color: var(--text);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.page-content {
  min-height: 0;
  padding: 0 14px 18px;
  gap: 16px;
}

.notice {
  top: 16px;
  right: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(17, 19, 23, 0.1);
}

.entity-page {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.entity-board {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.entity-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.entity-board-copy {
  min-width: 0;
}

.entity-board-copy h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.entity-board-copy p {
  margin: 8px 0 0;
  max-width: 560px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.5;
}

.entity-board-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.entity-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 340px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.entity-search svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: 0 0 auto;
}

.entity-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
}

.entity-search input::placeholder {
  color: var(--muted);
}

.entity-search-reset {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.entity-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  color: #7d8390;
  font-size: 12px;
  font-weight: 600;
}

.entity-meta-strip strong {
  color: var(--text);
}

.entity-list {
  display: grid;
}

.entity-list-head,
.entity-row {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.entity-list-head {
  background: #fbfcfe;
  color: #96a2b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-block: 10px;
}

.entity-list-head-actions {
  text-align: right;
}

.entity-list-doctors .entity-list-head,
.entity-list-doctors .entity-row {
  grid-template-columns: minmax(240px, 1.52fr) minmax(138px, 0.72fr) minmax(124px, 0.6fr) minmax(72px, 0.32fr) auto;
}

.entity-list-clients .entity-list-head,
.entity-list-clients .entity-row {
  grid-template-columns: minmax(260px, 1.6fr) minmax(138px, 0.7fr) minmax(142px, 0.7fr) minmax(96px, 0.38fr) auto;
}

.entity-list-services .entity-list-head,
.entity-list-services .entity-row {
  grid-template-columns: minmax(220px, 1.45fr) minmax(130px, 0.7fr) minmax(104px, 0.42fr) minmax(116px, 0.48fr) minmax(116px, 0.48fr) auto;
}

.entity-row {
  transition: background-color 0.18s ease;
}

.entity-row:hover {
  background: #fbfcff;
}

.entity-row:last-child {
  border-bottom: 0;
}

.entity-primary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.entity-avatar {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f2efff, #e8f0ff);
  color: #5b4bbd;
  font-size: 13px;
  font-weight: 800;
}

.entity-avatar-large {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 15px;
}

.entity-primary-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.entity-primary-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.entity-primary-copy > span {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.entity-inline-note {
  color: #7c8596;
  font-size: 11.5px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.entity-cell-label {
  color: #96a2b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entity-cell strong {
  font-size: 13px;
  line-height: 1.35;
}

.entity-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.entity-actions .button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11.5px;
}

.entity-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 52px 30px 58px;
  text-align: center;
}

.entity-empty-state strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.entity-empty-state span {
  max-width: 440px;
  color: var(--muted-strong);
  line-height: 1.55;
}

.entity-chip-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
  background: #8ad2a2;
  box-shadow: 0 0 0 5px rgba(138, 210, 162, 0.18);
}

.entity-chip-dot.is-muted {
  background: #bfc7d6;
  box-shadow: 0 0 0 5px rgba(191, 199, 214, 0.18);
}

.button-dark,
.button-light,
.button-primary,
.button-ghost,
.button-danger {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.button-dark {
  background: #141519;
  color: #fff;
  border: 0;
  box-shadow: 0 10px 24px -12px rgba(17, 19, 23, 0.6);
}

.button-light,
.button-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: #15171c;
}

.button-primary {
  border: 0;
  background: #141519;
  color: #fff;
}

.button-danger {
  border: 0;
  background: #fdecea;
  color: #d6453b;
}

.button-light:hover,
.button-ghost:hover {
  border-color: #d7dce4;
  background: #fff;
}

.button-dark:hover,
.button-primary:hover {
  background: #000;
}

.entity-drawer,
.doctor-drawer {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: block;
}

.entity-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.24);
  backdrop-filter: blur(2px);
}

.entity-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(460px, 100vw);
  padding: 20px 20px 22px;
  background: #fff;
  box-shadow: -20px 0 48px rgba(12, 18, 32, 0.12);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.entity-drawer-head h2 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.entity-drawer-head p {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.55;
}

.entity-drawer-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
}

.entity-drawer-card-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.entity-drawer-card-copy strong {
  font-size: 14px;
  line-height: 1.2;
}

.entity-drawer-card-copy span {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
}

.entity-drawer-form {
  flex: 1 1 auto;
  align-content: start;
}

.entity-drawer-form label {
  gap: 6px;
  font-size: 12px;
}

.entity-drawer-form input,
.entity-drawer-form select,
.entity-drawer-form textarea {
  min-height: 42px;
  border-radius: 14px;
}

.entity-drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.doctor-avatar {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  overflow: hidden;
  background: #edf2f8;
}

.doctor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-row {
  --doctor-color: #58c4b4;
}

.doctor-row.is-inactive,
.service-row.is-inactive {
  background: linear-gradient(0deg, rgba(245, 248, 252, 0.5), rgba(245, 248, 252, 0.5)), #fff;
}

.doctor-pill-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.doctor-status-pill,
.doctor-color-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.doctor-status-pill.is-active {
  background: #f1f7f4;
  color: #2d7f5a;
}

.doctor-status-pill.is-hidden {
  background: #f4f6f9;
  color: #74849b;
}

.doctor-color-pill {
  background: color-mix(in srgb, var(--doctor-color) 12%, white);
  color: #40516d;
}

.doctor-color-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--doctor-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--doctor-color) 14%, white);
}

.doctor-drawer-card-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  overflow: hidden;
  background: #ecf1f7;
  color: #223047;
  font-size: 13px;
  font-weight: 800;
}

.doctor-drawer-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-drawer-card-swatch {
  width: 10px;
  height: 34px;
  margin-left: auto;
  border-radius: 999px;
  background: var(--doctor-color);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--doctor-color) 12%, white);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-grid-card {
  display: grid;
}

.settings-grid-head {
  grid-template-columns: minmax(160px, 1.15fr) minmax(128px, 0.6fr) minmax(128px, 0.48fr) minmax(128px, 0.48fr);
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.15fr) minmax(128px, 0.6fr) minmax(128px, 0.48fr) minmax(128px, 0.48fr);
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-day-copy {
  display: grid;
  gap: 4px;
}

.settings-day-copy strong {
  font-size: 14px;
}

.settings-day-copy span {
  color: var(--muted-strong);
  font-size: 12px;
}

.settings-day-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.settings-day-toggle input {
  width: 16px;
  height: 16px;
}

.table-time-input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}

.entity-board-actions {
  display: flex;
  justify-content: flex-start;
  padding: 0 22px 22px;
}

.analytics-board-tools {
  gap: 12px;
}

.analytics-period-chip {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.analytics-period-chip span {
  color: #96a2b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analytics-period-chip strong {
  font-size: 13px;
  line-height: 1.1;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.analytics-kpi-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.analytics-kpi-label {
  color: #96a2b6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analytics-kpi-card strong {
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.analytics-kpi-card small {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 12px;
  padding: 18px 22px 0;
}

.analytics-grid-secondary {
  padding-top: 12px;
}

.analytics-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.analytics-panel-feed {
  margin: 12px 22px 22px;
}

.analytics-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.analytics-panel-head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.analytics-panel-head p {
  margin: 6px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
}

.analytics-panel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f9fc;
  color: #6f7c90;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.analytics-empty {
  padding: 18px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

.analytics-status-list,
.analytics-leader-list,
.analytics-service-list,
.analytics-weekday-list,
.analytics-feed-list {
  display: grid;
}

.analytics-status-row,
.analytics-leader-row,
.analytics-service-row,
.analytics-weekday-row,
.analytics-feed-row {
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
}

.analytics-status-row + .analytics-status-row,
.analytics-leader-row + .analytics-leader-row,
.analytics-service-row + .analytics-service-row,
.analytics-weekday-row + .analytics-weekday-row,
.analytics-feed-row + .analytics-feed-row {
  border-top: 1px solid var(--line);
}

.analytics-status-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.85fr) minmax(120px, 1.35fr) auto;
}

.analytics-status-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.analytics-status-copy strong {
  font-size: 13px;
}

.analytics-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #c5ccda;
  box-shadow: 0 0 0 4px rgba(197, 204, 218, 0.18);
}

.analytics-status-dot.is-success {
  background: #57b98a;
  box-shadow: 0 0 0 4px rgba(87, 185, 138, 0.18);
}

.analytics-status-dot.is-accent {
  background: #7367f0;
  box-shadow: 0 0 0 4px rgba(115, 103, 240, 0.14);
}

.analytics-status-dot.is-danger {
  background: #e46f6f;
  box-shadow: 0 0 0 4px rgba(228, 111, 111, 0.14);
}

.analytics-status-bar,
.analytics-weekday-bar {
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.analytics-status-bar span,
.analytics-weekday-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #c5ccda;
}

.analytics-status-bar span.is-success {
  background: #57b98a;
}

.analytics-status-bar span.is-accent {
  background: #7367f0;
}

.analytics-status-bar span.is-danger {
  background: #e46f6f;
}

.analytics-status-meta,
.analytics-leader-metric {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
}

.analytics-status-meta strong,
.analytics-leader-metric strong,
.analytics-weekday-meta strong {
  font-size: 13px;
  line-height: 1.1;
}

.analytics-status-meta span,
.analytics-leader-metric span,
.analytics-weekday-copy span,
.analytics-doctor-copy span,
.analytics-service-copy span,
.analytics-feed-copy span,
.analytics-feed-time span,
.analytics-feed-doctor span {
  color: var(--muted-strong);
  font-size: 11.5px;
  line-height: 1.4;
}

.analytics-leader-row,
.analytics-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
}

.analytics-doctor-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.analytics-doctor-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--doctor-color) 18%, white);
  color: #243245;
  font-size: 12px;
  font-weight: 800;
}

.analytics-doctor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.analytics-doctor-copy,
.analytics-service-copy,
.analytics-weekday-copy,
.analytics-feed-copy,
.analytics-feed-time {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.analytics-doctor-copy strong,
.analytics-service-copy strong,
.analytics-weekday-copy strong,
.analytics-feed-copy strong,
.analytics-feed-time strong,
.analytics-feed-doctor {
  font-size: 13px;
  line-height: 1.2;
}

.analytics-weekday-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
}

.analytics-weekday-bar span {
  background: linear-gradient(90deg, #7367f0 0%, #8e85fb 100%);
}

.analytics-feed-row {
  display: grid;
  grid-template-columns: minmax(116px, 0.72fr) minmax(0, 1fr) minmax(130px, 0.8fr);
}

.analytics-feed-time span.is-success {
  color: #2f8a63;
}

.analytics-feed-time span.is-accent {
  color: #5b52cb;
}

.analytics-feed-time span.is-danger {
  color: #d05757;
}

.analytics-feed-doctor {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  min-width: 0;
}

.analytics-feed-doctor-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 8px;
}

@media (max-width: 1180px) {
  .entity-board-head,
  .entity-meta-strip,
  .entity-list-head,
  .entity-row,
  .settings-row,
  .entity-board-actions {
    padding-inline: 18px;
  }

  .entity-board-head {
    align-items: flex-start;
  }

  .entity-board-tools {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .entity-search {
    min-width: min(100%, 360px);
  }

  .analytics-kpi-grid,
  .analytics-grid {
    padding-inline: 18px;
  }

  .analytics-panel-feed {
    margin-inline: 18px;
    margin-bottom: 18px;
  }

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

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.is-sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .entity-list-head {
    display: none;
  }

  .entity-list-doctors .entity-row,
  .entity-list-clients .entity-row,
  .entity-list-services .entity-row,
  .settings-row,
  .settings-grid-head {
    grid-template-columns: 1fr;
  }

  .entity-cell,
  .entity-actions {
    justify-self: stretch;
  }

  .entity-actions {
    justify-content: flex-start;
  }

  .shell-toolbar {
    padding-inline: 18px;
  }

  .page-content {
    padding-inline: 0;
    padding-bottom: 0;
  }

  .entity-board {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .entity-drawer-panel {
    width: 100vw;
    padding-inline: 18px;
  }

  .analytics-kpi-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-status-row,
  .analytics-leader-row,
  .analytics-service-row,
  .analytics-weekday-row,
  .analytics-feed-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .analytics-status-meta,
  .analytics-leader-metric,
  .analytics-feed-doctor {
    justify-items: start;
    justify-self: start;
    text-align: left;
  }

  .analytics-panel-feed {
    margin: 12px 18px 18px;
  }
}

@media (max-width: 640px) {
  .analytics-kpi-grid {
    grid-template-columns: 1fr;
  }
}
