/* =============================================================================
 * PROJECT : polooma - BEAUTY TECH
 * FILE    : sl.css
 * PATH    : /salon/assets/sl.css
 * PURPOSE : Superadmin context styling: layout shell, sidebar, topbar, cards,
 *           KPI tiles, data tables, impersonation banner. Distinctive editorial
 *           aesthetic (warm sand + ink), WCAG 2.2 (focus, contrast, motion).
 * VERSION : 1.0.0  2026-05-23  Initial.
 * ============================================================================= */

:root {
  /* Palette — warm sand canvas, ink sidebar, copper accent */
  --sl-bg:        #EFE9DD;
  --sl-surface:   #FBF8F2;
  --sl-card:      #FFFFFF;
  --sl-ink:       #1A1714;
  --sl-ink-2:     #4A433A;
  --sl-muted:     #8A8071;
  --sl-line:      #DED6C6;
  --sl-sidebar:   #181512;
  --sl-sidebar-2: #221E19;
  --sl-accent:    #B45B2E;   /* copper */
  --sl-accent-2:  #C8763F;
  --sl-good:      #2F7D5B;
  --sl-warn:      #B4882E;
  --sl-bad:       #A23B2E;

  --sl-radius:    6px;
  --sl-radius-sm: 6px;
  --sl-shadow:    0 1px 2px rgba(26,23,20,.05), 0 8px 24px -12px rgba(26,23,20,.18);
  --sl-shadow-sm: 0 1px 2px rgba(26,23,20,.06);

  --sl-font-display: 'Fraunces', Georgia, serif;
  --sl-font-body:    'Outfit', system-ui, sans-serif;

  --sl-sidebar-w: 252px;
}

* { box-sizing: border-box; }

.sl-body {
  margin: 0;
  background: var(--sl-bg);
  color: var(--sl-ink);
  font-family: var(--sl-font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* subtle paper grain via layered radial dots */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(26,23,20,.022) 1px, transparent 0);
  background-size: 22px 22px;
}

/* ── Skip link ─────────────────────────────────────────────────────────── */
.sl-skip {
  position: fixed; top: -100px; left: 12px; z-index: 1100;
  background: var(--sl-ink); color: #fff; padding: 10px 16px;
  border-radius: 0 0 6px 6px; text-decoration: none; font-weight: 600;
  transition: top .15s ease;
}
.sl-skip:focus { top: 0; }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.sl-shell { display: flex; min-height: 100vh; }
.sl-shell--impersonating { padding-top: 0; }

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.sl-sidebar {
  width: var(--sl-sidebar-w); flex: 0 0 var(--sl-sidebar-w);
  background: linear-gradient(180deg, var(--sl-sidebar), var(--sl-sidebar-2));
  color: #E8E1D5; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 40;
}
.sl-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 22px 22px 18px;
}
.sl-brand__mark {
  width: 38px; height: 38px; border-radius: 6px;
  background: var(--sl-accent); color: #fff;
  font-family: var(--sl-font-display); font-weight: 600; font-size: 22px;
  display: grid; place-items: center; line-height: 1;
  box-shadow: 0 4px 14px -4px rgba(180,91,46,.7);
}
.sl-brand__name {
  font-family: var(--sl-font-display); font-size: 1.18rem; font-weight: 600;
  letter-spacing: .2px; display: flex; flex-direction: column; line-height: 1.05;
}
.sl-brand__name small {
  font-family: var(--sl-font-body); font-size: .56rem; font-weight: 600;
  letter-spacing: .22em; color: var(--sl-accent-2); margin-top: 3px;
}

.sl-nav { flex: 1 1 auto; overflow-y: auto; padding: 6px 12px; }
.sl-nav__group {
  font-size: .66rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: #8d8475; padding: 16px 12px 8px;
}
.sl-nav__list { list-style: none; margin: 0; padding: 0; }
.sl-nav__link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 2px; border-radius: var(--sl-radius-sm);
  color: #D7CFC2; text-decoration: none; font-weight: 500; font-size: .92rem;
  transition: background .14s ease, color .14s ease;
}
.sl-nav__link i { font-size: 1.05rem; width: 20px; text-align: center; opacity: .85; }
.sl-nav__link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sl-nav__link.is-active {
  background: var(--sl-accent); color: #fff;
  box-shadow: 0 6px 16px -8px rgba(180,91,46,.9);
}
.sl-nav__link.is-active i { opacity: 1; }
.sl-sidebar__foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }

