/* ===========================================================================
   Owner · daily appointments view (also provides base styles for admin)
   Dark glassmorphism theme — matches home.css / chat view.
   =========================================================================== */
:root {
  --brand: #16a37f;            /* teal action color, tuned for dark bg */
  --brand-strong: #1bb98f;     /* hover (brighter on dark) */
  --brand-soft: rgba(22, 163, 127, 0.18);

  --ink: #f5f0f7;
  --ink-soft: rgba(245, 240, 247, 0.66);
  --ink-faint: rgba(245, 240, 247, 0.46);

  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);

  --bg: #0f0b12;
  --bg-2: #17111d;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.045);

  --danger: #ff8a80;
  --ok: #5dcaa5;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  --ring: 0 0 0 3px rgba(22, 163, 127, 0.32);

  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(22, 163, 127, 0.22), transparent 84%),
    radial-gradient(circle at 85% 12%, rgba(159, 199, 255, 0.16), transparent 80%),
    linear-gradient(180deg, var(--bg) 0%, #120d16 48%, #0d0910 100%);
  background-attachment: fixed;
}
.owner { max-width: 760px; margin: 0 auto; padding: 28px 20px 64px; }

/* ---- Header ---- */
.owner-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 50px; height: 50px; flex: none; border-radius: 15px;
  display: grid; place-items: center; font-weight: 800; font-size: 21px;
  letter-spacing: 0.04em; color: #1b1020;
  background: linear-gradient(140deg, rgba(232, 185, 165, 0.98), rgba(159, 199, 255, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 22px rgba(159, 199, 255, 0.22);
}
.brand-text { min-width: 0; }
.brand-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.owner-topbar h1 { margin: 0; font-family: var(--font-display); font-size: 26px; letter-spacing: -.02em; }
.sub { margin: 3px 0 0; color: var(--ink-soft); font-size: 14px; text-transform: capitalize; }

/* Live greeting subtitle */
.greeting { display: flex; align-items: center; gap: 7px; margin: 4px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.greet-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(22, 163, 127, 0.5); animation: greetPulse 2.4s ease-out infinite; }
@keyframes greetPulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 127, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(22, 163, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 127, 0); }
}
@media (prefers-reduced-motion: reduce) { .greet-dot { animation: none; } }

.controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* Circular icon button (used for Refresh in the header) */
.icon-btn.round {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-soft); display: grid; place-items: center;
  cursor: pointer; transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.icon-btn.round:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.icon-btn.round.spin svg { animation: iconSpin .6s ease; }
@keyframes iconSpin { to { transform: rotate(360deg); } }
/* Ghost button with a leading icon */
.btn.btn-icon { gap: 8px; padding: 0 14px; }
.btn.btn-icon svg { opacity: .85; }
.locale-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px);
}
.locale-option {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 7px 10px;
}
.locale-option.active {
  background: var(--brand);
  color: #06241c;
}
.date-nav {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 3px; backdrop-filter: blur(14px);
}
.icon-btn {
  width: 30px; height: 32px; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--ink-soft); border-radius: 8px;
  display: grid; place-items: center; transition: background .12s ease, color .12s ease;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.date-nav input[type="date"] { border: 0; box-shadow: none; padding: 6px 6px; font-size: 14px; background: transparent; color: var(--ink); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #06241c; border: 1px solid transparent;
  border-radius: var(--radius-sm); padding: 0 16px; height: 40px;
  font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background .14s ease, transform .06s ease, box-shadow .14s ease;
}
.btn:hover { background: var(--brand-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }

input[type="date"], input[type="password"] {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 14px; color: var(--ink); background: var(--surface);
  transition: border-color .14s ease, box-shadow .14s ease;
}
input[type="date"]:focus, input[type="password"]:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }

/* ---- Cards / login ---- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.card h2 { margin: 0; font-size: 18px; }
.card-hint { margin: 6px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.login-card { max-width: 460px; margin: 8vh auto 0; }
.login-row { display: flex; gap: 10px; margin-top: 16px; }
.login-row input { flex: 1; }

/* ---- Owner auth / post-payment welcome screen ---- */
/* A calm full-viewport view that covers the dashboard chrome so the new owner
   sees only a welcome + password field. On success it fades away to reveal the
   dashboard beneath (see .auth-leaving / .content-enter). */
