:root {
  color-scheme: dark;
  --ink: #f7f1e6;
  --muted: #bfb3a2;
  --line: rgba(247, 241, 230, 0.16);
  --panel: rgba(23, 27, 29, 0.78);
  --panel-strong: rgba(15, 17, 18, 0.94);
  --copper: #d89d57;
  --jade: #42c4a6;
  --red: #d85a4b;
  --blue: #7bb7d8;
  --charcoal: #0d1112;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(66, 196, 166, 0.08), transparent 32%),
    radial-gradient(circle at 80% 8%, rgba(216, 157, 87, 0.16), transparent 34%),
    linear-gradient(145deg, #0d1112 0%, #171b1d 46%, #101415 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 20px;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(216, 157, 87, 0.55);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(216, 157, 87, 0.24), rgba(66, 196, 166, 0.08));
  color: var(--copper);
  font-weight: 900;
}

.brand-mark-large {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.nav-tabs,
.admin-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 18, 0.64);
}

.nav-tab,
.admin-tab {
  min-width: 92px;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.nav-tab.is-active,
.admin-tab.is-active {
  background: var(--ink);
  color: var(--charcoal);
  font-weight: 800;
}

.admin-entry {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(13, 17, 18, 0.64);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.admin-entry:hover,
.admin-entry:focus-visible {
  border-color: var(--jade);
  color: var(--ink);
}

.admin-entry-dot {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 4px rgba(216, 157, 87, 0.12);
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px 6px 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 18, 0.64);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.account-chip button {
  display: none;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.account-chip.is-signed-in button {
  display: inline-flex;
  align-items: center;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.admin-section {
  display: none;
}

.admin-section.is-active {
  display: block;
}

.admin-section.storefront-layout.is-active,
.storefront-layout.admin-section.is-active {
  display: grid;
}

.is-hidden {
  display: none !important;
}

.shop-onboarding {
  max-width: 980px;
  margin: 32px auto;
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  gap: 40px;
  border: 1px solid rgba(218, 230, 242, 0.2);
  background: #111619;
  color: #f5f7f8;
}

.shop-onboarding h1 {
  margin: 8px 0 12px;
}

.shop-onboarding p {
  color: #b9c2c8;
  line-height: 1.6;
}

.shop-onboarding form {
  display: grid;
  gap: 14px;
  align-content: start;
}

.shop-onboarding small,
.form-feedback {
  color: #b9c2c8;
}

.form-feedback {
  min-height: 1.4em;
  margin: 0;
}

.share-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  max-width: 430px;
}

.share-link span {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted, #64707a);
}

.share-link strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .shop-onboarding {
    grid-template-columns: 1fr;
    padding: 24px;
    margin: 20px 16px;
    gap: 20px;
  }

  .share-link {
    width: 100%;
  }
}

.booking-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: 24px;
  min-height: 520px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 18, 0.58);
  box-shadow: var(--shadow);
}

.client-hero .hero-copy {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(216, 157, 87, 0.16), transparent 48%),
    rgba(13, 17, 18, 0.68);
}

.client-hero .hero-copy::after {
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(216, 157, 87, 0.18);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--jade);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.4rem);
  font-weight: 700;
  line-height: 0.94;
}

h2 {
  margin-bottom: 0;
  font-size: 1.18rem;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.client-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(420px, 100%);
  margin-top: 20px;
  padding: 12px;
  border: 1px solid rgba(216, 157, 87, 0.28);
  border-radius: 8px;
  background: rgba(216, 157, 87, 0.08);
}

.welcome-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--copper);
  color: #15110d;
  font-size: 0.75rem;
  font-weight: 900;
}

.client-welcome strong,
.client-welcome small {
  display: block;
}

.client-welcome small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}

.hero-stats span {
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.hero-stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.4rem;
}

.hero-gallery {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.58fr;
  gap: 12px;
  min-height: 520px;
}

.hero-gallery img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  filter: saturate(0.94) contrast(1.04);
  box-shadow: var(--shadow);
}

.hero-gallery img:first-child {
  object-position: center;
}

