.icon {
  inline-size: 20px;
  block-size: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn,
.icon-button,
.chip,
.select-card,
.sort-head {
  min-block-size: 44px;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 48px;
  border-radius: 10px;
  padding-inline: 18px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.admin-dense,
.btn-compact {
  min-block-size: 40px;
}

.btn-primary {
  color: #FFF;
  background: var(--accent);
}

.btn-brand {
  color: #FFF;
  background: var(--brand);
}

.btn-secondary {
  border: 1.5px solid var(--brand);
  color: var(--brand);
  background: transparent;
}

.btn-ghost {
  color: var(--brand);
}

.btn-destructive {
  border: 1.5px solid color-mix(in srgb, var(--danger) 42%, transparent);
  color: var(--danger);
}

.btn.full,
.full {
  inline-size: 100%;
}

.btn:active,
.chip:active,
.select-card:active,
.icon-button:active {
  transform: scale(.98);
}

.btn:disabled,
.chip:disabled {
  border-color: var(--line);
  color: var(--ink-faint);
  background: var(--surface-sunken);
  transform: none;
}

.btn:focus-visible,
.chip:focus-visible,
.select-card:focus-visible,
.icon-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.icon-button {
  position: relative;
  inline-size: 44px;
  block-size: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--brand);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding-inline: 14px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.chip.is-selected,
.chip[aria-pressed="true"] {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-tint);
  font-weight: 600;
}

.chip.tiny {
  min-block-size: 30px;
  padding-inline: 10px;
  font-size: 12px;
}

.time-chip {
  min-block-size: 44px;
  font-variant-numeric: tabular-nums;
}

.time-chip.is-selected {
  border-color: transparent;
  color: #FFF;
  background: var(--accent);
  animation: slotSpring 240ms cubic-bezier(.34,1.56,.64,1);
}

.time-chip:disabled {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.panel-card,
.mini-card,
.feature-tile,
.doctor-public-card,
.form-card,
.booking-card,
.history-row,
.profile-header,
.staff-card,
.service-admin-card,
.table-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.panel-card {
  padding: var(--dense-pad, 20px);
}

.icon-tile {
  inline-size: 48px;
  block-size: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--brand);
  background: var(--brand-tint);
}

.avatar {
  inline-size: 56px;
  block-size: 56px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #FFF;
  background: var(--avatar-bg, var(--brand));
  font-family: var(--font-heading);
  font-weight: 700;
}

.avatar.small,
.text-avatar {
  inline-size: 36px;
  block-size: 36px;
}

.badge {
  min-block-size: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-inline: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-confirmed { color: var(--success); background: var(--success-tint); }
.badge-pending { color: var(--warning); background: var(--warning-tint); }
.badge-cancelled { color: var(--danger); background: var(--danger-tint); }
.badge-completed { color: var(--brand); background: var(--brand-tint); }
.badge-noShow { color: var(--info); background: var(--info-tint); }

.field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.field.wide,
.wide {
  grid-column: 1 / -1;
}

.input-field,
select,
textarea {
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 48px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  padding-inline: 14px;
}

textarea,
.textarea {
  min-block-size: 112px;
  padding-block: 12px;
  resize: vertical;
}

.boxed {
  display: block;
}

.phone-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  padding-inline: 8px 14px;
}

.phone-input input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.phone-input span {
  border-radius: 999px;
  background: var(--surface-sunken);
  color: var(--ink-soft);
  padding-block: 3px;
  padding-inline: 10px;
}

.check-control,
.toggle-row {
  min-block-size: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.check-control {
  justify-content: start;
}

.check-control input {
  position: absolute;
  opacity: 0;
}

.check-control span {
  inline-size: 22px;
  block-size: 22px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  color: #FFF;
}

.check-control input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
}

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

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle span {
  inline-size: 44px;
  block-size: 26px;
  position: relative;
  display: inline-block;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background-color 160ms ease;
}

.toggle span::after {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  inline-size: 20px;
  block-size: 20px;
  border-radius: 999px;
  background: #FFF;
  transition: transform 160ms ease;
}

.toggle input:checked + span {
  background: var(--brand);
}

.toggle input:checked + span::after {
  transform: translateX(calc(-1 * 18px));
}

.tabs {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-inline: auto;
  padding-block-end: 2px;
}

.tabs button {
  min-block-size: 44px;
  border: 0;
  border-block-end: 2px solid transparent;
  color: var(--ink-soft);
  background: transparent;
  padding-inline: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.tabs button.is-active {
  border-color: var(--brand);
  color: var(--brand);
}

.toast-root {
  position: fixed;
  z-index: 100;
  inset-block-end: calc(16px + env(safe-area-inset-bottom));
  inset-inline: 16px;
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.toast {
  position: relative;
  inline-size: min(100%, 430px);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding-block: 12px;
  padding-inline: 14px;
  box-shadow: var(--shadow-pop);
  animation: toastIn 220ms ease-out both;
}

.toast::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  inline-size: 100%;
  block-size: 2px;
  background: var(--brand);
  animation: toastProgress 3500ms linear forwards;
}

.toast.is-leaving {
  animation: toastOut 220ms ease-out both;
}

.sheet-backdrop,
.modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  background: rgba(18,49,43,.34);
}

.sheet-backdrop {
  justify-items: end;
}

.slide-over {
  inline-size: min(100%, 440px);
  block-size: 100%;
  overflow: auto;
  border: 0;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow-pop);
  animation: sheetIn 260ms ease-out both;
}

