@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/inter-600.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/inter-700.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/roboto-400.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/roboto-500.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/roboto-700.ttf") format("truetype");
}

@font-face {
  font-family: "Noto Kufi Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/noto-kufi-arabic-400.ttf") format("truetype");
}

@font-face {
  font-family: "Noto Kufi Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/noto-kufi-arabic-500.ttf") format("truetype");
}

@font-face {
  font-family: "Alexandria";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/alexandria-600.ttf") format("truetype");
}

@font-face {
  font-family: "Alexandria";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/alexandria-700.ttf") format("truetype");
}

:root {
  --canvas: #f5f7f6;
  --surface: #ffffff;
  --surface-soft: #edf1ef;
  --ink: #17201e;
  --muted: #5d6865;
  --line: #d9dfdc;
  --brand: #0b6764;
  --brand-dark: #064d4a;
  --brand-soft: #d9ece8;
  --brand-wash: #eef6f4;
  --abu-dhabi-red: #94373a;
  --warning: #f1b84b;
  --danger: #a94141;
  --success: #18765f;
  --radius: 8px;
  --shadow: 0 8px 24px rgba(23, 32, 30, 0.07);
  --bottom-nav-height: 76px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Roboto", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: "Inter", "Roboto", Arial, sans-serif;
  font-weight: 600;
  text-wrap: balance;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(0, 107, 103, 0.22);
  outline-offset: 2px;
}

.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  width: 86px;
  height: 44px;
  align-items: center;
}

.brand img {
  width: 100%;
  height: 38px;
  object-fit: contain;
}

.desktop-nav {
  display: none;
}

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

