/* AyaBookings UI components — tokens only */

.aya-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--aya-space-2);
  font-family: inherit;
  font-size: var(--aya-text-body-app);
  font-weight: 600;
  line-height: 1.2;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--aya-radius-md);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.aya-btn:focus-visible {
  outline: none;
  box-shadow: var(--aya-focus-ring);
}

.aya-btn--primary {
  color: #fff;
  background: var(--aya-brand-900);
}

.aya-btn--primary:hover:not(:disabled) {
  background: var(--aya-brand-800);
}

.aya-btn--secondary {
  color: var(--aya-ink);
  background: var(--aya-surface);
  border: 1px solid var(--aya-border-strong);
  font-weight: 500;
}

.aya-btn--secondary:hover:not(:disabled) {
  border-color: var(--aya-muted);
}

.aya-btn--ghost {
  color: var(--aya-brand-700);
  background: transparent;
}

.aya-btn--ghost:hover:not(:disabled) {
  background: var(--aya-brand-50);
}

.aya-btn--danger {
  color: var(--aya-danger);
  background: var(--aya-surface);
  border: 1px solid color-mix(in srgb, var(--aya-danger) 35%, var(--aya-border-strong));
}

.aya-btn--cta {
  color: #fff;
  background: var(--aya-cta);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 24px;
}

.aya-btn--cta:hover:not(:disabled) {
  background: var(--aya-cta-hover);
}

.aya-btn:disabled,
.aya-btn.is-loading {
  cursor: not-allowed;
  color: var(--aya-subtle);
  background: var(--aya-divider);
  border-color: transparent;
}

.aya-btn.is-loading .aya-btn__label {
  opacity: 0.6;
}

.aya-btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: aya-spin 0.6s linear infinite;
}

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

.aya-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aya-field__label {
  font-size: var(--aya-text-label);
  font-weight: 600;
  color: var(--aya-ink);
}

.aya-field__required {
  color: var(--aya-danger);
}

.aya-field__control,
.aya-field__select,
.aya-field__textarea {
  font-family: inherit;
  font-size: var(--aya-text-body-app);
  color: var(--aya-ink);
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--aya-radius-md);
  background: var(--aya-surface);
  border: 1px solid var(--aya-border-strong);
}

.aya-field__control:focus,
.aya-field__select:focus,
.aya-field__textarea:focus {
  outline: none;
  border-color: var(--aya-brand-600);
  box-shadow: var(--aya-focus-ring-inset);
}

.aya-field.is-error .aya-field__control,
.aya-field.is-error .aya-field__select,
.aya-field.is-error .aya-field__textarea {
  border-color: var(--aya-danger);
  box-shadow: 0 0 0 3px var(--aya-danger-bg);
}

.aya-field__hint {
  font-size: var(--aya-text-caption);
  color: var(--aya-subtle);
}

.aya-field__error {
  font-size: var(--aya-text-caption);
  color: var(--aya-danger);
}

.aya-field__phone {
  display: flex;
}

.aya-field__dial {
  display: flex;
  align-items: center;
  gap: var(--aya-space-2);
  padding: 0 12px;
  font-size: var(--aya-text-body-app);
  color: var(--aya-ink);
  background: var(--aya-canvas);
  border: 1px solid var(--aya-border-strong);
  border-right: 0;
  border-radius: var(--aya-radius-md) 0 0 var(--aya-radius-md);
  min-height: 42px;
}

.aya-field__phone .aya-field__control {
  border-radius: 0 var(--aya-radius-md) var(--aya-radius-md) 0;
}

.aya-field--search .aya-field__search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  min-height: 42px;
  border: 1px solid var(--aya-border-strong);
  border-radius: var(--aya-radius-md);
  background: var(--aya-surface);
  color: var(--aya-muted);
}

.aya-field--search .aya-field__control {
  flex: 1;
  border: 0;
  padding: 10px 0;
  min-height: auto;
  background: transparent;
  box-shadow: none;
}

.aya-field--search .aya-field__control:focus {
  box-shadow: none;
}