.hero-gallery img:nth-child(2) {
  margin-top: 64px;
  height: calc(100% - 64px);
}

.gallery-note {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(300px, calc(100% - 36px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(13, 17, 18, 0.78);
  backdrop-filter: blur(14px);
}

.gallery-note span,
.gallery-note strong {
  display: block;
}

.gallery-note span {
  color: var(--muted);
  font-size: 0.84rem;
}

.workspace-grid,
.admin-grid,
.storefront-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  gap: 20px;
  margin-top: 20px;
}

.booking-panel,
.estimate-card,
.schedule-board,
.quick-scheduler,
.import-panel,
.brand-settings-card,
.phone-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.booking-panel,
.schedule-board,
.quick-scheduler,
.import-panel,
.brand-settings-card {
  padding: 22px;
}

.panel-intro {
  margin: 8px 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.panel-heading {
  margin-bottom: 18px;
}

label,
fieldset {
  display: block;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  padding: 12px 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(66, 196, 166, 0.16);
}

select option {
  color: #111;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

fieldset {
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  color: var(--muted);
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.service-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--jade);
}

.service-option strong {
  display: block;
  color: var(--ink);
}

.service-option small {
  color: var(--muted);
}

.service-option em {
  color: var(--copper);
  font-style: normal;
  font-weight: 900;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-action {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, var(--copper), #f0cc81);
  color: #15110d;
  transition: transform 180ms ease, filter 180ms ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  transition: border-color 180ms ease, background 180ms ease;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  border-color: var(--jade);
  background: rgba(66, 196, 166, 0.09);
}

.estimate-card {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 24px;
}

.client-assurance {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.8rem;
}

.client-assurance span {
  color: var(--jade);
  font-weight: 900;
}

.estimate-total {
  margin: 10px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.7rem;
  line-height: 1;
}

.estimate-meta {
  color: var(--muted);
  line-height: 1.5;
}

.estimate-breakdown {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}

.estimate-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.estimate-line strong {
  color: var(--ink);
}

.next-open {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border-radius: 8px;
  background: rgba(66, 196, 166, 0.11);
  color: var(--muted);
}

.next-open strong {
  color: var(--jade);
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.admin-tabs {
  position: sticky;
  top: 76px;
  z-index: 4;
  width: fit-content;
  max-width: 100%;
  margin: 6px 0 20px;
  overflow-x: auto;
  backdrop-filter: blur(18px);
}

.admin-header h1,
.storefront-layout h1 {
  margin-bottom: 0;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.route-admin {
  --line: rgba(123, 183, 216, 0.18);
}

#admin-view,
#login-view {
  max-width: 1160px;
  margin: 0 auto;
}

#admin-view .admin-tabs {
  border-color: rgba(123, 183, 216, 0.2);
  background: rgba(7, 13, 18, 0.82);
}

#admin-view .admin-tab.is-active {
  background: var(--blue);
  color: #071017;
}

#admin-view .eyebrow,
#login-view .eyebrow {
  color: var(--blue);
}

#admin-view .primary-action,
#login-view .primary-action {
  background: linear-gradient(135deg, var(--blue), #b6e2f6);
}

.auth-gate {
  min-height: 520px;
  margin-top: 18px;
  padding: clamp(28px, 6vw, 68px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(216, 90, 75, 0.12), transparent 38%),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.auth-gate {
  background:
    linear-gradient(135deg, rgba(123, 183, 216, 0.16), transparent 46%),
    var(--panel-strong);
}

.auth-gate h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
}

.auth-gate p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-shortcut {
  width: min(340px, 100%);
  margin-top: 18px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.metric-row article {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.metric-row span,
.appointment-card small {
  color: var(--muted);
}

.metric-row strong {
  display: block;
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.7rem;
}

.analytics-suite {
  margin-top: 20px;
}

.calendar-suite {
  margin-top: 20px;
}

.service-suite {
  margin-top: 20px;
}

.relationship-suite {
  margin-top: 20px;
}

.analytics-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 18, 0.52);
}

.analytics-toolbar h2 {
  font-size: 1.5rem;
}

.analytics-toolbar label {
  width: min(260px, 100%);
  margin: 0;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.insight-grid article,
.analytics-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.insight-grid article {
  min-height: 132px;
  padding: 18px;
}

.insight-grid span,
.insight-grid small {
  color: var(--muted);
}

.insight-grid strong {
  display: block;
  margin: 8px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  margin-top: 14px;
}

.analytics-layout-three {
  grid-template-columns: 0.9fr 0.9fr 1fr;
}

.analytics-card {
  min-width: 0;
  padding: 18px;
}

.calendar-weekdays,
.booking-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.calendar-day {
  min-height: 70px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.calendar-day.is-empty {
  opacity: 0.28;
}

.calendar-day strong,
.calendar-day span {
  display: block;
}

.calendar-day strong {
  color: var(--ink);
  font-size: 0.85rem;
}

.calendar-day span {
  margin-top: 8px;
  color: var(--jade);
  font-size: 0.78rem;
  font-weight: 900;
}

.calendar-day[data-heat="2"] {
  background: rgba(66, 196, 166, 0.11);
}

.calendar-day[data-heat="3"] {
  background: rgba(216, 157, 87, 0.16);
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.chart-row {
  display: grid;
  grid-template-columns: 82px 1fr 72px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.chart-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.chart-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--copper));
}

.compact .chart-row {
  grid-template-columns: 70px 1fr 44px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.rank-item strong,
.rank-item span {
  display: block;
}

.rank-item small {
  color: var(--muted);
}

.rank-pill {
  align-self: center;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(66, 196, 166, 0.12);
  color: var(--jade);
  font-weight: 900;
}

.expense-form {
  display: grid;
  gap: 10px;
}

.expense-form label {
  margin-bottom: 0;
}

.expense-form .secondary-action {
  width: 100%;
}

.owner-notes {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.owner-note {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  line-height: 1.45;
}

.owner-note strong {
  color: var(--ink);
}

.calendar-integration-grid,
.calendar-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.calendar-provider-card {
  display: grid;
  grid-template-columns: 1fr minmax(190px, 0.46fr);
  gap: 18px;
  min-height: 240px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.calendar-provider-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.calendar-provider-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.provider-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--copper);
  font-weight: 900;
}

.provider-status {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 12px;
}

.provider-status span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.calendar-provider-card.is-connected .provider-status span {
  background: rgba(66, 196, 166, 0.11);
  color: var(--jade);
}

.calendar-settings-form .secondary-action,
.calendar-sync-actions .secondary-action {
  width: 100%;
}

.toggle-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.toggle-line input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--jade);
}

.external-events {
  display: grid;
  gap: 10px;
}

.external-event {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.external-event strong,
.external-event span,
.external-event small {
  display: block;
}

.external-event span,
.external-event small {
  color: var(--muted);
}

.calendar-sync-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.sync-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.sync-badge.is-synced {
  background: rgba(66, 196, 166, 0.12);
  color: var(--jade);
}

.appointment-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.appointment-card .sync-button {
  width: auto;
  min-width: 72px;
  height: 32px;
  padding: 0 10px;
  background: rgba(66, 196, 166, 0.1);
  font-size: 0.78rem;
  font-weight: 900;
}

.payment-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(216, 157, 87, 0.12);
  color: var(--copper);
  font-size: 0.74rem;
  font-weight: 900;
}

.payment-badge.is-paid {
  background: rgba(66, 196, 166, 0.12);
  color: var(--jade);
}

.relationship-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.relationship-metrics article {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(66, 196, 166, 0.08), transparent 58%),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.relationship-metrics span,
.relationship-metrics small {
  color: var(--muted);
}

.relationship-metrics strong {
  display: block;
  margin: 8px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.relationship-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}

.service-admin-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.76fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.service-admin-list {
  display: grid;
  gap: 10px;
}

.service-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(216, 157, 87, 0.08), transparent 60%),
    rgba(255, 255, 255, 0.04);
}