.icon-button,
.profile-button {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.icon-button:hover,
.profile-button:hover {
  transform: translateY(-1px);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.icon-button i,
.profile-button i {
  font-size: 20px;
}

.icon-button.dark {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.language-button {
  min-width: 76px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  font-family: "Noto Kufi Arabic", "Roboto", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 1180px);
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: 24px 18px calc(var(--bottom-nav-height) + 34px);
}

.app-page {
  display: none;
}

.app-page.active-page {
  display: block;
  animation: page-in 220ms ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.overline {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.welcome-row,
.page-topline,
.section-title-row,
.step-heading,
.block-title-row,
.featured-topline,
.featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.welcome-row {
  align-items: flex-start;
}

.welcome-row > div {
  min-width: 0;
  flex: 1;
}

.location-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.location-line i {
  color: var(--abu-dhabi-red);
  font-size: 16px;
}

.location-line b {
  padding-inline-start: 9px;
  border-inline-start: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}

.welcome-row h1,
.page-topline h1 {
  max-width: 680px;
  margin-top: 7px;
  font-size: clamp(30px, 8vw, 39px);
  font-weight: 600;
  line-height: 1.12;
}

.home-lead {
  max-width: 600px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.page-topline {
  justify-content: flex-start;
  align-items: flex-start;
}

.page-topline > div {
  flex: 1;
}

.search-box {
  display: grid;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 21px;
  padding: 8px 10px 8px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.search-box:focus-within {
  border-color: var(--brand);
}

.search-box > i {
  color: var(--muted);
  font-size: 21px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.search-box input::placeholder {
  color: #92958e;
}

.search-box.compact {
  min-height: 52px;
  margin-top: 0;
  box-shadow: none;
  border-color: var(--line);
}

.filter-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-soft);
  cursor: pointer;
}

.filter-button i {
  font-size: 17px;
}

.featured-session {
  position: relative;
  min-height: 298px;
  margin-top: 18px;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 28px rgba(6, 77, 74, 0.14);
}

.featured-session::after {
  content: none;
}

.availability-badge,
.featured-price,
.service-badge,
.status-pill,
.live-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.availability-badge {
  padding: 7px 10px;
  color: #103f34;
  background: #d9f4e8;
}

.availability-badge > span,
.live-label > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.featured-price {
  padding: 7px 11px;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.featured-copy {
  position: relative;
  z-index: 1;
  max-width: 450px;
  padding: 29px 0 19px;
}

.featured-copy > p:first-child {
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.featured-copy h2 {
  max-width: 360px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.14;
}

.featured-copy > p:last-child {
  max-width: 360px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.5;
}

.featured-venue {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 17px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 500;
}

.featured-venue i {
  font-size: 16px;
}

.featured-footer {
  position: relative;
  z-index: 2;
  align-items: center;
  flex-wrap: wrap;
}

.featured-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
}

.featured-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.featured-metrics i {
  font-size: 16px;
}

.featured-action {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.featured-action i {
  font-size: 17px;
}

.content-section {
  margin-top: 34px;
}

.section-title-row {
  align-items: flex-end;
}

.section-title-row h2 {
  margin-top: 3px;
  font-size: 23px;
  line-height: 1.12;
}

.section-title-row > a {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 750;
}

.session-list,
.service-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.home-session-card,
.service-card {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  text-align: start;
}

button.service-card,
button.home-session-card {
  cursor: pointer;
}

.home-session-card:hover,
.service-card:hover {
  border-color: #a9c8c5;
  box-shadow: 0 12px 28px rgba(17, 18, 16, 0.07);
}

.home-session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.home-session-card h3,
.service-card h3 {
  font-size: 17px;
  font-weight: 680;
  line-height: 1.18;
}

.home-session-card p,
.service-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 13px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-meta i {
  color: var(--brand);
  font-size: 15px;
}

.price-stack {
  min-width: 64px;
  text-align: end;
}

.price-stack strong {
  display: block;
  font-size: 16px;
}

.price-stack span {
  color: var(--muted);
  font-size: 10px;
}

.next-slot-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.next-slot-card h3 {
  margin: 2px 0 3px;
  font-size: 16px;
}

.next-slot-card p:last-child {
  color: var(--muted);
  font-size: 11px;
}

.date-tile {
  display: flex;
  width: 54px;
  height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: #fff;
  background: var(--ink);
}

.date-tile strong {
  font-size: 22px;
  line-height: 1;
}

.date-tile span {
  margin-top: 4px;
  font-size: 9px;
  font-weight: 750;
}

.bottom-nav {
  position: fixed;
  z-index: 40;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 10px;
  display: grid;
  height: var(--bottom-nav-height);
  grid-template-columns: repeat(4, 1fr);
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(17, 18, 16, 0.16);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 10px;
  color: #777a74;
  font-size: 10px;
  font-weight: 700;
}

.bottom-nav a i {
  font-size: 22px;
}

.bottom-nav a.active {
  color: #fff;
  background: var(--ink);
}

.booking-screen,
.manage-screen,
.story-screen,
.admin-screen {
  max-width: 940px;
  margin: 0 auto;
}

.booking-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 26px 0 18px;
  padding: 0;
  list-style: none;
}

.booking-progress::before {
  position: absolute;
  z-index: 0;
  top: 14px;
  right: 12%;
  left: 12%;
  height: 1px;
  background: var(--line);
  content: "";
}

.booking-progress li {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #8b8e88;
  font-size: 9px;
}

.booking-progress li span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--canvas);
  font-size: 11px;
  font-weight: 800;
}

.booking-progress li.active {
  color: var(--ink);
}

.booking-progress li.active span {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.booking-progress li.done span {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.booking-flow,
.manage-panel,
.story-lead,
.story-content,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.booking-flow {
  padding: 20px 18px calc(88px + env(safe-area-inset-bottom));
}

.form-step,
.booking-success {
  display: none;
}

.form-step.active,
.booking-success.active {
  display: block;
  animation: page-in 190ms ease both;
}

.step-heading {
  margin-bottom: 19px;
  align-items: flex-start;
}

.step-heading h2 {
  margin-top: 3px;
  font-size: 26px;
  line-height: 1.08;
}

.step-heading > span {
  display: grid;
  min-width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.service-card {
  display: block;
  min-height: 160px;
  transition: border 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.service-card.selected {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0, 79, 76, 0.18);
}

.service-card.selected p,
.service-card.selected .card-meta {
  color: rgba(255, 255, 255, 0.78);
}

.service-card.selected .card-meta i {
  color: #fff;
}

.service-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.service-card-top strong {
  white-space: nowrap;
  font-size: 15px;
}

.service-card .service-badge {
  margin-bottom: 12px;
  padding: 5px 8px;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.service-card.selected .service-badge {
  color: var(--ink);
  background: #fff;
}

.selected-session {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-bottom: 24px;
  padding: 15px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--brand);
}

.selected-session h3 {
  font-size: 17px;
}

.selected-session p {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
}

.selected-session strong {
  font-size: 16px;
}

.schedule-block + .schedule-block {
  margin-top: 27px;
}

.block-title-row {
  margin-bottom: 12px;
  align-items: center;
}

.block-title-row h3 {
  font-size: 15px;
}

.block-title-row > span {
  color: var(--muted);
  font-size: 10px;
}

.block-title-row .live-label {
  color: var(--success);
}

.date-rail {
  display: grid;
  grid-auto-columns: minmax(66px, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  padding-bottom: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.date-rail::-webkit-scrollbar {
  display: none;
}

.date-chip {
  display: flex;
  min-height: 81px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.date-chip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.date-chip strong {
  margin-top: 5px;
  font-size: 20px;
}

.date-chip.active {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.date-chip.active span {
  color: rgba(255, 255, 255, 0.64);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.slot-button {
  min-height: 47px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.slot-button,
.home-slot-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-direction: column;
}

.slot-button-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.slot-button small,
.home-slot-button small {
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.slot-button.selected small,
.home-slot-button.active small {
  color: rgba(255, 255, 255, 0.78);
}

.slot-button:hover {
  border-color: var(--brand);
}

.slot-button.selected {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.slot-button:disabled {
  color: #b4b6b1;
  background: #f3f3f1;
  cursor: not-allowed;
}

.slot-button:disabled .slot-button-time,
.home-slot-button:disabled .slot-button-time {
  text-decoration: line-through;
}

.slot-button:disabled small,
.home-slot-button:disabled small {
  color: #89938f;
}

.form-grid,
.manage-form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span {
  font-size: 12px;
  font-weight: 720;
}

.field input,
.field select,
.admin-tools select {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: var(--surface);
}

.field input:focus,
.field select:focus,
.admin-tools select:focus {
  border-color: var(--brand);
}

.payment-note {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  border-radius: var(--radius);
  background: var(--brand-wash);
}

.payment-note i {
  color: var(--brand);
  font-size: 24px;
}

.payment-note strong {
  font-size: 13px;
}

.payment-note p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.booking-summary {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.summary-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  color: #fff;
  background: var(--brand);
}

.summary-hero p {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.summary-hero h3 {
  font-size: 18px;
}

.summary-hero strong {
  white-space: nowrap;
  font-size: 18px;
}

.summary-row {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
}

.summary-row span {
  color: var(--muted);
  font-size: 11px;
}

.summary-row strong {
  max-width: 62%;
  font-size: 13px;
  text-align: end;
  overflow-wrap: anywhere;
}

.terms-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 11px;
  cursor: pointer;
}

.terms-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.flow-actions {
  position: fixed;
  z-index: 35;
  right: 12px;
  bottom: calc(var(--bottom-nav-height) + 20px + env(safe-area-inset-bottom));
  left: 12px;
  display: grid;
  grid-template-columns: 0.78fr 1.5fr;
  gap: 9px;
  max-width: 904px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(17, 18, 16, 0.16);
  backdrop-filter: blur(16px);
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.featured-action {
  min-height: 48px;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--ink);
}

.button.primary:hover {
  background: var(--brand-dark);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
}

.button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.button i {
  font-size: 17px;
}

.booking-success {
  padding: 25px 0;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
}

.success-icon i {
  font-size: 38px;
}

.booking-success h2 {
  margin-top: 6px;
  font-size: 28px;
}

.booking-success > p:not(.overline) {
  max-width: 420px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
}

.success-reference {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 360px;
  align-items: center;
  gap: 8px 20px;
  margin: 22px auto 0;
  padding: 15px;
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.success-reference span {
  color: var(--muted);
  font-size: 11px;
}

.success-actions {
  display: grid;
  gap: 8px;
  max-width: 360px;
  margin: 18px auto 0;
}

.credit-card {
  position: relative;
  display: grid;
  min-height: 185px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 21px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 28px rgba(6, 77, 74, 0.14);
}

.credit-card::after {
  content: none;
}

.credit-card p:first-child {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 700;
}

.credit-card strong {
  display: block;
  margin-top: 5px;
  font-size: 34px;
  line-height: 1;
}

.credit-card > i {
  font-size: 34px;
}

.credit-card > p:last-child {
  max-width: 330px;
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.manage-panel {
  margin-top: 16px;
  padding: 19px;
}

.manage-panel[hidden] {
  display: none;
}

.manage-form {
  margin-top: 18px;
}

.full-span {
  grid-column: 1 / -1;
}

.client-bookings {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.booking-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.booking-item h3 {
  font-size: 14px;
}

.booking-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.status-pill {
  justify-content: center;
  padding: 5px 8px;
  color: var(--success);
  background: #e2f2ed;
}

.status-pill.canceled {
  color: var(--danger);
  background: #f8e9e9;
}

.status-pill.pending {
  color: #73520b;
  background: #fff2c7;
}

.backend-notice {
  position: relative;
  z-index: 30;
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  color: #fff;
  background: #4d584f;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.backend-notice[hidden] {
  display: none;
}

.empty-state {
  padding: 25px;
  border: 1px dashed #c7c9c3;
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  text-align: center;
}

.story-lead {
  margin-top: 24px;
  padding: 25px;
  border-top: 4px solid var(--brand);
}

.story-lead img {
  width: 110px;
  margin-bottom: 25px;
}

.story-lead blockquote {
  max-width: 700px;
  font-size: clamp(25px, 7vw, 44px);
  font-weight: 630;
  line-height: 1.14;
}

.story-content {
  display: grid;
  gap: 18px;
  margin-top: 14px;
  padding: 22px;
  color: #444743;
  line-height: 1.8;
}

.story-content p:first-child::first-letter {
  float: left;
  margin: 7px 8px 0 0;
  color: var(--brand);
  font-size: 52px;
  font-weight: 700;
  line-height: 0.78;
}

.story-cta {
  width: 100%;
  margin-top: 15px;
}

.admin-screen {
  max-width: 1180px;
}

.admin-heading {
  align-items: center;
}

.export-button {
  flex: 0 0 auto;
}

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

.admin-stats {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.admin-stats article {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-stats strong {
  font-size: 28px;
}

.admin-tools {
  display: grid;
  gap: 10px;
  margin: 18px 0 12px;
}

.admin-tools select {
  height: 52px;
}

.table-wrap {
  overflow: auto;
  box-shadow: none;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  text-align: start;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  text-align: start;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f8f8f6;
  font-size: 10px;
  text-transform: uppercase;
}

.small-button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.small-button.danger {
  color: var(--danger);
  background: #f8e9e9;
}

.small-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 18px;
  bottom: calc(var(--bottom-nav-height) + 28px + env(safe-area-inset-bottom));
  left: 18px;
  max-width: 430px;
  margin: 0 auto;
  padding: 13px 16px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--ink);
  box-shadow: 0 16px 42px rgba(17, 18, 16, 0.22);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.rtl {
  direction: rtl;
  font-family: "Noto Kufi Arabic", Tahoma, Arial, sans-serif;
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl blockquote {
  font-family: "Alexandria", "Noto Kufi Arabic", Tahoma, Arial, sans-serif;
  font-weight: 600;
  line-height: 1.28;
}

body.rtl .overline {
  text-transform: none;
}

body.rtl .featured-copy h2 {
  max-width: 100%;
  font-size: 27px;
  line-height: 1.32;
}

body.rtl .featured-copy > p:last-child {
  margin-top: 9px;
  line-height: 1.65;
}

body.rtl .ph-arrow-right,
body.rtl .ph-arrow-left {
  transform: rotate(180deg);
}

body.rtl .summary-row strong,
body.rtl .price-stack {
  text-align: start;
}

body.rtl .story-content p:first-child::first-letter {
  float: right;
  margin: 7px 0 0 8px;
}

body.admin-mode .bottom-nav {
  display: none;
}

body.admin-mode .app-shell {
  padding-bottom: 36px;
}

@media (min-width: 700px) {
  .app-header {
    padding-right: max(28px, calc((100vw - 1180px) / 2));
    padding-left: max(28px, calc((100vw - 1180px) / 2));
  }

  .app-shell {
    padding: 38px 28px 54px;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .desktop-nav a {
    padding: 9px 13px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 720;
  }

  .desktop-nav a.active {
    color: #fff;
    background: var(--brand-dark);
  }

  .bottom-nav {
    display: none;
  }

  .home-screen.active-page {
    display: grid;
    grid-template-columns: minmax(0, 1.17fr) minmax(340px, 0.83fr);
    gap: 18px 22px;
    align-items: start;
  }

  .home-screen > .welcome-row,
  .home-screen > .search-box,
  .home-screen > .featured-session {
    grid-column: 1;
  }

  .home-screen > .content-section {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 0;
  }

  .home-screen > .next-slot-card {
    grid-column: 1 / -1;
  }

  .featured-session {
    min-height: 310px;
    padding: 25px;
  }

  .featured-copy {
    padding-top: 38px;
  }

  .featured-copy h2 {
    font-size: 34px;
  }

  .session-list {
    grid-template-columns: 1fr;
  }

  .home-session-card {
    min-height: 128px;
  }

  .booking-flow {
    padding: 28px;
  }

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid,
  .manage-form,
  .admin-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-actions {
    position: static;
    grid-template-columns: auto minmax(180px, 260px);
    justify-content: end;
    margin-top: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .date-rail {
    grid-auto-columns: minmax(72px, 1fr);
  }

  .slot-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .success-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 760px;
  }

  .admin-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .story-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 38px;
  }
}

@media (min-width: 1000px) {
  .brand {
    width: 102px;
  }

  .home-screen {
    grid-template-columns: minmax(0, 1.3fr) minmax(390px, 0.7fr);
  }

  .welcome-row h1,
  .page-topline h1 {
    font-size: 42px;
  }

  .booking-screen {
    max-width: 960px;
  }

  .booking-flow {
    padding: 34px;
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .welcome-row h1,
  .page-topline h1 {
    font-size: 30px;
  }

  .featured-copy h2 {
    font-size: 24px;
  }

  .featured-metrics span:nth-child(2) {
    display: none;
  }

  .next-slot-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .next-slot-card > .icon-button {
    display: none;
  }

  .booking-item {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .booking-item > .status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .bottom-nav {
    right: 6px;
    left: 6px;
  }
}

/* Account, authentication, and final product polish */
.account-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.account-button i {
  font-size: 19px;
}

.search-box input::placeholder,
.field input::placeholder {
  color: #68726f;
  opacity: 1;
}

.home-screen > .featured-session {
  margin-top: 22px;
}

.home-session-card p,
.service-card p,
.credit-card > p:last-child,
.empty-state,
.booking-item p,
.admin-stats span {
  font-size: 13px;
}

.card-meta,
.featured-metrics span,
.featured-venue,
.next-slot-card p:last-child {
  font-size: 12px;
}

.price-stack span {
  font-size: 11px;
}

.booking-progress li b {
  font-size: 11px;
}

.account-prompt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 15px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-prompt.signed-in {
  display: none;
}

.account-prompt-icon,
.auth-symbol,
.admin-lock-icon,
.dialog-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.account-prompt-icon i,
.auth-symbol i,
.admin-lock-icon i,
.dialog-icon i {
  font-size: 24px;
}

.account-prompt h2 {
  margin-top: 4px;
  font-size: 21px;
}

.account-prompt p:not(.overline) {
  max-width: 600px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.account-prompt-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.account-only[hidden],
.admin-content[hidden] {
  display: none;
}

.guest-lookup-result:not(:empty) {
  margin-top: 14px;
}

.booking-item {
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 15px;
}

.booking-item h3 {
  font-size: 16px;
}

.booking-item > .status-pill {
  position: absolute;
  margin: 0;
}

.booking-item {
  position: relative;
}

.booking-item .status-pill {
  top: 14px;
  inset-inline-end: 14px;
}

.booking-item-copy {
  min-width: 0;
  padding-inline-end: 82px;
}

.booking-item-actions {
  display: flex;
  grid-column: 2;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.booking-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.booking-details[hidden] {
  display: none;
}

.small-button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.small-button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.small-button.primary {
  color: #fff;
  background: var(--brand-dark);
}

.auth-screen,
.account-screen {
  max-width: 980px;
  margin: 0 auto;
}

.auth-layout {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.auth-benefits {
  padding: 22px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--brand);
}

.auth-benefits .auth-symbol {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.auth-benefits .overline {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.75);
}

.auth-benefits h2 {
  max-width: 430px;
  margin-top: 7px;
  font-size: 27px;
  line-height: 1.18;
}

.auth-benefits > p:not(.overline) {
  max-width: 470px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.benefit-list {
  display: grid;
  gap: 11px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.benefit-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}

.benefit-list i {
  font-size: 19px;
}

.auth-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-panel-heading h2 {
  font-size: 25px;
}

.auth-panel-heading p,
.auth-switch {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.auth-switch {
  text-align: center;
}

.auth-switch a,
.text-action {
  color: var(--brand-dark);
  font-weight: 700;
}

.text-action {
  justify-self: start;
  padding: 0;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-inline-end: 50px;
}

.password-toggle {
  position: absolute;
  inset-inline-end: 8px;
  bottom: 6px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.account-terms {
  margin-top: 0;
}

.account-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.account-avatar {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-family: "Inter", sans-serif;
  font-size: 19px;
  font-weight: 700;
}

.account-identity h1 {
  margin-top: 4px;
  font-size: clamp(27px, 7vw, 39px);
}

.account-identity p:last-child {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.account-signout {
  grid-column: 1 / -1;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.progress-stats article {
  min-width: 0;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.progress-stats span {
  display: block;
  min-height: 36px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.progress-stats strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(20px, 5vw, 28px);
}

.account-section {
  margin-top: 28px;
}

.account-links {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.account-links a {
  display: grid;
  min-height: 58px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 700;
}

.account-links i {
  color: var(--brand);
  font-size: 21px;
}

.admin-gate {
  display: grid;
  max-width: 520px;
  gap: 18px;
  margin: 6vh auto 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-gate[hidden] {
  display: none;
}

.admin-gate h1 {
  margin-top: 5px;
  font-size: 31px;
}

.admin-gate p:not(.overline) {
  margin-top: 8px;
  color: var(--muted);
}

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

.confirm-dialog {
  width: min(calc(100% - 32px), 470px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(23, 32, 30, 0.25);
}

.confirm-dialog::backdrop {
  background: rgba(23, 32, 30, 0.48);
  backdrop-filter: blur(4px);
}

.confirm-dialog form {
  padding: 24px;
}

.confirm-dialog .overline {
  margin-top: 20px;
}

.confirm-dialog h2 {
  margin-top: 5px;
  font-size: 25px;
}

.confirm-dialog p:not(.overline) {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 23px;
}

.button.danger {
  color: #fff;
  background: var(--danger);
}

.story-lead blockquote {
  font-size: clamp(25px, 7vw, 36px);
}

.story-lead,
.story-content {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.story-lead {
  padding: 26px 0 20px;
  border-top: 1px solid var(--brand);
  border-radius: 0;
}

.story-content {
  max-width: 800px;
  padding: 8px 0 8px 20px;
  border-inline-start: 2px solid var(--brand-soft);
  border-radius: 0;
}

body.rtl .story-content {
  padding: 8px 20px 8px 0;
}

body.rtl .account-links .ph-caret-right {
  transform: rotate(180deg);
}

@media (min-width: 700px) {
  .auth-layout {
    grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
    align-items: stretch;
  }

  .auth-benefits,
  .auth-panel {
    padding: 32px;
  }

  .account-identity {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .account-signout {
    grid-column: auto;
  }

  .account-prompt {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .account-prompt-actions {
    grid-column: auto;
    grid-template-columns: auto auto;
  }
}

@media (max-width: 430px) {
  .account-button {
    width: 42px;
    padding: 0;
  }

  .account-button span {
    display: none;
  }

  .language-button {
    min-width: 70px;
  }

  .progress-stats span {
    font-size: 11px;
  }

  .booking-item-copy {
    padding-inline-end: 0;
    padding-top: 28px;
  }
}

/* Clinic operations refinement */
body.staff-mode .desktop-nav,
body.admin-mode .desktop-nav,
body.staff-mode #headerAccountLink,
body.admin-mode #headerAccountLink {
  display: none;
}

body.staff-mode .app-header,
body.admin-mode .app-header {
  position: static;
  grid-template-columns: 1fr auto;
}

.staff-next-session {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-inline-start: 4px solid var(--brand);
  background: #eef8f6;
}

.staff-next-session > div {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 3px 8px;
}

.staff-next-session strong,
.staff-next-session small {
  grid-column: 2 / -1;
}

.staff-next-session small {
  color: var(--muted);
}

.staff-live-dot {
  grid-row: 1 / 4;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #14886f;
  box-shadow: 0 0 0 5px rgba(20, 136, 111, .12);
}

.staff-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.staff-list-tools {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 170px;
  gap: 8px;
  width: min(100%, 520px);
}

.staff-list-tools select {
  min-height: 44px;
}

.status-pill.arrived {
  color: #075985;
  background: #e0f2fe;
}

.status-pill.in-session {
  color: #5b3a00;
  background: #fff3c4;
}

.admin-governance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  padding-block: 24px;
  border-block: 1px solid var(--line);
}

.admin-governance {
  min-width: 0;
}

.staff-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px;
  margin: 16px 0;
}

.staff-create-form .form-note {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}

.staff-create-form .button {
  align-self: end;
  min-height: 46px;
}

.staff-account-list,
.audit-log-list {
  display: grid;
  gap: 8px;
  max-height: 390px;
  overflow: auto;
  padding-inline-end: 3px;
}

.staff-account-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  background: #fff;
}

.staff-account-row > div:nth-child(2),
.audit-log-row > div {
  display: grid;
  min-width: 0;
}

.staff-account-row span,
.audit-log-row span,
.audit-log-row time {
  color: var(--muted);
  font-size: .78rem;
}

.staff-account-row > div:nth-child(2) span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-account-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.staff-account-actions .small-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.staff-avatar,
.audit-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--brand);
  background: #eef8f6;
}

.audit-log-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-bottom: 1px solid var(--line);
}

.audit-log-row strong {
  text-transform: capitalize;
}

.audit-log-row time {
  text-align: end;
}

@media (max-width: 900px) {
  .admin-governance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .staff-next-session {
    align-items: stretch;
    flex-direction: column;
  }

  .staff-next-session .small-button {
    width: 100%;
    min-height: 44px;
  }

  .staff-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .staff-list-tools {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .staff-create-form {
    grid-template-columns: 1fr;
  }

  .staff-account-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .staff-account-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .staff-account-actions .small-button {
    width: 100%;
  }
}

.staff-heading-actions {
  display: flex;
  gap: 8px;
}

.primary-icon {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.staff-scheduler-dialog {
  width: min(calc(100% - 28px), 620px);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 24px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px rgba(23, 32, 30, .25);
}

.staff-scheduler-dialog::backdrop {
  background: rgba(23, 32, 30, .52);
  backdrop-filter: blur(4px);
}

.dialog-close-row {
  display: flex;
  justify-content: end;
  margin: -10px -10px 0 0;
}

.staff-scheduler-heading h2 {
  margin: 3px 0 6px;
  font-size: 1.55rem;
}

.staff-scheduler-heading > p:last-child {
  margin: 0;
  color: var(--muted);
}

.staff-customer-search {
  margin-top: 20px;
}

.staff-customer-search .search-box {
  min-height: 48px;
  border: 1px solid var(--line-strong);
}

.staff-customer-results {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
  margin-top: 8px;
}

.staff-new-customer-button {
  width: 100%;
  margin-top: 10px;
}

.staff-new-customer-button[hidden] {
  display: none;
}

.staff-customer-create-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.staff-customer-create-form[hidden] {
  display: none;
}

.staff-create-heading,
.staff-create-actions {
  grid-column: 1 / -1;
}

.staff-create-heading {
  display: grid;
  gap: 3px;
}

.staff-create-heading span {
  color: var(--muted);
  font-size: .86rem;
}

.staff-create-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.staff-customer-result {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  text-align: start;
  background: #fff;
}

.staff-customer-result:hover,
.staff-customer-result:focus-visible {
  border-color: var(--brand);
  background: #f4fbf9;
}

.staff-customer-result > span:nth-child(2),
.selected-customer > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.staff-customer-result small,
.selected-customer small {
  overflow: hidden;
  color: var(--muted);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-schedule-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.staff-schedule-form[hidden] {
  display: none;
}

.selected-customer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #eef8f6;
}

.staff-schedule-note {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 11px 12px;
  color: #31534c;
  font-size: .86rem;
  background: #f4f8f7;
}

.staff-schedule-form > .button {
  grid-column: 1 / -1;
  min-height: 48px;
}

@media (max-width: 560px) {
  .staff-scheduler-dialog {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 8px 8px 0 0;
  }

  .staff-schedule-form {
    grid-template-columns: 1fr;
  }

  .staff-customer-create-form {
    grid-template-columns: 1fr;
  }

  .staff-create-heading,
  .staff-create-actions {
    grid-column: auto;
  }

  .selected-customer,
  .staff-schedule-note,
  .staff-schedule-form > .button {
    grid-column: auto;
  }

  .selected-customer {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .selected-customer .small-button {
    grid-column: 1 / -1;
  }
}

/* Age-inclusive readability and touch targets */
:root {
  --muted: #4f5b57;
  --bottom-nav-height: 82px;
}

body {
  line-height: 1.6;
}

.welcome-row h1,
.page-topline h1 {
  font-size: 34px;
  line-height: 1.16;
}

.overline,
.location-line,
.section-title-row > a,
.availability-badge,
.service-badge,
.status-pill {
  font-size: 13px;
}

.icon-button,
.profile-button {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}

.icon-button i,
.profile-button i {
  font-size: 22px;
}

.language-button,
.account-button {
  min-height: 46px;
}

.language-button {
  height: 46px;
  font-size: 14px;
}

.button {
  min-height: 54px;
  font-size: 15px;
}

.small-button {
  min-height: 44px;
  padding-inline: 14px;
  font-size: 13px;
}

.home-session-card p,
.service-card p,
.auth-benefits > p:not(.overline),
.account-prompt p,
.credit-card > p:last-child,
.empty-state,
.booking-item p,
.confirm-dialog p:not(.overline) {
  font-size: 14px;
  line-height: 1.55;
}

.card-meta,
.featured-metrics span,
.featured-venue,
.next-slot-card p:last-child,
.price-stack span,
.selected-session p,
.booking-details {
  font-size: 13px;
}

.date-tile span {
  font-size: 11px;
}

.service-grid {
  gap: 12px;
  margin-top: 0;
}

.service-card {
  min-height: 168px;
  padding: 18px;
}

.service-card.selected {
  border-width: 2px;
}

.service-card-labels {
  display: flex;
  min-height: 27px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.service-card .service-card-labels .service-badge {
  margin-bottom: 0;
}

.selected-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.selected-indicator i {
  font-size: 18px;
}

.step-heading > span {
  display: inline-flex;
  min-width: auto;
  height: 36px;
  padding-inline: 12px;
  border-radius: 18px;
  font-size: 13px;
  white-space: nowrap;
}

.booking-progress {
  margin-top: 28px;
}

.booking-progress::before {
  top: 16px;
}

.booking-progress li {
  gap: 7px;
  color: #68726f;
}

.booking-progress li span {
  width: 33px;
  height: 33px;
  font-size: 13px;
}

.booking-progress li b {
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.booking-flow {
  padding-bottom: calc(98px + env(safe-area-inset-bottom));
}

.block-title-row h3 {
  font-size: 16px;
}

.block-title-row > span,
.summary-hero p,
.summary-row span {
  font-size: 12px;
}

.date-chip {
  min-height: 88px;
}

.date-chip span {
  font-size: 12px;
}

.date-chip strong {
  font-size: 22px;
}

.slot-button {
  min-height: 54px;
  font-size: 15px;
}

.field {
  gap: 8px;
}

.field > span {
  font-size: 14px;
}

.field input,
.field select,
.admin-tools select,
.search-box.compact {
  min-height: 56px;
  height: 56px;
  font-size: 16px;
}

.payment-note strong {
  font-size: 14px;
}

.payment-note p {
  font-size: 13px;
  line-height: 1.55;
}

.summary-row {
  min-height: 62px;
}

.summary-row strong {
  font-size: 14px;
}

.terms-row {
  gap: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.terms-row input {
  width: 22px;
  height: 22px;
}

.toast,
th,
td {
  font-size: 13px;
}

.booking-success > p:not(.overline),
.success-reference span,
.credit-card p:first-child,
.progress-stats span {
  font-size: 13px;
}

.story-lead blockquote {
  font-size: 32px;
}

.account-identity h1 {
  font-size: 32px;
}

.progress-stats strong {
  font-size: 24px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #62aaa4;
  outline-offset: 3px;
}

body.rtl {
  line-height: 1.75;
}

body.rtl .service-card p,
body.rtl .payment-note p,
body.rtl .terms-row,
body.rtl .auth-benefits > p:not(.overline) {
  line-height: 1.75;
}

@media (min-width: 700px) {
  .booking-flow {
    padding-bottom: 28px;
  }
}

@media (min-width: 1000px) {
  .welcome-row h1,
  .page-topline h1 {
    font-size: 42px;
  }

  .story-lead blockquote {
    font-size: 36px;
  }

  .account-identity h1 {
    font-size: 39px;
  }

  .progress-stats strong {
    font-size: 28px;
  }
}

@media (max-width: 430px) {
  .account-button {
    width: 46px;
  }

  .welcome-row h1,
  .page-topline h1 {
    font-size: 32px;
  }

  .step-heading h2 {
    font-size: 24px;
  }

  .flow-actions {
    bottom: calc(var(--bottom-nav-height) + 16px + env(safe-area-inset-bottom));
  }

  .bottom-nav a {
    gap: 4px;
    font-size: 12px;
  }

  .bottom-nav a i {
    font-size: 23px;
  }
}

/* Home booking dashboard */
.home-screen {
  max-width: 1060px;
  margin: 0 auto;
}

.home-screen > .welcome-row {
  align-items: flex-start;
}

.home-heading {
  max-width: 650px;
}

.home-screen .location-line {
  margin-bottom: 18px;
}

.home-screen .welcome-row h1 {
  max-width: 620px;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1.14;
}

.home-screen .home-lead {
  max-width: 560px;
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.55;
}

.home-screen > .featured-session {
  min-height: 0;
  margin-top: 26px;
  padding: 20px;
  overflow: visible;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(23, 32, 30, 0.06);
}

.home-screen .featured-price {
  padding: 0;
  border-radius: 0;
  color: var(--brand-dark);
  background: transparent;
  font-size: 16px;
}

.home-screen .featured-copy {
  max-width: none;
  padding: 20px 0 15px;
}

.home-screen .featured-copy > p:first-child {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.home-screen .featured-copy h2 {
  max-width: none;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.16;
}

.home-screen .featured-copy > p:last-child {
  max-width: 520px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.featured-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.featured-details > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: center;
}

.featured-details i {
  grid-row: 1 / span 2;
  color: var(--brand);
  font-size: 19px;
}

.featured-details span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.featured-details strong {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.3;
}

.home-screen .featured-venue {
  margin: 0;
  padding: 14px 0;
  border: 0;
  color: var(--muted);
  font-size: 13px;
}

.home-screen .featured-footer {
  display: block;
}

.home-screen .featured-action {
  width: 100%;
  min-height: 52px;
  justify-content: space-between;
  padding-inline: 17px;
  color: #fff;
  background: var(--brand-dark);
  font-size: 15px;
}

.home-screen .featured-action:hover {
  background: var(--ink);
}

.home-assurance {
  display: grid;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-assurance > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 14px 4px;
}

.home-assurance > div + div {
  border-top: 1px solid var(--line);
}

.home-assurance i {
  color: var(--brand);
  font-size: 22px;
}

.home-assurance span {
  display: grid;
  min-width: 0;
}

.home-assurance strong {
  font-size: 14px;
  line-height: 1.35;
}

.home-assurance small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.home-screen > .content-section {
  margin-top: 30px;
}

.home-screen .section-title-row h2 {
  font-size: 24px;
}

.home-screen .session-list {
  gap: 12px;
  margin-top: 16px;
}

.home-screen .home-session-card {
  min-height: 0;
  padding: 18px;
  align-items: start;
  border-color: #cfd8d4;
  box-shadow: none;
}

.home-screen .home-session-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(23, 32, 30, 0.06);
}

.home-screen .home-session-card h3 {
  font-size: 18px;
  line-height: 1.25;
}

.home-screen .home-session-card p {
  max-width: 500px;
  margin-top: 6px;
  font-size: 14px;
}

.home-screen .card-meta {
  margin-top: 14px;
  font-size: 13px;
}

.home-screen .price-stack strong {
  color: var(--brand-dark);
  font-size: 17px;
}

.home-screen .price-stack span {
  font-size: 12px;
}

body.rtl .home-screen .featured-copy h2 {
  font-size: 26px;
}

body.rtl .featured-details span,
body.rtl .featured-details strong,
body.rtl .home-assurance small {
  line-height: 1.65;
}

@media (min-width: 700px) {
  .home-screen.active-page {
    grid-template-columns: minmax(0, 0.92fr) minmax(390px, 1.08fr);
    gap: 30px 46px;
    align-items: center;
  }

  .home-screen > .welcome-row {
    grid-column: 1;
    grid-row: 1;
  }

  .home-screen > .featured-session {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
  }

  .home-screen > .home-assurance {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 2px;
  }

  .home-assurance > div {
    padding: 17px 20px;
  }

  .home-assurance > div + div {
    border-top: 0;
    border-inline-start: 1px solid var(--line);
  }

  .home-screen > .content-section {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 2px;
  }

  .home-screen .session-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .home-screen .welcome-row h1 {
    font-size: 42px;
  }

  .home-screen > .featured-session {
    padding: 24px;
  }
}

@media (max-width: 430px) {
  .home-screen .welcome-row h1 {
    font-size: 30px;
  }

  .home-screen > .featured-session {
    margin-top: 22px;
  }

  .featured-details {
    gap: 7px;
  }

  .featured-details strong {
    font-size: 14px;
  }

  .home-screen .home-session-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-screen .price-stack {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    text-align: start;
  }
}

/* Universal usability layer */
:root {
  --muted: #43514d;
  --line: #c8d2ce;
}

.overline {
  font-size: 14px;
  line-height: 1.45;
  text-transform: none;
}

.location-line,
.account-identity p:last-child,
.booking-details,
.admin-stats span,
.home-assurance small,
.featured-details span,
.card-meta,
.featured-venue,
.price-stack span {
  font-size: 14px;
}

.icon-button,
.profile-button {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.language-button,
.account-button {
  min-height: 48px;
  height: 48px;
  font-size: 14px;
}

.button {
  min-height: 56px;
  font-size: 16px;
}

.small-button {
  min-height: 48px;
  padding-inline: 15px;
  font-size: 14px;
}

.section-title-row > a,
.text-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding-inline: 4px;
  font-size: 14px;
}

.desktop-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 14px;
}

.bottom-nav a {
  color: #56615d;
  font-size: 13px;
}

.service-card.selected p,
.service-card.selected .card-meta,
.selected-session p {
  color: #fff;
}

.auth-benefits .overline,
.auth-benefits > p:not(.overline),
.credit-card p:first-child,
.credit-card > p:last-child,
.summary-hero p {
  color: rgba(255, 255, 255, 0.94);
}

.booking-progress li b {
  font-size: 13px;
}

.step-heading h2 {
  line-height: 1.2;
}

.field > span {
  font-size: 15px;
}

.field input,
.field select,
.admin-tools select,
.search-box.compact {
  min-height: 58px;
  height: 58px;
}

.password-field input {
  padding-inline-end: 58px;
}

.password-toggle {
  width: 44px;
  height: 44px;
  bottom: 7px;
}

.password-toggle i {
  font-size: 20px;
}

.auth-panel-heading p,
.auth-switch,
.auth-benefits > p:not(.overline),
.benefit-list li,
.account-prompt p:not(.overline),
.booking-success > p:not(.overline),
.payment-note p,
.terms-row,
.story-content,
.confirm-dialog p:not(.overline) {
  font-size: 15px;
}

.summary-row span,
.summary-row strong,
.success-reference span,
.progress-stats span,
th,
td,
.toast {
  font-size: 14px;
}

th {
  text-transform: none;
}

.terms-row {
  min-height: 58px;
  align-items: start;
}

.terms-row input {
  width: 24px;
  height: 24px;
}

.account-links a {
  min-height: 62px;
  font-size: 15px;
}

.home-screen .featured-action {
  min-height: 56px;
  font-size: 16px;
}

.home-screen .featured-copy > p:first-child,
.home-screen .featured-copy > p:last-child,
.home-screen .home-session-card p,
.home-screen .card-meta,
.home-assurance strong {
  font-size: 15px;
}

@media (max-width: 699px) {
  .auth-layout .auth-panel {
    order: -1;
  }

  .auth-layout .auth-benefits {
    order: 1;
  }
}

@media (min-width: 351px) and (max-width: 430px) {
  .account-button {
    width: auto;
    min-width: 94px;
    padding-inline: 13px;
  }

  .account-button span {
    display: inline;
  }
}

@media (max-width: 430px) {
  .account-prompt-actions,
  .progress-stats {
    grid-template-columns: 1fr;
  }

  .progress-stats article {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .progress-stats span {
    min-height: 0;
  }

  .progress-stats strong {
    margin-top: 0;
  }

  .booking-item-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-item-actions .danger {
    grid-column: 1 / -1;
  }
}

@media (max-width: 350px) {
  .account-button {
    width: 48px;
    min-width: 48px;
    padding: 0;
  }

  .account-button span {
    display: none;
  }

  .bottom-nav a {
    font-size: 12px;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #87938e;
    --muted: #303b38;
  }

  button,
  a,
  input,
  select {
    outline-offset: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* V33: mobile-first booking workspace */
:root {
  --canvas: #f7f9f8;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --ink: #17201f;
  --muted: #4f5c59;
  --line: #cdd8d4;
  --brand: #006b67;
  --brand-dark: #005652;
  --brand-soft: #dcefeb;
  --brand-wash: #f0f7f5;
  --abu-dhabi-red: #b43b43;
  --radius: 8px;
  --shadow: 0 12px 30px rgba(23, 32, 31, 0.07);
  --bottom-nav-height: 70px;
  --header-height: 70px;
}

body {
  background: var(--canvas);
}

.app-header {
  min-height: var(--header-height);
  padding: 10px 16px;
  border-bottom-color: #dfe6e3;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
}

.brand {
  width: 82px;
  height: 42px;
}

.brand img {
  height: 36px;
}

.header-actions {
  gap: 7px;
}

.language-button,
.account-button {
  min-height: 46px;
  height: 46px;
  border-radius: 6px;
}

.language-button {
  min-width: 76px;
  padding-inline: 12px;
  border-color: var(--brand);
  color: var(--ink);
  background: #fff;
}

.account-button {
  min-width: 92px;
  padding-inline: 13px;
  background: var(--brand);
}

.account-button:hover {
  background: var(--brand-dark);
}

.app-shell {
  padding: 22px 16px calc(var(--bottom-nav-height) + 30px + env(safe-area-inset-bottom));
}

.home-screen {
  width: 100%;
  max-width: 1040px;
}

.home-intro {
  max-width: 660px;
}

.home-intro .location-line {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 15px;
}

.home-intro .location-line i {
  font-size: 21px;
}

.home-intro .location-line b {
  color: var(--muted);
  font-size: 13px;
}

.home-intro h1 {
  max-width: 620px;
  font-size: 32px;
  line-height: 1.14;
}

.home-intro .home-lead {
  max-width: 600px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.home-planner {
  margin-top: 30px;
}

.planner-label-row,
.planner-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.planner-label-row {
  margin-bottom: 12px;
}

.planner-label-row h2 {
  font-size: 18px;
  line-height: 1.3;
}

.planner-label-row .live-label {
  color: var(--success);
  font-size: 13px;
}

.home-service-tabs {
  display: grid;
  grid-template-columns: repeat(var(--service-count, 2), minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.page-topline > div,
.book-session-heading > div {
  min-width: 0;
}

.page-topline h1,
.planner-session-name h2,
.details-selection strong {
  overflow-wrap: anywhere;
}

.home-service-tab {
  position: relative;
  min-width: 0;
  min-height: 54px;
  padding: 8px 7px;
  border-inline-end: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}

.home-service-tab:last-child {
  border-inline-end: 0;
}

.home-service-tab.active {
  color: #fff;
  background: var(--brand);
}

.home-service-tab.active::after {
  position: absolute;
  right: 32%;
  bottom: 7px;
  left: 32%;
  height: 3px;
  border-radius: 3px;
  background: #fff;
  content: "";
}

.planner-workspace {
  margin-top: 14px;
  padding: 19px 18px 18px;
  border: 1px solid #c6ddd7;
  border-radius: var(--radius);
  background: var(--brand-wash);
}

.planner-session-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid #c8d8d4;
}

.planner-session-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.planner-session-icon i {
  font-size: 26px;
}

.planner-session-name {
  min-width: 0;
}

.planner-session-name h2 {
  font-size: 18px;
  line-height: 1.25;
}

.planner-session-name p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.planner-session-facts {
  display: grid;
  min-width: 78px;
  gap: 5px;
  text-align: end;
}

.planner-session-facts span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
}

.planner-session-facts span i {
  color: var(--brand);
  font-size: 18px;
}

.planner-session-facts span b {
  font-weight: 500;
}

.planner-session-facts strong {
  color: var(--brand-dark);
  font-size: 17px;
}

.planner-section {
  padding-top: 20px;
}

.planner-time-section {
  margin-top: 19px;
  border-top: 1px solid #c8d8d4;
}

.planner-section-title {
  margin-bottom: 13px;
}

.planner-section-title h3 {
  font-size: 18px;
}

.planner-section-title > span {
  color: var(--muted);
  font-size: 12px;
  text-align: end;
}

.home-date-rail,
.home-slot-rail {
  display: grid;
  grid-auto-flow: column;
  gap: 9px;
  padding: 2px 0 5px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.home-date-rail::-webkit-scrollbar,
.home-slot-rail::-webkit-scrollbar {
  display: none;
}

.home-date-rail {
  grid-auto-columns: 76px;
}

.home-slot-rail {
  grid-auto-columns: minmax(94px, 1fr);
}

.home-date-button,
.home-slot-button {
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.home-date-button {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.home-date-button span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.home-date-button strong {
  margin-top: 3px;
  font-size: 27px;
  line-height: 1;
}

.home-date-button.active {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.home-date-button.active span {
  color: rgba(255, 255, 255, 0.9);
}

.home-slot-button {
  min-height: 66px;
  padding-inline: 14px;
  font-size: 17px;
  font-weight: 700;
}

.home-slot-button.active {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.home-slot-button:disabled {
  color: #89938f;
  background: #e9efed;
  cursor: not-allowed;
}

.home-continue-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-inline: 19px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--ink);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.home-continue-button:hover {
  background: var(--brand-dark);
}

.home-continue-button i {
  font-size: 23px;
}

.home-assurance {
  margin-top: 25px;
  background: transparent;
}

.home-assurance > div {
  min-height: 68px;
  padding: 13px 3px;
}

.home-assurance i {
  color: var(--abu-dhabi-red);
}

.home-assurance strong {
  color: var(--ink);
}

.home-assurance small {
  color: var(--muted);
}

.booking-screen {
  max-width: 760px;
}

.page-topline h1 {
  font-size: 30px;
}

.booking-progress {
  margin: 22px 0 17px;
}

.booking-progress li span {
  width: 32px;
  height: 32px;
  background: var(--canvas);
  font-size: 13px;
}

.booking-progress li.active span {
  background: var(--brand);
}

.booking-flow {
  padding: 20px 18px calc(90px + env(safe-area-inset-bottom));
  border-color: var(--line);
  box-shadow: none;
}

.service-grid {
  gap: 10px;
}

.service-card {
  min-height: 148px;
  border-color: var(--line);
  box-shadow: none;
}

.service-card.selected {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: none;
}

.selected-session {
  border: 1px solid #c6ddd7;
  color: var(--ink);
  background: var(--brand-wash);
}

.selected-session p {
  color: var(--muted);
}

.selected-session strong {
  color: var(--brand-dark);
}

.date-chip,
.slot-button {
  border-color: var(--line);
}

.date-chip {
  min-height: 88px;
}

.date-chip.active {
  border-color: var(--brand);
  background: var(--brand);
}

.slot-button {
  min-height: 64px;
  font-size: 16px;
}

.slot-button.selected {
  border-color: var(--ink);
  background: var(--ink);
}

.field input,
.field select,
.admin-tools select,
.search-box.compact {
  border-color: var(--line);
  background: #fff;
}

.flow-actions {
  right: 0;
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  left: 0;
  max-width: none;
  padding: 9px 12px;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: 0 -8px 20px rgba(23, 32, 31, 0.07);
}

.bottom-nav {
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  padding: 4px 8px env(safe-area-inset-bottom);
  border-width: 1px 0 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}

.bottom-nav a {
  gap: 2px;
  border-radius: 0;
  color: #58635f;
  font-size: 12px;
}

.bottom-nav a i {
  font-size: 23px;
}

.bottom-nav a.active {
  color: var(--brand);
  background: transparent;
}

.bottom-nav a.active::before {
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand);
  content: "";
}

body.rtl .home-continue-button i,
body.rtl .page-topline .icon-button i {
  transform: rotate(180deg);
}

body.rtl .planner-session-facts {
  text-align: start;
}

body.rtl .planner-session-facts span {
  justify-content: flex-start;
}

@media (max-width: 350px) {
  .home-intro h1 {
    font-size: 28px;
  }

  .home-service-tab {
    min-height: 58px;
    font-size: 12px;
  }

  .planner-workspace {
    padding-inline: 14px;
  }

  .planner-session-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .planner-session-icon {
    width: 44px;
    height: 44px;
  }

  .planner-session-facts {
    grid-column: 2;
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: start;
  }

  .planner-session-facts span {
    justify-content: flex-start;
  }
}

@media (min-width: 700px) {
  .app-header {
    padding-inline: 28px;
  }

  .brand {
    width: 92px;
  }

  .app-shell {
    padding: 36px 28px 48px;
  }

  .home-screen.active-page {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
    gap: 34px 48px;
  }

  .home-intro {
    position: sticky;
    top: calc(var(--header-height) + 36px);
  }

  .home-intro h1 {
    font-size: 40px;
  }

  .home-planner {
    margin-top: 0;
  }

  .home-assurance {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0;
  }

  .home-assurance > div {
    padding: 16px 20px;
  }

  .home-assurance > div + div {
    border-top: 0;
    border-inline-start: 1px solid var(--line);
  }

  .booking-flow {
    padding-bottom: 24px;
  }

  .flow-actions {
    position: static;
    grid-template-columns: 0.7fr 1.3fr;
    margin-top: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

@media (min-width: 1000px) {
  .home-screen.active-page {
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 40px 64px;
  }

  .home-intro h1 {
    font-size: 44px;
  }

  .planner-workspace {
    padding: 23px;
  }
}

/* V34: selected mobile CTA and booking assurance treatment */
.app-shell {
  padding-top: 16px;
}

.home-intro .location-line {
  margin-bottom: 12px;
}

.home-intro h1 {
  font-size: 30px;
  line-height: 1.12;
}

.home-intro .home-lead {
  margin-top: 7px;
  font-size: 16px;
  line-height: 1.45;
}

.home-planner {
  margin-top: 22px;
}

.planner-label-row {
  margin-bottom: 9px;
}

.planner-workspace {
  margin-top: 12px;
  padding: 15px 14px 16px;
}

.planner-session-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  padding-bottom: 14px;
}

.planner-session-icon {
  width: 46px;
  height: 46px;
}

.planner-session-name p {
  display: none;
}

.planner-section {
  padding-top: 15px;
}

.planner-time-section {
  margin-top: 14px;
}

.planner-section-title {
  margin-bottom: 10px;
}

.planner-section-title h3 {
  font-size: 16px;
}

.home-date-button {
  min-height: 82px;
}

.home-slot-button {
  min-height: 66px;
}

.home-continue-button {
  position: relative;
  min-height: 60px;
  justify-content: center;
  margin-top: 16px;
  padding-inline: 20px;
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(0, 107, 103, 0.16);
  font-size: 17px;
}

.home-continue-button:hover,
.home-continue-button:focus-visible {
  background: var(--brand-dark);
}

.home-continue-button i {
  position: absolute;
  inset-inline-end: 20px;
}

.home-date-rail {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  overflow: visible;
}

.home-date-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.home-date-button.active small {
  color: rgba(255, 255, 255, 0.9);
}

.home-slot-rail {
  grid-auto-columns: calc((100% - 18px) / 3);
}

.home-slot-button {
  gap: 3px;
}

.home-slot-button i {
  font-size: 19px;
}

.home-assurance {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  background: #fff;
}

.home-assurance > div {
  display: block;
  min-height: 116px;
  padding: 14px 10px;
}

.home-assurance > div + div {
  border-top: 0;
  border-inline-start: 1px solid var(--line);
}

.home-assurance i {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 22px;
}

.home-assurance span,
.home-assurance strong,
.home-assurance small {
  display: block;
}

.home-assurance strong {
  font-size: 14px;
  line-height: 1.32;
}

.home-assurance small {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 350px) {
  .home-assurance {
    grid-template-columns: 1fr;
  }

  .home-assurance > div {
    display: grid;
    min-height: 0;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 4px;
  }

  .home-assurance > div + div {
    border-top: 1px solid var(--line);
    border-inline-start: 0;
  }

  .home-assurance i {
    margin-bottom: 0;
  }
}

/* V36: unified booking flow, non-blocking feedback, and responsive operations */
.booking-progress.two-step {
  max-width: 320px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-inline: auto;
}

.booking-progress.two-step::before {
  right: 25%;
  left: 25%;
}

.form-step[hidden] {
  display: none !important;
}

.flow-actions[hidden] {
  display: none !important;
}

.details-selection {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 11px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.details-selection-icon {
  display: grid;
  width: 42px;
  height: 42px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.details-selection-icon i {
  font-size: 23px;
}

.details-selection > div {
  min-width: 0;
}

.details-selection strong,
.details-selection small {
  display: block;
}

.details-selection strong {
  font-size: 15px;
  line-height: 1.35;
}

.details-selection small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.details-selection > b {
  align-self: end;
  color: var(--brand-dark);
  font-size: 15px;
  white-space: nowrap;
}

.details-selection > a {
  justify-self: end;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.toast {
  top: calc(var(--header-height) + 10px);
  bottom: auto;
  transform: translateY(-10px);
}

.toast.show {
  transform: translateY(0);
}

.admin-screen,
.admin-content {
  min-width: 0;
}

.admin-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  justify-content: stretch;
}

.admin-heading .admin-actions {
  width: 100%;
  grid-column: 1 / -1;
  margin-top: 12px;
}

.admin-heading .export-button {
  min-width: 0;
  flex: 1;
}

.admin-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-stats article {
  min-height: 108px;
  align-content: space-between;
  padding: 13px 11px;
}

.admin-stats span {
  font-size: 12px;
  line-height: 1.35;
}

.admin-stats strong {
  font-size: 24px;
  line-height: 1;
}

.admin-content .table-wrap {
  display: none;
}

.admin-mobile-list {
  display: grid;
  gap: 12px;
}

.admin-booking-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.admin-booking-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-booking-card-heading > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-booking-card-heading strong {
  font-size: 16px;
}

.admin-booking-card-heading > div span {
  color: var(--muted);
  font-size: 13px;
}

.admin-booking-card h3 {
  margin-top: 16px;
  font-size: 17px;
}

.admin-booking-card dl {
  display: grid;
  gap: 0;
  margin: 13px 0 15px;
}

.admin-booking-card dl > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.admin-booking-card dt {
  color: var(--muted);
  font-size: 13px;
}

.admin-booking-card dd {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.admin-booking-card .button {
  width: 100%;
}

@media (max-width: 350px) {
  .details-selection {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .details-selection-icon {
    width: 38px;
    height: 38px;
  }

  .details-selection > b,
  .details-selection > a {
    grid-column: 2;
    justify-self: start;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-stats article {
    min-height: 86px;
  }
}

@media (min-width: 700px) {
  .toast {
    right: 28px;
    left: auto;
    margin: 0;
  }

  .admin-heading {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
  }

  .admin-heading .admin-actions {
    width: auto;
    grid-column: auto;
    margin-top: 0;
  }

  .admin-stats article {
    min-height: 114px;
    padding: 18px;
  }

  .admin-content .table-wrap {
    display: block;
  }

  .admin-mobile-list {
    display: none;
  }
}

@media (min-width: 700px) {
  .app-shell {
    padding-top: 36px;
  }

  .home-assurance > div {
    display: grid;
    min-height: 78px;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
  }

  .home-assurance i {
    margin-bottom: 0;
  }
}

/* V42: distinct Home overview and Book route */
.home-screen.active-page,
.book-session-screen.active-page {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
}

.home-screen.active-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.home-intro {
  max-width: 760px;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--line);
}

.button.primary.home-primary-action {
  width: auto;
  min-width: 190px;
  min-height: 52px;
  justify-content: space-between;
  gap: 28px;
  margin-top: 22px;
  padding-inline: 20px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(11, 103, 100, 0.15);
}

.home-primary-action i {
  font-size: 20px;
}

.button.primary.home-primary-action:hover,
.button.primary.home-primary-action:focus-visible {
  color: #fff;
  background: var(--brand-dark);
}

.home-service-overview {
  margin-top: 27px;
}

.home-section-heading {
  margin-bottom: 14px;
}

.home-section-heading .overline {
  margin: 0 0 3px;
}

.home-section-heading h2 {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 22px;
  line-height: 1.25;
}

.home-service-overview-list {
  border-top: 1px solid var(--line);
}

.home-overview-service {
  display: grid;
  width: 100%;
  min-height: 92px;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 13px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  text-align: start;
  cursor: pointer;
  transition: background-color 160ms ease, padding-inline 160ms ease;
}

.home-overview-service:hover,
.home-overview-service:focus-visible {
  padding-inline: 10px;
  outline: 0;
  background: var(--brand-wash);
}

.home-overview-service:focus-visible {
  box-shadow: inset 3px 0 0 var(--brand);
}

.home-overview-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  grid-row: 1 / 3;
  align-items: center;
  justify-content: center;
  border: 1px solid #c8deda;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-wash);
}

.home-overview-icon i {
  font-size: 21px;
}

.home-overview-copy {
  display: grid;
  min-width: 0;
  grid-column: 2;
  gap: 2px;
}

.home-overview-copy strong {
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.3;
}

.home-overview-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-overview-meta {
  display: flex;
  min-width: 0;
  grid-column: 2;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.home-overview-meta small {
  font-size: inherit;
}

.home-overview-meta b {
  color: var(--brand-dark);
  font-size: 14px;
}

.home-overview-arrow {
  grid-column: 3;
  grid-row: 1 / 3;
  color: var(--brand);
  font-size: 18px;
}

.home-screen > .home-assurance {
  margin-top: 28px;
}

.book-session-screen {
  padding-bottom: 12px;
}

.book-session-heading {
  max-width: 760px;
}

.book-session-lead {
  max-width: 620px;
  margin: 7px 0 0 60px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.rtl .book-session-lead {
  margin-right: 60px;
  margin-left: 0;
}

.book-session-screen .home-planner {
  margin-top: 26px;
}

.rtl .home-overview-arrow,
.rtl .home-primary-action .ph-arrow-right {
  transform: rotate(180deg);
}

@media (max-width: 699px) {
  .home-intro {
    padding-top: 2px;
  }

  .button.primary.home-primary-action {
    width: 100%;
  }

  .book-session-lead {
    margin-inline-start: 56px;
    margin-inline-end: 0;
  }

  .rtl .book-session-lead {
    margin-inline-start: 56px;
    margin-inline-end: 0;
  }
}

@media (min-width: 700px) {
  .home-screen.active-page,
  .book-session-screen.active-page {
    max-width: 1040px;
  }

  .home-intro {
    padding: 12px 0 36px;
  }

  .home-intro h1 {
    max-width: 700px;
    font-size: 42px;
  }

  .home-overview-service {
    min-height: 88px;
    grid-template-columns: 48px minmax(0, 1fr) auto 20px;
    grid-template-rows: auto;
    gap: 16px;
    padding: 18px 8px;
  }

  .home-overview-icon,
  .home-overview-copy,
  .home-overview-meta,
  .home-overview-arrow {
    grid-column: auto;
    grid-row: auto;
  }

  .home-overview-icon {
    width: 48px;
    height: 48px;
  }

  .home-overview-copy small {
    white-space: normal;
  }

  .home-overview-meta {
    display: grid;
    min-width: 96px;
    justify-items: end;
    gap: 1px;
  }

  .home-overview-meta b {
    font-size: 15px;
  }

  .book-session-screen .home-planner {
    margin-top: 32px;
  }
}

/* V46: keep the full header from wrapping on tablets */
@media (min-width: 700px) and (max-width: 899px) {
  .app-header {
    min-height: var(--header-height);
    padding-inline: 28px;
  }

  .desktop-nav {
    display: none;
  }

  .bottom-nav {
    display: grid;
  }

  .app-shell {
    padding-bottom: calc(var(--bottom-nav-height) + 30px + env(safe-area-inset-bottom));
  }
}

/* V47: remove legacy sticky/grid behavior from the rebuilt Home route */
.home-screen .home-intro {
  position: static;
  top: auto;
}

.home-screen > .home-assurance {
  grid-column: auto;
  grid-row: auto;
}

/* V48: operating-hours states */
.home-date-button.closed,
.date-chip.closed {
  border-style: dashed;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: not-allowed;
}

.home-date-button.closed strong {
  color: var(--muted);
}

.home-date-button.closed small,
.date-chip.closed strong {
  color: var(--abu-dhabi-red);
  font-size: 11px;
}

.slot-empty {
  width: 100%;
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  text-align: center;
}

/* V49: visible weekly hours and seven-day booking rail */
.home-hours {
  margin-top: 27px;
}

.home-hours-list {
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-hours-list > div {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 4px;
}

.home-hours-list > div + div {
  border-top: 1px solid var(--line);
}

.home-hours-list dt,
.home-hours-list dd {
  margin: 0;
}

.home-hours-list dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.home-hours-list dd {
  color: var(--brand-dark);
  font-family: "Inter", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-align: end;
}

.home-hours-list .closed dd {
  color: var(--abu-dhabi-red);
}

.home-date-rail {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 27px) / 4);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

@media (min-width: 700px) {
  .home-hours-list {
    display: grid;
    grid-template-columns: 1.45fr 0.7fr 1fr;
  }

  .home-hours-list > div {
    padding: 14px 18px;
  }

  .home-hours-list > div + div {
    border-top: 0;
    border-inline-start: 1px solid var(--line);
  }

  .home-date-rail {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
  }
}

/* V50: full month calendar and complete slot grid */
.calendar-section-title {
  align-items: flex-end;
}

.calendar-toolbar {
  display: grid;
  min-height: 42px;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
}

.calendar-toolbar > strong {
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  text-align: center;
}

.calendar-nav-button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}

.calendar-nav-button:hover,
.calendar-nav-button:focus-visible {
  color: var(--brand-dark);
  background: var(--brand-wash);
}

.calendar-nav-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.calendar-weekdays,
.home-date-rail.month-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 6px;
  overflow: visible;
}

.calendar-weekdays {
  margin-bottom: 6px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day-spacer {
  min-width: 0;
}

.home-date-button.calendar-day {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 5px 2px;
}

.home-date-button.calendar-day strong {
  font-size: 17px;
  line-height: 1.1;
}

.home-date-button.calendar-day small {
  min-height: 10px;
  margin-top: 3px;
  font-size: 8px;
  line-height: 1;
}

.home-date-button.calendar-day.outside-window {
  border-color: transparent;
  opacity: 0.3;
  background: transparent;
}

.home-slot-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 9px;
  overflow: visible;
}

.home-slot-button {
  width: 100%;
}

.rtl .calendar-nav-button i {
  transform: rotate(180deg);
}

@media (min-width: 700px) {
  .home-date-button.calendar-day {
    min-height: 62px;
  }

  .home-date-button.calendar-day strong {
    font-size: 19px;
  }

  .home-date-button.calendar-day small {
    font-size: 9px;
  }

  .home-slot-rail {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* V55: operational readiness, clearer receipts, and all-age readability */
.calendar-weekdays span,
.home-date-button.calendar-day small,
.home-slot-button small,
.slot-button small {
  font-size: 12px;
  line-height: 1.2;
}

.home-date-button.calendar-day {
  min-height: 60px;
  padding: 7px 3px;
}

.home-date-button.calendar-day small {
  min-height: 14px;
}

.success-details {
  display: grid;
  width: 100%;
  max-width: 680px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px auto 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.success-details > div {
  min-width: 0;
  padding: 15px 14px;
}

.success-details > div:nth-child(even) {
  border-inline-start: 1px solid var(--line);
}

.success-details > div:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.success-details dt,
.success-details dd {
  margin: 0;
}

.success-details dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.success-details dd {
  margin-top: 5px;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.policy-screen {
  max-width: 900px;
}

.policy-content {
  max-width: 760px;
  margin: 34px auto 0;
}

.policy-content > p {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.75;
}

.policy-content h2 {
  margin: 32px 0 8px;
  font-size: 21px;
}

.policy-content .policy-updated {
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.account-terms a,
.app-footer a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-help-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
}

.auth-help-actions .text-action {
  min-height: 40px;
}

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

.admin-operations {
  margin: 26px 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.admin-operations-heading h2 {
  margin-top: 4px;
  font-size: 22px;
}

.integration-status {
  display: flex;
  max-width: 340px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.integration-status.ready {
  border-color: #acd7c4;
  color: #126342;
  background: #f0faf5;
}

.integration-status.development {
  border-color: #e2cf9c;
  color: #74560c;
  background: #fffaf0;
}

.integration-status i {
  flex: 0 0 auto;
  font-size: 22px;
}

.integration-status span,
.integration-status strong,
.integration-status small {
  display: block;
  min-width: 0;
}

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

.integration-status small {
  margin-top: 2px;
  color: currentColor;
  font-size: 12px;
  line-height: 1.35;
}

.device-status-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.device-status {
  display: grid;
  min-width: 0;
  min-height: 76px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.device-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #189166;
}

.device-status.offline .device-indicator {
  background: var(--abu-dhabi-red);
}

.device-status strong,
.device-status small {
  display: block;
}

.device-status strong {
  font-size: 15px;
}

.device-status small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.device-status .small-button {
  min-height: 40px;
  white-space: nowrap;
}

.device-block-form {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.8fr 0.8fr;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.device-block-form .block-reason {
  grid-column: 1 / -2;
}

.device-block-form > .button {
  align-self: end;
}

.maintenance-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.maintenance-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.maintenance-item strong,
.maintenance-item span {
  display: block;
}

.maintenance-item strong {
  font-size: 14px;
}

.maintenance-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state.compact {
  margin: 0;
  padding: 16px 0;
}

.attendance-control {
  display: grid;
  min-width: 128px;
  gap: 4px;
  margin-bottom: 8px;
}

.attendance-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.attendance-control select {
  min-height: 40px;
  padding: 7px 28px 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand-dark);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
}

.admin-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.admin-card-actions .attendance-control {
  margin: 0;
}

.status-pill.completed {
  color: #126342;
  background: #e9f7f0;
}

.status-pill.no-show {
  color: #815719;
  background: #fff2da;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.admin-pagination span {
  min-width: 100px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.app-footer {
  display: flex;
  max-width: 1180px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 14px auto 0;
  padding: 22px 28px calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.app-footer nav {
  display: flex;
  gap: 18px;
}

@media (max-width: 699px) {
  .app-footer nav a,
  .auth-switch a,
  .account-terms a,
  #changeScheduleLink {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  .admin-tools .search-box input,
  .staff-list-tools .search-box input {
    min-height: 44px;
  }

  .booking-screen.is-complete .booking-progress {
    display: none;
  }

  .booking-flow.is-complete {
    padding-top: 8px;
  }

  .booking-flow.is-complete .booking-success {
    padding-top: 10px;
  }

  .booking-flow.is-complete .success-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 13px;
  }

  .booking-flow.is-complete .success-icon i {
    font-size: 31px;
  }

  .booking-flow.is-complete .booking-success h2 {
    font-size: 25px;
  }

  .booking-flow.is-complete .success-reference,
  .booking-flow.is-complete .success-details {
    margin-top: 16px;
  }

  .success-details {
    grid-template-columns: 1fr;
  }

  .success-details > div:nth-child(even) {
    border-inline-start: 0;
  }

  .success-details > div + div {
    border-top: 1px solid var(--line);
  }

  .admin-operations-heading,
  .app-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-status {
    max-width: none;
  }

  .device-status-list,
  .device-block-form {
    grid-template-columns: 1fr;
  }

  .device-block-form .block-reason {
    grid-column: auto;
  }

  .device-status {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .device-status .small-button {
    grid-column: 2;
    width: 100%;
  }

  .admin-card-actions {
    grid-template-columns: 1fr;
  }

  .app-footer {
    margin-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    padding-inline: 20px;
  }
}

@media (min-width: 700px) {
  .admin-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* V57: Admin daily device timeline */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-schedule {
  margin-top: 28px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-schedule-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.admin-schedule-heading h2 {
  margin-top: 4px;
  font-size: 22px;
}

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

.schedule-date-controls input {
  width: 154px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand-dark);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.schedule-date-controls .small-button {
  min-height: 44px;
}

.schedule-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.schedule-summary strong {
  font-size: 14px;
}

.schedule-summary span {
  color: var(--muted);
  font-size: 13px;
  text-align: end;
}

.schedule-timeline-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overscroll-behavior-inline: contain;
}

.schedule-timeline-wrap:focus-visible {
  outline: 3px solid rgba(0, 122, 116, 0.2);
  outline-offset: 3px;
}

.schedule-timeline {
  position: relative;
  display: grid;
  min-width: 760px;
  grid-template-columns: 68px repeat(3, minmax(210px, 1fr));
  grid-template-rows: 50px;
  grid-auto-rows: 36px;
}

.schedule-device-1 { grid-column: 2; }
.schedule-device-2 { grid-column: 3; }
.schedule-device-3 { grid-column: 4; }
.schedule-row-1 { grid-row-start: 2; }
.schedule-row-2 { grid-row-start: 3; }
.schedule-row-3 { grid-row-start: 4; }
.schedule-row-4 { grid-row-start: 5; }
.schedule-row-5 { grid-row-start: 6; }
.schedule-row-6 { grid-row-start: 7; }
.schedule-row-7 { grid-row-start: 8; }
.schedule-row-8 { grid-row-start: 9; }
.schedule-row-9 { grid-row-start: 10; }
.schedule-row-10 { grid-row-start: 11; }
.schedule-row-11 { grid-row-start: 12; }
.schedule-row-12 { grid-row-start: 13; }
.schedule-row-13 { grid-row-start: 14; }
.schedule-row-14 { grid-row-start: 15; }
.schedule-row-15 { grid-row-start: 16; }
.schedule-row-16 { grid-row-start: 17; }
.schedule-row-17 { grid-row-start: 18; }
.schedule-row-18 { grid-row-start: 19; }
.schedule-row-19 { grid-row-start: 20; }
.schedule-row-20 { grid-row-start: 21; }
.schedule-row-21 { grid-row-start: 22; }
.schedule-span-1 { grid-row-end: span 1; }
.schedule-span-2 { grid-row-end: span 2; }
.schedule-span-3 { grid-row-end: span 3; }
.schedule-span-4 { grid-row-end: span 4; }
.schedule-span-5 { grid-row-end: span 5; }
.schedule-span-6 { grid-row-end: span 6; }
.schedule-span-7 { grid-row-end: span 7; }
.schedule-span-8 { grid-row-end: span 8; }
.schedule-span-9 { grid-row-end: span 9; }
.schedule-span-10 { grid-row-end: span 10; }
.schedule-span-11 { grid-row-end: span 11; }
.schedule-span-12 { grid-row-end: span 12; }
.schedule-span-13 { grid-row-end: span 13; }
.schedule-span-14 { grid-row-end: span 14; }
.schedule-span-15 { grid-row-end: span 15; }
.schedule-span-16 { grid-row-end: span 16; }
.schedule-span-17 { grid-row-end: span 17; }
.schedule-span-18 { grid-row-end: span 18; }
.schedule-span-19 { grid-row-end: span 19; }
.schedule-span-20 { grid-row-end: span 20; }
.schedule-span-21 { grid-row-end: span 21; }

/* Staff operations portal */
body.staff-mode .bottom-nav,
body.staff-mode .app-footer {
  display: none;
}

.staff-content {
  display: grid;
  min-width: 0;
  gap: 24px;
}

.staff-content > * {
  min-width: 0;
  max-width: 100%;
}

.staff-heading {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.page-topline.staff-heading > div {
  min-width: 0;
  flex: none;
}

.staff-heading h1 {
  overflow-wrap: anywhere;
}

.staff-stats article:last-child strong {
  color: #8f4b3f;
}

.staff-appointments {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.staff-section-heading {
  margin-bottom: 16px;
}

.staff-section-heading h2 {
  margin: 2px 0 0;
  font-size: 1.25rem;
}

.staff-booking-list {
  display: grid;
  gap: 10px;
}

.staff-booking-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto minmax(172px, 210px);
  gap: 16px;
  align-items: center;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.staff-booking-time {
  display: grid;
  align-content: center;
  min-height: 64px;
  padding-inline-end: 14px;
  border-inline-end: 1px solid var(--line);
}

.staff-booking-time strong {
  font-size: 1.12rem;
}

.staff-booking-time span,
.staff-booking-person small,
.staff-booking-person p {
  color: var(--muted);
  font-size: .84rem;
}

.staff-booking-person {
  min-width: 0;
}

.staff-booking-person > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-booking-person h3 {
  margin: 7px 0 3px;
  font-size: 1rem;
}

.staff-booking-person p {
  margin: 0;
}

.staff-contact-actions {
  display: flex;
  gap: 8px;
}

.staff-contact-actions .icon-button {
  border: 1px solid var(--line);
  background: #fff;
}

.staff-attendance select {
  min-height: 44px;
}

.staff-refund-action,
.staff-refund-status {
  grid-column: 2 / -1;
  justify-self: end;
}

.staff-refund-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.staff-refund-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7b5b12;
  font-size: .84rem;
  font-weight: 700;
}

.refund-inbox {
  padding: 20px;
  border: 1px solid #cddfd9;
  border-radius: 8px;
  background: #f7fbfa;
}

.refund-inbox-heading,
.refund-request-row {
  display: flex;
  align-items: center;
}

.refund-inbox-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.refund-inbox-heading h2 {
  margin: 2px 0 0;
  font-size: 1.25rem;
}

.refund-count {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--muted);
  background: #e7efec;
  font-weight: 800;
}

.refund-count.has-pending {
  color: #fff;
  background: var(--danger);
}

.refund-request-list {
  display: grid;
  gap: 8px;
}

.refund-request-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.refund-request-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--brand-strong);
  background: #e5f1ed;
  font-size: 20px;
}

.refund-request-row > div {
  display: grid;
  gap: 2px;
}

.refund-request-row span,
.refund-request-row small {
  color: var(--muted);
}

.refund-amount {
  white-space: nowrap;
}

.refund-dialog textarea {
  min-height: 104px;
  resize: vertical;
}

.refund-policy-note {
  padding: 10px 12px;
  border-inline-start: 3px solid var(--brand);
  background: var(--surface-soft);
}

.refund-review-summary {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.refund-review-summary dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.refund-review-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.refund-review-summary dt {
  color: var(--muted);
}

.refund-review-summary dd {
  margin: 0;
  text-align: end;
}

.refund-review-summary .refund-reason-row {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.refund-review-summary .refund-reason-row dd {
  text-align: start;
}

.refund-review-actions {
  grid-template-columns: auto auto 1fr;
}

@media (max-width: 720px) {
  body.staff-mode .app-shell {
    padding-bottom: 24px;
  }

  .staff-content {
    gap: 18px;
  }

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

  .staff-booking-card {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
  }

  .staff-booking-time {
    min-height: 54px;
    padding-inline-end: 10px;
  }

  .staff-contact-actions {
    flex-direction: column;
  }

  .staff-attendance {
    grid-column: 1 / -1;
  }

  .staff-refund-action,
  .staff-refund-status {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .staff-refund-action {
    justify-content: center;
    min-height: 44px;
  }

  .refund-request-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .refund-request-row .small-button {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  .refund-review-actions {
    grid-template-columns: 1fr 1fr;
  }

  .refund-review-actions .primary {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .staff-attendance select {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .staff-heading h1 {
    font-size: 1.3rem;
  }

  .staff-booking-card {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .staff-booking-person h3 {
    overflow-wrap: anywhere;
  }
}

.schedule-corner,
.schedule-device-header,
.schedule-time-label,
.schedule-grid-cell {
  min-width: 0;
}

.schedule-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 5;
  display: grid;
  grid-column: 1;
  grid-row: 1;
  place-items: center;
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 800;
}

.schedule-device-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-row: 1;
  grid-template-columns: 9px minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.schedule-device-header strong {
  font-size: 14px;
}

.schedule-device-header small {
  color: var(--muted);
  font-size: 11px;
  text-align: end;
}

.schedule-device-header.offline .device-indicator {
  background: var(--abu-dhabi-red);
}

.schedule-time-label {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  grid-column: 1;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5px;
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
}

.schedule-grid-cell {
  border-inline-end: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.schedule-grid-cell:nth-of-type(odd) {
  background: #fbfcfc;
}

.schedule-event {
  position: relative;
  z-index: 2;
  min-width: 0;
  margin: 2px 3px;
  padding: 7px 9px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: start;
}

button.schedule-event {
  cursor: pointer;
}

.schedule-event.appointment {
  border-color: #9dcfca;
  color: #064f4c;
  background: #dff2f0;
}

.schedule-event.appointment:hover,
.schedule-event.appointment:focus-visible {
  border-color: var(--brand);
  background: #cceae7;
}

.schedule-event.appointment.completed {
  border-color: #9fd3b9;
  color: #155d40;
  background: #e5f5ec;
}

.schedule-event.appointment.no-show,
.schedule-event.appointment.pending {
  border-color: #dec48a;
  color: #74560c;
  background: #fff4dc;
}

.schedule-event.maintenance {
  border-color: #dbb9b4;
  color: #772c27;
  background: #fae9e7;
}

.schedule-event strong,
.schedule-event span,
.schedule-event small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-event strong {
  font-size: 12px;
}

.schedule-event strong i {
  margin-inline-end: 5px;
}

.schedule-event span,
.schedule-event small {
  margin-top: 3px;
  font-size: 10px;
}

.schedule-offline-column {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  border-inline-end: 1px solid var(--line);
  background: repeating-linear-gradient(135deg, rgba(176, 66, 56, 0.04), rgba(176, 66, 56, 0.04) 7px, rgba(176, 66, 56, 0.09) 7px, rgba(176, 66, 56, 0.09) 14px);
  pointer-events: none;
}

.schedule-offline-column span {
  position: sticky;
  top: 62px;
  align-self: start;
  margin-top: 12px;
  padding: 4px 7px;
  border-radius: 4px;
  color: #772c27;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
}

.schedule-closed {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  background: var(--surface-soft);
}

.schedule-closed i {
  font-size: 23px;
}

.schedule-mobile-agenda {
  display: none;
}

.admin-booking-focus {
  animation: admin-focus 1.8s ease;
}

@keyframes admin-focus {
  0%, 45% { box-shadow: 0 0 0 3px rgba(0, 122, 116, 0.22); }
  100% { box-shadow: none; }
}

.rtl .schedule-date-controls .ph-caret-left,
.rtl .schedule-date-controls .ph-caret-right,
.rtl .agenda-event .ph-caret-right {
  transform: rotate(180deg);
}

@media (max-width: 699px) {
  .admin-schedule {
    margin-top: 22px;
    padding-top: 22px;
  }

  .admin-schedule-heading,
  .schedule-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-date-controls {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .schedule-date-controls label,
  .schedule-date-controls input {
    width: 100%;
  }

  .schedule-date-controls .small-button {
    grid-column: 1 / -1;
  }

  .schedule-summary {
    gap: 5px;
  }

  .schedule-summary span {
    line-height: 1.5;
    text-align: start;
  }

  .schedule-timeline-wrap {
    display: none;
  }

  .schedule-mobile-agenda {
    display: grid;
    gap: 10px;
  }

  .device-agenda {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .device-agenda > header {
    display: grid;
    min-height: 52px;
    grid-template-columns: 9px auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
  }

  .device-agenda > header strong {
    font-size: 15px;
  }

  .device-agenda > header small {
    color: var(--muted);
    font-size: 12px;
    text-align: end;
  }

  .device-agenda.offline .device-indicator {
    background: var(--abu-dhabi-red);
  }

  .device-agenda > div > p {
    margin: 0;
    padding: 16px 12px;
    color: var(--muted);
    font-size: 13px;
  }

  .agenda-event {
    display: grid;
    width: 100%;
    min-height: 62px;
    grid-template-columns: 58px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--brand-dark);
    background: transparent;
    text-align: start;
  }

  .agenda-event:last-child {
    border-bottom: 0;
  }

  button.agenda-event {
    cursor: pointer;
  }

  button.agenda-event:hover,
  button.agenda-event:focus-visible {
    background: var(--brand-wash);
  }

  .agenda-event.maintenance {
    grid-template-columns: 22px minmax(0, 1fr);
    color: #772c27;
    background: #fff8f7;
  }

  .agenda-event > span,
  .agenda-event strong,
  .agenda-event small {
    display: block;
    min-width: 0;
  }

  .agenda-event strong {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .agenda-event small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
  }

  .agenda-time {
    color: var(--brand);
    font-size: 13px;
    font-weight: 800;
  }

  .agenda-time small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
  }
}
.operations-views {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
.operations-views button {
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--brand-dark);
  font: inherit;
  cursor: pointer;
}
.operations-views button[aria-pressed="true"] {
  border-bottom-color: var(--brand);
  background: var(--brand-wash);
  font-weight: 700;
}
.operations-panel[hidden] { display: none !important; }
@media (max-width: 600px) {
  #staffContent .admin-stats article,
  #adminContent .admin-stats article {
    min-height: 72px;
    padding: 12px;
    gap: 6px;
  }
  #staffContent .admin-stats strong,
  #adminContent .admin-stats strong { font-size: 22px; }
  .operations-views button { font-size: 14px; flex: 1 1 auto; }
}
