/* Glamora Business CRM — layout after Toggl Track web (grouped sidebar, trial
   card, white cards on a soft ground), in Glamora's brand. */
:root {
  --pink: #f44369;
  --pink-deep: #c42a4e;
  --pink-soft: rgba(244, 67, 105, 0.1);
  --orange: #ef8744;
  --ink: #1a0d12;
  --ink-2: #3d1a26;
  --muted: rgba(61, 26, 38, 0.6);
  --faint: rgba(61, 26, 38, 0.42);
  --ground: #f8f4f5;
  --side: #fdfafb;
  --surface: #ffffff;
  --surface-2: #fbf7f8;
  --line: rgba(61, 26, 38, 0.1);
  --line-strong: rgba(61, 26, 38, 0.18);
  --ok: #1f9d55; --ok-bg: rgba(31, 157, 85, 0.12);
  --warn: #9a6400; --warn-bg: rgba(218, 165, 32, 0.18);
  --bad: #c42a4e; --bad-bg: rgba(196, 42, 78, 0.1);
  --info: #7a2e8f; --info-bg: rgba(122, 46, 143, 0.1);
  --mute-bg: rgba(61, 26, 38, 0.07);
  --shadow-1: 0 1px 2px rgba(61, 26, 38, 0.05), 0 1px 1px rgba(244, 67, 105, 0.03);
  --shadow-2: 0 1px 2px rgba(61, 26, 38, 0.05), 0 8px 24px rgba(244, 67, 105, 0.08), 0 20px 48px rgba(61, 26, 38, 0.06);
  --shadow-3: 0 2px 4px rgba(61, 26, 38, 0.08), 0 24px 64px rgba(61, 26, 38, 0.22);
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --r: 14px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --side-w: 236px;
  --scroll: rgba(244, 67, 105, 0.3); --scroll-hover: rgba(244, 67, 105, 0.6); --scroll-soft: rgba(244, 67, 105, 0.16);
  --tile-size: 48px; --tile-line: rgba(61, 26, 38, 0.07); --tile: rgba(244, 67, 105, 0.14);
  color-scheme: light;
}
html.dark {
  --ink: #fce4ec; --ink-2: #f3c6d3;
  --muted: rgba(252, 228, 236, 0.62); --faint: rgba(252, 228, 236, 0.4);
  --ground: #0f0709; --side: #140a0e; --surface: #1c0e14; --surface-2: #231219;
  --line: rgba(252, 228, 236, 0.1); --line-strong: rgba(252, 228, 236, 0.2);
  --tile-line: rgba(252, 228, 236, 0.06); --tile: rgba(244, 67, 105, 0.2);
  --ok: #5fd08f; --warn: #f5c451; --bad: #ff8fa8; --info: #d9a0ea;
  --info-bg: rgba(217, 160, 234, 0.12); --mute-bg: rgba(252, 228, 236, 0.08);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 24px 64px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: 'Nunito Sans', 'Noto Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px; line-height: 1.6; color: var(--ink); background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--pink); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { flex: none; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2.5px solid var(--pink); outline-offset: 2px; border-radius: 6px; }

/* ── Scrollbars ────────────────────────────────────────────────────────── */
/* Slim pink pill, no arrows, no track. The sidebar's thumb is fainter so it
   doesn't split the layout. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb {
  background: var(--scroll); background-clip: padding-box;
  border: 3px solid transparent; border-radius: 999px; min-height: 40px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-hover); }
::-webkit-scrollbar-thumb:active { background-color: var(--pink); }
.side-scroll::-webkit-scrollbar { width: 8px; }
.side-scroll::-webkit-scrollbar-thumb { background-color: var(--scroll-soft); border-width: 2px; }
.side-scroll::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-hover); }
.side-scroll::-webkit-scrollbar-thumb:active { background-color: var(--pink); }
/* Firefox has no ::-webkit-scrollbar; use the standard properties there only
   (in Chrome they would switch off the rules above). */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
  .side-scroll { scrollbar-color: var(--scroll-soft) transparent; }
}

/* ── Shell ─────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: transparent; border-right: 1px solid var(--line); padding-top: var(--s3);
  overflow: hidden; z-index: 30;
}
.side-brand {
  flex: none; display: flex; align-items: center; justify-content: center; gap: var(--s2);
  margin: 0 var(--s3); padding: var(--s2) var(--s2) var(--s3); text-decoration: none; color: var(--ink);
}
.side-scroll {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column;
  padding: 0 var(--s3) var(--s4);
}
.side-brand img { width: 52px; height: 52px; object-fit: contain; flex: none; transition: transform .25s var(--ease); }
.side-brand:hover img { transform: scale(1.06) rotate(-4deg); }
.side-brand:active img { transform: scale(0.94); }
.nav-group { margin-top: var(--s3); }
.nav-label { font-size: 11.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 var(--s2) var(--s1); }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px var(--s2); margin: 1px 0; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14.5px;
  transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { background: var(--mute-bg); }
.nav a:active { transform: scale(0.98); }
.nav a[aria-current="page"] { background: var(--pink-soft); color: var(--pink-deep); }
html.dark .nav a[aria-current="page"] { color: #ff9db3; }
/* Menu icons on soft coloured circles, same colours as the app's settings lists. */
.nav-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--tone); background: var(--tone-bg); transition: transform .25s var(--ease); }
:is(.nav-ic, .head-ic).pink { --tone: #f44369; --tone-bg: #fce7ef; }
:is(.nav-ic, .head-ic).blue { --tone: #3b82f6; --tone-bg: #e8f4fd; }
:is(.nav-ic, .head-ic).yellow { --tone: #f59e0b; --tone-bg: #fff7e6; }
:is(.nav-ic, .head-ic).green { --tone: #22c55e; --tone-bg: #f0fdf4; }
:is(.nav-ic, .head-ic).purple { --tone: #a855f7; --tone-bg: #fdf4ff; }
html.dark :is(.nav-ic, .head-ic:is(.pink, .blue, .yellow, .green, .purple)) { --tone-bg: rgba(255, 255, 255, 0.09); }
.nav a:hover .nav-ic { transform: scale(1.06); }
.nav a { padding-block: 5px; }
.nav .count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 900; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding-top: var(--s4); }
.trial-card {
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: var(--s3);
  box-shadow: var(--shadow-1); font-size: 12.5px;
}
.trial-card b { display: block; font-size: 13px; }
.trial-card .bar { height: 4px; border-radius: 2px; background: var(--mute-bg); margin: 8px 0; overflow: hidden; }
.trial-card .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--orange)); transform-origin: left; transition: transform .9s cubic-bezier(.22, 1.2, .36, 1); }
@media (prefers-reduced-motion: reduce) { .trial-card .bar i { transition: none; } }
/* Plan card: plan + status badge, trial days, seats, price, next payment, portal button. */
.plan-card.bad { border-color: rgba(196, 42, 78, .35); }
.plan-card .pc-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.plan-card .pc-head b { font-size: 14px; line-height: 1.3; }
.plan-card .pc-head .pill { font-size: 11px; line-height: 1.3; white-space: normal; }
.plan-card .pc-trial { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.plan-card .bar { margin: 6px 0 0; }
.plan-card .pc-seats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.plan-card .pc-seats span { white-space: nowrap; }
.plan-card .pc-used { margin-inline-start: auto; color: var(--muted); font-weight: 600; }
.plan-card .pc-rows { display: grid; gap: 6px; margin: 8px 0 0; }
.plan-card .pc-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plan-card .pc-rows dt { color: var(--muted); font-size: 11.5px; }
.plan-card .pc-rows dd { margin: 0; font-weight: 700; font-size: 12px; text-align: end; }
.plan-card .pc-vat { margin: 6px 0 0; font-size: 10.5px; color: var(--faint); text-align: end; }
.plan-card .error { margin: 10px 0 0; font-size: 12px; }
.plan-card [data-portal] { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.side-user { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s3); padding: var(--s2); border-radius: 10px; }
.side-user .who { min-width: 0; flex: 1; font-size: 12px; }
.side-user .who b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who span { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; position: relative; z-index: 1; }

/* Tiles background (port of components/background_1txt): grid lines, and the
   tile under the cursor lights up instantly then fades out over 2s. One layer
   is fixed behind the whole shell (sidebar + page); the opaque top bar has its
   own layer. Both grids are anchored to the viewport so the lines line up. */
.tiles {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--tile-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--tile-line) 1px, transparent 1px);
  background-size: var(--tile-size) var(--tile-size);
  background-attachment: fixed;
}
.topbar .tiles { position: absolute; z-index: -1; }
.tile-glow { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; clip-path: inset(0 0 0 var(--side-w)); }
@media (max-width: 900px) { .tile-glow { clip-path: none; } }
.tile-glow .tile {
  position: absolute; top: 0; left: 0; width: calc(var(--tile-size) - 1px); height: calc(var(--tile-size) - 1px);
  background: var(--tile); opacity: 1;
}
.tile-glow .tile.out { opacity: 0; transition: opacity 2s ease-out; }
@media (max-width: 767px) { :root { --tile-size: 36px; } }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s6); background: var(--ground);
  border-bottom: 1px solid var(--line); min-height: 60px;
}
.topbar .menu-btn { display: none; }
.topbar .crumbs { font-weight: 800; font-size: 14px; }
.topbar .spacer { flex: 1; }
.view { padding: var(--s5) var(--s6) var(--s7); max-width: 1240px; width: 100%; margin-inline: auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(26px, 3vw, 32px); font-weight: 800; letter-spacing: -0.03em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); background: var(--side); transform: translateX(-100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  body.nav-open .side { transform: none; box-shadow: var(--shadow-3); }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { padding: var(--s3) var(--s4); }
  .topbar .menu-btn { display: inline-grid; }
  .view { padding: var(--s4) var(--s4) var(--s7); }
}
.scrim { position: fixed; inset: 0; background: rgba(26, 13, 18, 0.4); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 25; }