/* ── Main column ───────────────────────────────────────────────────────── */
.sl-main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.sl-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 28px; position: sticky; top: 0; z-index: 30;
  background: rgba(239,233,221,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sl-line);
}
.sl-topbar__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.sl-lang__sel {
  border: 1px solid var(--sl-line); background: var(--sl-card);
  border-radius: 6px; padding: 6px 10px; font: inherit; font-size: .82rem;
  font-weight: 600; color: var(--sl-ink-2); cursor: pointer;
}
.sl-id { display: flex; align-items: center; gap: 10px; }
.sl-id__avatar {
  width: 38px; height: 38px; border-radius: 6px;
  background: var(--sl-ink); color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: .95rem;
}
.sl-id__meta { display: flex; flex-direction: column; line-height: 1.15; }
.sl-id__name { font-weight: 600; font-size: .88rem; }
.sl-id__role { font-size: .72rem; color: var(--sl-muted); }

.sl-burger {
  display: none; border: 1px solid var(--sl-line); background: var(--sl-card);
  border-radius: 6px; width: 40px; height: 40px; font-size: 1.3rem;
  color: var(--sl-ink); cursor: pointer;
}

.sl-content { padding: 28px; max-width: 1320px; width: 100%; }

/* ── Impersonation banner ──────────────────────────────────────────────── */
.sl-impersonation {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #2B1A0F; color: #FFE6D2;
  padding: 11px 22px; font-size: .9rem; font-weight: 500;
  border-bottom: 2px solid var(--sl-accent);
}
.sl-impersonation i { font-size: 1.1rem; color: var(--sl-accent-2); }
.sl-impersonation strong { color: #fff; }
.sl-impersonation__exit {
  margin-left: auto; color: #fff; text-decoration: none; font-weight: 600;
  border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 5px 12px;
  display: inline-flex; align-items: center; gap: 6px;
}
.sl-impersonation__exit:hover { background: rgba(255,255,255,.12); }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.sl-card__head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--sl-line);
  font-weight: 600; font-size: .98rem;
}
.sl-card__head i { color: var(--sl-accent); }
.sl-card__head .sl-card__action { margin-left: auto; }
.sl-card__body { padding: 18px 20px; }

/* ── KPI tiles ─────────────────────────────────────────────────────────── */
.sl-kpi {
  background: var(--sl-card); border: 1px solid var(--sl-line);
  border-radius: var(--sl-radius); padding: 18px; box-shadow: var(--sl-shadow-sm);
  position: relative; overflow: hidden;
  animation: sl-rise .5s cubic-bezier(.22,1,.36,1) backwards;
}
.sl-kpi:nth-child(1){animation-delay:.02s} .sl-kpi:nth-child(2){animation-delay:.06s}
.sl-kpi:nth-child(3){animation-delay:.10s} .sl-kpi:nth-child(4){animation-delay:.14s}
.sl-kpi:nth-child(5){animation-delay:.18s}
.sl-kpi__icon {
  width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--sl-accent), var(--sl-accent-2));
  color: #fff; font-size: 1.15rem; margin-bottom: 12px;
}
.sl-kpi__val, .sl-kpi__value {
  font-family: var(--sl-font-display); font-size: 2rem; font-weight: 600;
  line-height: 1; color: var(--sl-ink); letter-spacing: -.5px;
}
.sl-kpi__lbl, .sl-kpi__label { font-size: .82rem; color: var(--sl-muted); margin-top: 6px; }
.sl-kpi__delta { font-size: .75rem; font-weight: 600; margin-top: 4px; }
.sl-kpi__delta.up { color: var(--sl-good); }
.sl-kpi__delta.flat { color: var(--sl-muted); }

@keyframes sl-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Section grid ──────────────────────────────────────────────────────── */
.sl-grid { display: grid; gap: 18px; }
.sl-grid--2 { grid-template-columns: 1.6fr 1fr; }
.sl-section-title {
  font-family: var(--sl-font-display); font-size: 1.05rem; font-weight: 600;
  margin: 0 0 2px;
}
.sl-section-sub { color: var(--sl-muted); font-size: .85rem; margin: 0; }

