/* ============================================================
   Tattoo Studio — Internal Scheduling
   Self-contained stylesheet. No external fonts or frameworks.
   Designed iPad-first (landscape + portrait), scales to iPhone.
   ============================================================ */

:root {
  --canvas: #F4F4F2;
  --surface: #FFFFFF;
  --ink: #17181A;
  --ink-soft: #2A2C2F;
  --muted: #6B7075;
  --muted-2: #9AA0A6;
  --line: #E6E6E3;
  --line-strong: #D8D8D4;

  --accent: #C23B3B;
  --accent-dark: #A82F2F;

  --ok: #1E8A5B;
  --ok-bg: #E3F3EB;
  --warn: #B97614;
  --warn-bg: #FBF0DC;
  --info: #3B6FD4;
  --info-bg: #E8EEF9;
  --neutral-bg: #EEEEEC;
  --danger-bg: #F9E7E7;

  --sidebar-bg: #1B1C1E;
  --sidebar-ink: #E8E8E6;
  --sidebar-muted: #9C9FA3;

  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(23,24,26,.05), 0 4px 16px rgba(23,24,26,.06);
  --shadow-lift: 0 6px 28px rgba(23,24,26,.16);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --sidebar-w: 240px;
  --drawer-w: 400px;
  --touch: 44px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 .6em; }
/* Every <ul> in this app is a custom-styled list (appointment rows, client
   rows, updates, etc.) — none want the default bullet/indent, and
   display:flex on the <ul> alone doesn't reliably suppress markers across
   browsers. */