/* ── Cards & grids ─────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.card-pad { padding: var(--s5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15px; font-weight: 800; }
/* A card title with its icon in a soft pink circle (Profil). */
.head-with-ic { display: flex; align-items: center; gap: 10px; }
.head-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--tone, var(--pink-deep)); background: var(--tone-bg, var(--pink-soft)); }
/* With a colour class (.blue, .pink …) it matches that page's icon in the side menu. */
/* The reminders bell rings once when the card is hovered or used (AnimateIcons' bell-ring). */
.bell-ring, .bell-clap, .bell-wave { transform-box: fill-box; }
.bell-ring { transform-origin: 50% 0; }
.bell-wave.r { transform-origin: 0% 100%; }
.bell-wave.l { transform-origin: 100% 100%; }
.ring-on-hover:is(:hover, :focus-within) .bell-ring { animation: bell-ring 1.3s ease-in-out; }
.ring-on-hover:is(:hover, :focus-within) .bell-clap { animation: bell-clap 1.3s ease-in-out .08s; }
.ring-on-hover:is(:hover, :focus-within) .bell-wave { animation: bell-wave 1.3s ease-out .08s; }
@keyframes bell-ring { 0% { transform: rotate(0); } 9% { transform: rotate(7deg); } 26% { transform: rotate(-18deg); } 45% { transform: rotate(14deg); } 62% { transform: rotate(-9deg); } 78% { transform: rotate(5deg); } 90% { transform: rotate(-2deg); } 100% { transform: rotate(0); } }
@keyframes bell-clap { 0% { transform: translateX(0); } 9% { transform: translateX(1.5px); } 26% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 62% { transform: translateX(-2.5px); } 78% { transform: translateX(1.5px); } 90% { transform: translateX(-1px); } 100% { transform: translateX(0); } }
@keyframes bell-wave { 0% { opacity: 0; transform: scale(.5); } 25% { opacity: 1; transform: scale(1.15); } 50% { opacity: .25; transform: scale(.7); } 75% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }
.card-head .link { font-size: 11.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--pink); text-decoration: none; }
.card-head .link:hover { text-decoration: underline; }
.card-body { padding: var(--s4) var(--s5); }
.grid { display: grid; gap: var(--s4); }
.grid.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.two { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.halves { grid-template-columns: 1fr; } }
.stack { display: grid; gap: var(--s4); }

.stat {
  display: block; text-decoration: none; color: inherit; padding: var(--s4) var(--s5);
  transition: transform .3s var(--ease), box-shadow .2s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.stat:active { transform: translateY(0) scale(0.99); }
.stat .label { font-size: 11.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .label .ic { color: var(--pink); }
.stat .label .nav-ic { width: 32px; height: 32px; margin-inline-end: 4px; }
.stat .label .nav-ic .ic { color: inherit; }
.stat .value { font-size: 28px; font-weight: 900; letter-spacing: -0.03em; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* Key-number cards (Overview + every Statistics tab): one larger size everywhere. */
.grid.stats > .stat { padding: var(--s5); min-height: 148px; }
.grid.stats > .stat .label { font-size: 12.5px; }
.grid.stats > .stat .value { font-size: 36px; margin-top: var(--s3); }
.grid.stats > .stat .sub { font-size: 13px; margin-top: var(--s2); }
/* Statistics period picker: six options, so it scrolls sideways on phones instead of clipping. */
#ranges button { white-space: nowrap; }
@media (max-width: 760px) { #ranges { max-width: 100%; overflow-x: auto; scrollbar-width: none; } #ranges::-webkit-scrollbar { display: none; } }
@media (max-width: 600px) { .grid.stats > .stat { padding: var(--s4); min-height: 0; } .grid.stats > .stat .value { font-size: 28px; white-space: nowrap; } }
.delta { font-weight: 800; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }

/* ── Banner ────────────────────────────────────────────────────────────── */
.banner {
  display: flex; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); margin-bottom: var(--s4);
  border-radius: var(--r); border: 1px solid rgba(244, 67, 105, 0.22);
  background: radial-gradient(600px 120px at 0% 0%, rgba(244, 67, 105, 0.14), transparent 70%),
              radial-gradient(500px 140px at 100% 100%, rgba(239, 135, 68, 0.12), transparent 70%), var(--surface);
}
.banner .bi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--pink), var(--orange)); flex: none; }
.banner .bt { flex: 1; min-width: 0; }
.banner .bt b { display: block; font-size: 15px; }
.banner .bt span { color: var(--muted); font-size: 13px; }
.banner.warn { border-color: rgba(218, 165, 32, 0.35); background: var(--warn-bg); }
@media (max-width: 640px) { .banner { flex-wrap: wrap; } }