.compact-sheet {
  block-size: auto;
  align-self: end;
  border-start-start-radius: 16px;
  border-start-end-radius: 16px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 16px;
}

.sheet-actions,
.stack,
.sheet-nav {
  display: grid;
  gap: 12px;
}

.modal-backdrop {
  place-items: center;
  padding: 16px;
}

.modal-card {
  inline-size: min(100%, 400px);
  display: grid;
  gap: 14px;
  padding: 20px;
}

.empty-state {
  min-block-size: 220px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 28px;
  color: var(--brand);
  text-align: center;
}

.empty-state p {
  max-inline-size: 38ch;
}

.line-art {
  inline-size: 96px;
  block-size: 96px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-sunken);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline: -60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: shimmer 1400ms linear infinite;
}

.skeleton-stack {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.hero-skeleton { block-size: 220px; }
.line-skeleton { inline-size: 52%; block-size: 18px; }
.card-skeleton { block-size: 96px; }

.spinner {
  inline-size: 18px;
  block-size: 18px;
  border: 2px solid rgba(255,255,255,.45);
  border-block-start-color: #FFF;
  border-radius: 999px;
  animation: spin 700ms linear infinite;
}

@keyframes slotSpring {
  0% { transform: scale(1); }
  58% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

@keyframes sheetIn {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(12px); }
}

@keyframes toastProgress {
  to { inline-size: 0; }
}

@keyframes shimmer {
  to { transform: translateX(120%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (hover: hover) {
  .btn:hover,
  .chip:hover,
  .icon-button:hover {
    transform: translateY(-1px);
  }

  .btn-primary:hover { background: var(--accent-strong); }
  .btn-brand:hover { background: var(--brand-strong); }
  .btn-ghost:hover,
  .icon-button:hover { background: var(--brand-ghost); }
  .btn-destructive:hover { background: var(--danger-tint); }
  .select-card:hover { border-color: var(--brand); box-shadow: var(--shadow-card); }
}

@media (min-width: 900px) {
  .toast-root {
    inset-block: 24px auto;
    inset-inline: auto 24px;
    justify-items: end;
  }
}

@media (max-width: 699px) {
  .slide-over {
    inline-size: 100%;
  }
}

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

  .skeleton::after,
  .toast::after,
  .spinner {
    animation: none !important;
  }
}