/* ── Table ─────────────────────────────────────────────────────────────── */
.sl-table { width: 100%; border-collapse: collapse; }
.sl-table th, .sl-table td { padding: 12px 16px; text-align: left; }
.sl-table thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sl-muted); font-weight: 700; border-bottom: 1px solid var(--sl-line);
}
.sl-table tbody tr { border-bottom: 1px solid var(--sl-line); }
.sl-table tbody tr:last-child { border-bottom: 0; }
.sl-table tbody tr:hover { background: var(--sl-surface); }
.sl-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sl-table .center { text-align: center; }
.sl-salon-name { font-weight: 600; }
.sl-salon-domain { color: var(--sl-muted); font-size: .8rem; }

/* ── Badges ────────────────────────────────────────────────────────────── */

/* ── Buttons ───────────────────────────────────────────────────────────── */
.sl-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--sl-line); background: var(--sl-card); color: var(--sl-ink);
  border-radius: 6px; padding: 8px 14px; font: inherit; font-weight: 600; font-size: .85rem;
  cursor: pointer; text-decoration: none; transition: all .14s ease;
}
.sl-btn:hover { border-color: var(--sl-ink-2); }
.sl-btn--primary {
  background: var(--sl-accent); border-color: var(--sl-accent); color: #fff;
  box-shadow: 0 6px 16px -8px rgba(180,91,46,.9);
}
.sl-btn--primary:hover { background: var(--sl-accent-2); border-color: var(--sl-accent-2); color: #fff; }
.sl-btn--ghost { background: transparent; }
.sl-btn--sm { padding: 5px 10px; font-size: .78rem; border-radius: 6px; }
.sl-btn--icon { padding: 6px 9px; }

/* Simulate action — visually distinct, since it changes who you are */
.sl-btn--sim {
  border-color: var(--sl-accent); color: var(--sl-accent); background: rgba(180,91,46,.06);
}
.sl-btn--sim:hover { background: var(--sl-accent); color: #fff; }

/* ── Activity feed ─────────────────────────────────────────────────────── */
.sl-feed { list-style: none; margin: 0; padding: 0; }
.sl-feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sl-line); }
.sl-feed li:last-child { border-bottom: 0; }
.sl-feed__dot {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 6px;
  display: grid; place-items: center; font-size: .85rem; color: #fff;
}
.sl-feed__dot--ok   { background: var(--sl-good); }
.sl-feed__dot--fail { background: var(--sl-bad); }
.sl-feed__dot--info { background: var(--sl-ink-2); }
.sl-feed__txt { font-size: .86rem; }
.sl-feed__meta { color: var(--sl-muted); font-size: .76rem; }

.sl-empty { text-align: center; color: var(--sl-muted); padding: 28px 16px; font-size: .9rem; }
.sl-empty a { color: var(--sl-accent); }

/* ── Focus visibility (WCAG 2.4.7) ─────────────────────────────────────── */
a:focus-visible, button:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--sl-accent); outline-offset: 2px; border-radius: 6px;
}

/* ── Backdrop (mobile) ─────────────────────────────────────────────────── */
.sl-backdrop {
  position: fixed; inset: 0; background: rgba(24,21,18,.5); z-index: 35;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .sl-kpis { grid-template-columns: repeat(3, 1fr); }
  .sl-grid--2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sl-sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: 8px 0 30px -10px rgba(0,0,0,.4);
  }
  .sl-shell.is-nav-open .sl-sidebar { transform: none; }
  .sl-burger { display: grid; place-items: center; }
  .sl-content { padding: 18px; }
}
@media (max-width: 560px) {
  .sl-kpis { grid-template-columns: repeat(2, 1fr); }
  .sl-id__meta { display: none; }
}

/* ── Reduced motion (WCAG 2.3.3 / respects user pref) ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Flash alerts (CRUD confirmations) ─────────────────────────────────── */
.sl-alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; margin-bottom: 18px; border-radius: 6px;
  font-size: .9rem; font-weight: 500; border: 1px solid transparent;
}
.sl-alert i { font-size: 1.1rem; }
.sl-alert--success { background: rgba(47,125,91,.10);  color: var(--sl-good); border-color: rgba(47,125,91,.25); }
.sl-alert--error   { background: rgba(162,59,46,.10);  color: var(--sl-bad);  border-color: rgba(162,59,46,.25); }
.sl-alert--info    { background: rgba(74,67,58,.08);   color: var(--sl-ink-2); border-color: rgba(74,67,58,.20); }