/* ── Buttons & inputs ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  font-weight: 800; font-size: 13.5px; text-decoration: none; cursor: pointer;
  border: none; border-radius: 10px; padding: 9px 16px; color: #fff;
  background: linear-gradient(120deg, var(--pink-deep) 0%, var(--pink) 60%, #f5617f 100%);
  box-shadow: 0 1px 2px rgba(196, 42, 78, 0.25), 0 4px 14px rgba(244, 67, 105, 0.22);
  transition: transform .25s var(--ease), box-shadow .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(196, 42, 78, 0.25), 0 10px 24px rgba(244, 67, 105, 0.3); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow-1); }
.btn.ghost:hover { border-color: var(--pink); color: var(--pink); }
.btn.danger { background: #c42a4e; box-shadow: 0 4px 14px rgba(196, 42, 78, 0.25); }
.btn.quiet { background: transparent; color: var(--ink-2); box-shadow: none; padding: 7px 10px; }
.btn.quiet:hover { background: var(--mute-bg); }
.btn.quiet.danger { color: var(--bad); background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { padding: 13px 24px; font-size: 15px; border-radius: 12px; }
.btn.full { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--ink-2); position: relative;
  transition: background-color .15s ease, transform .25s var(--ease);
}
.icon-btn:hover { background: var(--mute-bg); }
.icon-btn:active { transform: scale(0.92); }
.top-profile { display: inline-grid; border-radius: 50%; text-decoration: none; margin-left: var(--s1); transition: transform .25s var(--ease); }
.top-profile .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-strong); }
.top-profile:hover { transform: scale(1.06); }
.top-profile:hover .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--pink); }
.top-profile:active { transform: scale(0.94); }
.top-profile:focus-visible { border-radius: 50%; }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--pink); color: #fff; font-size: 10px; font-weight: 900; display: grid; place-items: center; border: 2px solid var(--ground); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff; animation: spin .8s linear infinite; display: inline-block; }
.btn.ghost .spinner, .loading .spinner, .spinner.dark { border-color: var(--line-strong); border-top-color: var(--pink); }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 6px; margin-bottom: var(--s4); }
.field > label, .label-sm { font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; font-size: 14px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.input { resize: vertical; min-height: 96px; }
.input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(244, 67, 105, 0.12); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.error { background: var(--bad-bg); border: 1px solid rgba(196, 42, 78, 0.28); color: var(--bad); border-radius: 10px; padding: 10px 14px; font-weight: 700; font-size: 13px; margin-bottom: var(--s4); }
.note { background: var(--warn-bg); border: 1px solid rgba(218, 165, 32, 0.3); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: var(--s4); }

.switch { position: relative; display: inline-block; vertical-align: middle; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: var(--line-strong); transition: background-color .2s ease; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--pink); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--pink); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 100px; cursor: pointer;
  font-size: 13px; font-weight: 700; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-2);
  transition: background-color .15s ease, border-color .15s ease, transform .2s var(--ease);
}
.chip:hover { border-color: var(--pink); }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"], .chip.on { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-deep); }
html.dark .chip[aria-pressed="true"], html.dark .chip.on { color: #ff9db3; }
.chip .n { font-size: 11px; color: var(--muted); }
/* Profil's hour choices (refund deadline, reminders): the shared .seg control, full width. */
.seg.fill { display: flex; width: 100%; }
.seg.fill button { flex: 1; padding-inline: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg.fill button:disabled { cursor: progress; opacity: .6; }
.seg-summary { margin: 0 0 14px; color: var(--ink-2); line-height: 1.55; text-wrap: pretty; }
.seg-label { margin: 16px 0 8px; }
.seg-summary + .seg-label { margin-top: 0; }
.seg-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); line-height: 1.6; text-wrap: pretty; }
.chip .emoji { flex: none; width: 18px; height: 18px; margin: -2px 0; }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { border: none; background: transparent; padding: 7px 14px; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--muted); transition: background-color .15s ease, color .15s ease; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button:hover { color: var(--ink); }
.seg button:active { transform: scale(0.97); }
.seg button[aria-pressed="true"] { background: var(--pink-soft); color: var(--pink-deep); }
html.dark .seg button[aria-pressed="true"] { color: #ff9db3; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 900; padding: 2px 9px; border-radius: 100px; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.mute { background: var(--mute-bg); color: var(--muted); }

.avatar {
  width: var(--s, 36px); height: var(--s, 36px); border-radius: 50%; flex: none; object-fit: cover;
  display: inline-grid; place-items: center; font-size: calc(var(--s, 36px) * 0.36); font-weight: 900;
  /* Capitals have no descender, so a normal line box leaves them sitting high: use a 1-line box and nudge down. */
  line-height: 1; padding-top: 0.08em; box-sizing: border-box; text-transform: uppercase;
  color: var(--pink-deep); background: linear-gradient(135deg, rgba(244,67,105,.16), rgba(239,135,68,.16));
}

/* ── Lists & tables ────────────────────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); border-top: 1px solid var(--line); }
.list > li:first-child { border-top: none; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .meta { font-size: 12.5px; color: var(--muted); }
.list .amt { font-weight: 900; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px var(--s4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px var(--s4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background-color .12s ease; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.who-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.who-cell b { display: block; }
.who-cell span { font-size: 12px; color: var(--muted); }
.actions-cell { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.empty { text-align: center; padding: var(--s7) var(--s5); color: var(--muted); }
.empty img { width: 96px; height: 96px; object-fit: contain; margin-bottom: var(--s2); }
/* An empty state's duck: its own shape, gently floating. */
.empty .empty-duck { display: block; width: auto; height: 112px; margin: 0 auto var(--s3); animation: duck-float 4s ease-in-out infinite; }
li .empty .empty-duck { height: 92px; }
@keyframes duck-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: var(--s7) 0; }