ul { list-style: none; margin: 0; padding: 0; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}
.pre-line { white-space: pre-line; }
.wrap-anywhere { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Auth pages (login / setup) ---------- */
.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background:
    radial-gradient(1200px 500px at 80% -10%, #ECECE9 0%, transparent 60%),
    var(--canvas);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
}
.auth-card h1 { font-size: 21px; margin-bottom: 4px; }
.auth-intro { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.auth-foot { margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-quote {
  margin: 0 0 18px; font-size: 13.5px; font-style: italic; color: var(--muted);
  border-left: 3px solid var(--line-strong); padding-left: 12px;
}
.auth-attribution {
  margin: 0; font-size: 12px; color: var(--muted-2); text-align: center;
  max-width: 420px;
}

/* ---------- App shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform .22s ease;
}
.sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-lift); }

.sidebar-brand { padding: 22px 20px 16px; }
.sidebar-brand > div { min-width: 0; flex: 1; }
/* Studio name and subtitle must never be cut off with "…" — wrap onto a
   second line instead if the sidebar is ever too narrow for them. */
.sidebar-brand .brand-name {
  font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .01em;
  overflow-wrap: break-word;
}
.sidebar-brand .brand-sub {
  font-size: 12px; color: var(--sidebar-muted); margin-top: 2px;
  overflow-wrap: break-word;
}

.sidebar-nav { flex: 1; padding: 8px 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--touch);
  padding: 0 12px;
  margin-bottom: 2px;
  border-radius: 9px;
  color: var(--sidebar-ink);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.nav-item.is-active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.nav-item-label { flex: 1; }
.nav-badge {
  flex: none;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}

.sidebar-user {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .avatar { flex: none; }
.sidebar-user-meta { min-width: 0; flex: 1; }
.sidebar-user-name { font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 12px; color: var(--sidebar-muted); text-transform: capitalize; }
.sidebar-signout {
  color: var(--sidebar-muted); font-size: 12.5px; text-decoration: none;
  padding: 8px 6px; border-radius: 7px;
}
.sidebar-signout:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.06); }

/* Explicit in-panel close button: once the sidebar is open it visually covers
   the hamburger toggle underneath it (same on-screen position at narrow
   widths), so that button alone can never close it again — this one lives
   inside the open panel itself and is always reachable. */
.sidebar-close {
  margin-left: auto; flex: none;
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,.16); background: transparent;
  color: var(--sidebar-ink); border-radius: 9px;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-close:hover { background: rgba(255,255,255,.08); color: #fff; }

#navScrim {
  position: fixed; inset: 0; background: rgba(23,24,26,.44);
  z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
#navScrim.is-on { opacity: 1; pointer-events: auto; }

.main { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 10px;
}
.topbar-titles { flex: 1; min-width: 0; }
.page-title { font-size: 24px; font-weight: 700; }
.page-subtitle { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.nav-toggle {
  flex: none;
  width: var(--touch); height: var(--touch);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.content { flex: 1; padding: 6px 18px 90px; max-width: 1240px; width: 100%; }

/* Wide screens: sidebar starts open beside the content, and the hamburger
   collapses/expands it (app.js toggles .nav-collapsed on .shell). The in-panel
   × close button is mobile-only — hidden here via an ID selector with
   !important on purpose: the button also carries the shared .btn class, whose
   own `display` rule sits later in this file and would otherwise win the
   display tie against a plain class rule here. */
@media (min-width: 1100px) {
  .sidebar { transform: none; box-shadow: none; }
  #navScrim { display: none !important; }
  #sidebarClose { display: none !important; }
  .main { margin-left: var(--sidebar-w); transition: margin-left .22s ease; }
  .topbar { padding: 22px 28px 12px; }
  .content { padding: 8px 28px 60px; }

  .shell.nav-collapsed .sidebar { transform: translateX(-100%); }
  .shell.nav-collapsed .main { margin-left: 0; }
}

/* ---------- Cards / sections ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card-title { font-size: 16.5px; font-weight: 700; margin-bottom: 12px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.card-head .card-title { margin-bottom: 0; }

.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 22px 8px;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch);
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: #FAFAF8; }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: var(--neutral-bg); }
.btn-danger-ghost { background: transparent; color: var(--accent); border-color: var(--line-strong); }
.btn-danger-ghost:hover { background: var(--danger-bg); border-color: #E4B8B8; }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--touch); padding: 0; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-confirmed { background: var(--ok-bg); color: var(--ok); }
.badge-deposit_required { background: var(--warn-bg); color: var(--warn); }
.badge-rescheduled { background: var(--info-bg); color: var(--info); }
.badge-cancelled { background: var(--neutral-bg); color: var(--muted); }
.badge-no_show { background: var(--danger-bg); color: var(--accent); }
.badge-role { background: var(--neutral-bg); color: var(--ink-soft); text-transform: capitalize; }

/* ---------- Dots / avatars ---------- */
.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--artist, var(--muted-2)); flex: none;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--artist, #3B6FD4);
  color: #fff; font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  letter-spacing: .02em;
  flex: none;
}
.avatar-img {
  object-fit: cover; background: var(--neutral-bg);
  border: 1px solid rgba(0,0,0,.06);
}
.avatar-xl { width: 96px; height: 96px; font-size: 30px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 14px; min-width: 0; }
.field-label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  margin-bottom: 6px; letter-spacing: .01em;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #FCFCFB;
  font: inherit;
  color: var(--ink);
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23,24,26,.08);
}
.field-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field-hint-inline { font-size: 12.5px; font-weight: 400; color: var(--muted); }

.field-check {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--touch); margin-bottom: 10px;
  font-size: 14.5px; cursor: pointer;
}
.field-check input[type="checkbox"] {
  width: 22px; height: 22px; accent-color: var(--ink); flex: none;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: 1 / -1; }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }
.inline-fields { display: flex; gap: 12px; }
.inline-fields .field { flex: 1; }