/* ── Forms (CRUD edit pages) ───────────────────────────────────────────── */
.sl-form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.sl-form-grid .full { grid-column: 1 / -1; }
.sl-field label { display: block; font-size: .8rem; font-weight: 600; color: var(--sl-ink-2); margin-bottom: 6px; }
.sl-field input[type=text], .sl-field input[type=email], .sl-field input[type=password],
.sl-field select, .sl-field textarea {
  width: 100%; border: 1px solid var(--sl-line); border-radius: 6px;
  padding: 9px 12px; font: inherit; background: var(--sl-card); color: var(--sl-ink);
}
.sl-field textarea { min-height: 90px; resize: vertical; }
.sl-field .hint { font-size: .76rem; color: var(--sl-muted); margin-top: 4px; }
.sl-check { display: flex; align-items: center; gap: 8px; }
.sl-check input { width: 18px; height: 18px; }
.sl-form-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
@media (max-width: 640px) { .sl-form-grid { grid-template-columns: 1fr; } }

/* Danger button for destructive actions */
.sl-btn--danger { border-color: var(--sl-bad); color: var(--sl-bad); background: rgba(162,59,46,.06); }
.sl-btn--danger:hover { background: var(--sl-bad); color: #fff; border-color: var(--sl-bad); }

/* Trashed-row hint */
.sl-table tr.is-trashed { opacity: .62; }
.sl-table tr.is-trashed .sl-salon-name { text-decoration: line-through; }

/* ===========================================================================
 * Salon panel — page-level components (added for the salon pages).
 * All radii stay within the 6px project limit.
 * ======================================================================== */

.sl-page { display: block; }
.sl-page__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.sl-page__title {
    font-family: var(--sl-font-display); font-size: 1.5rem; margin: 0; color: var(--sl-ink);
}
.sl-page__sub { color: var(--sl-muted); margin: .25rem 0 0; }

/* KPI grid */
.sl-kpis {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75rem; margin-bottom: 1.5rem;
}
/* Cards */
.sl-card {
    background: var(--sl-card); border: 1px solid var(--sl-line);
    border-radius: var(--sl-radius); padding: 1.25rem; margin-bottom: 1.25rem;
    box-shadow: var(--sl-shadow-sm);
}
.sl-card__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.sl-card__title { font-size: 1.05rem; margin: 0; color: var(--sl-ink); }

/* Two-column layout (stacks on small screens) */
.sl-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 900px) { .sl-grid-2 { grid-template-columns: 1fr 1fr; } }

/* Filters bar */
.sl-filters {
    display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; align-items: center;
}
.sl-filters input, .sl-filters select {
    border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm);
    padding: .5rem .65rem; font: inherit; background: var(--sl-surface); color: var(--sl-ink);
}
.sl-filters input[type="search"] { flex: 1 1 220px; }

/* Forms */
.sl-form__grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem;
}
.sl-field { display: flex; flex-direction: column; gap: .35rem; }
.sl-field--wide { grid-column: 1 / -1; }
.sl-field--check { flex-direction: row; align-items: center; gap: .5rem; }
.sl-field label { font-weight: 600; font-size: .85rem; color: var(--sl-ink); }
.sl-field input, .sl-field select, .sl-field textarea {
    border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm);
    padding: .55rem .7rem; font: inherit; background: var(--sl-surface); color: var(--sl-ink);
}
.sl-field input:focus, .sl-field select:focus, .sl-field textarea:focus {
    outline: 2px solid var(--sl-accent); outline-offset: 1px; border-color: var(--sl-accent);
}
.sl-form__actions { display: flex; gap: .5rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* Permission fieldset */
.sl-perms {
    border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm); padding: 1rem;
}
.sl-perms legend { font-weight: 600; font-size: .85rem; padding: 0 .35rem; }
.sl-perms__item { display: inline-flex; align-items: center; gap: .4rem; margin-right: 1rem; font-weight: 400; }