.auth-screen {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 24px; overflow: auto;
  background:
    radial-gradient(circle at 50% 6%, rgba(22, 163, 127, 0.22), transparent 58%),
    radial-gradient(circle at 84% 92%, rgba(159, 199, 255, 0.14), transparent 55%),
    linear-gradient(180deg, #130e18 0%, #0c080f 100%);
}
.auth-screen.hidden { display: none !important; }
.auth-screen.auth-leaving { animation: authOut .5s cubic-bezier(.4, 0, .2, 1) forwards; }

.auth-card {
  width: 100%; max-width: 424px; text-align: center;
  padding: 40px 34px 26px;
  background: rgba(23, 17, 29, 0.74); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px);
  animation: authIn .6s cubic-bezier(.16, 1, .3, 1) both;
}

/* Badge: a calm lock for normal sign-in, a celebratory check after payment. */
.auth-badge {
  width: 78px; height: 78px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
}
.auth-badge svg { width: 40px; height: 40px; }
.auth-badge .icon-lock { stroke: currentColor; stroke-width: 1.7; }
.auth-badge .icon-check { display: none; }
.is-welcome .auth-badge {
  background: radial-gradient(circle at 50% 34%, rgba(93, 202, 165, 0.30), rgba(22, 163, 127, 0.12));
  border-color: rgba(93, 202, 165, 0.5);
  box-shadow: 0 0 0 7px rgba(22, 163, 127, 0.10), 0 12px 34px rgba(22, 163, 127, 0.28);
  animation: badgePop .55s cubic-bezier(.16, 1, .3, 1) .12s both;
}
.is-welcome .auth-badge .icon-lock { display: none; }
.is-welcome .auth-badge .icon-check { display: block; }
.auth-badge .icon-check .ring { stroke: rgba(93, 202, 165, 0.45); stroke-width: 2; }
.auth-badge .icon-check .check {
  stroke: var(--ok); stroke-width: 4.5;
  stroke-dasharray: 44; stroke-dashoffset: 44;
  animation: checkDraw .45s cubic-bezier(.65, 0, .45, 1) .5s forwards;
}

.auth-title { margin: 0; font-family: var(--font-display); font-size: 25px; letter-spacing: -.02em; line-height: 1.22; }
.auth-sub { margin: 11px auto 0; max-width: 34ch; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }

.auth-form { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.auth-input {
  width: 100%; height: 52px; text-align: center; font-size: 15px;
  border: 1px solid var(--line-strong); border-radius: 13px; color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.auth-input::placeholder { color: var(--ink-faint); }
.auth-input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); background: rgba(255, 255, 255, 0.07); }
.auth-btn { width: 100%; height: 52px; font-size: 15px; border-radius: 13px; }
.auth-btn:disabled { opacity: .7; cursor: default; }
.auth-error { margin: 15px 0 0; font-size: 13.5px; }
.auth-note { margin: 15px auto 0; max-width: 33ch; color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; }
.auth-note.ok { color: var(--ok); }
.auth-link {
  display: block; margin: 16px auto 0; padding: 4px; background: none; border: 0; cursor: pointer;
  color: var(--ink-soft); font-size: 13px; font-weight: 600; font-family: inherit;
  text-decoration: underline; text-underline-offset: 3px; transition: color .14s ease;
}
.auth-link:hover { color: var(--brand); }

.auth-locale { margin: 22px auto 0; }

/* Dashboard reveal after the auth screen fades out */
.content-enter { animation: contentIn .55s cubic-bezier(.16, 1, .3, 1) both; }

@keyframes authIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes authOut { to { opacity: 0; transform: scale(1.035); } }
@keyframes badgePop { 0% { transform: scale(.4); opacity: 0; } 62% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
@keyframes contentIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .auth-card, .is-welcome .auth-badge, .content-enter, .auth-screen.auth-leaving { animation: none !important; }
  .auth-badge .icon-check .check { animation: none; stroke-dashoffset: 0; }
}

/* =====================================================================
   Calendar — day / week (time-grid) + month, with a full-screen mode
   ===================================================================== */
.cal {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(18px); overflow: hidden;
  height: min(74vh, 760px);
}