.aya-field__file {
  display: flex;
  align-items: center;
  gap: var(--aya-space-3);
}

.aya-check,
.aya-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--aya-text-body-app);
  color: var(--aya-ink);
  cursor: pointer;
}

.aya-check input,
.aya-radio input {
  width: 18px;
  height: 18px;
  accent-color: var(--aya-brand-900);
}

.aya-switch {
  width: 42px;
  height: 24px;
  border-radius: var(--aya-radius-pill);
  padding: 3px;
  border: 0;
  cursor: pointer;
  display: flex;
  background: #c9cfd3;
  transition: background 0.15s ease;
}

.aya-switch[aria-checked="true"] {
  background: var(--aya-brand-900);
  justify-content: flex-end;
}

.aya-switch__thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}

.aya-choice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--aya-radius-lg);
  border: 1px solid var(--aya-border);
  font-size: var(--aya-text-body-app);
  color: var(--aya-ink);
  cursor: pointer;
  background: var(--aya-surface);
}

.aya-choice-card.is-selected {
  border: 2px solid var(--aya-brand-900);
  background: var(--aya-brand-50);
  font-weight: 600;
}

.aya-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--aya-text-caption);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--aya-radius-pill);
}

.aya-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.aya-badge--success { color: var(--aya-success); background: var(--aya-success-bg); }
.aya-badge--warning { color: var(--aya-warning); background: var(--aya-warning-bg); }
.aya-badge--danger { color: var(--aya-danger); background: var(--aya-danger-bg); }
.aya-badge--info { color: var(--aya-info); background: var(--aya-info-bg); }
.aya-badge--neutral { color: var(--aya-neutral); background: var(--aya-neutral-bg); }
.aya-badge--ussd { color: var(--aya-ussd); background: var(--aya-ussd-bg); }

.aya-badge--code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  color: var(--aya-brand-900);
  background: var(--aya-brand-100);
  padding: 3px 10px;
  border-radius: var(--aya-radius-xs);
}

.aya-badge--count {
  font-size: 13px;
  font-weight: 400;
  color: var(--aya-body);
  background: var(--aya-surface);
  border: 1px solid var(--aya-border);
  padding: 5px 12px;
}

.aya-badge--count strong {
  color: var(--aya-ink);
  font-weight: 600;
}

.aya-tabs--segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--aya-neutral-bg);
  border-radius: var(--aya-radius-md);
}

.aya-tabs--segmented .aya-tabs__tab {
  font-family: inherit;
  font-size: var(--aya-text-body-app);
  border: 0;
  border-radius: var(--aya-radius-sm);
  padding: 8px 14px;
  background: transparent;
  color: var(--aya-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--aya-space-2);
}

.aya-tabs--segmented .aya-tabs__tab.is-active {
  background: var(--aya-surface);
  color: var(--aya-ink);
  font-weight: 500;
  box-shadow: var(--aya-shadow-card);
}

.aya-tabs--segmented .aya-tabs__count {
  font-size: var(--aya-text-caption);
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--aya-radius-pill);
  background: var(--aya-brand-100);
  color: var(--aya-brand-900);
}

.aya-tabs--underline {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--aya-border);
}