/* Opening hours editor */
.sl-hours { display: flex; flex-direction: column; gap: .5rem; }
.sl-hours__row {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    padding: .4rem 0; border-bottom: 1px solid var(--sl-line);
}
.sl-hours__day { display: inline-flex; align-items: center; gap: .4rem; min-width: 130px; font-weight: 600; }
.sl-hours__sep { color: var(--sl-muted); }
.sl-hours__pause { color: var(--sl-muted); font-size: .8rem; margin-left: .5rem; }
.sl-hours input[type="time"] {
    border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm); padding: .35rem .5rem; font: inherit;
}

/* Inline add row (category) */
.sl-inline-add { display: flex; gap: .5rem; }
.sl-inline-add input { flex: 1; }

/* Simple list (categories) */
.sl-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.sl-list__row {
    display: flex; align-items: center; justify-content: space-between;
    padding: .5rem 0; border-bottom: 1px solid var(--sl-line);
}

/* Colour swatch */
.sl-swatch {
    display: inline-block; width: .9rem; height: .9rem; border-radius: var(--sl-radius-sm);
    border: 1px solid var(--sl-line); vertical-align: middle; margin-right: .4rem;
}

/* Badges */
.sl-badge {
    display: inline-block; padding: .15rem .5rem; border-radius: var(--sl-radius-sm);
    font-size: .78rem; font-weight: 600; line-height: 1.4;
}
.sl-badge--ok    { background: color-mix(in srgb, var(--sl-good) 18%, transparent); color: var(--sl-good); }
.sl-badge--off   { background: color-mix(in srgb, var(--sl-bad) 16%, transparent);  color: var(--sl-bad); }
.sl-badge--new   { background: color-mix(in srgb, var(--sl-accent) 18%, transparent); color: var(--sl-accent); }
.sl-badge--muted { background: var(--sl-surface); color: var(--sl-muted); }
.sl-badge--role  { background: var(--sl-surface); color: var(--sl-ink); border: 1px solid var(--sl-line); }

/* Inline forms (table actions) */
.sl-inline-form { display: inline; }
.sl-inline-form select {
    border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm); padding: .3rem .4rem; font: inherit;
}

/* Misc helpers */
.sl-muted { color: var(--sl-muted); }
.sl-truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-count { color: var(--sl-muted); font-size: .82rem; margin: .75rem 0 0; }

/* ===========================================================================
 * Salon login — full-screen standalone page.
 * ======================================================================== */
.sl-login {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 1.5rem; background: var(--sl-bg);
}
.sl-login__card {
    width: 100%; max-width: 380px; background: var(--sl-card);
    border: 1px solid var(--sl-line); border-radius: var(--sl-radius);
    box-shadow: var(--sl-shadow); padding: 2rem;
}
.sl-login__brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; }
.sl-login__mark {
    width: 2.2rem; height: 2.2rem; border-radius: var(--sl-radius-sm);
    background: var(--sl-accent); color: #fff; font-family: var(--sl-font-display);
    font-weight: 700; display: grid; place-items: center; font-size: 1.2rem;
}
.sl-login__name { font-family: var(--sl-font-display); font-weight: 600; line-height: 1; color: var(--sl-ink); }
.sl-login__name small { display: block; font-size: .6rem; letter-spacing: .12em; color: var(--sl-muted); }
.sl-login__title { font-family: var(--sl-font-display); font-size: 1.4rem; margin: 0 0 .25rem; color: var(--sl-ink); }
.sl-login__sub { color: var(--sl-muted); font-size: .9rem; margin: 0 0 1.25rem; }
.sl-login__form { display: flex; flex-direction: column; gap: 1rem; }
.sl-login__submit { width: 100%; justify-content: center; margin-top: .5rem; }
.sl-login__error {
    display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem;
    padding: .6rem .8rem; border-radius: var(--sl-radius-sm); font-size: .9rem;
    background: color-mix(in srgb, var(--sl-bad) 12%, transparent); color: var(--sl-bad);
    border: 1px solid color-mix(in srgb, var(--sl-bad) 35%, transparent);
}

/* ===========================================================================
 * Salon profile page.
 * ======================================================================== */