/* Toolbar */
.cal-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.cal-nav { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cal-arrows { display: flex; gap: 2px; }
.cal-title { margin: 0; font-family: var(--font-display); font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.cal-count { font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; }
.cal-actions { display: flex; align-items: center; gap: 10px; }

/* Segmented view control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); }
.seg-btn {
  border: 0; background: transparent; color: var(--ink-soft); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  transition: background .14s ease, color .14s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--brand); color: #06241c; }
.cal-expand .ico-collapse { display: none; }
.cal-fullscreen .cal-expand .ico-expand { display: none; }
.cal-fullscreen .cal-expand .ico-collapse { display: block; }

.cal-body { position: relative; flex: 1; min-height: 0; display: flex; }

/* ---- Time grid (day / week) ---- */
.tg { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.tg-head { display: grid; border-bottom: 1px solid var(--line); }
.tg-corner { border-right: 1px solid var(--line); }
.tg-dayhead {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px;
  border-left: 1px solid var(--line);
}
.tg-dayhead .dh-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.tg-dayhead .dh-num { font-size: 17px; font-weight: 700; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.tg-dayhead.is-today .dh-name { color: var(--brand); }
.tg-dayhead.is-today .dh-num { background: var(--brand); color: #06241c; }
.tg-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.tg-grid { display: grid; position: relative; padding-top: 8px; }
.tg-gutter { border-right: 1px solid var(--line); }
.tg-hour { position: relative; }
.tg-hour span { position: absolute; top: -7px; right: 8px; font-size: 11px; color: var(--ink-faint); }
.tg-col { position: relative; border-left: 1px solid var(--line); }
.tg-col.is-today { background: rgba(22, 163, 127, 0.05); }
.tg-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.tg-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #ff5a5f; z-index: 4; }
.tg-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #ff5a5f; }

/* Appointment block */
.appt {
  position: absolute; overflow: hidden; text-align: left; cursor: pointer;
  border: 1px solid rgba(22, 163, 127, 0.5); border-left: 3px solid var(--brand);
  background: linear-gradient(180deg, rgba(22, 163, 127, 0.28), rgba(22, 163, 127, 0.16));
  color: var(--ink); border-radius: 8px; padding: 4px 7px; z-index: 3;
  display: flex; flex-direction: column; gap: 1px; line-height: 1.2;
  transition: transform .08s ease, box-shadow .12s ease;
}
.appt:hover { z-index: 5; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); transform: translateY(-1px); }
.appt-t { font-size: 10.5px; font-weight: 700; color: var(--brand); }
.appt-n { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-s { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Month grid ---- */
.mo { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.mo-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.mo-dh { padding: 8px 6px; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.mo-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; min-height: 0; overflow-y: auto; }
.mo-cell { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 6px; min-height: 90px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.mo-cell:nth-child(7n + 1) { border-left: 0; }
.mo-out { background: rgba(0, 0, 0, 0.14); }
.mo-out .mo-num { color: var(--ink-faint); }
.mo-num {
  align-self: flex-start; border: 0; background: transparent; color: var(--ink); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; width: 26px; height: 26px; border-radius: 50%;
}
.mo-num:hover { background: var(--brand-soft); }
.mo-cell.is-today .mo-num { background: var(--brand); color: #06241c; }
.mo-appt {
  display: flex; align-items: center; gap: 5px; width: 100%; text-align: left; cursor: pointer;
  border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 11.5px;
  padding: 2px 4px; border-radius: 5px; white-space: nowrap; overflow: hidden;
}
.mo-appt:hover { background: var(--brand-soft); }
.mo-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.mo-time { font-weight: 700; color: var(--brand); flex: none; }
.mo-name { overflow: hidden; text-overflow: ellipsis; }
.mo-more { border: 0; background: transparent; color: var(--ink-faint); cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; text-align: left; padding: 1px 4px; }
.mo-more:hover { color: var(--brand); }

/* ---- Appointment detail popover ---- */
.appt-pop {
  position: absolute; z-index: 20; width: 240px; padding: 12px 14px;
  background: rgba(23, 17, 29, 0.96); border: 1px solid var(--line-strong);
  border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); backdrop-filter: blur(20px);
}
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pop-when { font-size: 12px; font-weight: 700; color: var(--brand); }
.pop-x { border: 0; background: transparent; color: var(--ink-faint); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.pop-x:hover { color: var(--ink); }
.pop-name { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.pop-svc { margin-top: 2px; font-size: 13px; color: var(--ink-soft); }
.pop-row { margin-top: 8px; }
.pop-phone { color: var(--brand); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.pop-phone:hover { text-decoration: underline; }

/* ---- Full-screen focus mode ---- */
body.cal-fs-lock { overflow: hidden; }
.cal.cal-fullscreen {
  position: fixed; inset: 0; z-index: 200; height: 100vh; width: 100vw;
  border-radius: 0; border: 0; max-width: none;
  /* Opaque backdrop so the dashboard behind doesn't bleed through. */
  background: linear-gradient(180deg, #130e18 0%, #0d0910 100%);
}
.cal.cal-fullscreen .cal-toolbar { padding: 14px 20px; }

@media (max-width: 700px) {
  .cal { height: min(72vh, 640px); }
  .cal-toolbar { gap: 8px; }
  .cal-title { font-size: 16px; }
  .cal-count { display: none; }
  .seg-btn { padding: 6px 11px; }
  .mo-cell { min-height: 62px; padding: 3px; }
  .mo-appt .mo-name { display: none; }
  .mo-dh { font-size: 10px; padding: 6px 2px; }
}

/* ---- Stats (legacy — retained for other views) ---- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px;
}
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 4px;
}
.stat-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.stat-value { font-size: 24px; font-weight: 750; letter-spacing: -.02em; color: var(--ink); }
.stat:nth-child(2) .stat-value { color: var(--brand); }

/* ---- Appointment list ---- */
.appt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px;
  backdrop-filter: blur(16px); transition: border-color .14s ease, box-shadow .14s ease, transform .06s ease;
}
.item:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.item .time {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 76px; padding: 8px 6px; border-radius: var(--radius-sm);
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 15px;
  border: 1px solid var(--line);
}
.avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  color: var(--brand); background: var(--brand-soft); border: 1px solid var(--line);
}
.item .info { flex: 1; min-width: 0; }
.info .name { font-weight: 650; font-size: 15px; color: var(--ink); }
.info .svc {
  margin-top: 3px; display: inline-block; font-size: 12.5px; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}
.info .phone { margin-left: 8px; font-size: 13px; color: var(--brand); text-decoration: none; }
.info .phone:hover { text-decoration: underline; }
.price { color: var(--brand); font-weight: 750; font-size: 16px; white-space: nowrap; }

/* ---- Empty state ---- */
.empty-state {
  text-align: center; padding: 48px 16px; color: var(--ink-faint);
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty-icon { font-size: 34px; margin-bottom: 8px; }
.empty-state p { margin: 0; font-size: 14.5px; }

.error { color: var(--danger); }
.hidden { display: none; }

/* ---- Plan badge ---- */
.plan-badge {
  align-self: center;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-soft); background: var(--surface);
}
.plan-badge.plan-standard { color: #9fc7ff; border-color: rgba(159, 199, 255, 0.5); }
.plan-badge.plan-premium { color: #06241c; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); border-color: transparent; }

/* ---- Tabs ---- */
.tabs {
  display: flex; gap: 6px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 5px; backdrop-filter: blur(14px);
}
.tab {
  flex: 1; border: 0; background: transparent; color: var(--ink-soft);
  font-size: 14px; font-weight: 700; cursor: pointer; padding: 9px 12px;
  border-radius: 9px; transition: background .14s ease, color .14s ease;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--brand); color: #06241c; }

/* ---- Editor cards ---- */
.editor-card { display: flex; flex-direction: column; gap: 14px; }
.editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.editor-head h2 { margin: 0; font-size: 18px; }
.editor-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.editor-msg { margin: 0; font-size: 13.5px; }
.editor-msg.ok { color: var(--ok); }
.editor-msg.err { color: var(--danger); }
.limit-note { margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.limit-note.warn { color: var(--danger); }

/* ---- Team (barbers) editor ---- */
.staff-row { margin-bottom: 8px; }
.staff-row-main {
  display: grid; grid-template-columns: minmax(0, 1fr) 38px 38px; gap: 8px; align-items: center;
}
.staff-row input.s-name {
  width: 100%; min-width: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 14px; color: var(--ink); background: var(--surface);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.staff-row input.s-name:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.staff-row .svc-toggle {
  font-size: 16px; width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.staff-row .svc-toggle:hover { background: var(--brand-soft); color: var(--brand); }
/* Expandable per-barber service panel */
.staff-svc-panel {
  margin-top: 8px; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: 13px;
}
.staff-svc-panel.hidden { display: none; }
.staff-svc-header { display: flex; gap: 16px; margin-bottom: 10px; }
.staff-svc-radio { display: flex; align-items: center; gap: 5px; color: var(--ink-soft); cursor: pointer; }
.staff-svc-radio input { accent-color: var(--brand); }
.staff-svc-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.staff-svc-check { display: flex; align-items: center; gap: 4px; color: var(--ink-soft); cursor: pointer; font-size: 13px; }
.staff-svc-check input { accent-color: var(--brand); }
.staff-svc-none { margin: 0 0 10px; font-size: 12px; color: var(--danger); }
.staff-svc-actions { display: flex; gap: 8px; }
.staff-svc-hint { margin-top: 10px; font-size: 12px; color: var(--ink-faint); }
.team-locked { text-align: center; padding: 26px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.team-locked.hidden { display: none; } /* beat .team-locked's display over the generic .hidden */
.team-locked .lock-ico { font-size: 30px; }
.team-locked p { margin: 0; max-width: 40ch; color: var(--ink-soft); line-height: 1.55; }
.pop-staff { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--brand); }
.appt-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Service rows ---- */
.svc-head, .svc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 92px 96px 38px;
  gap: 8px; align-items: center;
}
.svc-head {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-faint); padding: 0 2px;
}
.svc-row input {
  width: 100%; min-width: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 9px 10px; font-size: 14px; color: var(--ink); background: var(--surface);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.svc-row input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
/* Number cells with an inline unit adornment (min / $) */
.svc-num { position: relative; display: flex; align-items: center; min-width: 0; }
.svc-num input { width: 100%; }
.svc-num .svc-unit {
  position: absolute; right: 11px; color: var(--ink-faint); font-size: 12px; font-weight: 700; pointer-events: none;
}
.svc-num .svc-unit.pre { left: 11px; right: auto; }
.svc-num input.d { padding-right: 36px; }
.svc-num input.p { padding-left: 24px; }
@media (max-width: 560px) {
  .svc-head { display: none; }
  .svc-row {
    grid-template-columns: 1fr 1fr 38px;
    grid-template-areas: "name name del" "code code code" "min price price";
    row-gap: 8px;
  }
  .svc-row .n { grid-area: name; }
  .svc-row .c { grid-area: code; }
  .svc-row .svc-num.cell-min { grid-area: min; }
  .svc-row .svc-num.cell-price { grid-area: price; }
  .svc-row .del { grid-area: del; }
}

/* Native select restyled to match text inputs */
.field select {
  width: 100%; appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 9px 34px 9px 11px; font-size: 14px; color: var(--ink); background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' fill-opacity='0.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.field select:hover { border-color: var(--line-strong); }
.field select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field select option { color: #111; }
.btn.del {
  height: 34px; padding: 0; width: 34px; background: var(--surface);
  color: var(--danger); border: 1px solid var(--line-strong); font-size: 18px;
}
.btn.del:hover { background: rgba(255, 138, 128, 0.14); border-color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Schedule editor ---- */
.sched-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .sched-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.field input {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 14px; color: var(--ink); background: var(--surface);
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.days { display: flex; flex-wrap: wrap; gap: 8px; }
.day-toggle {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease, transform .1s ease;
}
.day-toggle:hover { border-color: var(--brand); }
.day-toggle:active { transform: scale(0.96); }
.day-toggle.off {
  background: rgba(255, 138, 128, 0.16); color: var(--danger); border-color: rgba(255, 138, 128, 0.45);
  text-decoration: line-through; text-decoration-thickness: 2px;
}

/* ---- Upgrade banner ---- */
.upgrade-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; padding: 16px 18px;
  border-radius: var(--radius); border: 1px solid rgba(159, 199, 255, 0.4);
  background: linear-gradient(135deg, rgba(159, 199, 255, 0.14), rgba(22, 163, 127, 0.12));
  backdrop-filter: blur(16px);
}
.upgrade-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.upgrade-copy strong { font-size: 15px; }
.upgrade-copy span { font-size: 13px; color: var(--ink-soft); }
.upgrade-banner .btn { flex: none; }
@media (max-width: 560px) {
  .upgrade-banner { flex-direction: column; align-items: stretch; }
  .upgrade-banner .btn { width: 100%; }
}

/* ---- Share tab: booking QR + link ---- */
.qr-body {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 16px;
}
.qr-box {
  display: inline-flex; padding: 12px; flex: none;
  background: #fff; border-radius: 14px; border: 1px solid var(--line);
  cursor: pointer; transition: transform .14s ease, box-shadow .14s ease;
}
.qr-box:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.qr-box img, .qr-box canvas { display: block; }
.qr-side { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 14px; }
.qr-url {
  font-size: 13px; color: var(--ink-soft); word-break: break-all;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
}

/* Referral link row (Refer & earn tab) — theme the read-only text input. */
.billing-link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.billing-link-row input {
  flex: 1; min-width: 200px; height: 42px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--ink); background: var(--surface); font-size: 14px;
}
.billing-link-row input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
