:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --border: #dfe5ee;
  --primary: #2458d3;
  --primary-dark: #1948b8;
  --success: #167a43;
  --danger: #b42318;
  --available-bg: #edf9f1;
  --booked-bg: #fff0ef;
  --blocked-bg: #f1f2f4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
.shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.admin-shell { max-width: 1400px; margin: 0 auto; padding: 18px 16px 32px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 10px 30px rgba(16,24,40,.06); padding: 24px; }
.booking-card { width: min(100%, 650px); }
.narrow { width: min(100%, 420px); margin: 80px auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .11em; font-size: 12px; font-weight: 800; color: var(--primary); }
h1 { margin: 6px 0 8px; font-size: clamp(28px, 5vw, 42px); line-height: 1.08; }
h2 { margin: 0 0 16px; font-size: 21px; }
.lead, .muted { color: var(--muted); }
.lead { margin: 0 0 24px; line-height: 1.55; }
.job-today { margin: -12px 0 18px; padding: 10px 12px; border-radius: 10px; background: #eef4ff; color: var(--primary-dark); font-size: 13px; font-weight: 700; }
.nova-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.nova-choice-button { display: grid; gap: 2px; min-height: 126px; place-content: center; border: 2px solid #e3dfff; border-radius: 18px; background: linear-gradient(145deg, #fff, #f3f0ff); color: var(--primary); box-shadow: 0 10px 24px rgba(60,45,130,.08); }
.nova-choice-button:hover, .nova-choice-button:focus-visible { border-color: var(--primary); background: #eeeaff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(60,45,130,.16); }
.nova-choice-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.nova-choice-number { font-size: 34px; line-height: 1; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-size: 14px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid #cfd7e4; border-radius: 11px; padding: 12px 13px; font: inherit; color: inherit; background: #fff; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(36,88,211,.12); }
textarea { resize: vertical; }
.date-field { position: relative; display: flex; align-items: stretch; }
.date-field > #date { padding-right: 50px; }
.calendar-button { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 44px; display: grid; place-items: center; border-left: 1px solid #cfd7e4; border-radius: 0 10px 10px 0; background: #f8fafc; font-size: 17px; overflow: hidden; cursor: pointer; }
.calendar-button input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
button, .button-link { border: 0; border-radius: 11px; padding: 12px 16px; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; }
.primary { background: var(--primary); color: #fff; }
.primary:hover { background: var(--primary-dark); }
.secondary { background: #eef2f7; color: var(--text); }
.secondary:hover { background: #e2e8f0; }
.small { padding: 9px 12px; }
.label-row, .toolbar, .admin-header, .header-actions, .legend, .slot-main, .slot-actions { display: flex; align-items: center; }
.label-row { justify-content: space-between; font-size: 14px; font-weight: 700; }
.slots { display: grid; grid-template-columns: repeat(auto-fill,minmax(82px,1fr)); gap: 9px; }
.time-list { min-height: 150px; padding: 5px; overflow-y: auto; }
.time-list option { padding: 8px 10px; border-radius: 6px; font-weight: 700; }
.time-list option:checked { background: var(--primary); color: #fff; }
.slot-btn { background: #fff; border: 1px solid var(--border); color: var(--text); padding: 11px 8px; }
.slot-btn:hover { border-color: var(--primary); }
.slot-btn.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.slot-btn:disabled { cursor: not-allowed; background: #f3f4f6; color: #a1a7b1; opacity: .8; }
.message { min-height: 20px; font-size: 14px; color: var(--danger); }
.message.ok { color: var(--success); }
.hidden { display: none !important; }
.confirmation { text-align: center; padding: 28px 0 4px; }
.success-icon { width: 58px; height: 58px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: #eaf8ef; color: var(--success); font-size: 30px; font-weight: 900; }
.admin-header { justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.admin-header h1 { margin-bottom: 0; font-size: clamp(26px, 3vw, 34px); }
.header-actions { gap: 10px; flex-wrap: wrap; }
.header-actions button, .header-actions .button-link { padding: 9px 11px; font-size: 12px; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 14px; align-items: start; }
.admin-grid .card { padding: 16px; border-radius: 14px; }
.side-stack { display: grid; gap: 14px; }
.availability-card h2 { margin: 3px 0 4px; }
.settings-context { margin: 0 0 12px; font-size: 12px; }
.availability-form { gap: 9px; }
.availability-form label { font-size: 12px; }
.availability-form input, .availability-form select { padding: 8px 9px; }
.availability-form .message { min-height: 17px; font-size: 12px; }
.settings-actions { display: flex; justify-content: flex-end; gap: 8px; }
.admin-users-card h2 { margin: 3px 0 10px; }
.admin-user-form { gap: 7px; }
.admin-user-form input { padding: 8px 9px; font-size: 12px; }
.admin-user-form .message { min-height: 16px; font-size: 11px; }
.admin-users { display: grid; gap: 5px; margin-top: 10px; }
.admin-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; font-size: 12px; font-weight: 800; }
.admin-user-current { color: var(--muted); font-size: 10px; font-weight: 600; }
.admin-users-card h3 { margin: 16px 0 8px; font-size: 14px; }
.counter-reset { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 16px; border: 1px solid #f1d4d1; border-radius: 14px; background: #fff7f6; }
.counter-reset h3 { margin: 0 0 4px; color: var(--danger); }
.counter-reset p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.counter-reset button { flex: 0 0 auto; }
.stats-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stats-heading h2 { margin-top: 4px; }
.stats-intro { margin: -6px 0 14px; font-size: 13px; }
.name-stats { display: grid; gap: 7px; max-height: calc(100vh - 235px); overflow-y: auto; scrollbar-gutter: stable; }
.name-stat { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--border); border-radius: 9px; background: #f8fafc; }
.name-stat-name { min-width: 0; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-stat-last { margin-top: 2px; color: var(--muted); font-size: 11px; }
.name-stat-count { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 900; }
.toolbar { gap: 8px; margin-bottom: 8px; }
.nova-switcher { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 12px; background: #e4e6ef; }
.nova-option { min-width: 64px; padding: 7px 9px; border-radius: 9px; background: transparent; color: #667085; font-size: 12px; box-shadow: none; }
.nova-option span { margin-right: 2px; font-size: 9px; font-weight: 700; opacity: .72; }
.nova-option:hover { background: rgba(255,255,255,.65); color: #344054; }
.nova-option.active { background: linear-gradient(135deg, #6d4aff, #854cff); color: #fff; box-shadow: 0 5px 12px rgba(109,74,255,.25); }
.date-navigator { display: inline-flex; align-items: stretch; gap: 0; min-height: 40px; padding: 3px; border: 1px solid #dfe2eb; border-radius: 13px; background: #fff; box-shadow: 0 3px 10px rgba(35,31,76,.06); }
.date-navigator .admin-date-field { width: 148px; flex-basis: 148px; }
.date-navigator .admin-date-field > input { height: 100%; padding: 7px 42px 7px 12px; border: 0; border-radius: 8px; background: #f6f5fb; color: #282641; font-size: 13px; font-weight: 800; text-align: center; box-shadow: none; }
.date-navigator .calendar-button { top: 0; right: 0; bottom: 0; width: 38px; border: 0; border-radius: 0 8px 8px 0; background: transparent; color: #6d4aff; }
.date-arrow, .today-button { border-radius: 8px; background: transparent; color: #667085; box-shadow: none; }
.date-arrow { width: 34px; padding: 0; font-size: 25px; font-weight: 500; line-height: 1; }
.today-button { padding: 0 10px; font-size: 11px; }
.date-arrow:hover, .today-button:hover { background: #eeebff; color: #5a3de0; }
.toolbar input, .toolbar select { padding: 9px 10px; }
.toolbar input { max-width: 180px; }
.toolbar .admin-date-field { width: 150px; flex: 0 0 150px; }
.toolbar .admin-date-field > input { max-width: none; padding: 9px 46px 9px 10px; }
.toolbar select { width: auto; min-width: 120px; font-weight: 800; }
.icon-btn { background: #eef2f7; width: 38px; height: 38px; padding: 0; font-size: 18px; }
.legend { gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin: 5px 0 10px; }
.drag-hint { color: var(--muted); font-size: 12px; margin: 0 0 5px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.available { background: #35a767; }.dot.booked { background: #e45d54; }.dot.blocked { background: #737b89; }
.admin-grid > .card { position: sticky; top: 12px; }
.day-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  max-height: calc(100vh - 190px);
  min-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 5px;
  scrollbar-gutter: stable;
}
.admin-slot { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 6px; align-items: center; min-height: 44px; padding: 6px 7px; border-radius: 8px; border: 1px solid var(--border); }
.admin-slot.available { background: var(--available-bg); }
.admin-slot.available { cursor: crosshair; user-select: none; touch-action: none; }
.admin-slot.available.drag-selected { background: #cfeeda; border-color: #35a767; box-shadow: inset 0 0 0 1px #35a767; }
.admin-slot.booked { background: var(--booked-bg); }
.admin-slot.booked { cursor: pointer; }
.admin-slot.booked:focus-visible { outline: 3px solid rgba(109,74,255,.32); outline-offset: 2px; }
.admin-slot.blocked { background: var(--blocked-bg); }
.admin-slot.blocked { cursor: crosshair; user-select: none; touch-action: none; }
.admin-slot.blocked.drag-selected { background: #dce7f8; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.time { font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
.slot-title { font-size: 12px; font-weight: 800; }
.slot-description { font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-actions { gap: 8px; }
.mini-btn { padding: 6px 7px; font-size: 10px; }
.danger { background: #fee4e2; color: var(--danger); }
.app-dialog { width: min(calc(100% - 32px), 440px); padding: 0; border: 0; border-radius: 16px; color: var(--text); box-shadow: 0 24px 70px rgba(16,24,40,.24); }
.app-dialog::backdrop { background: rgba(16,24,40,.5); backdrop-filter: blur(2px); }
.dialog-content { padding: 24px; }
.dialog-content h2 { margin: 0 0 8px; }
.dialog-content p { margin: 0; color: var(--muted); line-height: 1.5; }
.appointment-dialog { width: min(calc(100% - 28px), 560px); }
.appointment-dialog h2 { margin-top: 6px; }
.appointment-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0 0; }
.appointment-details > div { padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #f8f9fc; }
.appointment-details dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.appointment-details dd { margin: 0; font-size: 14px; font-weight: 750; }
.appointment-details .appointment-description { grid-column: 1 / -1; }
.appointment-description dd { max-height: 280px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 500; line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.dialog-confirm-small { padding: 6px 10px; font-size: 11px; align-self: center; }
.dialog-actions.evasive-actions { position: relative; display: block; min-height: 150px; }
.evasive-actions #bookingDialogCancel { position: absolute; left: 0; bottom: 0; }
.evasive-actions .evasive-button { position: absolute; right: auto; bottom: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-row { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.check-row input { width: auto; }
@media (max-width: 850px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-header { align-items: flex-start; flex-direction: column; }
  .admin-grid > .card { position: static; }
  .day-slots { max-height: 65vh; }
}
@media (min-width: 851px) and (max-width: 1150px) {
  .day-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .shell { padding: 12px; align-items: start; }
  .booking-card { margin-top: 8px; padding: 20px; }
  .admin-shell { padding: 18px 10px 40px; }
  .card { padding: 18px; border-radius: 14px; }
  .day-slots { grid-template-columns: 1fr; max-height: 65vh; }
  .admin-slot { grid-template-columns: 52px 1fr auto; }
  .two-col { grid-template-columns: 1fr; }
}

/* Modern visual refresh */
:root {
  --bg: #f5f7fb;
  --card: rgba(255, 255, 255, .92);
  --text: #172033;
  --muted: #697386;
  --border: #e2e7f0;
  --primary: #5b5bd6;
  --primary-dark: #4747b8;
  --success: #16865b;
  --danger: #c2413b;
  --available-bg: #f1fbf6;
  --booked-bg: #fff5f4;
  --blocked-bg: #f5f6f8;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 5%, rgba(91, 91, 214, .10), transparent 30rem),
    radial-gradient(circle at 92% 95%, rgba(34, 197, 153, .08), transparent 28rem),
    var(--bg);
  letter-spacing: -.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 20;
  background: linear-gradient(90deg, #5b5bd6, #8b5cf6, #22c599);
}

.shell { padding: 34px 20px; }
.admin-shell { padding-top: 24px; }

.card {
  border-color: rgba(221, 227, 238, .9);
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(30, 41, 59, .08), 0 2px 8px rgba(30, 41, 59, .03);
  backdrop-filter: blur(14px);
}

.booking-card { width: min(100%, 680px); padding: 34px; }
.eyebrow { color: var(--primary); font-size: 11px; letter-spacing: .16em; }
h1 { letter-spacing: -.045em; font-weight: 780; }
h2 { letter-spacing: -.025em; }
.lead { max-width: 54ch; }

label { color: #344054; font-size: 13px; }
input, textarea, select {
  border-color: #d8deea;
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:hover, textarea:hover, select:hover { border-color: #b9c2d2; }
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 91, 214, .12);
}

button, .button-link {
  border-radius: 12px;
  font-weight: 750;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
button:not(:disabled):active, .button-link:active { transform: translateY(1px); }
.primary {
  background: linear-gradient(135deg, #6565dd, #5151c7);
  box-shadow: 0 7px 18px rgba(91, 91, 214, .22);
}
.primary:hover { background: linear-gradient(135deg, #5b5bd6, #4444b3); box-shadow: 0 9px 22px rgba(91, 91, 214, .28); }
.primary:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.secondary { background: #f1f3f8; color: #344054; }
.secondary:hover { background: #e8ebf2; color: #1d2939; }
.danger { background: #fff0ef; color: #b93832; }
.danger:hover { background: #ffe3e1; }

.calendar-button { border-left-color: #d8deea; background: #f7f8fb; }
.job-today { border: 1px solid #dfe2ff; background: linear-gradient(135deg, #f0f1ff, #f7f5ff); color: #4545a6; }
.time-list { min-height: 168px; border-radius: 14px; padding: 7px; background: #fafbfc; }
.time-list option { margin: 2px 0; padding: 9px 12px; border-radius: 8px; }
.time-list option:checked { background: linear-gradient(90deg, #5b5bd6, #6868df); }

.success-icon { background: #eafaf3; box-shadow: 0 0 0 8px rgba(22, 134, 91, .07); }

.admin-header {
  padding: 4px 2px 8px;
  border-bottom: 1px solid rgba(216, 222, 234, .75);
}
.admin-header h1 { letter-spacing: -.04em; }
.header-actions { gap: 7px; }
.header-actions button, .header-actions .button-link { border: 1px solid rgba(216, 222, 234, .75); }
.admin-grid { gap: 16px; }
.admin-grid .card { border-radius: 18px; }

.toolbar {
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8f9fb;
}
.toolbar input, .toolbar select { border-color: transparent; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.icon-btn { border: 1px solid transparent; background: #eceff5; color: #475467; }
.icon-btn:hover { border-color: #d8deea; background: #fff; }
.legend { padding: 0 3px; }
.dot { box-shadow: 0 0 0 3px rgba(0, 0, 0, .035); }

.day-slots, .name-stats { scrollbar-color: #c4cad5 transparent; scrollbar-width: thin; }
.day-slots::-webkit-scrollbar, .name-stats::-webkit-scrollbar { width: 7px; }
.day-slots::-webkit-scrollbar-thumb, .name-stats::-webkit-scrollbar-thumb { border-radius: 99px; background: #c4cad5; }

.admin-slot {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(51, 65, 85, .055);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.admin-slot:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(51, 65, 85, .10), 0 5px 12px rgba(30, 41, 59, .06); }
.admin-slot.available { background: linear-gradient(135deg, #f2fbf6, #edfaf4); }
.admin-slot.booked { background: linear-gradient(135deg, #fff6f5, #fff0ef); }
.admin-slot.blocked { background: linear-gradient(135deg, #f7f8fa, #f1f3f6); }
.time { color: #344054; letter-spacing: 0; }

.availability-card { overflow: hidden; }
.settings-context { color: #7b8495; }
.name-stat, .admin-user { border-color: #e7ebf2; background: #fafbfc; transition: background .15s ease, border-color .15s ease; }
.name-stat:hover, .admin-user:hover { border-color: #d8deea; background: #fff; }
.name-stat-count { background: linear-gradient(135deg, #6969df, #5353c7); box-shadow: 0 4px 10px rgba(91, 91, 214, .18); }

.app-dialog {
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 22px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
  animation: dialog-in .18s ease-out;
}
.app-dialog::backdrop { background: rgba(22, 29, 45, .52); backdrop-filter: blur(5px); }
.dialog-content { padding: 28px; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 850px) {
  .admin-header { padding-bottom: 14px; }
  .header-actions { width: 100%; }
  .toolbar { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .shell { padding: 14px 10px; }
  .booking-card { padding: 22px 18px; border-radius: 18px; }
  .header-actions button, .header-actions .button-link { flex: 1 1 auto; }
  .toolbar .admin-date-field { width: 142px; flex-basis: 142px; }
  .dialog-content { padding: 22px; }
}

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

/* High-impact visual layer */
body {
  background-color: #eef1f7;
  background-image:
    linear-gradient(rgba(91, 91, 214, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 91, 214, .035) 1px, transparent 1px),
    radial-gradient(circle at 12% 8%, rgba(108, 92, 231, .16), transparent 32rem),
    radial-gradient(circle at 88% 88%, rgba(31, 190, 150, .13), transparent 30rem);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.booking-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 32px 90px rgba(31, 38, 73, .16), 0 4px 14px rgba(31, 38, 73, .07);
}
.booking-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 9px;
  background: linear-gradient(90deg, #6c5ce7 0%, #8b5cf6 45%, #19c49a 100%);
}
.booking-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -130px;
  right: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 231, .15), rgba(108, 92, 231, 0) 70%);
  pointer-events: none;
}
.booking-card h1 { max-width: 520px; margin-top: 10px; font-size: clamp(34px, 6vw, 52px); color: #171b33; }
.booking-card .eyebrow { display: inline-flex; padding: 6px 9px; border-radius: 7px; background: #efedff; color: #5748c7; }
.booking-card form { gap: 19px; }
.booking-card input, .booking-card textarea, .booking-card select { min-height: 48px; border-width: 1.5px; }
.booking-card textarea { min-height: 112px; }
.booking-card #bookButton { min-height: 50px; font-size: 15px; }
.booking-card .label-row { padding-top: 2px; }

.admin-shell { max-width: 1440px; padding-top: 18px; }
.admin-header {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(120deg, #202442 0%, #32315f 52%, #45417b 100%);
  box-shadow: 0 18px 45px rgba(29, 32, 64, .22);
}
.admin-header::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  top: -175px;
  right: 12%;
  border-radius: 50%;
  background: rgba(139, 92, 246, .24);
  filter: blur(2px);
  pointer-events: none;
}
.admin-header > * { position: relative; z-index: 1; }
.admin-header h1 { color: #fff; font-size: clamp(30px, 3vw, 40px); }
.admin-header .eyebrow { color: #bcb9ff; }
.admin-header .secondary, .admin-header .button-link {
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .10);
  color: #fff;
  backdrop-filter: blur(8px);
}
.admin-header .secondary:hover, .admin-header .button-link:hover { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .18); }

.admin-grid { gap: 18px; }
.admin-grid .card {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 14px 38px rgba(31, 38, 73, .09), 0 2px 5px rgba(31, 38, 73, .04);
}
.admin-grid > .card { border-top: 5px solid #6960da; }
.side-stack > .card:first-child { border-top: 5px solid #1fbe96; }
.side-stack > .card:last-child { border-top: 5px solid #8b5cf6; }
.availability-card h2, .stats-heading h2 { font-size: 22px; color: #20243d; }

.toolbar { padding: 9px; border: 0; background: #eef0f6; }
.toolbar select, .toolbar input { min-height: 40px; }
.legend { margin: 9px 0 12px; }
.legend span { padding: 5px 8px; border-radius: 99px; background: #f5f6f9; color: #596174; font-weight: 650; }

.admin-slot {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding-left: 11px;
  border-radius: 10px;
}
.admin-slot::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; }
.admin-slot.available::before { background: #20b486; }
.admin-slot.booked::before { background: #e4655f; }
.admin-slot.blocked::before { background: #8b93a3; }
.admin-slot.available { background: #effaf5; }
.admin-slot.booked { background: #fff2f1; }
.admin-slot.blocked { background: #f1f3f6; }
.admin-slot .time { color: #242944; }

.name-stat { min-height: 52px; padding: 9px 11px; border: 0; background: #f5f6fa; }
.name-stat:hover { transform: translateX(2px); background: #f0efff; }
.name-stat-count { border-radius: 9px; }

.app-dialog { border: 0; border-top: 6px solid #6c5ce7; }

@media (max-width: 850px) {
  .admin-header { padding: 18px; }
  .admin-header::after { right: -100px; }
}

@media (max-width: 560px) {
  .booking-card h1 { font-size: 34px; }
  .admin-header { border-radius: 18px; }
}

/* Expressive dashboard finish */
:root {
  --primary: #6d4aff;
  --primary-dark: #5536db;
}

body::before { height: 5px; background: linear-gradient(90deg, #6d4aff 0%, #a855f7 38%, #06b6d4 68%, #18c98b 100%); }

.booking-card {
  padding: 44px;
  background: linear-gradient(155deg, rgba(255,255,255,.98), rgba(248,247,255,.96));
  box-shadow: 0 38px 110px rgba(43, 35, 91, .20), 0 0 0 1px rgba(255,255,255,.8);
}
.booking-card::before { height: 12px; }
.booking-card .eyebrow { padding: 7px 11px; border: 1px solid #dbd5ff; border-radius: 99px; box-shadow: 0 4px 12px rgba(109,74,255,.10); }
.booking-card h1 {
  margin: 16px 0 12px;
  font-size: clamp(40px, 7vw, 58px);
  line-height: 1.08;
  padding-bottom: .08em;
  background: linear-gradient(120deg, #171b33 20%, #5940cc 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.booking-card .lead { font-size: 16px; }
.booking-card label {
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid #e7e5f3;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 5px 16px rgba(38, 33, 75, .035);
}
.booking-card input, .booking-card textarea { border: 0; border-bottom: 2px solid #e1deef; border-radius: 6px; background: #f8f7fc; }
.booking-card input:focus, .booking-card textarea:focus { border-bottom-color: var(--primary); box-shadow: 0 4px 0 rgba(109,74,255,.11); }
.booking-card .date-field { margin: -2px -1px; }
.booking-card .calendar-button { border-radius: 9px; background: #eeeafd; }
.booking-card .label-row { margin-top: 4px; font-size: 15px; }
.booking-card .time-list { border: 2px solid #e3dfff; background: #f8f7ff; }
.booking-card #bookButton { border-radius: 15px; font-size: 16px; box-shadow: 0 14px 30px rgba(109,74,255,.30); }

.admin-header {
  min-height: 118px;
  padding: 25px 28px;
  background:
    radial-gradient(circle at 72% -60%, rgba(173,115,255,.72), transparent 42%),
    linear-gradient(115deg, #171a32 0%, #292751 52%, #3d3472 100%);
  box-shadow: 0 24px 60px rgba(29,26,65,.28);
}
.admin-header h1 { font-size: clamp(36px, 4vw, 48px); line-height: .95; }
.admin-header .eyebrow { margin-bottom: 8px; }
.header-actions { justify-content: flex-end; }
.header-actions button, .header-actions .button-link {
  padding: 10px 14px;
  border-radius: 99px;
  font-size: 11px;
  letter-spacing: .02em;
}
.header-actions button:last-child { background: #fff; color: #252343; }
.header-actions button:last-child:hover { background: #eeeafd; }

.admin-grid { grid-template-columns: minmax(0,1fr) 350px; }
.admin-grid .card { padding: 19px; }
.admin-grid > .card { border-top-width: 7px; box-shadow: 0 20px 50px rgba(35,31,76,.11); }
.side-stack > .card { border-top-width: 7px !important; box-shadow: 0 16px 42px rgba(35,31,76,.09); }
.side-stack > .card:first-child { background: linear-gradient(160deg, #fff 60%, #effcf8); }
.side-stack > .card:last-child { background: linear-gradient(160deg, #fff 65%, #f5f1ff); }

.toolbar { border-radius: 17px; background: linear-gradient(135deg, #efeff7, #f6f6fa); box-shadow: inset 0 1px 2px rgba(30,30,60,.05); }
.toolbar select, .toolbar input { border-radius: 11px; }
.toolbar > select:first-child { color: #fff; background: linear-gradient(135deg, #6d4aff, #854cff); box-shadow: 0 7px 18px rgba(109,74,255,.22); }
.icon-btn { border-radius: 11px; }

.drag-hint { margin: 10px 3px 4px; }
.legend span { border: 1px solid #e7e8ef; background: #fff; box-shadow: 0 3px 8px rgba(30,40,70,.035); }
.day-slots { gap: 7px; padding: 3px 7px 5px 3px; }
.admin-slot {
  min-height: 53px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(31,38,73,.045), inset 0 0 0 1px rgba(51,65,85,.055);
}
.admin-slot::before { width: 6px; }
.admin-slot:hover { transform: translateY(-2px) scale(1.008); box-shadow: 0 10px 20px rgba(31,38,73,.10); }
.admin-slot .mini-btn { border-radius: 8px; }
.admin-slot.available .mini-btn { background: #dff6eb; color: #147653; }
.admin-slot.blocked .mini-btn { background: #e5e7ec; color: #4b5565; }

.availability-card .eyebrow, .stats-heading .eyebrow { display: inline-flex; padding: 4px 7px; border-radius: 6px; background: rgba(109,74,255,.08); }
.availability-form { margin-top: 15px; }
.availability-form > label { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.72); }
.availability-form select { cursor: pointer; }
.settings-actions { padding-top: 3px; }
.name-stats { gap: 9px; }
.name-stat { min-height: 58px; border-left: 4px solid #ddd7ff; border-radius: 12px; }
.name-stat:hover { border-left-color: #7658ff; }

.app-dialog { width: min(calc(100% - 28px), 480px); border-top-width: 9px; border-radius: 26px; }
.dialog-content { padding: 32px; }
.dialog-content h2 { font-size: 27px; }

@media (max-width: 1150px) {
  .admin-grid { grid-template-columns: minmax(0,1fr) 320px; }
}

@media (max-width: 850px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-header { min-height: 0; }
}

@media (max-width: 560px) {
  .nova-choice { grid-template-columns: 1fr; }
  .nova-choice-button { min-height: 88px; }
  .booking-card { padding: 30px 20px 24px; }
  .booking-card h1 { font-size: 38px; }
  .booking-card label { padding: 11px; }
  .admin-header h1 { font-size: 36px; }
  .counter-reset { align-items: stretch; flex-direction: column; }
  .appointment-details { grid-template-columns: 1fr; }
  .appointment-details .appointment-description { grid-column: auto; }
}
/* Chronological agenda */
.agenda-header {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 74px;
  align-items: center;
  margin: 0 7px 0 3px;
  padding: 8px 12px;
  border-radius: 11px 11px 0 0;
  background: #242342;
  color: #c9c7e8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.agenda-header span:last-child { text-align: right; }

.day-slots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 7px 5px 3px;
  border-radius: 0 0 13px 13px;
  background: #fff;
}
.admin-slot {
  grid-template-columns: 64px minmax(0, 1fr) 74px;
  min-height: 42px;
  padding: 5px 8px 5px 12px;
  border: 0;
  border-bottom: 1px solid #eceef3;
  border-radius: 0;
  background: #fff !important;
  box-shadow: none;
  transform: none;
}
.admin-slot::before {
  inset: 50% auto auto 68px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px currentColor;
  transform: translate(-50%, -50%);
}
.admin-slot::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 67px;
  width: 1px;
  z-index: 0;
  background: #e1e4ec;
}
.admin-slot > * { position: relative; z-index: 1; }
.admin-slot:hover { z-index: 2; border-radius: 8px; background: #f8f8fc !important; transform: none; box-shadow: 0 7px 18px rgba(31,38,73,.09); }
.admin-slot.hour-start { border-top: 2px solid #d8dbe6; }
.admin-slot.hour-start .time { color: #4e3fc0; font-size: 13px; }
.admin-slot.available::before { color: #20b486; background: #20b486; }
.admin-slot.booked::before { color: #e4655f; background: #e4655f; }
.admin-slot.blocked::before { color: #8b93a3; background: #8b93a3; }
.admin-slot.booked > :nth-child(2) { margin: 2px 0; padding: 5px 9px; border-left: 3px solid #e4655f; border-radius: 7px; background: #fff0ef; }
.admin-slot.blocked > :nth-child(2) { margin: 2px 0; padding: 5px 9px; border-left: 3px solid #8b93a3; border-radius: 7px; background: #f0f2f5; }
.admin-slot.available > :nth-child(2) { padding-left: 9px; color: #667085; }
.admin-slot .time { color: #667085; font-size: 12px; text-align: left; }
.admin-slot .slot-actions { justify-content: flex-end; }
.admin-slot .mini-btn { min-width: 58px; }
.admin-slot.drag-selected { border-radius: 7px; background: #eeeaff !important; box-shadow: inset 0 0 0 2px rgba(109,74,255,.35); }

@media (max-width: 560px) {
  .agenda-header { grid-template-columns: 62px minmax(0, 1fr) 62px; padding-inline: 8px; }
  .admin-slot { grid-template-columns: 50px minmax(0, 1fr) 62px; padding-left: 8px; }
  .admin-slot::before { left: 54px; }
  .admin-slot::after { left: 53px; }
}