/* ── Charts ────────────────────────────────────────────────────────────── */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-weight: 700; }
.chart .bar { fill: var(--pink); transition: opacity .15s ease; }
.chart .bar.dim { fill: var(--pink); opacity: .35; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart g:hover .bar { opacity: .8; }
.tip {
  position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 700;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px;
  box-shadow: var(--shadow-3); opacity: 0; transition: opacity .12s ease;
}
.tip.on { opacity: 1; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s3); padding: 10px 0; border-top: 1px solid var(--line); }
.hbar:first-child { border-top: none; }
.hbar .n { font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .v { font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
.hbar .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--mute-bg); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 3px; background: var(--pink); transform-origin: left; }
.hbar .s { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: -2px; }
.card-period { display: inline-block; margin: -4px 0 12px; padding: 3px 10px; border-radius: 99px; background: var(--pink-soft); color: var(--pink-deep); font-weight: 800; }
/* A row that opens a team member's card. */
.hbar.click { width: 100%; border-inline: 0; border-bottom: 0; background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.hbar.click .n { display: inline-flex; align-items: center; gap: 4px; }
.hbar.click .n .ic { color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .2s ease, transform .25s var(--ease); }
.hbar.click:hover .n, .hbar.click:focus-visible .n { color: var(--pink-deep); }
.hbar.click:hover .n .ic, .hbar.click:focus-visible .n .ic { opacity: 1; transform: none; }
.hbar.click:active { transform: scale(0.99); }
[dir="rtl"] .hbar.click .n .ic { transform: scaleX(-1); }
.money { display: grid; gap: 0; }
.money div { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.money div:first-child { border-top: none; }
.money .neg { color: var(--bad); }
.money .tot { font-weight: 900; font-size: 16px; border-top: 2px solid var(--line-strong); }

/* ── Readiness ─────────────────────────────────────────────────────────── */
.ready-bar { height: 8px; border-radius: 4px; background: var(--mute-bg); overflow: hidden; margin: var(--s3) 0 var(--s4); }
.ready-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--pink), var(--orange)); transform-origin: left; transition: transform .6s var(--ease); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.checklist li { display: flex; align-items: center; gap: var(--s3); padding: 10px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: none; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid var(--line-strong); color: transparent; }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist .grow { flex: 1; min-width: 0; }
.checklist .grow b { display: block; }
.checklist .grow span { font-size: 12.5px; color: var(--muted); }

.cover {
  position: relative; aspect-ratio: 16 / 6; border-radius: var(--r); overflow: hidden; background:
  radial-gradient(400px 200px at 20% 20%, rgba(244,67,105,.35), transparent 70%),
  radial-gradient(400px 200px at 90% 90%, rgba(239,135,68,.35), transparent 70%), var(--surface-2);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); }
.cover .cover-meta { position: absolute; left: var(--s5); right: var(--s5); bottom: var(--s4); z-index: 1; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.cover .cover-meta h2 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; }
.cover .cover-meta p { margin: 2px 0 0; opacity: .85; font-size: 13px; }

/* ── Gallery ───────────────────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s3); }
.photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.photo:hover img { transform: scale(1.04); }
.photo .del { position: absolute; top: 8px; right: 8px; background: rgba(26,13,18,.65); color: #fff; opacity: 0; transition: opacity .15s ease, transform .25s var(--ease); }
.photo:hover .del, .photo .del:focus-visible { opacity: 1; }
.photo .del:hover { background: var(--bad); }
.drop { border: 2px dashed var(--line-strong); border-radius: 12px; display: grid; place-items: center; text-align: center; aspect-ratio: 1; color: var(--muted); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; font-weight: 700; padding: var(--s3); }
.drop:hover, .drop.over { border-color: var(--pink); background: var(--pink-soft); color: var(--pink-deep); }
.drop input { display: none; }

/* ── Hours editor ──────────────────────────────────────────────────────── */
.hours { display: grid; gap: 0; }
.hours .day { display: grid; grid-template-columns: 130px auto 1fr; align-items: center; gap: var(--s3); padding: 10px 0; border-top: 1px solid var(--line); }
.hours .day:first-child { border-top: none; }
.hours .day b { font-weight: 800; }
.hours .times { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.hours .times input { width: 120px; }
.hours .closed { color: var(--faint); font-weight: 700; }
@media (max-width: 560px) { .hours .day { grid-template-columns: 1fr auto; } .hours .times { grid-column: 1 / -1; } }

/* ── Calendar (week grid, Toggl style) ─────────────────────────────────── */
.cal { overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); min-width: 860px; position: relative; }
.cal-head { position: sticky; top: 0; background: var(--surface); z-index: 2; padding: 10px 8px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-head:first-child { border-left: none; }
.cal-head .d { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; margin-right: 6px; }
.cal-head .w { font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cal-head.today .d, .cal-head.today .w { color: var(--pink); }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 8px; font-size: 11px; color: var(--muted); font-weight: 700; transform: translateY(-50%); }
.cal-col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hour); }
.cal-col.today { background-color: rgba(244, 67, 105, 0.03); }
.appt {
  position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 5px 7px; overflow: hidden; cursor: pointer;
  font-size: 11.5px; line-height: 1.3; text-align: left; border: none; border-left: 3px solid var(--pink);
  background: var(--pink-soft); color: var(--ink); transition: transform .2s var(--ease), box-shadow .2s ease;
}
.appt:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); z-index: 3; }
.appt:active { transform: scale(0.98); }
.appt b { display: block; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.pending { border-left-color: #d49a00; background: var(--warn-bg); }
.appt.completed { border-left-color: var(--ok); background: var(--ok-bg); }
.appt.cancelled, .appt.no_show, .appt.refunded { border-left-color: var(--faint); background: var(--mute-bg); color: var(--muted); text-decoration: line-through; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--pink); z-index: 2; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); }
.toolbar { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); }
.toolbar .spacer { flex: 1; }
.week-nav { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.week-nav button { border: none; background: none; cursor: pointer; padding: 6px 8px; display: grid; place-items: center; color: var(--ink-2); }
.week-nav button:hover { color: var(--pink); }
.week-nav span { font-weight: 800; font-size: 13px; padding: 0 6px; min-width: 150px; text-align: center; }
.search { position: relative; }
.search input { padding-left: 34px; width: 220px; }
.search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ── Chat ──────────────────────────────────────────────────────────────── */
.chat { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 180px); min-height: 480px; overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-list a { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); transition: background-color .12s ease; }
.chat-list a:hover { background: var(--surface-2); }
.chat-list a[aria-current="true"] { background: var(--pink-soft); }
.chat-list .grow { flex: 1; min-width: 0; }
.chat-list .grow b { display: flex; justify-content: space-between; gap: 8px; }
.chat-list .grow b small { font-weight: 700; color: var(--muted); font-size: 11px; }
.chat-list .grow span { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { display: flex; flex-direction: column; min-width: 0; }
.thread-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); }
.msgs { flex: 1; overflow-y: auto; padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: 6px; background:
  radial-gradient(500px 300px at 100% 0%, rgba(244,67,105,.05), transparent 70%), var(--surface-2); }
.msg { max-width: min(70%, 520px); padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); word-wrap: break-word; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: linear-gradient(120deg, var(--pink-deep), var(--pink)); color: #fff; border: none; }
.msg small { display: block; font-size: 10.5px; opacity: .7; margin-top: 2px; }
.day-sep { align-self: center; font-size: 11px; font-weight: 800; color: var(--muted); padding: 6px 0; }
.composer { display: flex; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.composer textarea { min-height: 42px; max-height: 140px; resize: none; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: auto; }
  .chat.has-thread .chat-list { display: none; }
  .chat:not(.has-thread) .thread { display: none; }
  .msgs { min-height: 50vh; }
}