.service-admin-row strong,
.service-admin-row small,
.service-admin-row span {
  display: block;
}

.service-admin-row small {
  color: var(--muted);
}

.service-flags {
  display: grid;
  gap: 6px;
}

.service-flags small {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-weight: 900;
}

.revenue-form .primary-action {
  margin-top: 4px;
}

.reminder-queue {
  display: grid;
  gap: 10px;
}

.reminder-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.reminder-card.is-due {
  border-left-color: var(--copper);
}

.reminder-card.is-late {
  border-left-color: var(--red);
}

.reminder-card strong,
.reminder-card small,
.reminder-card span {
  display: block;
}

.reminder-card small {
  color: var(--muted);
}

.reminder-card div {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 7px;
}

.reminder-card button,
.client-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.client-ledger-card {
  margin-top: 14px;
}

.client-ledger {
  display: grid;
  gap: 10px;
}

.client-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) 0.7fr 0.45fr 0.9fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.client-row strong,
.client-row small,
.client-row span {
  display: block;
}

.client-row small {
  color: var(--muted);
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.tutorial-dialog {
  width: min(640px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background:
    linear-gradient(145deg, rgba(66, 196, 166, 0.12), transparent 48%),
    #101415;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.tutorial-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.tutorial-dialog > div {
  padding: clamp(22px, 5vw, 34px);
}

.tutorial-dialog h2 {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.tutorial-dialog ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.tutorial-dialog strong {
  color: var(--ink);
}

.tutorial-actions {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.tutorial-actions .secondary-action {
  width: 100%;
}

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

.appointment-card {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--copper);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.appointment-card strong,
.appointment-card span {
  display: block;
}

.appointment-card button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(216, 90, 75, 0.12);
  color: var(--ink);
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.storefront-layout {
  align-items: stretch;
  min-height: 650px;
}

.storefront-layout .import-panel,
.storefront-layout .brand-settings-card {
  grid-column: 1;
}

.storefront-layout .storefront-preview {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
  gap: 20px;
  min-height: 650px;
  margin-top: 18px;
}

.login-copy,
.auth-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-copy {
  background:
    linear-gradient(145deg, rgba(123, 183, 216, 0.13), transparent 42%),
    var(--panel);
}

.auth-panel-kicker {
  margin-bottom: 14px;
  color: var(--ink);
  font-weight: 900;
}

.login-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 68px);
}

.login-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.auth-state-card {
  width: min(440px, 100%);
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.auth-state-card span,
.auth-state-card strong,
.auth-state-card small {
  display: block;
}

.auth-state-card span,
.auth-state-card small {
  color: var(--muted);
}

.auth-state-card strong {
  margin: 6px 0;
  font-size: 1.35rem;
}

.auth-panel {
  align-self: center;
  padding: 22px;
}

.auth-role-toggle,
.auth-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 18, 0.58);
}

.auth-role-toggle button,
.auth-method-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-role-toggle button.is-active,
.auth-method-tabs button.is-active {
  background: var(--ink);
  color: var(--charcoal);
}

.auth-form {
  margin-top: 12px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-actions .secondary-action {
  width: 100%;
}

#recaptcha-container {
  margin-top: 12px;
}

.firebase-checklist {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.firebase-checklist ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.import-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-settings-card {
  background:
    linear-gradient(145deg, rgba(216, 157, 87, 0.1), transparent 54%),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.brand-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.brand-preview strong,
.brand-preview small {
  display: block;
}

.brand-preview strong {
  font-size: 1.15rem;
}

.brand-preview small {
  margin-top: 3px;
  color: var(--muted);
}

.brand-settings-card .secondary-action {
  width: 100%;
}

#shop-icon {
  text-transform: uppercase;
}

.import-steps {
  display: grid;
  gap: 10px;
  margin: 22px 0 4px;
}

.import-steps > div {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.import-steps span {
  display: grid;
  width: 28px;
  height: 28px;
  grid-row: span 2;
  place-items: center;
  border: 1px solid rgba(123, 183, 216, 0.55);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 900;
}

.import-steps strong {
  font-size: 0.9rem;
}

.import-steps small {
  color: var(--muted);
  font-size: 0.76rem;
}

.import-panel p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.instagram-form {
  margin-top: 16px;
}

.import-status {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.import-status span,
.import-status strong {
  display: block;
}

.import-status span {
  color: var(--muted);
  font-size: 0.82rem;
}

.storefront-preview {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(123, 183, 216, 0.16), transparent),
    rgba(255, 255, 255, 0.04);
}

.phone-frame {
  width: min(360px, 90%);
  padding: 12px;
  background: #080a0b;
}

.phone-top {
  width: 82px;
  height: 8px;
  margin: 6px auto 14px;
  border-radius: 999px;
  background: #293033;
}

.phone-content {
  padding: 18px;
  border-radius: 8px;
  background: #f7f1e6;
  color: #101415;
}

.phone-content strong,
.phone-content span {
  display: block;
}

.preview-placeholder {
  display: grid;
  min-height: 74px;
  margin-bottom: 8px;
  place-items: center;
  border: 1px dashed rgba(16, 20, 21, 0.26);
  border-radius: 6px;
  color: #59605e;
  text-align: center;
}

.preview-placeholder span,
.preview-placeholder small {
  display: block;
  margin: 0;
}

.preview-placeholder span {
  font-size: 0.74rem;
  font-weight: 800;
}

.preview-placeholder small {
  max-width: 220px;
  margin-top: 4px;
  font-size: 0.68rem;
  line-height: 1.35;
}

.phone-gallery:not(:empty) + .phone-content button {
  display: block;
}

.phone-content span {
  margin: 6px 0 14px;
  color: #59605e;
  font-size: 0.86rem;
}

.phone-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.phone-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.phone-content button {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  background: #101415;
  color: #f7f1e6;
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 18, 0.92);
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-credit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.site-credit a {
  color: var(--ink);
  font-weight: 900;
  text-decoration-color: rgba(199, 205, 209, 0.55);
  text-underline-offset: 4px;
}

.site-credit a:hover,
.site-credit a:focus-visible {
  color: #f2f4f5;
  text-decoration-color: #f2f4f5;
}

.ch-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 34%),
    #050607;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 16px 34px rgba(0, 0, 0, 0.35);
}

.ch-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 880px) {
  .topbar,
  .admin-header {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-tabs {
    width: 100%;
  }

  .nav-tab,
  .admin-tab {
    flex: 1;
    min-width: 0;
  }

  .account-chip {
    justify-content: space-between;
  }

  .booking-hero,
  .workspace-grid,
  .admin-grid,
  .storefront-layout,
  .login-layout,
  .metric-row,
  .insight-grid,
  .analytics-layout,
  .analytics-layout-three,
  .calendar-integration-grid,
  .calendar-settings-grid,
  .calendar-provider-card,
  .service-admin-grid,
  .service-admin-row,
  .relationship-metrics,
  .relationship-grid,
  .client-row {
    grid-template-columns: 1fr;
  }

  .storefront-layout .import-panel,
  .storefront-layout .brand-settings-card,
  .storefront-layout .storefront-preview {
    grid-column: auto;
    grid-row: auto;
  }

  .analytics-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-gallery {
    min-height: 430px;
  }

  .estimate-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 12px;
  }

  h1 {
    font-size: 2.8rem;
  }

  .hero-copy,
  .booking-panel,
  .schedule-board,
  .quick-scheduler,
  .import-panel,
  .auth-panel,
  .login-copy {
    padding: 18px;
  }

  .hero-stats,
  .field-pair,
  .auth-actions,
  .calendar-sync-actions,
  .external-event,
  .reminder-card,
  .tutorial-actions,
  .appointment-card,
  .chart-row,
  .compact .chart-row {
    grid-template-columns: 1fr;
  }

  .chart-row {
    gap: 6px;
  }

  .calendar-day {
    min-height: 56px;
    padding: 6px;
  }

  .hero-gallery {
    grid-template-columns: 1fr;
  }

  .hero-gallery img:nth-child(2) {
    display: none;
  }

  .admin-entry {
    width: 100%;
  }

  .site-credit {
    align-items: flex-start;
  }
}

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