.sl-profile { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.sl-profile__avatar {
    width: 4rem; height: 4rem; flex: 0 0 auto; border-radius: var(--sl-radius);
    background: var(--sl-accent); color: #fff; display: grid; place-items: center;
    font-family: var(--sl-font-display); font-size: 1.6rem; font-weight: 700;
}
.sl-profile__meta { flex: 1 1 240px; }
.sl-profile__name { font-family: var(--sl-font-display); font-size: 1.25rem; margin: 0; color: var(--sl-ink); }
.sl-profile__role { color: var(--sl-muted); margin: .15rem 0 1rem; }
.sl-profile__facts { display: grid; gap: .6rem; margin: 0; }
.sl-profile__facts > div { display: grid; grid-template-columns: 130px 1fr; gap: .5rem; align-items: baseline; }
.sl-profile__facts dt { color: var(--sl-muted); font-size: .85rem; margin: 0; }
.sl-profile__facts dd { margin: 0; color: var(--sl-ink); }

/* Topbar identity as a link */
a.sl-id { text-decoration: none; color: inherit; }
a.sl-id:hover .sl-id__name { text-decoration: underline; }
a.sl-id:focus-visible { outline: 2px solid var(--sl-accent); outline-offset: 2px; border-radius: var(--sl-radius-sm); }

/* ===========================================================================
 * Salon — components that were used in markup but missing styles.
 * (icon action buttons, table wrapper/actions, form wrapper, lang switch)
 * All radii within the 6px project limit.
 * ======================================================================== */

/* Form wrapper (the inner grid is .sl-form__grid, already styled) */
.sl-form { display: block; }

/* Language switch in the topbar */
.sl-lang { display: inline-flex; align-items: center; }

/* Horizontal scroll container for tables on small screens */
.sl-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Actions column: keep buttons on one line, right-aligned */
.sl-table__actions {
    white-space: nowrap; text-align: right;
}
.sl-table__actions .sl-inline-form { display: inline-flex; vertical-align: middle; margin-left: .25rem; }

/* Compact icon buttons used for row actions (edit / delete / activate) */
.sl-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; margin-left: 4px;
    border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm);
    background: var(--sl-surface); color: var(--sl-ink);
    cursor: pointer; text-decoration: none; font-size: .95rem;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
    vertical-align: middle;
}
.sl-icon-btn:hover {
    background: color-mix(in srgb, var(--sl-accent) 12%, var(--sl-surface));
    border-color: var(--sl-accent); color: var(--sl-accent);
}
.sl-icon-btn:focus-visible { outline: 2px solid var(--sl-accent); outline-offset: 1px; }
.sl-icon-btn--danger:hover {
    background: color-mix(in srgb, var(--sl-bad) 12%, var(--sl-surface));
    border-color: var(--sl-bad); color: var(--sl-bad);
}

/* ===========================================================================
 * Reservation editor — services multi-select.
 * ======================================================================== */
.sl-multiselect {
    width: 100%; border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm);
    background: var(--sl-card); color: var(--sl-ink); padding: .35rem;
    font: inherit; font-size: .9rem;
}
.sl-multiselect:focus-visible { outline: 2px solid var(--sl-accent); outline-offset: 1px; }
.sl-multiselect optgroup { font-weight: 600; color: var(--sl-muted); }
.sl-multiselect option {
    padding: .3rem .4rem; border-radius: var(--sl-radius-sm); margin: 1px 0;
}
.sl-multiselect option:checked {
    background: color-mix(in srgb, var(--sl-accent) 18%, transparent);
    color: var(--sl-ink);
}

/* ===========================================================================
 * Reservation editor — visit products + photo gallery.
 * ======================================================================== */
.sl-mt { margin-top: 1rem; }

/* Add-product row */
.sl-vp-add { margin-top: 1rem; }
.sl-vp-add__row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.sl-vp-add__row .sl-select { flex: 1 1 200px; min-width: 0; }
.sl-select {
    border: 1px solid var(--sl-line); background: var(--sl-card); color: var(--sl-ink);
    border-radius: var(--sl-radius-sm); padding: .5rem .6rem; font: inherit; font-size: .9rem;
}
.sl-select:focus-visible { outline: 2px solid var(--sl-accent); outline-offset: 1px; }