/* ── Modal & toast ─────────────────────────────────────────────────────── */
dialog.modal { border: none; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-3); }
dialog.modal.wide { width: min(720px, calc(100vw - 32px)); }
dialog.modal[open] { animation: pop .35s var(--ease); }
dialog.modal::backdrop { background: rgba(26, 13, 18, 0.45); backdrop-filter: blur(2px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-inner { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; font-weight: 900; }
.modal-body { padding: var(--s5); overflow-y: auto; }
.modal-body p:first-child { margin-top: 0; }
.modal-foot { display: flex; gap: var(--s2); justify-content: flex-end; padding: var(--s3) var(--s5); border-top: 1px solid var(--line); flex-wrap: wrap; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow-3); animation: pop .35s var(--ease); transition: opacity .3s ease, transform .3s ease; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ── Full-screen states (gate, setup) ──────────────────────────────────── */
.solo {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: var(--s5) var(--s4) var(--s7);
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(239, 135, 68, 0.12), transparent 60%),
    radial-gradient(800px 600px at -10% 20%, rgba(244, 67, 105, 0.10), transparent 60%), var(--ground);
}
/* Logo at the far left, language (and log out) at the far right; the logo is the login's crop, larger. */
.solo-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 2px var(--s4) 0; margin-bottom: var(--s5); }
.solo-top .auth-logo { width: 200px; height: 62px; }
.solo-top .auth-logo img { width: 312px; margin: -54px 0 0 -55px; }
@media (max-width: 480px) { .solo-top { padding: 0; } .solo-top .auth-logo { width: 156px; height: 48px; } .solo-top .auth-logo img { width: 244px; margin: -42px 0 0 -43px; } }
.solo-card { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-2); padding: var(--s6); }
.solo-card.wide { max-width: 720px; }
@media (max-width: 560px) { .solo-card { padding: var(--s5) var(--s4); } }
.solo h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.03em; font-weight: 800; margin-bottom: var(--s2); }
.solo .lead { color: var(--muted); margin: 0 0 var(--s5); line-height: 1.7; }
.solo .hero { width: 110px; height: 110px; object-fit: contain; display: block; margin: 0 auto var(--s3); }

/* Two-step login screens: the glass card, centred in the page, on the login's pink
   (the glass takes its plum tone from the pink behind it). */