.aya-tabs--underline .aya-tabs__tab {
  font-family: inherit;
  font-size: var(--aya-text-body-app);
  border: 0;
  background: none;
  padding: 10px 2px;
  margin-bottom: -1px;
  color: var(--aya-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.aya-tabs--underline .aya-tabs__tab.is-active {
  color: var(--aya-ink);
  font-weight: 600;
  border-bottom-color: var(--aya-brand-900);
}

.aya-tabs--vertical {
  border: 1px solid var(--aya-border);
  border-radius: 14px;
  padding: 6px;
}

.aya-tabs--vertical .aya-tabs__tab {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: var(--aya-text-body-app);
  border: 0;
  background: none;
  padding: 9px 12px;
  border-radius: var(--aya-radius-sm);
  color: var(--aya-body);
  cursor: pointer;
}

.aya-tabs--vertical .aya-tabs__tab.is-active {
  background: var(--aya-brand-100);
  color: var(--aya-brand-900);
  font-weight: 600;
}

.aya-stat-card {
  border: 1px solid var(--aya-border);
  border-radius: var(--aya-radius-xl);
  padding: 20px 22px;
  background: var(--aya-surface);
}

.aya-stat-card__label {
  font-size: var(--aya-text-label);
  font-weight: 500;
  color: var(--aya-muted);
}

.aya-stat-card__value {
  margin-top: var(--aya-space-2);
  font-size: var(--aya-text-kpi);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--aya-ink);
  font-variant-numeric: tabular-nums;
}

.aya-stat-card__meta {
  margin-top: 6px;
  font-size: var(--aya-text-label);
  color: var(--aya-muted);
}

.aya-stat-card--accent {
  border: 0;
  background: linear-gradient(135deg, var(--aya-brand-900) 0%, var(--aya-brand-700) 100%);
}

.aya-stat-card--accent .aya-stat-card__label {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--aya-brand-300);
}

.aya-stat-card--accent .aya-stat-card__value {
  color: #fff;
}

.aya-stat-card--accent .aya-stat-card__meta {
  color: var(--aya-brand-300);
}

.aya-stat-card--icon {
  display: flex;
  align-items: center;
  gap: 14px;
}

.aya-stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--aya-radius-lg);
  background: var(--aya-brand-100);
  color: var(--aya-brand-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aya-card {
  background: var(--aya-surface);
  border: 1px solid var(--aya-border);
  border-radius: var(--aya-radius-xl);
  box-shadow: var(--aya-shadow-card);
}

.aya-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--aya-space-3);
  padding: var(--aya-space-4) var(--aya-space-5);
  border-bottom: 1px solid var(--aya-divider);
}

.aya-card__title {
  margin: 0;
  font-size: var(--aya-text-h2-app);
  font-weight: 600;
  color: var(--aya-ink);
}

.aya-card__body {
  padding: var(--aya-space-5);
}

.aya-section {
  margin-bottom: var(--aya-space-6);
}

.aya-table-wrap {
  border: 1px solid var(--aya-border);
  border-radius: var(--aya-radius-xl);
  overflow: hidden;
  background: var(--aya-surface);
}

.aya-table__toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--aya-space-3);
  padding: 14px 20px;
  border-bottom: 1px solid var(--aya-divider);
}

.aya-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--aya-text-body-app);
}

.aya-table th {
  text-align: left;
  font-size: var(--aya-text-caption);
  font-weight: 500;
  color: var(--aya-muted);
  padding: 12px 20px;
  border-bottom: 1px solid var(--aya-divider);
}

.aya-table th.is-amount,
.aya-table td.is-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.aya-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--aya-divider);
  color: var(--aya-ink);
}

.aya-table tbody tr:hover {
  background: var(--aya-brand-50);
}

.aya-table__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--aya-space-3);
  padding: 12px 20px;
  font-size: var(--aya-text-label);
  color: var(--aya-muted);
}

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

.aya-menu {
  min-width: 200px;
  background: var(--aya-surface);
  border: 1px solid var(--aya-border);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--aya-shadow-raised);
}

.aya-menu__item {
  display: block;
  padding: 9px 10px;
  border-radius: var(--aya-radius-sm);
  font-size: var(--aya-text-label);
  color: var(--aya-ink);
  text-decoration: none;
}

.aya-menu__item:hover {
  background: var(--aya-canvas);
}

.aya-menu__item--danger {
  color: var(--aya-danger);
}

.aya-side-panel {
  width: 100%;
  max-width: 420px;
  background: var(--aya-surface);
  border: 1px solid var(--aya-border);
  border-radius: var(--aya-radius-xl);
  box-shadow: var(--aya-shadow-panel);
  display: flex;
  flex-direction: column;
}

.aya-side-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--aya-border);
}

.aya-side-panel__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--aya-ink);
}