/* Photo gallery */
.sl-gallery { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sl-gallery__group { display: flex; flex-direction: column; gap: .6rem; }
.sl-gallery__title { font-size: .9rem; font-weight: 600; color: var(--sl-ink); margin: 0; }
.sl-gallery__grid { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
.sl-photo {
    position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--sl-radius-sm);
    overflow: hidden; border: 1px solid var(--sl-line); background: var(--sl-surface);
}
.sl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-photo__del {
    position: absolute; top: 4px; right: 4px; width: 26px; height: 26px;
    display: grid; place-items: center; border: none; border-radius: var(--sl-radius-sm);
    background: rgba(20,18,16,.62); color: #fff; cursor: pointer; font-size: .85rem;
    opacity: 0; transition: opacity .12s ease;
}
.sl-photo:hover .sl-photo__del, .sl-photo:focus-within .sl-photo__del { opacity: 1; }
.sl-photo__del:hover { background: var(--sl-bad); }

/* Dropzone */
.sl-dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .25rem; text-align: center; padding: 1rem .75rem; cursor: pointer;
    border: 1.5px dashed var(--sl-line); border-radius: var(--sl-radius);
    color: var(--sl-muted); background: var(--sl-surface);
    transition: border-color .12s ease, background .12s ease;
}
.sl-dropzone:hover, .sl-dropzone.is-over {
    border-color: var(--sl-accent);
    background: color-mix(in srgb, var(--sl-accent) 7%, var(--sl-surface));
    color: var(--sl-ink);
}
.sl-dropzone i { font-size: 1.3rem; color: var(--sl-accent); }
.sl-dropzone__text { font-size: .85rem; }
.sl-dropzone.is-busy { opacity: .55; pointer-events: none; }

/* ===========================================================================
 * Reservation editor — two-column layout (data left, photos right).
 * Collapses to a single column on narrow viewports.
 * ======================================================================== */
.sl-editor {
    display: grid; gap: 1.25rem; align-items: start;
    grid-template-columns: 5fr 7fr;
}
.sl-editor__main, .sl-editor__side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
@media (max-width: 980px) {
    .sl-editor { grid-template-columns: 1fr; }
}

/* Page-head action cluster (e.g. delete + back on the edit screen). */
.sl-page__head-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* Inline-editable product table cells. */
.sl-select--sm, .sl-input--sm {
    width: 100%; min-width: 70px; padding: .3rem .4rem; font: inherit; font-size: .82rem;
    border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm);
    background: var(--sl-card); color: var(--sl-ink);
}
.sl-select--sm:focus-visible, .sl-input--sm:focus-visible { outline: 2px solid var(--sl-accent); outline-offset: 1px; }
.sl-table--editable td { vertical-align: middle; }

/* Photo thumbnail: edit/publish badges + metadata panel. */
.sl-photo__edit {
    position: absolute; top: 4px; right: 34px; width: 26px; height: 26px;
    display: grid; place-items: center; border: none; border-radius: var(--sl-radius-sm);
    background: rgba(20,18,16,.62); color: #fff; cursor: pointer; font-size: .8rem;
    opacity: 0; transition: opacity .12s ease;
}
.sl-photo:hover .sl-photo__edit, .sl-photo:focus-within .sl-photo__edit { opacity: 1; }
.sl-photo__edit:hover { background: var(--sl-accent); }
.sl-photo__pub {
    position: absolute; top: 4px; left: 4px; width: 22px; height: 22px;
    display: grid; place-items: center; border-radius: var(--sl-radius-sm);
    background: rgba(15,110,86,.85); color: #fff; font-size: .72rem;
}
.sl-photo__meta {
    position: absolute; inset: 0; background: var(--sl-card); padding: .5rem;
    display: flex; flex-direction: column; gap: .3rem; overflow: auto; z-index: 2;
    border-radius: var(--sl-radius-sm);
}
.sl-photo__meta label { font-size: .68rem; color: var(--sl-muted); display: flex; flex-direction: column; gap: 1px; }
.sl-photo__meta input[type="text"] {
    border: 1px solid var(--sl-line); border-radius: var(--sl-radius-sm);
    padding: .2rem .3rem; font: inherit; font-size: .72rem; background: var(--sl-surface); color: var(--sl-ink);
}
.sl-photo__pubrow { flex-direction: row !important; align-items: center; gap: 4px; }