@media (max-width: 560px) {
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Alerts / toast ---------- */
.alert {
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px;
}
.alert-error { background: var(--danger-bg); color: #8C2626; border: 1px solid #EFC9C9; }
.alert-ok { background: var(--ok-bg); color: #14603F; border: 1px solid #C4E4D4; }
.alert ul { margin: 0; padding-left: 18px; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 200; max-width: calc(100vw - 40px); text-align: center;
}
#toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Upload / saving feedback: spinners on buttons, thumbnails, avatars ---------- */
.spinner {
  display: inline-block; width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor;
  border-radius: 50%; animation: ts-spin .7s linear infinite;
  vertical-align: -3px; flex: none;
}
.btn-secondary .spinner, .btn-ghost .spinner { border-color: rgba(23,24,26,.2); border-top-color: var(--ink); }
@keyframes ts-spin { to { transform: rotate(360deg); } }

.thumb-uploading {
  display: flex; align-items: center; justify-content: center;
  background: var(--neutral-bg); cursor: default;
}
.thumb-uploading .spinner { border-color: rgba(23,24,26,.15); border-top-color: var(--muted); width: 20px; height: 20px; }

.avatar-uploading { position: relative; overflow: hidden; }
.avatar-uploading::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(23,24,26,.6); z-index: 1;
}
.avatar-uploading::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px;
  margin: -14px 0 0 -14px; border-radius: 50%; z-index: 2;
  border: 3px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: ts-spin .7s linear infinite;
}

/* ---------- Dashboard ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--stat, var(--info));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: block; text-decoration: none; color: inherit;
}
.stat-card:hover { text-decoration: none; box-shadow: var(--shadow-lift); }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 3px; }
.stat-link { font-size: 13px; color: var(--info); font-weight: 600; margin-top: 4px; display: inline-block; }

.dash-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 980px) {
  .dash-grid { grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr); align-items: start; }
}

/* ---------- Appointment list rows ---------- */
.apt-list { display: flex; flex-direction: column; gap: 10px; }
.apt-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  text-align: left;
  background: #FAFAF8;
  border: 1px solid var(--line);
  border-left: 4px solid var(--artist, var(--muted-2));
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.apt-row:hover { background: #F5F5F2; }
.apt-time { flex: none; width: 76px; font-weight: 700; font-size: 14px; }
.apt-main { flex: 1; min-width: 0; }
.apt-client { font-weight: 700; font-size: 15px; }
.apt-sub { font-size: 13px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apt-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.apt-deposit { font-size: 12.5px; color: var(--muted); }
.apt-row.is-past { opacity: .78; }

@media (max-width: 560px) {
  .apt-time { width: 62px; font-size: 13px; }
  .apt-side { align-items: flex-end; }
  .apt-deposit { display: none; }
}

/* ---------- Team snapshot / recent changes ---------- */
.team-snap { display: flex; flex-direction: column; gap: 12px; }
.team-snap-row { display: flex; align-items: center; gap: 10px; }
.team-snap-name { font-weight: 600; font-size: 14px; }
.team-snap-next { font-size: 12.5px; color: var(--muted); }

.change-list { display: flex; flex-direction: column; gap: 12px; }
.change-item { border-left: 3px solid var(--line-strong); padding-left: 11px; }
.change-action { font-weight: 600; font-size: 13.5px; }
.change-meta { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

/* ---------- Filter bar / day groups (Appointments page) ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.filter-bar .field { margin-bottom: 10px; flex: 1 1 150px; }
.filter-bar .btn { margin-bottom: 10px; }

.day-group { margin-bottom: 16px; }
.day-heading {
  font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin: 0 4px 8px;
}

/* ---------- Clients ---------- */
.client-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.client-tools form { flex: 1; display: flex; gap: 10px; min-width: 220px; }
.client-tools .field { flex: 1; margin-bottom: 0; }

.client-list { display: flex; flex-direction: column; gap: 10px; }
.client-row {
  display: flex; align-items: center; gap: 14px;
  background: #FAFAF8;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: inherit; text-decoration: none;
}
.client-row:hover { background: #F5F5F2; text-decoration: none; }
.client-name { font-weight: 700; font-size: 15px; }
.client-legal { font-weight: 400; color: var(--muted); font-size: 13.5px; }
.client-addedby {
  display: inline-block; margin-left: 8px; font-weight: 600; font-size: 11.5px;
  color: var(--muted); background: var(--neutral-bg); border-radius: 999px; padding: 2px 9px;
  vertical-align: middle;
}
.client-contact { font-size: 13px; color: var(--muted); margin-top: 1px; }
.client-row-side { margin-left: auto; text-align: right; flex: none; }
.client-next { font-size: 13px; font-weight: 600; }
.client-count { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.client-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; align-items: start; }
@media (min-width: 980px) {
  .client-grid { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); }
}

.thumb-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb {
  position: relative;
  width: 86px; height: 86px;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line);
  padding: 0; background: var(--neutral-bg); cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-grid-lg { gap: 12px; margin-top: 10px; }
.thumb-lg { width: 160px; height: 160px; border-radius: 12px; }
@media (max-width: 480px) {
  .thumb-lg { width: calc(50% - 6px); height: auto; aspect-ratio: 1; }
}
.thumb-del {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(23,24,26,.72); color: #fff;
  border: none; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Updates ---------- */
.update-list { display: flex; flex-direction: column; gap: 14px; }
.update-item { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.update-item:last-child { border-bottom: none; padding-bottom: 0; }
.update-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.update-title { font-size: 15.5px; font-weight: 700; }
.update-meta { font-size: 12.5px; color: var(--muted); flex: none; }
.update-body { font-size: 14px; margin-top: 5px; }

.update-engage { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.update-seen { font-size: 12.5px; color: var(--muted); }
.seen-details summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted);
  list-style: none;
}
.seen-details summary::-webkit-details-marker { display: none; }
.seen-details[open] summary { color: var(--ink); }
.seen-list { margin: 6px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--muted); }
.seen-list li { padding: 2px 0; }

.update-reactions { display: flex; gap: 4px; }
.reaction-btn {
  display: inline-flex; align-items: center; gap: 3px;
  min-height: 30px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-size: 13px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.reaction-btn:hover { background: var(--neutral-bg); }
.reaction-btn.is-mine { border-color: var(--ink); background: var(--neutral-bg); }
.reaction-btn .reaction-count { font-size: 11.5px; font-weight: 700; color: var(--muted); min-width: 8px; }

.update-comments-toggle { margin-left: auto; }

.update-comments-panel {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}
.comment-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.comment-item { font-size: 13.5px; }
.comment-head { display: flex; align-items: baseline; gap: 8px; }
.comment-when { font-size: 11.5px; color: var(--muted); flex: 1; }
.comment-delete {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 2px;
}
.comment-delete:hover { color: var(--accent); }
.comment-body { margin: 2px 0 0; }
.comment-form { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.comment-form textarea {
  flex: 1 1 200px; min-height: 0; padding: 8px 11px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: #FCFCFB; font: inherit; font-size: 13.5px; resize: vertical;
}

/* ---------- Team page ---------- */
.member-list { display: flex; flex-direction: column; gap: 12px; }
.member-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: #FAFAF8; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 15px;
}
.member-row.is-disabled { opacity: .6; }
.member-main { min-width: 160px; }
.member-name { font-weight: 700; }
.member-sub { font-size: 12.5px; color: var(--muted); }
.member-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.member-controls select {
  min-height: 38px; border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 6px 9px; font: inherit; font-size: 13.5px; background: #fff;
}
.reset-details summary {
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--info);
  min-height: 38px; display: flex; align-items: center; padding: 0 6px;
}
.reset-details form { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.reset-details input {
  min-height: 38px; border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 6px 10px; font: inherit; font-size: 13.5px;
}

/* ---------- Login quotes (quotes.php) ---------- */
.quote-list { display: flex; flex-direction: column; gap: 12px; }
.quote-row {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 16px;
  background: #FAFAF8; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 15px;
}
.quote-row-inactive { opacity: .55; }
.quote-edit-form { display: flex; gap: 10px; flex: 1 1 260px; min-width: 0; }
.quote-edit-form textarea {
  flex: 1; min-height: 0; padding: 8px 11px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: #FCFCFB; font: inherit; font-size: 13.5px; resize: vertical;
}
.quote-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quote-meta { font-size: 12px; color: var(--muted); margin-right: 4px; }

/* ---------- Segmented toggles / chips ---------- */
.seg {
  display: inline-flex; background: var(--neutral-bg);
  border-radius: 10px; padding: 3px; gap: 2px;
}
.seg button {
  min-height: 38px; padding: 0 14px;
  border: none; background: transparent; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seg button.is-on { background: var(--ink); color: #fff; }

.artist-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.chip.is-on { border-color: var(--artist, var(--ink)); color: var(--ink); background: #fff; }
.chip .dot { opacity: .35; }
.chip.is-on .dot { opacity: 1; }

/* ---------- Dashboard: by-artist breakdown ---------- */
#byArtistToggles { margin-bottom: 14px; }
.by-artist-table { display: flex; flex-direction: column; gap: 8px; }
.by-artist-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #FAFAF8; border: 1px solid var(--line); border-left: 4px solid var(--artist, var(--muted-2));
  border-radius: var(--radius-sm); padding: 11px 14px;
  transition: opacity .15s ease;
}
.by-artist-row.is-hidden { display: none; }
.by-artist-name { font-weight: 700; font-size: 14px; min-width: 120px; }
.by-artist-stats { display: flex; align-items: center; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.by-artist-stat { font-size: 13px; color: var(--muted); font-weight: 600; }
.by-artist-stat.is-warn { color: var(--warn); }
@media (max-width: 640px) {
  .by-artist-stats { margin-left: 0; gap: 12px; }
}

/* ---------- Calendar toolbar ---------- */
.cal-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px;
}
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 17px; font-weight: 700; margin: 0 8px; min-width: 130px; }
.cal-toolbar-spacer { flex: 1; }
.cal-toolbar .artist-filters { width: 100%; }
@media (min-width: 900px) {
  .cal-toolbar .artist-filters { width: auto; }
}

/* ---------- Custom calendar: month ---------- */
.cal-card { padding: 10px; overflow: hidden; }
#calendar { min-height: 480px; }

.cal-month { width: 100%; }
.cal-month-head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--line);
}
.cal-month-head div {
  padding: 8px 6px; font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; text-align: center;
}
.cal-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-mday {
  min-height: 108px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 5px;
  cursor: pointer;
  min-width: 0;
}
.cal-mday:nth-child(7n) { border-right: none; }
.cal-mday.is-out { background: #FAFAF8; }
.cal-mday.is-out .cal-mday-num { color: var(--muted-2); }
.cal-mday-num {
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.cal-mday.is-today .cal-mday-num { background: var(--accent); color: #fff; font-weight: 700; }
.cal-mchips { display: flex; flex-direction: column; gap: 3px; margin-top: 3px; }
.cal-mchip {
  display: block; width: 100%; text-align: left;
  border: none; cursor: pointer;
  background: color-mix(in srgb, var(--artist, #888) 13%, #fff);
  border-left: 3px solid var(--artist, #888);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 11.5px; line-height: 1.3;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
}
.cal-mchip .t { font-weight: 700; margin-right: 4px; }
.cal-mchip.is-cancelled, .cal-mchip.is-no_show { opacity: .55; text-decoration: line-through; }
.cal-mchip.is-block {
  background: repeating-linear-gradient(45deg, #ECECEA, #ECECEA 4px, #F6F6F4 4px, #F6F6F4 8px);
  border-left-color: var(--muted-2); color: var(--muted);
}
/* Another artist's booking: visible as busy, but not styled like a real
   appointment card — signals "you can't see into this one". */
.cal-mchip.is-restricted { opacity: .82; font-style: italic; }
.cal-mmore {
  border: none; background: none; cursor: pointer;
  font-size: 11.5px; font-weight: 700; color: var(--info);
  padding: 2px 6px; text-align: left;
}

/* ---------- Custom calendar: week / day time grid ---------- */
.cal-tg { display: flex; flex-direction: column; }
.cal-tg-head { display: flex; border-bottom: 1px solid var(--line); }
.cal-tg-gutter { flex: none; width: 52px; }
.cal-tg-headcols { flex: 1; display: grid; }
.cal-tg-headcol { padding: 8px 4px; text-align: center; cursor: pointer; border-left: 1px solid var(--line); }
.cal-tg-headcol:first-child { border-left: none; }
.cal-tg-dow { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-tg-dnum {
  font-size: 16px; font-weight: 700; margin-top: 1px;
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
}
.cal-tg-headcol.is-today .cal-tg-dnum { background: var(--accent); color: #fff; }

.cal-tg-body { display: flex; position: relative; }
.cal-tg-times { flex: none; width: 52px; position: relative; }
.cal-tg-time {
  position: absolute; right: 8px; transform: translateY(-50%);
  font-size: 11px; color: var(--muted-2); font-weight: 600;
}
.cal-tg-cols { flex: 1; display: grid; position: relative; }
.cal-tg-col { position: relative; border-left: 1px solid var(--line); min-width: 0; }
.cal-tg-col:first-child { border-left: none; }
.cal-tg-hline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.cal-tg-hline.is-half { border-top-style: dotted; border-top-color: #EFEFEC; }

.cal-ev {
  position: absolute;
  border: none; text-align: left; cursor: pointer;
  background: color-mix(in srgb, var(--artist, #888) 14%, #fff);
  border-left: 3px solid var(--artist, #888);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 12px; line-height: 1.3;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(23,24,26,.07);
  -webkit-tap-highlight-color: transparent;
}
.cal-ev .t { font-weight: 700; font-size: 11.5px; }
.cal-ev .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cal-ev .s { display: inline-block; margin-top: 2px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #fff; }
.cal-ev .s.s-confirmed { color: var(--ok); }
.cal-ev .s.s-deposit_required { color: var(--warn); }
.cal-ev .s.s-rescheduled { color: var(--info); }
.cal-ev .s.s-cancelled, .cal-ev .s.s-no_show { color: var(--muted); }
.cal-ev.is-cancelled, .cal-ev.is-no_show { opacity: .5; }
.cal-ev.is-cancelled .n, .cal-ev.is-no_show .n { text-decoration: line-through; }
.cal-ev.is-block {
  background: repeating-linear-gradient(45deg, #EDEDEB, #EDEDEB 5px, #F7F7F5 5px, #F7F7F5 10px);
  border-left-color: var(--muted-2); color: var(--muted); box-shadow: none;
}
.cal-ev.is-restricted .n { font-style: italic; }

/* ---------- Drawer (appointment details) ---------- */
#drawerScrim {
  position: fixed; inset: 0; background: rgba(23,24,26,.44);
  z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
#drawerScrim.is-on { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(var(--drawer-w), 100vw);
  background: var(--surface);
  z-index: 95;
  box-shadow: var(--shadow-lift);
  transform: translateX(102%);
  transition: transform .24s ease;
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px; gap: 10px;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 0 18px 18px; -webkit-overflow-scrolling: touch; }
.drawer-close {
  width: var(--touch); height: var(--touch); flex: none;
  border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
  font-size: 19px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.drawer-client { font-size: 21px; font-weight: 700; margin-top: 6px; }
.drawer-artist { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-top: 3px; }
.d-section { margin-top: 16px; }
.d-label {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px;
}
.d-value { font-size: 14.5px; }
.d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.d-actions .span-2 { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .drawer { width: 100vw; }
}

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 110;
  display: none; align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(23,24,26,.5);
}
.modal.is-open { display: flex; }
.modal-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  width: 100%; max-width: 640px;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  display: flex; flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
/* The form (or any single wrapper) between modal-head and modal-actions must
   itself become a flex column, or modal-body's overflow-y:auto never has a
   constrained height to scroll within — the whole card just grows instead. */
.modal-card > form,
.modal-card > .modal-form {
  display: flex; flex-direction: column;
  min-height: 0; flex: 1 1 auto;
}
.client-success:not([hidden]) { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.client-success .modal-actions { flex-wrap: wrap; }
.client-success-msg { font-size: 15px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 8px; gap: 12px;
  flex: none;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-body {
  padding: 8px 20px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  flex: 1 1 auto; min-height: 0;
}

@media (max-width: 640px) {
  .modal { padding: 0; align-items: stretch; }
  .modal-card { max-width: none; max-height: none; border-radius: 0; height: 100vh; height: 100dvh; }
}

/* ---------- Client picker ---------- */
.client-pick { position: relative; }
.client-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: 10px; box-shadow: var(--shadow-lift);
  z-index: 20; overflow: hidden; display: none;
  max-height: 240px; overflow-y: auto;
}
.client-results.is-open { display: block; }
.client-results button {
  display: block; width: 100%; text-align: left;
  border: none; background: none; cursor: pointer;
  padding: 11px 14px; font-size: 14px; min-height: var(--touch);
}
.client-results button:hover { background: var(--neutral-bg); }
.client-results .cr-phone { color: var(--muted); font-size: 12.5px; }
.client-results .cr-addedby {
  color: var(--muted); font-size: 11.5px; font-weight: 600;
  background: var(--neutral-bg); border-radius: 999px; padding: 1px 8px; margin-left: 6px;
}
.client-results .cr-empty { padding: 14px; font-size: 13.5px; color: var(--muted); }
.client-chosen {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--info-bg); border-radius: 10px; padding: 10px 14px;
  font-weight: 600; font-size: 14.5px;
}

/* ---------- Lightbox ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(10,10,11,.88);
  display: none; align-items: center; justify-content: center;
  padding: 22px; cursor: zoom-out;
}
#lightbox.is-open { display: flex; }
#lightbox img {
  max-width: 100%; max-height: 100%;
  border-radius: 10px; box-shadow: var(--shadow-lift);
}

/* ---------- Misc ---------- */
.form-error { color: #8C2626; font-size: 13.5px; margin: 6px 0 0; min-height: 1em; }
.hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }

/* ============================================================
   Additions — classes used by the final page markup that the
   sections above (written earlier) didn't yet cover.
   ============================================================ */

/* Brand mark (sidebar + auth pages) */
.sidebar-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: inline-block;
  background: linear-gradient(155deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
.brand-mark-lg { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 14px; display: inline-block; }
.auth-lede { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* Dashboard stat cards: markup uses class="stat card stat-today" etc. */
.stat {
  display: block; text-decoration: none; color: inherit;
  border-left: 4px solid var(--stat, var(--info));
}
.stat:hover { text-decoration: none; box-shadow: var(--shadow-lift); }
.stat-today { --stat: var(--info); }
.stat-week { --stat: var(--ok); }
.stat-deposit { --stat: var(--warn); }
.stat-blocked { --stat: #7C4DC4; }

/* Appointment rows: meta line + compact variant used on the client page */
.apt-meta { font-size: 13px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apt-list-compact .apt-time { width: 68px; font-size: 12.5px; line-height: 1.3; }

/* Dashboard team snapshot / recent changes: bare <li> markup */
.team-snap li { display: flex; align-items: center; gap: 10px; }
.change-list li { border-left: 3px solid var(--line-strong); padding-left: 11px; }
.change-detail { font-size: 13px; display: block; }
.change-when { font-size: 12px; color: var(--muted); display: block; margin-top: 1px; }

/* Filter bar actions (Appointments page) */
.filter-actions { display: flex; gap: 10px; margin-bottom: 10px; }

/* Two-column layout helpers */
.dash-main, .dash-side, .client-side { min-width: 0; }

/* Client list row spacing */
.client-contact { flex: 1; min-width: 0; }
.client-next { text-align: right; }

/* Updates page: markup uses update-top / update-when / update-del */
.update-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.update-when { font-size: 12.5px; color: var(--muted); flex: none; }
.update-del { margin-top: 8px; }

/* Team page: actual member-row markup */
.member {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: #FAFAF8; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 15px;
}
.member.member-disabled { opacity: .6; }
.member-id { display: flex; align-items: center; gap: 12px; min-width: 170px; }
.member-role { font-size: 12.5px; color: var(--muted); }
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.member-locked { font-size: 13px; color: var(--muted); font-style: italic; }
/* ---------- Colour swatch picker ---------- */
.swatch-list { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.swatch {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  border: 2px solid transparent; padding: 0; cursor: pointer;
  background: var(--sw, var(--muted-2));
  display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px #fff inset;
}
.swatch.is-selected::after {
  content: "✓"; color: #fff; font-size: 13px; font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.swatch-custom {
  position: relative; overflow: hidden;
  background: conic-gradient(red, #ff0, lime, cyan, blue, magenta, red);
}
.swatch-custom.is-selected { background: var(--sw); }
.swatch-custom-input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: none; padding: 0;
}
.inline-form select, .inline-form input {
  min-height: 38px; border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 6px 10px; font: inherit; font-size: 13.5px;
}
.reset-form { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }

/* Settings page card width */
.settings-card { max-width: 720px; }

/* Calendar toolbar rows (actual markup: cal-toolbar-row / cal-toolbar-row-2 / cal-tools / cal-actions) */
.cal-toolbar { flex-direction: column; align-items: stretch; }
.cal-toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.cal-toolbar-row-2 { align-items: center; }
.cal-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-left: auto; }
.cal-actions { display: flex; gap: 10px; margin-left: auto; }
@media (max-width: 760px) {
  .cal-toolbar-row-2 { flex-direction: column; align-items: stretch; }
  .cal-tools, .cal-actions { margin-left: 0; }
}

/* Appointment drawer: actual section/heading markup */
.drawer-title { font-size: 21px; font-weight: 700; margin-top: 6px; }
.drawer-section { margin-top: 16px; }
.drawer-section h3 {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px;
}
.drawer-section p { font-size: 14.5px; margin: 0; }
.mini-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 8px; font-size: 13.5px; }
.mini-facts dt { color: var(--muted); font-size: 12px; }
.mini-facts dd { margin: 0; font-weight: 600; }
.drawer-clientlink { margin-top: 18px; font-size: 13.5px; }
.drawer-actions { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.upload-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.upload-btn { cursor: pointer; }
.upload-hint { font-size: 12px; color: var(--muted); }

/* Appointment / block modal extras */
.modal-card-sm { max-width: 420px; }
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; padding: 10px 20px 18px; flex-wrap: wrap;
  flex: none; border-top: 1px solid var(--line);
}
.client-picker { position: relative; }
.new-client-fields { margin-top: 8px; margin-bottom: 14px; }
.new-client-fields .inline-fields { flex-wrap: wrap; }
.new-client-fields .inline-fields input { flex: 1 1 160px; min-height: var(--touch); padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: #FCFCFB; font: inherit; }

/* Sidebar sign-out button sits on the dark sidebar, not the light surface */
.btn-signout { color: var(--sidebar-ink); border-color: rgba(255,255,255,.14); flex: none; }
.btn-signout:hover { background: rgba(255,255,255,.08); color: #fff; }

.text-link { font-size: 13.5px; font-weight: 600; color: var(--info); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- Interaction polish: hover/focus consistency ---------- */
.card, .stat, .client-row, .apt-row, .member, .thumb, .chip, .nav-item {
  transition: box-shadow .15s ease, background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.client-row:hover, .apt-row:hover, .member:hover { box-shadow: var(--shadow); }
.thumb:hover img { transform: scale(1.04); }
.thumb img { transition: transform .18s ease; }

/* Keyboard focus must stay visible everywhere, even where hover styles already exist */
a:focus-visible, button:focus-visible, .apt-row:focus-visible, .client-row:focus-visible,
.nav-item:focus-visible, .chip:focus-visible, .seg button:focus-visible, .cal-mchip:focus-visible,
.cal-ev:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

/* ---------- Avatar / studio picture editors (account.php, settings.php) ---------- */
.avatar-editor { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-editor-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-editor-meta { flex: 1 1 200px; min-width: 200px; }
.brand-mark-img { object-fit: cover; }

/* Sidebar user block becomes a link once wrapped for account.php access */
.sidebar-user-link {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  color: inherit; text-decoration: none;
}
.sidebar-user-link:hover { text-decoration: none; }
.sidebar-user-link:hover .sidebar-user-name { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