.aya-side-panel__body {
  padding: 20px;
  flex: 1;
  overflow: auto;
}

.aya-side-panel__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--aya-space-2);
  padding: 14px 20px;
  border-top: 1px solid var(--aya-border);
}

.aya-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--aya-space-4);
  background: rgba(15, 42, 42, 0.45);
}

.aya-modal.is-open {
  display: flex;
}

.aya-modal__dialog {
  width: 100%;
  max-width: 480px;
  background: var(--aya-surface);
  border-radius: var(--aya-radius-xl);
  border: 1px solid var(--aya-border);
  box-shadow: var(--aya-shadow-raised);
}

.aya-empty-state {
  border: 1px dashed color-mix(in srgb, var(--aya-muted) 45%, var(--aya-border));
  border-radius: var(--aya-radius-xl);
  padding: 36px 24px;
  text-align: center;
}

.aya-empty-state__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 14px;
  background: var(--aya-neutral-bg);
  color: var(--aya-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.aya-empty-state__title {
  margin: 14px 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--aya-ink);
}

.aya-empty-state__text {
  margin: 0;
  font-size: var(--aya-text-body-app);
  color: var(--aya-muted);
}

.aya-page-header__bar {
  display: flex;
  align-items: center;
  gap: var(--aya-space-3);
  padding: 12px 24px;
  background: var(--aya-surface);
  border-bottom: 1px solid var(--aya-border);
}

.aya-page-header__breadcrumb {
  font-size: var(--aya-text-label);
  color: var(--aya-muted);
}

.aya-page-header__breadcrumb strong {
  color: var(--aya-ink);
}

.aya-page-header__main {
  padding: 24px;
  background: var(--aya-canvas);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--aya-space-4);
}

.aya-page-header__title {
  margin: 0;
  font-size: var(--aya-text-h1-app);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--aya-ink);
}

.aya-page-header__desc {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--aya-muted);
}

.aya-sidebar-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: var(--aya-radius-md);
  text-decoration: none;
  font-size: var(--aya-text-body-app);
  color: var(--aya-brand-300);
}

.aya-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.aya-sidebar-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
}

.aya-sidebar-item.is-active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--aya-cta);
}

.aya-sidebar-group {
  margin: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6fa8a8;
}

.aya-icon-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--aya-border);
  border-radius: var(--aya-radius-sm);
  background: var(--aya-surface);
  color: var(--aya-body);
  cursor: pointer;
}

.aya-icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--aya-focus-ring);
}

.aya-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.aya-ds-section {
  margin-bottom: var(--aya-space-8);
}

.aya-ds-section__title {
  margin: 0 0 var(--aya-space-3);
  font-size: 20px;
  font-weight: 600;
  color: var(--aya-ink);
}

.aya-ds-block {
  background: var(--aya-surface);
  border: 1px solid var(--aya-border);
  border-radius: var(--aya-radius-xl);
  box-shadow: var(--aya-shadow-card);
  overflow: hidden;
  margin-bottom: var(--aya-space-4);
}

.aya-ds-block__head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--aya-divider);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--aya-brand-900);
}

.aya-ds-block__body {
  padding: 22px;
}

.aya-ds-flex {
  display: flex;
  flex-wrap: wrap;
  gap: var(--aya-space-4);
  align-items: center;
}

.aya-app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--aya-canvas);
}

.aya-app-layout__sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--aya-brand-900);
  padding: 12px;
}

.aya-app-layout__main {
  flex: 1;
  min-width: 0;
}

.aya-marketing-layout__header,
.aya-business-layout__header {
  background: var(--aya-surface);
  border-bottom: 1px solid var(--aya-border);
}

.aya-marketing-layout__inner,
.aya-business-layout__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--aya-space-4) var(--aya-space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--aya-space-4);
}

.aya-marketing-layout__nav {
  display: flex;
  gap: var(--aya-space-6);
}

@media (max-width: 767px) {
  .aya-marketing-layout__nav {
    display: none;
  }
}
