/* Agent Booking NOW — shared interface foundations.
   Loaded after feature styles so all existing tools share one visual language. */
:root {
  color-scheme: light;
  --ink: #172b4d;
  --muted: #52627a;
  --line: #e1e7ef;
  --paper: #f6f8fc;
  --white: #fff;
  --primary: #1764d9;
  --primary-hover: #104fb4;
  --primary-soft: #edf4ff;
  --teal: var(--primary);
  --teal-dark: var(--primary-hover);
  --teal-soft: var(--primary-soft);
  --navy: #15335b;
  --blue: #1764d9;
  --red: #b4233b;
  --amber: #825b15;
  --shadow: 0 1px 3px rgb(23 43 77 / 3%);
  --focus: #1764d9;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

body { background: var(--paper); color: var(--ink); }
::selection { background: #dbe9ff; color: #122e57; }
a { color: var(--primary); }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { color: var(--ink); }
h1 { font-size: 28px; font-weight: 720; line-height: 1.25; letter-spacing: -.7px; }
h2 { font-size: 20px; font-weight: 680; line-height: 1.35; letter-spacing: -.35px; }
h3 { font-size: 16px; line-height: 1.4; letter-spacing: -.15px; }
.muted, .field-help { color: var(--muted); }
.field-help { font-size: 12px; line-height: 1.6; }
.eyebrow { color: var(--primary); font-size: 10px; font-weight: 750; letter-spacing: 1.1px; }

/* Controls share the same height, focus treatment, and clear action hierarchy. */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
  color: var(--ink);
  background-color: #fff;
  border-color: #c7d2e1;
  border-radius: 8px;
  min-height: 42px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgb(23 43 77 / 2%);
}
input::placeholder, textarea::placeholder { color: #718096; opacity: 1; }
input:disabled, select:disabled, textarea:disabled { color: #68778d; background-color: #f4f6fa; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--primary); }
label { color: var(--ink); font-size: 13px; font-weight: 620; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(23 100 217 / 10%);
}
.btn {
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 16px;
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 1px 2px rgb(23 43 77 / 4%);
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.secondary { background: #fff; color: var(--ink); border-color: #ccd6e3; box-shadow: none; }
.btn.secondary:hover { background: #f5f8fd; color: var(--primary-hover); border-color: #9db8df; }
.btn.ghost { background: transparent; color: var(--primary); border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--primary-soft); border-color: transparent; }
.btn.danger { background: #fff4f5; color: var(--red); border-color: #f1ccd3; box-shadow: none; }
.btn.danger:hover { background: #ffe8ec; border-color: #eab5c0; }
.btn.small { min-height: 36px; padding: 7px 11px; font-size: 12px; }
button:disabled, .btn:disabled { cursor: not-allowed; box-shadow: none; }
button:disabled:hover { transform: none; }
.actions { gap: 8px; }
.form-footer { gap: 10px; padding-top: 20px; margin-top: 24px; border-color: var(--line); }
.form-grid { gap: 18px; }
.check { font-weight: 450; }
.check input { box-shadow: none; }

/* White surfaces, precise borders, and compact information hierarchy. */
.card, .client-card, .team-cards article, .report-stat-grid article, .report-rates article,
.monitor-check, .monitor-queue-grid>article, .itinerary-stop, .waitlist-entry {
  background: #fff;
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad, .card-body { padding: 24px; }
.card-head { padding: 18px 24px; border-color: var(--line); gap: 12px; }
.card-head h2 { font-size: 17px; }
.card-foot { background: #fbfcfe; border-color: var(--line); padding: 16px 24px; }
.stack, .grid-2, .grid-3 { gap: 20px; }
.avatar, .client-avatar { background: var(--primary-soft); color: var(--primary); }
.provider-icon { border-radius: 9px; }
.table { color: var(--ink); font-size: 13px; }
.table th { background: #f8faff; color: #52627a; font-size: 10px; letter-spacing: .65px; padding-block: 12px; }
.table th, .table td { border-bottom-color: var(--line); }
.table tbody tr:hover { background: #fafcff; }
.table td { padding-block: 15px; }
.pill { border-radius: 20px; padding: 4px 9px; font-size: 11px; font-weight: 650; color: #465973; background: #eef2f7; }
.pill.good { background: #eaf7f0; color: #216848; }
.pill.warn { background: #fff4dc; color: #805811; }
.pill.bad { background: #ffedf0; color: #a52c44; }
.pill.blue { background: var(--primary-soft); color: #2358a5; }
.notice { border-radius: 9px; font-size: 13px; padding: 13px 15px; box-shadow: none; }
.notice.info { color: #274d81; background: #f0f6ff; border-color: #d4e3fb; }
.notice.error { color: #9e2940; background: #fff3f5; border-color: #efc9d1; }
.notice.success { color: #246a4b; background: #f0faf5; border-color: #c9e8d8; }
.empty { padding: 40px 24px; }
.empty .empty-mark { background: var(--primary-soft); color: var(--primary); }
.empty h3 { font-size: 16px; }
.empty p { font-size: 13px; line-height: 1.65; }
.spinner { border-color: #dbe7fa; border-top-color: var(--primary); }
.toast { background: #17345e; border-radius: 10px; box-shadow: 0 8px 30px rgb(23 43 77 / 18%); }
.toast.error { background: #9d2940; }

/* Feature modules inherit the same restrained blue active states. */
.client-section-nav, .team-tabs, .ai-tabs, .client-portal-tabs { border-color: var(--line); }
.client-section-nav button, .team-tabs button, .ai-tabs button, .client-portal-tabs button { color: var(--muted); }
.client-section-nav .active, .team-tabs button.active, .ai-tabs button.active,
.client-portal-tabs button[aria-pressed=true] { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.client-toolbar, .team-toolbar, .report-filters, .waitlist-queue-toolbar { gap: 12px; }
.client-card:hover { border-color: #a8c2e9; box-shadow: 0 3px 12px rgb(23 43 77 / 5%); }
.client-profile h2, .report-stat-grid strong, .report-rates strong,
.monitor-backup-summary strong, .itinerary-summary strong { color: var(--ink); }
.client-private-help, .client-note, .client-task, .waitlist-context,
.report-filter-help, .itinerary-origin, .workspace-move-current { background: #f7f9fd; border-color: var(--line); }
.client-section-heading, .team-day-heading, .monitor-history>li,
.report-table-scroll th, .report-table-scroll td { border-color: var(--line); }
.team-appointment { border-color: var(--line); border-radius: 10px; }
.team-appointment:hover { background: #f7faff; }
.team-event-copy strong, .team-time, .monitor-check-heading h3 { color: var(--ink); }
.team-event-copy span, .team-time span, .report-stat-grid span, .report-stat-grid small,
.monitor-check>p, .monitor-storage dt { color: var(--muted); }
.team-member-picker, .waitlist-settings fieldset, .webpush-preferences fieldset { border-color: var(--line); border-radius: 10px; }
.report-chart-column>span { background: var(--primary); }
.report-table-scroll thead th { background: #f8faff; color: var(--muted); }
.agent-import-view .card { border-color: var(--line); border-radius: 12px; }
.agent-import-view h2, .agent-import-view h3 { color: var(--ink); }
.agent-import-view input:not([type=checkbox]), .agent-import-view select { border-color: #c7d2e1; border-radius: 8px; }
.ai-step { background: var(--primary-soft); color: var(--primary); }
.ai-guide, .ai-columns, .ai-preview, .ai-summary { border-color: var(--line); }
.agent-import-view input[type=file]::file-selector-button { color: var(--primary); background: var(--primary-soft); border-color: #d1e1fa; }
.webpush-panel { border-color: var(--line); border-radius: 12px; background: #fff; }
.webpush-eyebrow { color: var(--primary); }
.webpush-hint { background: #f5f8fe; color: #49617f; }
.webpush-device, .webpush-history { border-color: var(--line); }
.itinerary-marker { background: var(--primary-soft); color: var(--primary); }
.itinerary-leg { border-color: #dbe5f5; background: #f7faff; }
.itinerary-time { color: var(--primary); }
.workspace-move-review .workspace-move-new { background: var(--primary-soft); border-color: #c5d9f7; }

/* Account panels and dialogs stay readable without oversized chrome. */
dialog { border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgb(15 35 67 / 22%); }
dialog::backdrop { background: rgb(21 40 69 / 42%); backdrop-filter: blur(3px); }
.dialog-head { border-color: var(--line); padding: 20px 24px; }
.dialog-head h2 { font-size: 20px; }
.dialog-body { padding: 24px; }
.dialog-footer { border-color: var(--line); background: #fbfcfe; }
.profile-preview { border-color: var(--line); }
.profile-photo { background: var(--primary-soft); color: var(--primary); }
.connection-card { border-color: var(--line); }
.connection-mini { border-color: var(--line); }
.service-card { border-color: var(--line); }

/* Client portal uses the same typography and appointment-card language. */
.client-portal-body { background: var(--paper); }
.client-portal-header { background: #fff; border-bottom-color: var(--line); min-height: 76px; }
.client-portal-brand { color: var(--ink); }
.client-portal-brand small { color: var(--muted); }
.client-portal-signin { max-width: 480px; margin-top: 56px; }
.client-portal-signin h1 { font-size: 30px; letter-spacing: -.8px; }
.client-portal-signin .card { padding: 26px; border-radius: 12px; }
.client-portal-greeting h1 { font-size: 28px; letter-spacing: -.7px; }
.client-portal-when { background: #f4f8ff; color: #234d85; border-color: #dce7f8; border-radius: 9px; }
.client-portal-booking { border-color: var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.client-portal-booking h2 { font-size: 18px; }
.client-portal-answers { border-color: var(--line); }

/* Public directory: quieter search bar, professional profile cards. */
.directory-page { background: var(--paper); color: var(--ink); font-family: inherit; }
.directory-header { background: #fff; border-color: var(--line); min-height: 76px; }
.directory-header nav { flex-shrink: 0; }
.directory-header .directory-button { white-space: nowrap; }
.directory-brand, .directory-agent-heading h3, .directory-section-heading h2 { color: var(--ink); }
.directory-brand small, .directory-agent-heading p, .directory-section-heading p { color: var(--muted); }
.directory-hero { padding-block: 52px 32px; }
.directory-hero h1 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -1px; line-height: 1.15; }
.directory-kicker { color: var(--primary); font-size: 11px; letter-spacing: 1px; }
.directory-hero>p:last-child { color: var(--muted); max-width: 660px; line-height: 1.7; }
.directory-search { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.directory-search input, .directory-search select { min-height: 44px; border-color: #c7d2e1; border-radius: 8px; }
.directory-card, .directory-teams article { border-color: var(--line); border-radius: 12px; box-shadow: var(--shadow); background: #fff; }
.directory-card:hover { border-color: #a8c2e9; box-shadow: 0 4px 16px rgb(23 43 77 / 5%); }
.directory-button { color: #fff; background: var(--primary); border: 1px solid var(--primary); border-radius: 8px; min-height: 42px; font-size: 13px; }
.directory-page a.directory-button { color: #fff; }
.directory-button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.directory-page a.directory-button.secondary { color: var(--primary); background: #fff; border-color: #c8d7ed; }
.directory-page a.directory-button.secondary:hover { background: var(--primary-soft); border-color: #9ebce9; }
.directory-clear { color: var(--primary); }
.directory-photo { color: var(--primary); background: var(--primary-soft); }
.directory-tags span { color: #405e85; background: #eff4fc; }
.directory-footer { border-color: var(--line); color: var(--muted); }

@media (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { font-size: 16px; min-height: 44px; }
  .btn, .btn.small, .directory-button { min-height: 44px; }
  .card-pad, .card-body { padding: 18px; }
  .card-head { padding: 16px 18px; }
  .card-foot { padding: 14px 18px; }
  .form-grid { gap: 16px; }
  .field-help, .notice { font-size: 12px; }
  .stack, .grid-2, .grid-3 { gap: 16px; }
  .dialog-body { padding: 20px 18px; }
  .dialog-head { padding: 16px 18px; }
  .client-portal-signin { margin-top: 30px; }
  .client-portal-header { min-height: 68px; }
  .client-portal-signin h1, .client-portal-greeting h1 { font-size: 27px; }
  .directory-hero { padding-block: 32px 24px; }
  .directory-search { padding: 16px; gap: 14px; }
  .directory-header { min-height: 68px; gap: 12px; }
  .directory-header .directory-button { padding-inline: 14px; }
  .directory-brand { min-width: 0; }
}

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

@media (forced-colors: active) {
  .btn, .pill, .card, .client-portal-booking, .directory-card { border: 1px solid ButtonText; }
  :focus-visible { outline-color: Highlight; }
}