.solo:has(> .solo-card.glass) { background: linear-gradient(115deg, #fcd6df 0 52%, #f8b4c5 52% 100%); }
.solo-card.glass { margin-block: auto; max-width: 480px; }
.solo-card.glass h1 { color: #fff; }
.solo-card.glass .lead { color: rgba(255, 255, 255, 0.72); }
.solo-card.glass .lead b { color: #fff; }
.solo-card.glass .hint { color: rgba(255, 255, 255, 0.6); }
.solo-card.glass .error { background: #fff1f4; color: #a3173a; border: 0; }
.solo-card.glass .note { background: #f0fbf4; color: #17663a; border: 0; }
.solo-card.glass .loading { color: rgba(255, 255, 255, 0.8); }
.solo-card.glass .input { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.solo-card.glass .input::placeholder { color: rgba(255, 255, 255, 0.4); }
.solo-card.glass .btn.quiet { color: rgba(255, 255, 255, 0.82); }
.solo-card.glass .btn.quiet:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.solo-card.glass .btn.quiet:disabled { color: rgba(255, 255, 255, 0.6); opacity: 1; }
.solo-card.glass .otp-slot { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.solo-card.glass .otp-slot.filled { background: rgba(255, 255, 255, 0.12); }
.solo-card.glass .otp-slot.active { border-color: #ff8fab; box-shadow: 0 0 0 4px rgba(255, 143, 171, 0.2); }
.solo-card.glass .otp-slot.active:empty::after { background: #ff8fab; }
.solo-card.glass .otp-sep { background: rgba(255, 255, 255, 0.35); }
.solo-card.glass .otp.invalid .otp-slot { border-color: #ff6b8a; background: rgba(255, 107, 138, 0.15); }
.solo-card.glass .backup-codes { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.25); }
.solo-card.glass .backup-codes code { color: #fff; }
.solo-card.glass .backup-codes li::before { color: rgba(255, 255, 255, 0.5); }
/* Gate screens on the glass card: plan rows, small print and its links. */
.solo-card.glass .rows > div { border-color: rgba(255, 255, 255, 0.15); }
.solo-card.glass .rows > div > span:first-child { color: rgba(255, 255, 255, 0.65); }
.solo-card.glass .rows > div > span:last-child { color: #fff; }
.solo-card.glass .muted { color: rgba(255, 255, 255, 0.65); }
.solo-card.glass .muted a, .solo-card.glass .hint a { color: #ffb3c4; font-weight: 700; }
/* Forms on the glass card (staff invitation page): labels, read-only field, password rules. */
.solo-card.glass .kicker { margin: 0 0 6px; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #ff9db3; }
.solo-card.glass .field > label { color: rgba(255, 255, 255, 0.85); }
.solo-card.glass .input:focus { border-color: #ff8fab; box-shadow: 0 0 0 4px rgba(255, 143, 171, 0.2); }
.solo-card.glass .input[readonly] { background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.75); cursor: default; }
.pw-rules { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; }
.pw-rules li { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line-strong); color: var(--muted); }
.pw-rules li.ok { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.solo-card.glass .pw-rules li { border-color: rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.7); }
.solo-card.glass .pw-rules li.ok { border-color: #4ade80; color: #bbf7d0; background: rgba(74, 222, 128, 0.15); }
.center { text-align: center; }

/* ── Login: split screen after Deel's, in Glamora pink, with a glass form card ─────────────────── */
.auth {
  --auth-base: #fcd6df; --auth-deep: #f8b4c5; --auth-tip: #fde3ea; --auth-blob: #f58fa9; --auth-tag: #1a0d12;
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--auth-base);
}
html.dark .auth { --auth-base: #1a0b11; --auth-deep: #2a111b; --auth-tip: #3a1827; --auth-blob: #5a1f35; }
html.dark .auth-art .tag { background: #fce4ec; color: #1a0d12; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); }
html.dark .auth-promo h2 mark { background: var(--pink); color: #fff; }
.auth-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.auth-bg .deep { fill: var(--auth-deep); }
.auth-bg .corner { fill: var(--auth-tip); }

.auth-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 26px 32px; }
.auth-logo { display: block; width: 156px; height: 48px; overflow: hidden; border-radius: 8px; transition: transform .35s var(--ease); }
.auth-logo img { display: block; width: 244px; max-width: none; margin: -42px 0 0 -43px; }
.auth-logo:hover { transform: translateY(-1px); }
.auth-logo:active { transform: scale(0.97); }
html.dark .auth-logo img { filter: brightness(0) invert(1); }
.auth-help { margin: 0; font-size: 15px; color: var(--ink-2); }
.auth-help a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.auth-help a:hover { color: var(--pink-deep); }

.auth-main {
  flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 32px 72px;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: var(--s6);
}

.auth-promo { display: grid; justify-items: center; text-align: center; }
.auth-art { position: relative; width: 540px; height: 350px; margin-bottom: 18px; }
.auth-art .blob {
  position: absolute; left: 190px; top: 10px; width: 330px; height: 330px; background: var(--auth-blob);
  border-radius: 47% 53% 44% 56% / 55% 45% 55% 45%;
}
.auth-art .duck {
  position: absolute; left: 150px; top: -36px; width: 420px; max-width: none;
  filter: drop-shadow(0 18px 24px rgba(122, 20, 52, 0.22));
}
.auth-art .tag {
  position: absolute; background: var(--auth-tag); color: #fff; border-radius: 999px;
  padding: 12px 26px; font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(26, 13, 18, 0.18);
}
.auth-art .t1 { left: 20px; top: 40px; }
.auth-art .t2 { left: 162px; top: 40px; }
.auth-art .t3 { left: 84px; top: 118px; }
.auth-art .cursor { position: absolute; left: 30px; top: 218px; width: 64px; transform: rotate(-8deg); }
.auth-art .cursor path { fill: var(--orange); stroke: #5a2437; stroke-width: 3; stroke-linejoin: round; }

.auth-promo h2 {
  font-size: clamp(40px, 4.4vw, 66px); font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  color: var(--ink); max-width: 11.5em;
}
.auth-promo h2 mark {
  display: inline-block; margin-top: 4px; padding: 0 12px 6px; background: var(--surface); color: inherit;
  transform: rotate(-1deg);
}
.auth-promo p { margin: 22px 0 16px; font-size: 18px; color: var(--ink-2); line-height: 1.7; }
.auth-more {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; border: 1.5px solid var(--ink); border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; transition: transform .35s var(--ease);
}
.auth-more:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.4); }
.auth-more:active { transform: translateY(0) scale(0.97); }

/* The form: a dark glass card (underlined fields, floating labels, arrow button). */
/* The glass surface, shared by the login card and the two-step login screens (.solo-card.glass). */
.auth-card, .solo-card.glass {
  border-radius: 22px; color: #fff;
  background: rgba(20, 8, 13, 0.62); border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 12px 40px rgba(196, 42, 78, 0.25);
  animation: auth-in .6s var(--ease) both;
}
.auth-card { justify-self: center; width: 100%; max-width: 400px; padding: 36px 32px 32px; }
@keyframes auth-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.auth-card h1 { text-align: center; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin: 0; color: #fff; }
.auth-sub { text-align: center; margin: 6px 0 28px; font-size: 14.5px; color: rgba(255, 255, 255, 0.7); }
.auth-card .error, .auth-card .note { margin-bottom: 18px; border: 0; }
.auth-card .error { background: #fff1f4; color: #a3173a; }
.auth-card .note { background: #f0fbf4; color: #17663a; }

/* Underlined field; the label (with its icon) sits in the field and floats up on focus or input. */
.gfield { position: relative; margin-bottom: 28px; }
.gfield input {
  display: block; width: 100%; padding: 12px 0 9px; border: 0; border-bottom: 2px solid rgba(255, 255, 255, 0.35); border-radius: 0;
  background: transparent; color: #fff; font: inherit; font-size: 16px; outline: 0; caret-color: #ff8fab;
}
.gfield input:hover { border-bottom-color: rgba(255, 255, 255, 0.55); }
.gfield input:focus { border-bottom-color: #ff8fab; }
.gfield input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 100px transparent inset; transition: background-color 9999s; }
.gfield label {
  position: absolute; left: 0; top: 12px; display: flex; align-items: center; gap: 8px; pointer-events: none;
  font-size: 15px; color: rgba(255, 255, 255, 0.72); transform-origin: 0 0; transition: transform .25s var(--ease), color .2s ease;
}
.gfield input:focus + label, .gfield input:not(:placeholder-shown) + label, .gfield input:-webkit-autofill + label { transform: translateY(-24px) scale(0.8); }
.gfield input:focus + label { color: #ffb3c4; }
.gfield.pw input { padding-right: 44px; }
.eye {
  position: absolute; right: -6px; bottom: 2px; display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, 0.8); cursor: pointer; transition: transform .3s var(--ease);
}
.eye:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.eye:active { transform: scale(0.9); }
.eye:focus-visible { outline: 2px solid #ff8fab; outline-offset: 1px; }
.eye .slash { opacity: 0; transition: opacity .2s; }
.eye[aria-pressed="true"] .slash { opacity: 1; }

.auth-link {
  display: block; margin: -12px 0 24px; padding: 2px 0; border: 0; background: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.75); font-size: 13.5px; font-weight: 600;
}
.auth-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.auth-link:active { opacity: .7; }
.auth-link:focus-visible { outline: 2px solid #ff8fab; outline-offset: 2px; border-radius: 4px; }
.auth-card .btn.auth-go { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; }
.auth-go svg { transition: transform .3s var(--ease); }
.auth-go:hover svg { transform: translateX(4px); }
.auth-switch { margin: 24px 0 0; text-align: center; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.auth-switch a { color: #ffb3c4; font-weight: 700; text-decoration: none; }
.auth-switch a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .auth-card, .solo-card.glass { animation: none; } }

@media (max-width: 1100px) {
  .auth-art { transform: scale(0.8); margin: -36px 0 -22px; }
}
@media (max-width: 920px) {
  .auth-main { grid-template-columns: 1fr; padding: 8px 16px 48px; }
  .auth-promo { display: none; }
  .auth-top { padding: 16px; }
}
@media (max-width: 480px) {
  .auth-help span { display: none; }
  .auth-card { padding: 30px 22px 26px; border-radius: 18px; }
  .auth-card h1 { font-size: 28px; }
}

.auth-logo { flex: none; }
@media (max-width: 400px) { .auth-logo { width: 54px; } }

.steps { display: flex; gap: 6px; margin-bottom: var(--s5); }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--mute-bg); }
.steps i.on { background: linear-gradient(90deg, var(--pink), var(--orange)); }
.step-label { font-size: 11.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--pink); margin-bottom: 6px; }
.wiz-foot { display: flex; justify-content: space-between; gap: var(--s3); margin-top: var(--s5); flex-wrap: wrap; }
.choice { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; text-align: left; margin-bottom: var(--s2); transition: border-color .15s ease, transform .25s var(--ease); }
.choice:hover { border-color: var(--pink); }
.choice:active { transform: scale(0.99); }
.choice[aria-checked="true"] { border-color: var(--pink); background: var(--pink-soft); }
.choice b { flex: 1; }
.choice .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.choice[aria-checked="true"] .radio { border-color: var(--pink); }
.choice[aria-checked="true"] .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); }
.suggest { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.suggest button { display: flex; gap: 8px; align-items: flex-start; width: 100%; padding: 10px 12px; background: var(--surface); border: none; border-top: 1px solid var(--line); text-align: left; cursor: pointer; font-size: 13px; }
.suggest li:first-child button { border-top: none; }
.suggest button:hover, .suggest button:focus-visible { background: var(--pink-soft); }
.map { width: 100%; aspect-ratio: 16 / 7; max-height: 260px; border: 1px solid var(--line); border-radius: 12px; margin-top: var(--s3); background: var(--surface-2); }
.rows { display: grid; }
.rows > div { display: flex; justify-content: space-between; gap: var(--s4); padding: 11px 0; border-top: 1px solid var(--line); }
.rows > div:first-child { border-top: none; }
.rows > div > span:first-child { color: var(--muted); }
.rows > div > span:last-child { font-weight: 800; text-align: right; }
.confetti { font-size: 48px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.view:focus { outline: none; }
.appt.short { padding: 2px 6px; display: flex; align-items: center; }
.appt.short b { font-size: 11px; }
.stat.static:hover { transform: none; box-shadow: var(--shadow-1); }
@media (min-width: 761px) { .thread-head a[href="#/chat"] { display: none; } }
@media (max-width: 640px) {
  .banner .bt { flex: 1 1 calc(100% - 64px); }
  .chart { overflow-x: auto; }
  .chart svg { min-width: 520px; }
}
@media (max-width: 900px) { table.tbl { min-width: 760px; } }
.grid > *, .stack > * { min-width: 0; }

/* ── Two-step login ────────────────────────────────────────────────────── */
.twofa-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--pink); background: var(--pink-soft); margin-bottom: var(--s3); }
/* 6-digit code: boxes (lib.js otpField) over one transparent input that does the typing. */
.otp { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; direction: ltr; }
.otp-input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; outline: 0; background: transparent;
  color: transparent; caret-color: transparent; font-size: 16px; letter-spacing: -0.5em; cursor: text; }
.otp-input::selection { background: transparent; }
.otp-slot { position: relative; flex: 1 1 0; min-width: 0; max-width: 52px; aspect-ratio: 52 / 60; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--ink);
  font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.otp-slot.filled { background: var(--surface); }
.otp-slot.active { border-color: var(--pink); box-shadow: 0 0 0 4px var(--pink-soft); }
.otp-slot.active:empty::after { content: ''; width: 2px; height: 42%; border-radius: 1px; background: var(--pink); animation: caret-blink 1.2s ease-out infinite; }
.otp-sep { flex: none; width: 12px; height: 2px; border-radius: 1px; background: var(--line-strong); }
.otp.invalid .otp-slot { border-color: var(--bad); background: var(--bad-bg); }
@keyframes caret-blink { 0%, 70%, 100% { opacity: 1; } 20%, 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .otp-slot.active:empty::after { animation: none; } }
.trust-row { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 var(--s4); cursor: pointer; font-size: 14px; }
.trust-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pink); flex: none; }
.trust-row .hint { display: block; }
.twofa-links { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: var(--s3); }
.backup-codes { list-style: none; padding: var(--s4); margin: 0 0 var(--s4); display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px var(--s4);
  background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 12px; counter-reset: bc; }
.backup-codes li { counter-increment: bc; display: flex; gap: 8px; align-items: baseline; }
.backup-codes li::before { content: counter(bc) '.'; color: var(--faint); font-size: 12px; width: 18px; text-align: right; }
.backup-codes code { font: 600 15px/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .04em; }
@media print {
  .solo-top, .btn, .trust-row, .lead { display: none !important; }
  .solo, .solo-card { background: #fff !important; box-shadow: none !important; border: 0 !important; }
}

/* ── Arabic: font and right-to-left ────────────────────────────────────────
   The page sets <html lang dir> (index.html + ../i18n.js). Letter-spacing
   breaks up joined Arabic letters, and Playfair has no Arabic, so Arabic
   headings use the Arabic sans. Everything below only flips direction. */
html[lang="ar"] body :not(.otp-input):not(code) { letter-spacing: 0 !important; }
html[lang="ar"] :is(.page-head h1, .solo h1, .auth-card h1, .auth-promo h2, h2[style*="Playfair"]) { font-family: 'Noto Sans Arabic', 'Nunito Sans', sans-serif !important; }
.otp, .backup-codes { direction: ltr; }

[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .nav .count { margin-left: 0; margin-right: auto; }
[dir="rtl"] .top-profile { margin-left: 0; margin-right: var(--s1); }
[dir="rtl"] .tile-glow { clip-path: inset(0 var(--side-w) 0 0); }
@media (max-width: 900px) {
  [dir="rtl"] .tile-glow { clip-path: none; }
  [dir="rtl"] .side { inset: 0 0 0 auto; transform: translateX(100%); }
  [dir="rtl"] body.nav-open .side { transform: none; }
}
[dir="rtl"] .icon-btn .dot { right: auto; left: 5px; }
/* Progress bars fill from the right. */
[dir="rtl"] :is(.trial-card .bar i, .hbar .track i, .ready-bar i) { transform-origin: right; }
[dir="rtl"] .switch span::after { left: auto; right: 3px; }
[dir="rtl"] .switch input:checked + span::after { transform: translateX(-16px); }
[dir="rtl"] .seg button + button { border-left: 0; border-right: 1px solid var(--line-strong); }
[dir="rtl"] :is(.tbl th, .appt, .choice, .suggest button) { text-align: right; }
[dir="rtl"] .tbl .num, [dir="rtl"] .hbar .v, [dir="rtl"] .rows > div > span:last-child { text-align: left; }
[dir="rtl"] .search input { padding-left: 12px; padding-right: 34px; }
[dir="rtl"] .search .ic { left: auto; right: 10px; }
[dir="rtl"] .chat-list { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .photo .del { right: auto; left: 8px; }
[dir="rtl"] .gfield.pw input { padding-right: 0; padding-left: 44px; }
[dir="rtl"] .gfield label { left: auto; right: 0; transform-origin: 100% 0; }
[dir="rtl"] .eye { right: auto; left: -6px; }
[dir="rtl"] .auth-art { direction: ltr; }
[dir="rtl"] .auth-bg { transform: scaleX(-1); }
/* Calendar: days run right-to-left like the rest of the page. */
[dir="rtl"] .cal-head { border-left: 0; border-right: 1px solid var(--line); }
[dir="rtl"] .cal-head:first-child { border-right: none; }
[dir="rtl"] .cal-head .d { margin-right: 0; margin-left: 6px; }
[dir="rtl"] .cal-times span { right: auto; left: 8px; }
[dir="rtl"] .cal-col { border-left: 0; border-right: 1px solid var(--line); }
[dir="rtl"] .appt { border-left: none; border-right: 3px solid var(--pink); }
[dir="rtl"] .appt.pending { border-right-color: #d49a00; }
[dir="rtl"] .appt.completed { border-right-color: var(--ok); }
[dir="rtl"] :is(.appt.cancelled, .appt.no_show, .appt.refunded) { border-right-color: var(--faint); }
[dir="rtl"] .now-line::before { left: auto; right: -5px; }
/* Arrows point the way you read. */
[dir="rtl"] :is(.week-nav, .thread-head) .ic { transform: scaleX(-1); }
/* Charts keep time running left-to-right, with right-to-left tooltip text. */
[dir="rtl"] .chart { direction: ltr; }
[dir="rtl"] .chart .tip { direction: rtl; }
/* Login: the illustration mirrors with the layout, the art itself does not. */
[dir="rtl"] .auth-logo { direction: ltr; }

/* ── Avatar picker (Settings) — the app's 25 Glamora avatars ── */
.avatar-picker { overflow: hidden; }
.ap-band {
  height: 112px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(244, 67, 105, 0.3), transparent 60%),
    radial-gradient(110% 150% at 100% 0%, rgba(255, 178, 56, 0.22), transparent 55%),
    linear-gradient(90deg, var(--pink-soft), rgba(244, 67, 105, 0.03));
}
.ap-body { padding: 0 var(--s6) var(--s6); margin-top: -68px; text-align: center; }
.ap-main {
  width: 136px; height: 136px; margin: 0 auto; border-radius: 50%; overflow: hidden;
  background: var(--surface); box-shadow: 0 0 0 4px var(--surface), var(--shadow-2);
  animation: ap-rise 0.6s var(--ease) both;
}
.ap-spin { width: 100%; height: 100%; transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.ap-spin img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ap-name { margin: var(--s4) 0 2px; font-size: 22px; letter-spacing: -0.02em; }
.ap-sub { margin: 0; }
.ap-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--s3); max-width: 620px; margin: var(--s5) auto 0;
}
.ap-opt {
  position: relative; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface-2); cursor: pointer; transition: transform 0.25s var(--ease);
}
.ap-opt img {
  display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  animation: ap-rise 0.5s var(--ease) both; animation-delay: calc(var(--i) * 18ms + 150ms);
}
.ap-opt::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 2.5px var(--pink); opacity: 0; transform: scale(0.8) rotate(-90deg);
  transition: opacity 0.2s ease, transform 0.35s var(--ease);
}
.ap-opt[aria-pressed="true"]::after { opacity: 1; transform: none; }
.ap-opt:hover { transform: translateY(-3px); }
.ap-opt:active { transform: translateY(0) scale(0.94); }
.ap-opt:focus-visible { outline: 2px solid var(--pink); outline-offset: 6px; }
.ap-foot {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3);
  flex-wrap: wrap; margin-top: var(--s5); text-align: start;
}
@keyframes ap-rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  .ap-main, .ap-opt img { animation: none; }
  .ap-spin, .ap-opt, .ap-opt::after { transition: none; }
}

/* ── Calendar sync (Settings) ── */
.cal-h { margin: 0 0 4px; font-size: 15px; }
.cal-p { margin: 0 0 var(--s4); }
.cal-feeds { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s2); }
.cal-feed {
  display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4);
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
}
.cal-feed .grow { flex: 1; min-width: 0; }
.cal-feed .meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-feed-emp { width: auto; max-width: 180px; }
.cal-status { font-size: 12px; margin-top: 2px; }
.cal-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 700; }
.cal-bad { color: var(--bad); font-weight: 700; }
.cal-ic {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--pink-soft); color: var(--pink);
}
.cal-add { padding: var(--s4); border: 1px dashed var(--line-strong); border-radius: 12px; }
.cal-actions { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.cal-help { margin-top: var(--s3); font-size: 13px; }
.cal-help summary { cursor: pointer; font-weight: 700; color: var(--pink-deep); }
.cal-help summary:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 4px; }
.cal-help p { margin: 6px 0 0; color: var(--muted); }
.cal-sep { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
.cal-link {
  display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s3);
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); margin-bottom: var(--s3);
}
.cal-link .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
#cal-export .cal-actions { justify-content: flex-start; }
@media (max-width: 640px) {
  .cal-feed { flex-wrap: wrap; }
  .cal-feed-emp { max-width: none; flex: 1; }
}

/* ── Client links + client card ── */
.who-link {
  display: inline-flex; align-items: center; gap: var(--s3); min-width: 0; padding: 4px 8px 4px 4px; margin: -4px;
  border: 0; border-radius: 14px; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.who-link > span:not(.avatar) { display: flex; flex-direction: column; min-width: 0; }
.who-link > .ic { color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity 0.2s ease, transform 0.25s var(--ease); }
.who-link:hover { background: var(--pink-soft); }
.who-link:hover > .ic, .who-link:focus-visible > .ic { opacity: 1; transform: none; }
.who-link:active { transform: scale(0.98); }
.who-link:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.thread-head .who-link { flex: 1; }
.list.click > li { padding: 0; }
.list.click > li > button {
  display: flex; align-items: center; gap: var(--s3); width: 100%; padding: var(--s3) var(--s5);
  border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.list.click > li > button > .ic { color: var(--muted); flex: none; }
.list.click > li > button:hover { background: var(--pink-soft); }
.list.click > li > button:active > * { transform: translateY(1px); }
.list.click > li > button:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; }
.client-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-bottom: var(--s4); }
.client-stats > div { padding: var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.client-stats span { display: block; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.client-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.client-h { margin: var(--s5) 0 var(--s2); font-size: 14px; }
.client-h .muted { font-weight: 600; }
.client-bookings { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.client-bookings li + li { border-top: 1px solid var(--line); }
.client-bookings button {
  display: flex; align-items: center; gap: var(--s3); width: 100%; padding: 10px var(--s3);
  border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.client-bookings .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.client-bookings .grow .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-bookings .amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.client-bookings .ic { color: var(--muted); flex: none; }
.client-bookings button:hover { background: var(--pink-soft); }
.client-bookings button:focus-visible { outline: 2px solid var(--pink); outline-offset: -2px; }
[dir="rtl"] :is(.who-link, .list.click, .client-bookings) .ic { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { .who-link, .who-link > .ic { transition: none; } }

/* ── Chat: "too fast" notice ── */
.chat-limit {
  margin: 0 var(--s5); padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 700;
  background: var(--bad-bg, rgba(196, 42, 78, 0.1)); color: var(--bad); animation: ap-rise 0.3s var(--ease) both;
}
@media (prefers-reduced-motion: reduce) { .chat-limit { animation: none; } }

/* ── DA | EN switch ── */
.lang-toggle { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 100px; background: var(--surface); border: 1px solid var(--line-strong); }
.lang-toggle button {
  min-width: 34px; height: 24px; padding: 0 8px; border: 0; border-radius: 100px; cursor: pointer;
  background: transparent; color: var(--ink-2); font: inherit; font-size: 11.5px; font-weight: 900; letter-spacing: .04em;
  opacity: .6; transition: transform 0.2s var(--ease), opacity 0.2s ease;
}
.lang-toggle button:hover { opacity: 1; }
.lang-toggle button:active { transform: scale(.94); }
.lang-toggle button:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.lang-toggle button[aria-pressed="true"] { background: var(--pink); color: #fff; opacity: 1; box-shadow: 0 2px 8px rgba(244, 67, 105, .3); }
@media (prefers-reduced-motion: reduce) { .lang-toggle button { transition: none; } }

/* Login-code screen: the duck typing on a Mac */
.twofa-duck { display: block; width: 120px; height: 120px; margin: -8px auto 8px; object-fit: contain; border-radius: 28px; animation: twofa-duck-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }
@keyframes twofa-duck-in { from { opacity: 0; transform: translateY(10px) scale(0.92); } }
@media (prefers-reduced-motion: reduce) { .twofa-duck { animation: none; } }

/* Staff with "can see" on a page: shown as the owner sees it, nothing to press (app.js lockView). */
.view.readonly :is(.btn, .icon-btn, label.drop):not(a) { display: none !important; }
.view.readonly .switch { pointer-events: none; opacity: 0.7; }
.view.readonly .chip:disabled { opacity: 1; cursor: default; }
.view.readonly .seg button:disabled { opacity: 1; cursor: default; }
.readonly-note { margin: 0 0 var(--s4); }

/* Team → Access: one row per area, the level as a segmented control. */
.access-list { display: grid; }
.access-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.access-row:first-child { border-top: 0; }
.access-row > span { font-weight: 800; }
.access-row .seg { flex-wrap: wrap; }
@media (max-width: 560px) { .access-row .seg { width: 100%; } .access-row .seg button { flex: 1; } }
