/* ==========================================================================
   Agenda SaaS — folha de estilos compilada (o servidor não precisa de Sass).
   Identidade: roxo + branco, com modo claro / escuro / automático.
   Fonte SCSS: assets/scss/app.scss
   ========================================================================== */

:root {
    --brand-900: #2e1065;
    --brand-700: #5b21b6;
    --brand-600: #6d28d9;
    --brand-500: #7c3aed;
    --brand-400: #a78bfa;
    --brand-100: #ede9fe;
    --brand-50: #f5f3ff;

    --bg: #f7f6fc;
    --bg-soft: #efecfa;
    --surface: #ffffff;
    --surface-2: #fbfaff;
    --text: #1d1830;
    --muted: #6b6484;
    --border: #e7e3f3;

    --ok: #0f766e; --ok-bg: #d3faf3;
    --warn: #92400e; --warn-bg: #fef3c7;
    --danger: #b91c1c; --danger-bg: #fee2e2;
    --info: #1d4ed8; --info-bg: #dbeafe;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(29, 24, 48, .06);
    --shadow: 0 12px 30px rgba(29, 24, 48, .08);
    --shadow-lg: 0 28px 70px rgba(29, 24, 48, .16);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --sidebar-width: 248px;
}

html[data-theme="dark"] {
    --bg: #0f0c1b; --bg-soft: #161129; --surface: #191331; --surface-2: #1f1840;
    --text: #f3f0fc; --muted: #a79fc4; --border: #2f2657;
    --brand-100: #2b2154; --brand-50: #221a43;
    --ok: #5eead4; --ok-bg: #10403c;
    --warn: #fcd34d; --warn-bg: #45330b;
    --danger: #fca5a5; --danger-bg: #4a1518;
    --info: #93c5fd; --info-bg: #16295a;
    --shadow: 0 12px 30px rgba(0, 0, 0, .5);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
        --bg: #0f0c1b; --bg-soft: #161129; --surface: #191331; --surface-2: #1f1840;
        --text: #f3f0fc; --muted: #a79fc4; --border: #2f2657;
        --brand-100: #2b2154; --brand-50: #221a43;
        --ok: #5eead4; --ok-bg: #10403c;
        --warn: #fcd34d; --warn-bg: #45330b;
        --danger: #fca5a5; --danger-bg: #4a1518;
        --info: #93c5fd; --info-bg: #16295a;
        --shadow: 0 12px 30px rgba(0, 0, 0, .5);
        --shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
    }
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .45em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.85rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -.01em; }
h3 { font-size: 1.06rem; }
p { margin: 0 0 .9em; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }

:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; border-radius: 6px; }

.shell { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: 42px 0; }
.section__title { margin-bottom: .2em; }
.section__subtitle { margin: 28px 0 12px; font-size: 1.05rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.muted { color: var(--muted); }
.link { font-weight: 600; }
.stack > * + * { margin-top: 12px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -9999px; background: var(--brand-600); color: #fff; padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 8px; top: 8px; }

/* Botões e campos ---------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: 999px; padding: 11px 20px;
    font: inherit; font-weight: 650; cursor: pointer; white-space: nowrap;
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn--primary { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; box-shadow: var(--shadow-sm); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--lg { padding: 14px 26px; font-size: 1.02rem; }
.btn--sm { padding: 8px 14px; font-size: .88rem; }
.btn--xs { padding: 5px 10px; font-size: .78rem; border-radius: 8px; }

.icon-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px;
    border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
    color: var(--text); font-size: 1.05rem; cursor: pointer;
}
.icon-btn:hover { background: var(--brand-50); text-decoration: none; }
.mini-btn { border: 0; background: rgba(255,255,255,.75); color: #221; border-radius: 6px; width: 22px; height: 22px; cursor: pointer; font-size: .78rem; line-height: 1; }
.mini-btn:hover { background: #fff; }

.input {
    width: 100%; font: inherit; color: var(--text); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px;
}
.input:focus { border-color: var(--brand-400); }
.input--sm { padding: 7px 10px; font-size: .9rem; width: auto; }
textarea.input { resize: vertical; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field--half { grid-column: span 1; }
.field--full { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.inline-form { display: inline; }

/* Topbar público ----------------------------------------------------------- */

.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar__inner { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.topbar__nav { display: flex; gap: 18px; margin-left: 12px; }
.topbar__nav a { color: var(--muted); font-weight: 550; font-size: .94rem; }
.topbar__nav a:hover { color: var(--brand-600); }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 750; }
.brand:hover { text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; font-size: 1.05rem; }
.brand__name { font-size: 1.05rem; letter-spacing: -.01em; }

.prefs { display: flex; gap: 6px; }
.prefs__select { font: inherit; font-size: .82rem; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.prefs__theme { display: inline-flex; align-items: center; gap: 3px; padding: 2px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.prefs__theme-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: .95rem; line-height: 1; }
.prefs__theme-btn:hover { background: var(--brand-50); color: var(--brand-600); }
.prefs__theme-btn.is-active { background: var(--brand-600); color: #fff; }
.prefs__theme-btn .bi { pointer-events: none; }

.menu { position: relative; }
.menu__list { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 210px; padding: 8px; display: grid; gap: 2px; z-index: 50; }
.menu__list a, .menu__logout { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.menu__list a:hover, .menu__logout:hover { background: var(--brand-50); text-decoration: none; }

.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--brand-400), var(--brand-700)); color: #fff; font-weight: 700; object-fit: cover; }
.avatar--xs { width: 24px; height: 24px; font-size: .75rem; }
.avatar--lg { width: 52px; height: 52px; font-size: 1.2rem; }
.avatar--xl { width: 72px; height: 72px; font-size: 1.5rem; }

/* Hero e landing ----------------------------------------------------------- */
.hero { background: url(https://frito.pt/sass/sass29/assets/images/background1.png); background-repeat: no-repeat;
  background-size: auto; padding: 64px 0 72px;}

/*.hero { background: radial-gradient(1200px 420px at 15% -10%, var(--brand-100), transparent 60%), linear-gradient(160deg, var(--brand-700), var(--brand-500) 55%, var(--brand-600)); color: #fff; padding: 64px 0 72px; }*/
.hero__content { max-width: 780px; }
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.92); font-size: 1.08rem; max-width: 62ch; }
.pill { display: inline-block; border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 600; }
.pill--soft { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); color: #fff; margin-bottom: 14px; }
.page-hero .pill--soft { background: var(--brand-100); border-color: transparent; color: var(--brand-700); }

.searchbar { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; background: var(--surface); margin: 25px; padding: 16px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); margin-top: 26px; }
.searchbar__field { display: flex; flex-direction: column; gap: 6px; }
.searchbar__field label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.hero__trust { list-style: none; display: flex; flex-wrap: wrap; gap: 26px; padding: 0; margin: 26px 0 0; color: rgba(255,255,255,.92); font-size: .92rem; }
.hero__trust strong { display: block; font-size: 1.35rem; }

.page-hero { padding: 52px 0 28px; background: linear-gradient(180deg, var(--bg-soft), transparent); }

/* Categorias --------------------------------------------------------------- */

.categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.category { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 18px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: transform .12s ease, border-color .15s ease; }
.category:hover { transform: translateY(-2px); border-color: var(--brand-400); text-decoration: none; }
.category.is-active { border-color: var(--brand-500); background: var(--brand-50); }
.category__icon { font-size: 1.7rem; line-height: 1; }
.category__name { font-weight: 650; font-size: .95rem; }
.category__count { font-size: .78rem; color: var(--muted); }

/* Cartões de empresa ------------------------------------------------------- */

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card-company { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .14s ease, box-shadow .18s ease; }
.card-company:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-company__media { position: relative; display: block; aspect-ratio: 16/9; background: var(--brand-100); }
.card-company__media img { width: 100%; height: 100%; object-fit: cover; }
.card-company__placeholder { display: grid; place-items: center; height: 100%; font-size: 2.4rem; font-weight: 800; color: var(--brand-600); }
.card-company__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-company__top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.card-company__top h3 { margin: 0; font-size: 1.05rem; }
.card-company__meta { margin: 0; font-size: .85rem; color: var(--muted); }
.card-company__desc { margin: 0; font-size: .9rem; color: var(--muted); }
.card-company__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rating { font-size: .88rem; font-weight: 700; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 2px 9px; }
.price { font-size: .9rem; color: var(--muted); }
.price strong { color: var(--text); font-size: 1.02rem; }
.badge { position: absolute; top: 10px; left: 10px; border-radius: 999px; padding: 4px 11px; font-size: .74rem; font-weight: 800; letter-spacing: .04em; }
.badge--sponsor { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }
.load-more { display: flex; justify-content: center; margin-top: 24px; }

/* Blocos informativos ------------------------------------------------------ */

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature__icon { font-size: 1.8rem; }
.feature h3 { margin-top: 10px; }
.feature p { color: var(--muted); margin-bottom: .6em; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand-500); border-radius: var(--radius); padding: 16px 18px; }
.timeline p { margin: 4px 0 0; color: var(--muted); }
.timeline--compact li { border-left-width: 3px; padding: 10px 14px; }

.pricing .plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.plan--highlight { border-color: var(--brand-500); box-shadow: var(--shadow); }
.plan--highlight .badge { position: static; align-self: flex-start; background: var(--brand-100); color: var(--brand-700); }
.plan__price { font-size: 2.1rem; font-weight: 800; margin: 0; }
.plan__price span { font-size: .95rem; font-weight: 500; color: var(--muted); }
.plan ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.plan .btn { margin-top: auto; }

.cta { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--brand-700), var(--brand-500)); color: #fff; border-radius: var(--radius-lg); padding: 32px; }
.cta h2 { color: #fff; margin-bottom: .2em; }
.cta p { color: rgba(255,255,255,.9); margin: 0; }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta .btn--ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); color: #fff; }

/* Página da empresa -------------------------------------------------------- */

.company-hero { position: relative; padding: 0 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.company-hero__cover { width: 100%; height: 260px; object-fit: cover; }
.company-hero__inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; justify-content: space-between; margin-top: -46px; position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.company-hero__meta { margin: 4px 0; font-weight: 600; }
.company-hero__address { margin: 0; color: var(--muted); font-size: .92rem; }

.company-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 22px; padding: 28px 0 48px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel__title { margin: 0 0 14px; font-size: 1.15rem; }
.panel__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.service-list__item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.service-list__item div { display: flex; flex-direction: column; }
.service-list__item .price { margin-left: auto; }

.team { display: flex; flex-wrap: wrap; gap: 18px; }
.team__member { margin: 0; text-align: center; display: grid; gap: 8px; justify-items: center; width: 110px; }
.team__member figcaption { display: grid; font-size: .88rem; }
.team--panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.team-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.team-card div { display: grid; }

.hours-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hours-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.hours-list li:last-child { border-bottom: 0; }

/* Assistente de marcação --------------------------------------------------- */

.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; }
.step { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .86rem; color: var(--muted); }
.step span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--border); color: var(--text); font-weight: 700; font-size: .78rem; }
.step.is-active { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50); }
.step.is-active span { background: var(--brand-500); color: #fff; }
.step.is-done span { background: var(--ok); color: #fff; }

.booking-step { margin-bottom: 18px; }
.booking-step h3 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.daypicker { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; padding: 6px 0 12px; }
.daypicker__day { width: auto; min-width: 0; padding: 12px 6px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: grid; gap: 2px; justify-items: center; transition: transform .12s ease, border-color .15s ease; font: inherit; }
.daypicker__day:hover:not(.is-disabled) { transform: translateY(-2px); border-color: var(--brand-400); }
.daypicker__day.is-selected { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); border-color: transparent; color: #fff; }
.daypicker__day.is-disabled { opacity: .45; cursor: not-allowed; background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 6px, var(--border) 6px, var(--border) 7px); }
.daypicker__weekday { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: inherit; opacity: .75; }
.daypicker__number { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.daypicker__month { font-size: .74rem; opacity: .75; }
.daypicker__closed { font-size: .62rem; text-transform: uppercase; font-weight: 700; color: var(--danger); }

.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.option { text-align: left; padding: 13px 15px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); display: grid; gap: 3px; transition: transform .12s ease, border-color .15s ease; }
.option:hover { transform: translateY(-2px); border-color: var(--brand-400); }
.option.is-selected { border-color: var(--brand-500); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-400); }
.option__name { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.option__meta { font-size: .84rem; color: var(--muted); }
.option-grid--pros .option { display: flex; align-items: center; gap: 12px; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { padding: 11px 6px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font: inherit; font-weight: 650; cursor: pointer; color: var(--text); }
.slot:hover { border-color: var(--brand-400); }
.slot.is-selected { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); border-color: transparent; color: #fff; }

.booking-summary { border-top: 1px dashed var(--border); padding-top: 16px; }
.summary-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; font-size: .94rem; }
.summary-list li span:first-child { color: var(--muted); }
.notice { background: var(--brand-50); border: 1px solid var(--brand-400); border-radius: var(--radius); padding: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.notice p { margin: 0; flex: 1 1 220px; font-weight: 600; }

/* Autenticação e cliente --------------------------------------------------- */

.auth { display: grid; place-items: center; padding: 56px 0; }
.auth__card { width: min(430px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); }
.auth__alt { margin: 14px 0 0; font-size: .9rem; }

.booking-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; position: relative; overflow: hidden; }
.booking-card__bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--tint, var(--brand-500)); }
.booking-card__info { display: grid; flex: 1 1 220px; padding-left: 6px; }
.booking-card__when { display: grid; text-align: right; gap: 2px; }
.booking-card__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* Painéis (empresa e administração) ---------------------------------------- */

.app-shell { display: flex; min-height: 100vh; background: var(--bg); }
.sidebar { width: var(--sidebar-width); flex: 0 0 var(--sidebar-width); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar__brand { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.sidebar__close { display: none; border: 0; background: none; font-size: 1.5rem; color: var(--muted); cursor: pointer; }
.sidebar__nav { padding: 12px; display: grid; gap: 3px; overflow-y: auto; }
.sidebar__link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: .93rem; }
.sidebar__link:hover { background: var(--brand-50); color: var(--brand-700); text-decoration: none; }
.sidebar__link.is-active { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; }
.sidebar__icon { font-size: 1.05rem; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 22px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.app-topbar__title { margin: 0; font-size: 1.12rem; display: flex; align-items: center; gap: 10px; }
.app-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.app-topbar__user { font-size: .88rem; color: var(--muted); }
.app-topbar .icon-btn { display: none; }
.app-content { padding: 22px; flex: 1; }

.admin-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #b45309, #f59e0b); color: #fff; padding: 9px 22px; font-weight: 700; font-size: .9rem; }
.admin-banner .btn--ghost { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); color: #fff; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 2px; }
.stat__label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat__value { font-size: 1.75rem; font-weight: 800; color: var(--brand-700); }
.stat__hint { font-size: .78rem; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { background: var(--surface-2); color: var(--muted); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--brand-50); }
.cell-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .84rem; color: var(--muted); }
.chip.is-active { background: var(--brand-500); border-color: transparent; color: #fff; text-decoration: none; }
.chip--hint { background: transparent; border-style: dashed; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: var(--surface-2); color: var(--muted); }
.tag--active, .tag--confirmed, .tag--paid { background: var(--ok-bg); color: var(--ok); }
.tag--pending { background: var(--warn-bg); color: var(--warn); }
.tag--suspended, .tag--cancelled, .tag--no_show { background: var(--danger-bg); color: var(--danger); }
.tag--completed { background: var(--info-bg); color: var(--info); }
.tag--vip { background: var(--brand-100); color: var(--brand-700); }
.tag--admin { background: var(--brand-100); color: var(--brand-700); }
/* v2.4 — campanhas de link marketing: concluída (verde) vs encerrada (vermelha). */
.tag--ads-completed { background: var(--ok-bg); color: var(--ok); }
.tag--ads-ended { background: var(--danger-bg); color: var(--danger); }

.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 16px; margin: 0; font-size: .92rem; }
.kv dt { color: var(--muted); text-transform: capitalize; }
.kv dd { margin: 0; word-break: break-word; }

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

/* Calendário --------------------------------------------------------------- */

.calendar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.calendar__toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.calendar__nav { display: flex; align-items: center; gap: 8px; }
.calendar__date { display: grid; margin-left: 6px; line-height: 1.25; }
.calendar__date strong { font-size: 1rem; text-transform: capitalize; }
.calendar__date span { font-size: .8rem; color: var(--muted); }
.calendar__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.calendar__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.calendar__scroller { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.calendar__grid {
    --px-per-min: 1.5px;
    display: grid;
    grid-template-columns: 62px repeat(var(--columns), minmax(170px, 1fr));
    grid-template-rows: auto 1fr;
    min-width: fit-content;
    background: var(--surface);
}
.calendar__corner { position: sticky; left: 0; z-index: 3; background: var(--surface-2); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.calendar__head { display: grid; justify-items: center; gap: 2px; padding: 12px 8px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.calendar__pro-name { font-weight: 700; font-size: .92rem; }
.calendar__pro-title { font-size: .74rem; color: var(--muted); }

.calendar__times { position: sticky; left: 0; z-index: 2; background: var(--surface-2); border-right: 1px solid var(--border); height: calc(var(--minutes) * var(--px-per-min)); position: relative; }
.calendar__time { position: absolute; top: calc(var(--offset) * var(--px-per-min)); right: 8px; transform: translateY(-50%); font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.calendar__column { position: relative; border-right: 1px solid var(--border); height: calc(var(--minutes) * var(--px-per-min)); }
.calendar__column.is-drop-target { background: color-mix(in srgb, var(--brand-100) 60%, transparent); }
.calendar__line { position: absolute; left: 0; right: 0; top: calc(var(--offset) * var(--px-per-min)); border-top: 1px solid var(--border); }

.calendar__event {
    position: absolute; left: 4px; right: 4px;
    top: calc(var(--offset) * var(--px-per-min));
    height: calc(var(--length) * var(--px-per-min) - 3px);
    border-radius: 10px; padding: 5px 8px; overflow: hidden; cursor: grab;
    display: flex; flex-direction: column; gap: 1px;
    background: color-mix(in srgb, var(--tint) 26%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--tint) 60%, transparent);
    border-left: 4px solid var(--tint);
    color: var(--text); font-size: .78rem; line-height: 1.25;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s ease, transform .1s ease;
}
html[data-theme="dark"] .calendar__event { background: color-mix(in srgb, var(--tint) 32%, #1a1433); }
.calendar__event:hover { box-shadow: var(--shadow); z-index: 4; }
.calendar__event.is-dragging { opacity: .55; cursor: grabbing; }
.calendar__event.status-cancelled { opacity: .5; text-decoration: line-through; }
.calendar__event-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.calendar__event-client { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar__event-pro { font-size: .72rem; color: color-mix(in srgb, var(--text) 60%, transparent); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar__event-service { color: color-mix(in srgb, var(--text) 75%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar__event-status { margin-top: auto; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.calendar__event-actions { position: absolute; top: 4px; right: 4px; display: none; gap: 3px; }
.calendar__event:hover .calendar__event-actions { display: flex; }

.calendar__break { position: absolute; left: 3px; right: 3px; top: calc(var(--offset) * var(--px-per-min)); height: calc(var(--length) * var(--px-per-min)); border-radius: 8px; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--brand-400) 22%, transparent), color-mix(in srgb, var(--brand-400) 22%, transparent) 6px, transparent 6px, transparent 11px); border: 1px dashed color-mix(in srgb, var(--brand-400) 60%, transparent); display: grid; place-items: center; font-size: .68rem; color: var(--muted); text-align: center; padding: 2px; z-index: 0; pointer-events: none; }
.calendar__block { position: absolute; left: 4px; right: 4px; top: calc(var(--offset) * var(--px-per-min)); height: calc(var(--length) * var(--px-per-min) - 3px); border-radius: 10px; background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 7px, var(--border) 7px, var(--border) 9px); border: 1px dashed var(--border); display: grid; place-items: center; font-size: .74rem; color: var(--muted); text-align: center; padding: 4px; }

.calendar__ghost { position: absolute; left: 4px; right: 4px; border-radius: 10px; border: 2px dashed var(--brand-500); background: color-mix(in srgb, var(--brand-500) 12%, transparent); pointer-events: none; z-index: 5; display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--brand-700); }
.calendar__ghost.is-invalid { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

.calendar__legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; font-size: .82rem; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--tint, var(--brand-500)); display: inline-block; }
.legend-dot--lg { width: 18px; height: 18px; }

/* Gráficos, progresso e interruptores --------------------------------------- */

.chart { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
.chart svg { width: 100%; height: 180px; display: block; }
.chart__line { fill: none; stroke: var(--brand-500); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart__area { fill: color-mix(in srgb, var(--brand-500) 16%, transparent); stroke: none; }
.chart__labels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: 6px; }

.progress { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; margin: 10px 0 6px; }
.progress__bar { display: block; height: 100%; width: var(--value, 0%); border-radius: 999px; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); }

.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--brand-600); }

.tag--frequent { background: var(--info-bg); color: var(--info); }
.tag--available { background: var(--ok-bg); color: var(--ok); }
.tag--redeemed { background: var(--info-bg); color: var(--info); }
.tag--expired { background: var(--danger-bg); color: var(--danger); }

/* Pesquisa global, gráficos do administrador e listas em barra ------------- */

.search { position: relative; flex: 1 1 260px; max-width: 420px; margin-left: 16px; }
.search__input { width: 100%; }
.search__results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; z-index: 60; max-height: 60vh; overflow-y: auto; }
.search__group { margin: 6px 8px 4px; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.search__item { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; color: var(--text); }
.search__item:hover, .search__item.is-active { background: var(--brand-50); text-decoration: none; }
.search__item span { font-size: .8rem; color: var(--muted); }
.search__empty { margin: 10px; color: var(--muted); font-size: .9rem; }
.blacklist-lookup { width: 100%; max-width: none; margin-left: 0; }
.blacklist-lookup__fallback { position: static; margin-top: 12px; max-height: 320px; }
.blacklist-lookup__fallback[hidden] { display: none; }

.chart--admin { position: relative; padding: 14px; }
.chart--admin.is-loading { opacity: .5; }
.chart__svg { width: 100%; height: 260px; display: block; }
.chart__grid { stroke: var(--border); stroke-width: 1; }
.chart__axis { fill: var(--muted); font-size: 11px; }
.chart__axis--x { font-size: 10px; }
.chart__hit { fill: transparent; cursor: pointer; }
.chart__bar { fill: var(--brand-500); opacity: .85; transition: opacity .12s ease, fill .12s ease; cursor: pointer; }
.chart__bar:hover, .chart__bar.is-active, .chart__bar:focus-visible { opacity: 1; fill: var(--brand-700); }
.chart--admin .chart__line { fill: none; stroke: #22d3ee; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__legend { display: flex; gap: 16px; font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.chart__tip { position: absolute; display: grid; gap: 1px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px 12px; font-size: .82rem; pointer-events: none; z-index: 10; min-width: 110px; }
.chart__tip strong { font-size: .88rem; display: block; margin-bottom: 2px; }
.chart__tip span { color: var(--muted); display: block; line-height: 1.35; }
.chart__tip-count::before { content: '· '; }

.bar-mini { display: block; height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 5px; max-width: 220px; }
.bar-mini__fill { display: block; height: 100%; width: var(--value, 0%); background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); border-radius: 999px; }

.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bar-list li { display: grid; grid-template-columns: minmax(90px, 130px) 1fr auto; gap: 12px; align-items: center; font-size: .9rem; }
.bar-list__value { color: var(--muted); font-size: .84rem; white-space: nowrap; }

.field__hint { font-size: .76rem; color: var(--muted); }
.empty-state--large { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 48px 24px; }
.empty-state__icon { font-size: 2.6rem; }
.empty-state__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.empty-state__hint { font-size: .85rem; color: var(--muted); max-width: 44ch; }
.field__required { color: var(--danger); font-weight: 700; }
.form-actions { margin-top: 20px; }
.input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 18%, transparent); }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn--danger:hover { background: var(--danger-bg); }

/* Modais e toasts ---------------------------------------------------------- */

.modal-host { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 18px; background: rgba(20, 14, 40, .55); backdrop-filter: blur(3px); }
.modal-host[hidden] { display: none; }
.modal__form { width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.modal__header h2 { margin: 0; font-size: 1.1rem; }
.modal__body { padding: 20px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal__body .field { grid-column: 1 / -1; }
.modal__body .field--half { grid-column: span 1; }
.modal__footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }

.alert { border-radius: var(--radius); padding: 13px 17px; margin: 16px 0; border: 1px solid transparent; }
.alert--success { background: var(--ok-bg); color: var(--ok); border-color: currentColor; }
.alert--error { background: var(--danger-bg); color: var(--danger); border-color: currentColor; }
.alert ul { margin: 6px 0 0; padding-left: 1.2rem; }

.toast-host { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 200; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand-500); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 12px 16px; max-width: 330px; font-size: .92rem; animation: toast-in .18s ease; }
.toast--error { border-left-color: var(--danger); }
.toast--success { border-left-color: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Rodapé ------------------------------------------------------------------- */

.footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; padding: 34px 0 20px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; }
.footer__grid h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.footer__grid a { display: block; padding: 3px 0; color: var(--text); font-size: .92rem; }
.footer__muted { color: var(--muted) !important; font-size: .85rem !important; }
.footer__tagline { color: var(--muted); font-size: .92rem; max-width: 44ch; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); margin-top: 22px; padding-top: 14px; color: var(--muted); font-size: .84rem; }
.footer__legal p { margin: 0; }

/* v5.0 — Redes sociais (WhatsApp / Instagram / Facebook), editáveis no
   painel global › Configurações. */
.footer__social { display: flex; gap: 10px; margin-top: 16px; }
.footer__social-link { display: inline-grid !important; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--muted) !important; font-size: 19px !important; padding: 0 !important; transition: transform .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease, background .15s ease; }
.footer__social-link:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(15, 23, 42, .35); border-color: transparent; color: #fff !important; }
.footer__social-link--whatsapp:hover { background: #25d366; }
.footer__social-link--instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.footer__social-link--facebook:hover { background: #1877f2; }

/* Faixa de destaque social na página inicial. */
.social-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.social-strip__label { color: var(--muted); font-size: .92rem; font-weight: 600; }
.social-strip__link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 650; font-size: .92rem; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.social-strip__link:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -14px rgba(15, 23, 42, .3); }
.social-strip__link .bi { font-size: 17px; }
.social-strip__link--whatsapp { color: #128c4b; }
.social-strip__link--instagram { color: #c13584; }
.social-strip__link--facebook { color: #1877f2; }

/* Responsivo --------------------------------------------------------------- */

@media (max-width: 1024px) {
    .company-layout { grid-template-columns: 1fr; }
    .searchbar { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .topbar__nav { display: none; }
    .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 90; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
    .sidebar.is-open { transform: none; }
    .sidebar__close { display: block; }
    .app-topbar .icon-btn { display: inline-grid; }
    .app-content { padding: 16px; }
    .footer__grid { grid-template-columns: 1fr; }
    .modal__body { grid-template-columns: 1fr; }
    .calendar__grid { --px-per-min: 1.35px; grid-template-columns: 54px repeat(var(--columns), minmax(150px, 1fr)); }
    .booking-card__when { text-align: left; }
    .booking-card__actions { margin-left: 0; width: 100%; }
}

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

/* Horário de funcionamento (períodos por dia) */
.hours-editor { display: grid; gap: 10px; }
.hours-day { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.hours-day__name { font-weight: 600; }
.hours-day__periods { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hours-period { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-alt, rgba(0,0,0,.03)); border-radius: 8px; padding: 3px 6px; }
.hours-day__closed { font-style: italic; }
.hours-day__actions { display: flex; gap: 6px; }
.icon-btn--sm { width: 24px; height: 24px; line-height: 22px; font-size: 14px; padding: 0; }
.form-inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.form-inline .field--grow { flex: 1 1 200px; }
@media (max-width: 640px) {
  .hours-day { grid-template-columns: 1fr; }
}

/* Plano escolhido no registo */
.plan-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--brand-50, rgba(124,58,237,.08)); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
.plan-chosen strong { font-size: 1.05rem; }
.plan-chosen span { color: var(--muted); }
.plan-chosen .link { margin-left: auto; }
.plan__desc { color: var(--muted); font-size: .9rem; margin: 4px 0 8px; }

/* Opção de atribuição automática no assistente de marcação. */
.option--random {
    border-style: dashed;
    border-color: var(--brand-400);
    background: linear-gradient(135deg, var(--brand-50), var(--surface));
}
.option--random .option__name { color: var(--brand-700); }
.option__random-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-700));
    color: #fff;
    font-size: 1.45rem;
    box-shadow: var(--shadow-sm);
}

/* Horário de funcionamento — compositor + cartões por dia. */
.hours-panel { overflow: hidden; }
.hours-composer {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin: 18px 0 8px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}
.hours-composer__submit { min-width: 170px; }
.hours-panel__tip { margin: 8px 0 18px; color: var(--muted); font-size: .85rem; }
.hours-cards { display: grid; grid-template-columns: repeat(7, minmax(155px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.hours-card { min-height: 145px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.hours-card.is-closed { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 7px, color-mix(in srgb, var(--border) 70%, transparent) 7px, color-mix(in srgb, var(--border) 70%, transparent) 9px); }
.hours-card__header { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.hours-card__header h3 { margin: 0; font-size: .94rem; }
.hours-card__periods { display: grid; gap: 8px; }
.hours-card__period { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 8px; border-radius: 8px; background: var(--brand-50); color: var(--brand-700); font-weight: 650; font-size: .84rem; }
.hours-card__empty { margin: 24px 0 0; text-align: center; color: var(--muted); font-size: .8rem; }
.tag--closed { background: var(--danger-bg); color: var(--danger); }
@media (max-width: 900px) {
    .hours-composer { grid-template-columns: 1fr 1fr; }
    .hours-composer__submit { min-width: 0; }
    .hours-cards { grid-template-columns: repeat(7, minmax(175px, 1fr)); }
}
@media (max-width: 520px) {
    .hours-composer { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v1.3 — Identidade visual (logo + banner), galeria e lightbox
   ========================================================================== */

.panel__subtitle { margin: 22px 0 6px; font-size: 1rem; }
.check { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--brand-600); }

/* Branding (configurações da empresa) ------------------------------------- */
.branding-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 14px; }
.branding-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); }
.branding-card__label { font-weight: 700; font-size: .9rem; }
.branding-card__preview { display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--brand-50); }
.branding-card__preview--logo { width: 96px; height: 96px; border-radius: 50%; }
.branding-card__preview--logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.branding-card__preview--banner { width: 100%; height: 120px; }
.branding-card__preview--banner img { width: 100%; height: 100%; object-fit: cover; }
.branding-card__empty { display: grid; place-items: center; width: 100%; height: 100%; font-size: 2rem; font-weight: 800; color: var(--brand-400); }
.branding-card input[type="file"] { padding: 8px; font-size: .85rem; }

/* Hero da empresa com logótipo -------------------------------------------- */
.company-hero__overlay { position: absolute; inset: 0 0 auto; height: 260px; background: linear-gradient(180deg, rgba(20,10,40,.12), rgba(20,10,40,.42)); pointer-events: none; }
.company-hero--with-cover { padding-bottom: 24px; }
.company-hero:not(.company-hero--with-cover) { padding-top: 56px; }
.company-hero__brand { display: flex; gap: 18px; align-items: center; min-width: 0; }
.company-hero__logo { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: var(--shadow); background: var(--surface); }
.company-hero__logo--initial { display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: var(--brand-100); background: linear-gradient(135deg, var(--brand-600), var(--brand-500)); }
@media (max-width: 640px) {
    .company-hero__logo { width: 72px; height: 72px; }
    .company-hero__brand { align-items: flex-start; }
}

/* Logo sobreposto no cartão da listagem ------------------------------------ */
.card-company__media { position: relative; }
.card-company__logo { position: absolute; left: 14px; bottom: -24px; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 3px solid var(--surface); box-shadow: var(--shadow-sm); background: linear-gradient(135deg, var(--brand-600), var(--brand-500)); display: grid; place-items: center; z-index: 2; }
.card-company__logo img { width: 100%; height: 100%; object-fit: cover; }
.card-company__logo span { font-size: 1.5rem; font-weight: 800; color: #fff; }
.card-company__body { padding-top: 20px; }
@media (max-width: 640px) {
    .card-company__logo { width: 52px; height: 52px; bottom: -18px; }
}

/* Galeria — vitrine pública ------------------------------------------------ */
.company-gallery { margin-top: 28px; }
.company-gallery__head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.company-gallery__head .panel__title { margin-bottom: 0; }
.company-gallery__head .muted { margin: 0; font-size: .92rem; }
.company-gallery__mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; gap: 10px; }
.company-gallery__item { position: relative; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: var(--bg-soft); }
.company-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1), opacity .35s ease; }
.company-gallery__item:hover img, .company-gallery__item:focus-visible img { transform: scale(1.055); }
.company-gallery__item img.is-fading { opacity: 0; }
.company-gallery__item--featured { grid-column: span 2; grid-row: span 2; }
.company-gallery__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 12px; background: linear-gradient(180deg, transparent, rgba(15,8,35,.78)); color: #fff; font-size: .9rem; font-weight: 600; text-align: left; }
.company-gallery__item:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; }
.company-gallery__more { margin: 12px auto 0; display: block; padding: 9px 22px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--brand-700); font-weight: 650; font-size: .9rem; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.company-gallery__more:hover { background: var(--brand-50); border-color: var(--brand-400); }
html[data-theme="dark"] .company-gallery__more { color: var(--brand-400); }
@media (max-width: 720px) {
    .company-gallery__mosaic { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 120px; }
    .company-gallery__item--featured { grid-column: span 2; grid-row: span 2; }
}

/* Faixas "Inspire-se" dentro do assistente --------------------------------- */
.booking-inspire { margin: 4px 0 16px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); }
.booking-inspire--summary { background: var(--brand-50); border-color: var(--brand-100); }
.booking-inspire__title { margin: 0 0 10px; font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.booking-inspire__row { display: flex; gap: 8px; }
.booking-inspire__thumb { flex: 1 1 0; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: var(--bg-soft); height: 76px; }
.booking-inspire__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.booking-inspire__thumb:hover img, .booking-inspire__thumb:focus-visible img { transform: scale(1.08); }
.booking-inspire__thumb:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 1px; }

/* Lightbox ----------------------------------------------------------------- */
body.has-lightbox { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(12, 7, 28, .86); backdrop-filter: blur(6px); }
.lightbox__stage { position: relative; z-index: 1; margin: 0; max-width: min(960px, 94vw); max-height: 88vh; display: grid; }
.lightbox__image { max-width: 100%; max-height: calc(88vh - 58px); border-radius: var(--radius); object-fit: contain; box-shadow: var(--shadow-lg); background: #000; }
.lightbox__bar { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 4px 0; color: #fff; }
.lightbox__caption { font-size: .95rem; font-weight: 600; flex: 1 1 auto; min-width: 0; }
.lightbox__counter { color: rgba(255,255,255,.72); font-size: .85rem; white-space: nowrap; }
.lightbox__close { position: absolute; top: -14px; right: -14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); z-index: 2; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #17112b; font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s ease; z-index: 2; }
.lightbox__nav:hover { background: #fff; }
.lightbox__nav--prev { left: -14px; }
.lightbox__nav--next { right: -14px; }
@media (max-width: 680px) {
    .lightbox { padding: 12px; }
    .lightbox__nav--prev { left: 6px; }
    .lightbox__nav--next { right: 6px; }
    .lightbox__close { top: 6px; right: 6px; }
}

/* Gestão da galeria (painel da empresa) ------------------------------------- */
.gallery-quota { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin: 10px 0 18px; }
.gallery-quota__bar { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-500), var(--brand-400)); transition: width .4s ease; }
.gallery-upload { display: grid; gap: 12px; margin-bottom: 22px; }
.gallery-upload__drop { display: grid; place-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--brand-100); border-radius: var(--radius); background: var(--brand-50); color: var(--brand-700); font-weight: 650; text-align: center; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.gallery-upload__drop:hover { border-color: var(--brand-400); background: var(--surface); }
.gallery-upload__drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gallery-upload__drop .field__hint { margin: 0; }
.gallery-upload__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-600); color: #fff; font-size: 24px; font-weight: 600; line-height: 1; }
html[data-theme="dark"] .gallery-upload__drop { color: var(--brand-400); }
.gallery-upload__row { display: flex; gap: 10px; }
.gallery-upload__row .input { flex: 1 1 auto; }
@media (max-width: 560px) { .gallery-upload__row { flex-direction: column; } }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.gallery-card { position: relative; margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.gallery-card.is-featured { border-color: var(--brand-500); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-500) 35%, transparent); }
.gallery-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gallery-card__badge { position: absolute; top: 8px; left: 8px; padding: 3px 10px; border-radius: 999px; background: var(--brand-600); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.gallery-card__caption { padding: 8px 10px; font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-card__actions { display: flex; gap: 6px; justify-content: center; padding: 8px; border-top: 1px solid var(--border); }
.gallery-card__actions form { display: inline-flex; }
.contact-hint { color: var(--muted); font-size: .85rem; }


/* ==========================================================================
   v1.4 — correções de interface
   1. Menu da conta que fecha mesmo (o atributo [hidden] era anulado pelo grid).
   2. Página pública da empresa totalmente responsiva (dias/horas/profissionais
      deixam de obrigar a scroll horizontal no telemóvel).
   3. Galeria em carrossel horizontal por baixo de «Sobre».
   4. Popup de detalhe da marcação, estrelas de avaliação e ranking.
   ========================================================================== */

/* 1. Menu da conta --------------------------------------------------------- */
.menu__list[hidden] { display: none !important; }
.menu__list { animation: menu-in .12s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu__name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__caret { font-size: .7rem; opacity: .7; }
.btn--soft { background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); }
.btn--soft:hover { background: var(--brand-100); border-color: var(--brand-400); text-decoration: none; }
html[data-theme="dark"] .btn--soft { background: rgba(124, 58, 237, .18); border-color: rgba(167, 139, 250, .35); color: var(--brand-400); }
.topbar__shortcut { white-space: nowrap; }
.topbar__actions { flex-wrap: wrap; gap: 8px; }

/* 2. Página pública da empresa — responsivo -------------------------------- */
.company-hero__cta { white-space: nowrap; }
.hours-list__row { align-items: flex-start; }
.hours-list__row.is-today { background: var(--brand-50); border-radius: var(--radius-sm); padding: 7px 10px; }
html[data-theme="dark"] .hours-list__row.is-today { background: rgba(124, 58, 237, .16); }
.hours-list__day { font-weight: 600; display: flex; flex-direction: column; }
.hours-list__today { font-style: normal; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-700); }
html[data-theme="dark"] .hours-list__today { color: var(--brand-400); }
.hours-list__periods { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.hours-list__period { white-space: nowrap; }

.booking-card__pro { display: grid; place-items: center; }
.avatar--md { width: 48px; height: 48px; font-size: 1.05rem; }

@media (max-width: 900px) {
    .company-hero__inner { flex-direction: column; align-items: stretch; margin-top: -32px; padding: 18px; }
    .company-hero__cta { width: 100%; text-align: center; }
    .company-layout { grid-template-columns: 1fr; padding: 18px 0 36px; }
    .company-side { order: 2; }
}

@media (max-width: 720px) {
    .topbar__shortcut span:not([aria-hidden]) { display: none; }
    .steps { gap: 6px; }
    .step { padding: 6px 10px; font-size: .78rem; }
    .panel { padding: 16px; }
    .daypicker { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
    .daypicker__day { padding: 9px 4px; }
    .daypicker__number { font-size: 1.15rem; }
    .option-grid { grid-template-columns: 1fr; }
    .option-grid--pros { grid-template-columns: 1fr; }
    .slots { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; }
    .slot { padding: 10px 4px; font-size: .92rem; }
    .team { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
    .team__member { width: auto; }
    .service-list__item { flex-wrap: wrap; }
    .service-list__item .price { margin-left: auto; }
    .hours-list li { font-size: .88rem; }
}

@media (max-width: 420px) {
    .daypicker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .company-hero__meta, .company-hero__address { font-size: .85rem; }
}

/* 3. Galeria em carrossel -------------------------------------------------- */
.company-gallery__head { align-items: center; }
.company-gallery__nav { display: flex; gap: 6px; }
.company-gallery__carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 1fr);
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 2px 14px;
    -webkit-overflow-scrolling: touch;
}
.company-gallery__carousel::-webkit-scrollbar { height: 8px; }
.company-gallery__carousel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.company-gallery__slide {
    position: relative; height: 190px; padding: 0; border: 0; border-radius: var(--radius);
    overflow: hidden; cursor: zoom-in; background: var(--bg-soft); scroll-snap-align: start;
}
.company-gallery__slide img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.company-gallery__slide:hover img, .company-gallery__slide:focus-visible img { transform: scale(1.06); }
.company-gallery__slide:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; }
.company-gallery__more { display: inline-block; text-align: center; }

@media (max-width: 720px) {
    .company-gallery__carousel { grid-auto-columns: 78%; }
    .company-gallery__slide { height: 210px; }
    .company-gallery__nav { display: none; }
    .company-gallery__more { display: block; width: 100%; padding: 12px 18px; background: var(--brand-500); border-color: transparent; color: #fff; font-weight: 700; }
    html[data-theme="dark"] .company-gallery__more { color: #fff; }
}

/* 4. Popup de detalhe da marcação ----------------------------------------- */
.modal--appointment { width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal__body--stack { display: block; }
.appointment-detail__pro { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.appointment-detail__pro div { display: grid; gap: 3px; justify-items: start; }
.detail-list { display: grid; gap: 8px; margin: 0 0 14px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px dashed var(--border); padding-bottom: 7px; }
.detail-list dt { color: var(--muted); font-size: .88rem; margin: 0; }
.detail-list dd { margin: 0; text-align: right; font-weight: 600; }
.price--lg { font-size: 1.2rem; }
.notice--warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.notice--info { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.notice--ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }

.review-form { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 14px; }
.review-form__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.review-form__label { font-weight: 600; }
.stars-input { display: inline-flex; gap: 2px; }
.stars-input__star { border: 0; background: none; cursor: pointer; font-size: 1.5rem; line-height: 1; color: #d4d0de; padding: 0 2px; transition: color .12s ease, transform .12s ease; }
.stars-input__star.is-on { color: #f5c542; }
.stars-input__star:hover { transform: scale(1.1); color: #f5c542; }
.stars { color: #f59e0b; letter-spacing: 1px; }

@media (max-width: 560px) {
    .modal--appointment { max-height: 92vh; }
    .detail-list > div { flex-direction: column; gap: 2px; }
    .detail-list dd { text-align: left; }
    .modal__footer { flex-wrap: wrap; }
    .modal__footer .btn { flex: 1 1 auto; }
    .booking-card__pro { display: none; }
}

/* 5. Avaliações no painel e ranking --------------------------------------- */
.rating-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rating-bars__row { display: grid; grid-template-columns: 54px 1fr 110px; gap: 12px; align-items: center; font-size: .9rem; }
.rating-bars__label { font-weight: 700; color: #f59e0b; }
.rating-bars__track { height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.rating-bars__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); }
.rating-bars__value { text-align: right; color: var(--muted); }
.review-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.review-card__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.review-card__foot { font-size: .82rem; margin-top: 6px; }
.ranking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: rank; }
.ranking-list__item { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ranking-list__position { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); font-weight: 800; }
html[data-theme="dark"] .ranking-list__position { background: rgba(124, 58, 237, .2); color: var(--brand-400); }
.ranking-list__name { display: grid; min-width: 0; }
.ranking-list__name span { font-size: .84rem; }
.ranking-list__score { font-weight: 700; white-space: nowrap; }
.badge--top { background: linear-gradient(135deg, #f59e0b, #b45309); color: #fff; }

@media (max-width: 560px) {
    .rating-bars__row { grid-template-columns: 46px 1fr; }
    .rating-bars__value { grid-column: 1 / -1; text-align: left; }
    .ranking-list__item { grid-template-columns: 28px 1fr; }
    .ranking-list__item .stars, .ranking-list__score { grid-column: 2; }
}

/* ==========================================================================
   v1.5 — Barra de topo com menu deslizante, calendário rolante, estados dos
   agendamentos e observações privadas do cliente.
   ========================================================================== */

/* 1. Barra de topo pública + menu hambúrguer ------------------------------- */
.topbar__inner { flex-wrap: nowrap; }
.topbar__burger {
    display: none; width: 42px; height: 42px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--surface); cursor: pointer;
    padding: 0; place-items: center; gap: 4px; flex-direction: column;
}
.topbar__burger span { display: block; width: 20px; height: 2px; border-radius: 2px;  transition: transform .2s ease, opacity .2s ease; }
.topbar__burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.topbar__burger.is-open span:nth-child(2) { opacity: 0; }
.topbar__burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.topbar__nav { margin-left: auto; margin-right: auto; gap: 22px; }
.topbar__actions { margin-left: 0; flex-wrap: nowrap; }

.navdrawer { position: fixed; inset: 0; z-index: 120; visibility: hidden; }
.navdrawer.is-open { visibility: visible; }
.navdrawer__backdrop { position: absolute; inset: 0; background: rgba(15, 12, 30, .5); opacity: 0; transition: opacity .22s ease; }
.navdrawer.is-open .navdrawer__backdrop { opacity: 1; }
.navdrawer__panel {
    position: absolute; inset: 0 auto 0 0; width: min(330px, 86vw);
    background: var(--surface); border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg); padding: 18px;
    display: flex; flex-direction: column; gap: 18px; overflow-y: auto;
    transform: translateX(-100%); transition: transform .26s cubic-bezier(.22, .61, .36, 1);
}
.navdrawer.is-open .navdrawer__panel { transform: none; }
.navdrawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.navdrawer__links { display: grid; gap: 2px; }
.navdrawer__links a { padding: 12px 10px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; }
.navdrawer__links a:hover { background: var(--surface-2); text-decoration: none; }
.navdrawer__links--account { border-top: 1px solid var(--border); padding-top: 10px; }
.navdrawer__foot { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; }
.navdrawer__foot .btn { flex: 1 1 auto; text-align: center; }
.navdrawer__business { margin-top: auto; display: grid; gap: 6px; font-size: .88rem; border-top: 1px dashed var(--border); padding-top: 12px; }
body.has-drawer { overflow: hidden; }

@media (max-width: 960px) {
    .topbar__nav { display: none; }
    .topbar__burger { display: inline-grid; }
    .topbar__inner { gap: 10px; }
    .brand__name { font-size: 1rem; }
    .topbar__actions { margin-left: auto; }
    .topbar__actions .topbar__shortcut { display: none; }
    .topbar__actions .btn--ghost, .topbar__actions .btn--primary { padding: 8px 12px; }
}

/* 2. Calendário rolante do cliente (dias + atalhos de mês) ------------------ */
.monthtabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.monthtabs__tab {
    flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
    border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .85rem; font-weight: 600;
    text-transform: capitalize; cursor: pointer; transition: all .15s ease;
}
.monthtabs__tab:hover { border-color: var(--brand-400); color: var(--brand-700); }
.monthtabs__tab.is-active { background: var(--brand-500); border-color: transparent; color: #fff; }

.daypicker-wrap { position: relative; display: flex; align-items: center; gap: 6px; }
.daypicker__arrow {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.daypicker__arrow:hover { border-color: var(--brand-400); color: var(--brand-700); }
.daypicker__hint { display: none; font-size: .78rem; margin: 2px 0 0; }
.daypicker__day { scroll-snap-align: start; }

@media (max-width: 860px) {
    /* Faixa horizontal: o cliente passa o dedo e as datas rolam. */
    .daypicker {
        display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px;
        scroll-snap-type: x proximity; scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch; padding-bottom: 10px;
    }
    .daypicker::-webkit-scrollbar { height: 6px; }
    .daypicker::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
    .daypicker__day { flex: 0 0 74px; }
    .daypicker__arrow { display: none; }
    .daypicker__hint { display: block; }
}

/* 3. Estado dos agendamentos na lista do painel ---------------------------- */
.status-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-form__select { min-width: 140px; }
.client-note-cell { max-width: 260px; }
.client-note-cell__text { display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; color: var(--muted); margin-right: 6px; }

@media (max-width: 720px) {
    .status-form { flex-direction: column; align-items: flex-start; }
    .status-form__select { width: 100%; min-width: 0; }
}

/* 4. Calendário operacional — tudo visível --------------------------------- */
.calendar__event { overflow: visible; }
.calendar__event-client { font-weight: 800; font-size: .86rem; white-space: normal; overflow-wrap: anywhere; }
.calendar__event-note {
    font-size: .72rem; color: color-mix(in srgb, var(--text) 72%, transparent);
    background: color-mix(in srgb, var(--tint) 16%, var(--surface));
    border-radius: 6px; padding: 1px 5px; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.calendar__event-note[hidden] { display: none; }
.calendar__event:hover {
    /* Ao passar o rato o bloco cresce o necessário para mostrar tudo. */
    height: auto !important; min-height: calc(var(--length) * var(--px-per-min) - 3px);
    z-index: 20; overflow: visible;
    background: color-mix(in srgb, var(--tint) 34%, var(--surface));
}
html[data-theme="dark"] .calendar__event:hover { background: color-mix(in srgb, var(--tint) 42%, #1a1433); }
.calendar__event-actions { background: color-mix(in srgb, var(--surface) 82%, transparent); border-radius: 8px; padding: 1px; }

/* 5. Coluna lateral da empresa (sobre, galeria, serviços e equipa) ----------
   CORREÇÃO v1.6: esta regra vinha DEPOIS das media queries do topo do ficheiro
   e, com a mesma especificidade, ganhava sempre. Resultado: o telemóvel ficava
   com duas colunas (1.55fr + minmax(300px,1fr)), a coluna principal era
   esmagada e o calendário de marcação do cliente aparecia na vertical
   (um dia por linha). Agora só se aplica em ecrãs grandes. */
@media (min-width: 1025px) {
    .company-layout { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); }
}
.company-side { display: grid; gap: 18px; align-content: start; }
.company-side .panel { padding: 16px; }
.company-side .panel__title { font-size: 1.02rem; }
.company-side .company-gallery__carousel { grid-auto-columns: 82%; }
.company-side .company-gallery__slide { height: 150px; }
.company-side .team { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.company-side .service-list__item { flex-wrap: wrap; gap: 6px; }

@media (max-width: 1024px) {
    /* CORREÇÃO v1.6: antes dizia ".company-side" (que nem sequer é grid de
       2 colunas). O alvo correto é o contentor .company-layout. */
    .company-layout { grid-template-columns: minmax(0, 1fr); padding: 18px 0 36px; }
    .company-side { grid-template-columns: minmax(0, 1fr); order: 2; }
    .company-main { min-width: 0; }
}

/* ==========================================================================
   v1.6 — Correções de responsividade do assistente de marcação
   ==========================================================================
   O calendário de escolha do dia deixava de ser horizontal porque:
   1) o contentor .company-layout mantinha 2 colunas no telemóvel (corrigido acima);
   2) .daypicker é filho flex de .daypicker-wrap sem min-width:0, o que impedia
      o encolhimento e forçava o grid a uma única coluna.
   -------------------------------------------------------------------------- */
.company-main { min-width: 0; }
.company-side { min-width: 0; }
.daypicker-wrap { min-width: 0; }
.daypicker { flex: 1 1 auto; min-width: 0; }
.daypicker__day { min-width: 0; }
.slots { min-width: 0; }
.booking-step { min-width: 0; }

/* Faixa horizontal com deslize também em tablet (<= 1024px). */
@media (max-width: 1024px) {
    .daypicker {
        display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px;
        scroll-snap-type: x proximity; scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch; padding-bottom: 10px;
    }
    .daypicker__day { flex: 0 0 78px; }
    .daypicker__hint { display: block; }
}

@media (max-width: 420px) {
    /* Nunca deixar cair para 1 coluna: mantém sempre 3 horas por linha. */
    .slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .daypicker__day { flex: 0 0 68px; }
}

/* O calendário operacional (empresa/administrador) tem de deslizar na
   horizontal no telemóvel em vez de empilhar colunas. */
.calendar__scroller { -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
    .calendar__grid { --px-per-min: 1.15px; grid-template-columns: 46px repeat(var(--columns), minmax(128px, 1fr)); }
    .calendar__toolbar { gap: 8px; }
    .calendar__filters { width: 100%; }
}

/* ==========================================================================
   v1.7 — Correções: calendário do cliente sempre horizontal, barra de topo
   responsiva, pesquisa de clientes, calendário operacional e recuperação de senha
   ==========================================================================
   Estas regras ficam no FIM do ficheiro de propósito: com a mesma especificidade,
   a última declaração ganha, o que anula as várias camadas anteriores (grid em
   desktop, flex só em media queries, etc.) que deixavam o calendário na vertical
   em alguns navegadores/larguras.
   -------------------------------------------------------------------------- */

/* 1. Faixa de dias: horizontal em TODOS os ecrãs ---------------------------- */
html { overflow-x: clip; }                 /* nada pode empurrar a página para o lado */
body { overflow-x: clip; }

.daypicker-wrap {
    display: flex; align-items: center; gap: 8px;
    width: 100%; min-width: 0; position: relative;
}
.daypicker {
    /* Nunca grid: uma única linha que rola na horizontal. */
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    grid-template-columns: none !important;
    flex: 1 1 0%; min-width: 0; width: 100%;
    gap: 8px; padding: 6px 2px 12px; margin: 0;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
    position: relative; outline-offset: 4px; cursor: grab;
}
.daypicker::-webkit-scrollbar { height: 6px; }
.daypicker::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.daypicker.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.daypicker.is-dragging .daypicker__day { pointer-events: none; }

.daypicker__day {
    flex: 0 0 86px !important; width: 86px; min-width: 86px; max-width: 86px;
    scroll-snap-align: start; scroll-snap-stop: normal;
    display: grid; gap: 2px; justify-items: center; align-content: center;
    padding: 12px 6px; min-height: 96px;
}
.daypicker__day:hover:not(.is-disabled) { transform: translateY(-1px); }
.daypicker__closed { max-width: 100%; text-align: center; line-height: 1.15; }

.daypicker__arrow {
    display: inline-grid !important; place-items: center;
    flex: 0 0 36px; width: 36px; height: 36px; padding: 0;
    border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); cursor: pointer;
    font-size: 1.25rem; line-height: 1; box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, opacity .15s ease, transform .12s ease;
}
.daypicker__arrow:hover:not(:disabled) { border-color: var(--brand-400); color: var(--brand-700); transform: scale(1.05); }
.daypicker__arrow:disabled { opacity: .3; cursor: default; box-shadow: none; }
html[data-theme="dark"] .daypicker__arrow:hover:not(:disabled) { color: var(--brand-400); }

.daypicker__hint { display: block; font-size: .78rem; margin: 0 0 6px; }

.monthtabs { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 0 4px; scrollbar-width: none; }
.monthtabs::-webkit-scrollbar { display: none; }
.monthtabs__tab { flex: 0 0 auto; white-space: nowrap; }

@media (max-width: 720px) {
    .daypicker__day { flex-basis: 74px !important; width: 74px; min-width: 74px; max-width: 74px; padding: 10px 4px; min-height: 86px; }
    .daypicker__number { font-size: 1.15rem; }
    .daypicker__arrow { display: none !important; }   /* o dedo desliza a faixa */
    .daypicker-wrap { gap: 0; }
}
@media (max-width: 420px) {
    .daypicker__day { flex-basis: 68px !important; width: 68px; min-width: 68px; max-width: 68px; }
}
@media (hover: none) and (pointer: coarse) {
    .daypicker { cursor: default; }
}

/* 2. Passos do assistente compactos no telemóvel --------------------------- */
@media (max-width: 720px) {
    .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .step { justify-content: center; padding: 6px 4px; font-size: .72rem; border-radius: 12px; text-align: center; flex-direction: column; gap: 4px; line-height: 1.15; }
    .step span { width: 24px; height: 24px; }
}
@media (max-width: 400px) {
    .step { font-size: .66rem; }
}

/* 3. Barra de topo pública: nunca mais larga do que o ecrã ------------------ */
.topbar__inner { min-width: 0; }
.topbar__burger { flex: 0 0 42px; }
.topbar__actions { min-width: 0; flex-shrink: 1; }
.topbar__actions .btn { white-space: nowrap; }
.brand { min-width: 0; }
.brand__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 960px) {
    /* Idioma/tema saem da barra (ficam no menu deslizante) e o botão «Criar conta»
       também: no telemóvel a barra passa a ser hambúrguer | marca | entrar/conta. */
    .topbar__actions .prefs--topbar { display: none; }
    .topbar__actions .topbar__register { display: none; }
    .topbar__inner { gap: 8px; padding: 10px 0; }
    .topbar__actions { gap: 6px; }
    .menu__name { max-width: 90px; }
}
@media (max-width: 480px) {
    .menu__name { display: none; }
    .menu__caret { display: none; }
    .topbar__actions .btn--ghost, .topbar__actions .btn--primary { padding: 8px 10px; font-size: .84rem; }
    .brand__mark { width: 32px; height: 32px; }
    .brand__name { font-size: .95rem; max-width: 40vw; }
}

/* Menu deslizante: preferências (idioma/tema) e toques maiores. */
.navdrawer__panel { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.navdrawer__label { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.navdrawer__prefs { border-top: 1px dashed var(--border); padding-top: 12px; }
.prefs--drawer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prefs--drawer .prefs__form { display: flex; }
.prefs--drawer .prefs__select { width: 100%; padding: 10px 8px; font-size: .9rem; }
.navdrawer__links a { display: block; }
.navdrawer__links a:active { background: var(--brand-50); }

/* Página da empresa: respiração e tamanhos confortáveis no telemóvel. */
@media (max-width: 720px) {
    .company-hero__inner { margin-top: -28px; padding: 16px; gap: 12px; }
    .company-hero__brand { gap: 12px; }
    .company-hero__logo { width: 64px; height: 64px; }
    .company-hero__cta { width: 100%; text-align: center; }
    .company-layout { padding: 14px 0 28px; gap: 16px; }
    .panel { padding: 16px 14px; }
    .panel__title { font-size: 1.15rem; }
    .booking-step h3 { font-size: 1rem; margin-bottom: 8px; }
    .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .slot { padding: 10px 2px; font-size: .9rem; }
    .booking-summary { padding: 14px; }
    .booking-summary .btn { width: 100%; }
}
@media (max-width: 400px) {
    .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 4. Pesquisa de clientes (painel): mesmo aspeto dos outros formulários ----- */
.filters--search { margin: 0 0 16px; gap: 8px; }
.filters__field { flex: 1 1 260px; max-width: 460px; min-width: 0; display: block; margin: 0; }
.filters__input, .filters__field .input { width: 100%; }
.filters__input[type="search"] { -webkit-appearance: none; appearance: none; }
.filters__input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
.filters--search .btn { flex: 0 0 auto; }
@media (max-width: 560px) {
    .filters--search { flex-direction: column; align-items: stretch; }
    .filters__field { max-width: none; }
    .filters--search .btn { width: 100%; text-align: center; }
}

/* 5. Calendário operacional: nome do cliente sempre visível ----------------- */
.calendar__event { padding: 4px 7px 4px 8px; gap: 0; overflow: hidden; }
.calendar__event-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.calendar__event-client {
    flex: 1 1 auto; min-width: 0; order: 0;
    font-size: .82rem; font-weight: 800; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.calendar__event-status {
    flex: 0 0 auto; margin: 0; order: 1;
    font-size: .58rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 1px 6px; border-radius: 999px; line-height: 1.5; opacity: 1;
    background: color-mix(in srgb, var(--tint) 28%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--tint) 45%, transparent);
    color: color-mix(in srgb, var(--text) 85%, transparent);
    max-width: 46%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.calendar__event-time { font-size: .72rem; line-height: 1.2; color: color-mix(in srgb, var(--text) 80%, transparent); }
.calendar__event-service, .calendar__event-pro { line-height: 1.2; }
.calendar__event.status-cancelled .calendar__event-client { text-decoration: line-through; }

/* Marcações curtas (≤ 30 min): bloco compacto mas com o nome legível. */
.calendar__event.is-short { padding: 2px 6px 2px 7px; }
.calendar__event.is-short .calendar__event-client { font-size: .78rem; }
.calendar__event.is-short .calendar__event-time { font-size: .68rem; }
.calendar__event.is-short .calendar__event-service,
.calendar__event.is-short .calendar__event-pro,
.calendar__event.is-short .calendar__event-note { display: none; }

/* Marcações muito curtas (≤ 15 min): só nome + estado numa linha. */
.calendar__event.is-tiny { padding: 1px 6px 1px 7px; justify-content: center; }
.calendar__event.is-tiny .calendar__event-client { font-size: .72rem; }
.calendar__event.is-tiny .calendar__event-status { font-size: .52rem; padding: 0 5px; }
.calendar__event.is-tiny .calendar__event-time,
.calendar__event.is-tiny .calendar__event-service,
.calendar__event.is-tiny .calendar__event-pro,
.calendar__event.is-tiny .calendar__event-note { display: none; }

/* Ao passar o rato o bloco cresce e mostra tudo (já existia): repõe as linhas escondidas. */
.calendar__event:hover .calendar__event-service,
.calendar__event:hover .calendar__event-pro,
.calendar__event:hover .calendar__event-time,
.calendar__event:hover .calendar__event-note:not([hidden]) { display: block; }
.calendar__event:hover .calendar__event-client { white-space: normal; overflow-wrap: anywhere; }
.calendar__event:hover .calendar__event-status { max-width: none; }

/* As ações (✎ ✓ ✕) passam para o canto inferior direito para não taparem o estado. */
.calendar__event-actions { top: auto; bottom: 3px; right: 4px; }

/* Nomes ainda mais legíveis no telemóvel (colunas mais estreitas). */
@media (max-width: 640px) {
    .calendar__event-client { font-size: .78rem; }
    .calendar__event-status { font-size: .54rem; }
}

/* 6. Autenticação: «Esqueci a senha» e erros de campo ----------------------- */
.auth__row { display: flex; justify-content: flex-end; margin-top: -4px; }
.auth__forgot { font-size: .88rem; font-weight: 600; }
.auth__debug { margin: 14px 0 0; font-size: .84rem; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); }
.field__error { display: block; color: var(--danger); font-size: .82rem; }
.field small.muted { font-size: .8rem; }
.input.is-invalid { border-color: var(--danger); }

/* v1.8 — carrossel em tempo real, banner de plano, fidelidade no calendário */
.live-wrap {
    margin-top: 22px; background: rgba(18, 10, 40, .55); border-radius: 22px; padding: 10px 12px;
    display: grid; grid-template-columns: 170px 1fr auto; gap: 10px; align-items: center;
}
.live-label { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; color: #86efac; font-weight: 700; }
.live-label small { color: #6ee7b7; font-weight: 600; }
.pulse {
    width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block;
    box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: livePulse 1.6s infinite; margin-right: 6px;
}
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
    70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.live-track { display: flex; overflow: hidden; }
.live-track { flex-wrap: wrap; }
.live-card {
    flex: 0 0 33.333%; max-width: 33.333%; min-width: 0; display: flex; gap: 10px; align-items: center;
    padding: 8px 12px; border-left: 1px solid rgba(255,255,255,.08); color: #fff; box-sizing: border-box;
}
.live-card.is-new { animation: liveFade .7s ease; }
@keyframes liveFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.live-card h4 { margin: 0; font-size: .95rem; }
.live-card p { margin: 2px 0 0; color: #c4b5fd; font-size: .8rem; }
.live-mins { margin-left: auto; color: #c4b5fd; font-size: .85rem; white-space: nowrap; }
.live-arrow {
    width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08);
    color: #fff; cursor: pointer;
}
.plan-banner {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    background: linear-gradient(135deg, #b45309, #f59e0b); color: #fff; padding: 12px 18px; font-weight: 700;
}
.plan-banner a { background: #fff; color: #9a3412; }
.calendar__event.is-loyalty { box-shadow: inset 0 0 0 2px #f5c542; }
.calendar__event-loyalty { display: block; font-size: .78rem; font-weight: 700; color: #fde68a; }
.check { display: flex; gap: 10px; align-items: flex-start; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 14px; padding: 12px; margin: 12px 0; }
@media (max-width: 980px) {
    .live-wrap { grid-template-columns: 1fr; }
    .live-card { flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 560px) {
    .live-card { flex: 0 0 100%; max-width: 100%; border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
}
@media (min-width: 981px) {
    .live-card { flex-basis: 33.333%; max-width: 33.333%; }
}


/* ===================================================================
   v2.1 — Área do profissional, comissões, extras, pagamento e fidelidade
   =================================================================== */
.badge-loyalty {
    display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 0 4px; padding: 2px 8px; border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #f5c542); color: #3b2a00; font-size: .72rem; font-weight: 800;
    letter-spacing: .01em; white-space: nowrap; vertical-align: middle; box-shadow: 0 1px 4px rgba(245,158,11,.35);
}
.badge-extra {
    display: inline-block; margin: 2px 4px 0 0; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700;
    background: #ecfeff; color: #155e75; border: 1px solid #a5f3fc;
}
[data-theme="dark"] .badge-extra { background: rgba(6,182,212,.15); color: #67e8f9; border-color: rgba(6,182,212,.35); }
.row--loyalty td:first-child { box-shadow: inset 4px 0 0 #f5c542; }
.booking-card.is-loyalty, .pro-card.is-loyalty { box-shadow: 0 0 0 2px #f5c542, 0 6px 18px rgba(245,158,11,.18); background: linear-gradient(90deg, rgba(254,243,199,.55), transparent 40%); }
[data-theme="dark"] .booking-card.is-loyalty, [data-theme="dark"] .pro-card.is-loyalty { background: linear-gradient(90deg, rgba(245,158,11,.14), transparent 40%); }
.loyalty-notice {
    display: block; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px;
    background: #fef3c7; border: 1px solid #fcd34d; color: #78350f; font-size: .92rem;
}
[data-theme="dark"] .loyalty-notice { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.4); color: #fde68a; }

.manage-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2, #f5f3ff); margin-bottom: 8px; }
[data-theme="dark"] .manage-summary { background: rgba(255,255,255,.06); }
.manage-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: #ecfdf5; border: 1px solid #a7f3d0; font-size: 1.05rem; }
.manage-total strong { font-size: 1.35rem; color: #065f46; }
[data-theme="dark"] .manage-total { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.4); }
[data-theme="dark"] .manage-total strong { color: #6ee7b7; }
.service-check.is-main { opacity: .45; text-decoration: line-through; }
.custom-extras { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.custom-extra-row { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 640px) { .custom-extra-row { grid-template-columns: 1fr; } }

.pro-access { padding: 12px; border-radius: 12px; border: 1px dashed var(--border, #ddd6fe); }
.pro-access__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
@media (max-width: 640px) { .pro-access__grid { grid-template-columns: 1fr; } }
.card-pro__commission { margin: 6px 0 0; font-size: .9rem; }

.stats-grid { display: grid; gap: 12px; margin: 14px 0 18px; }
.stats-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .stats-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stats-grid--4 { grid-template-columns: 1fr; } }
.stat-card {
    display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: inherit;
    background: var(--surface, #fff); border: 1px solid var(--border, #e9e5f5); box-shadow: 0 2px 10px rgba(30,20,60,.05);
}
.stat-card.is-active { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,.25); }
.stat-card--accent { background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; border: 0; }
.stat-card--accent .muted, .stat-card--accent .stat-card__label { color: rgba(255,255,255,.85); }
.stat-card__label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.stat-card__value { font-size: 1.5rem; line-height: 1.1; }
[data-theme="dark"] .stat-card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }
.small { font-size: .8rem; }
.pro-cell { display: flex; align-items: center; gap: 10px; }

.pro-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.pro-nav__date { display: inline-flex; }
.pro-day { margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border, #e9e5f5); font-size: 1rem; }
.pro-day.is-today { color: #7c3aed; }
.filters--wrap { flex-wrap: wrap; margin-bottom: 10px; }
.chip--sm { padding: 4px 10px; font-size: .8rem; }
.pro-card { position: relative; }
.pro-card.status-completed { opacity: .85; }
.pro-card.status-cancelled { opacity: .55; }
.pro-card__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pro-card__actions .input--sm { max-width: 150px; }
.pro-topbar__user { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; font-weight: 700; }
.pro-topbar__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
    .pro-topbar__name { display: none; }
    .booking-card.pro-card { grid-template-columns: 1fr; }
    .pro-card__actions { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
}
.pro-photo-form__preview { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pro-profile .panel--form { margin-bottom: 14px; }
.avatar--sm { width: 32px; height: 32px; font-size: .9rem; }

/* =====================================================================
   v2.3 — Calendário mensal, ausências, métricas globais e link marketing.
   ===================================================================== */

.calendar-month { display: flex; flex-direction: column; gap: 1rem; }

.month-grid { display: flex; flex-direction: column; gap: .35rem; }

.month-grid__head,
.month-grid__week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .35rem;
}

.month-grid__head span {
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted, #6b7280);
    padding: .25rem .4rem;
}

.month-day {
    display: flex;
    flex-direction: column;
    gap: .18rem;
    min-height: 118px;
    padding: .4rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: .65rem;
    background: var(--surface, #fff);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
    overflow: hidden;
}

.month-day:hover { border-color: var(--primary, #7c3aed); transform: translateY(-2px); }
.month-day.is-outside { opacity: .45; }
.month-day.is-today { border-color: var(--primary, #7c3aed); box-shadow: 0 0 0 1px var(--primary, #7c3aed) inset; }

.month-day__num {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: .82rem;
}

.month-day__count {
    font-size: .68rem;
    font-weight: 700;
    padding: .05rem .38rem;
    border-radius: 999px;
    background: var(--primary, #7c3aed);
    color: #fff;
}

.month-event {
    display: block;
    font-size: .68rem;
    line-height: 1.25;
    padding: .18rem .3rem;
    border-left: 3px solid var(--tint, #7c3aed);
    border-radius: .3rem;
    background: color-mix(in srgb, var(--tint, #7c3aed) 12%, transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-event b { font-weight: 700; }
.month-event i,
.month-event em { font-style: normal; opacity: .75; }
.month-event.status-cancelled { text-decoration: line-through; opacity: .55; }

.month-day__absence {
    font-size: .66rem;
    padding: .15rem .3rem;
    border-radius: .3rem;
    background: rgba(245, 158, 11, .18);
    color: #92400e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-day__more { font-size: .66rem; opacity: .7; }

.card--form { display: flex; flex-direction: column; gap: .85rem; padding: 1rem; }
/* v2.4 — campanha em estado terminal (concluída/encerrada): sem ações, visual atenuado. */
.card--muted { opacity: .78; }
.card__title { margin: 0; font-size: 1rem; }
.card__actions { display: flex; justify-content: flex-end; gap: .5rem; }
.card__inline-form { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.table__actions { white-space: nowrap; }
.table tr.is-muted { opacity: .55; }

.alert--info {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .35);
    border-radius: .6rem;
    padding: .6rem .8rem;
}

.progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(124, 58, 237, .15);
    overflow: hidden;
}

.progress__bar { display: block; height: 100%; background: var(--primary, #7c3aed); }

.bars {
    display: flex;
    align-items: flex-end;
    gap: .35rem;
    height: 180px;
    padding: .6rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: .7rem;
    overflow-x: auto;
}

.bars__group {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100%;
    position: relative;
    min-width: 26px;
    flex: 1 0 auto;
}

.bars__bar { width: 8px; border-radius: 3px 3px 0 0; }
.bars__bar--visits { background: #3b82f6; }
.bars__bar--bookings { background: #7c3aed; }
.bars__group small {
    position: absolute;
    bottom: -.15rem;
    left: 50%;
    transform: translate(-50%, 100%);
    font-size: .58rem;
    opacity: .6;
}

.card-company--sponsored { outline: 2px solid rgba(245, 158, 11, .45); outline-offset: 2px; }

@media (max-width: 720px) {
    .month-day { min-height: 74px; }
    .month-event i, .month-event em { display: none; }
}

/* v2.6 — paginação das listagens */
.pagination{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;margin-top:1rem;padding-top:.75rem;border-top:1px solid var(--border,rgba(128,128,128,.2))}
.pagination__pages{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem}
.pagination__gap{padding:0 .25rem;opacity:.6}
.pagination .is-disabled{opacity:.4;pointer-events:none}
/* v2.6 — indicador de limite do plano */
.limit-badge{display:inline-flex;align-items:center;gap:.35rem;font-size:.8rem;padding:.15rem .55rem;border-radius:999px;background:rgba(128,128,128,.12)}
.limit-badge.is-full{background:rgba(220,53,69,.12);color:#c1121f}
/* v2.6 — módulo bloqueado */
.module-locked{text-align:center;padding:2.5rem 1rem;opacity:.85}
.module-locked__icon{font-size:2.5rem;display:block;margin-bottom:.5rem}

/* ===================== v2.8 ===================== */
.sidebar__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; }
.register-errors strong { display: block; }
.register-errors div { margin-top: 4px; font-size: .88rem; }
.field__error[hidden] { display: none; }
.toast--info { background: var(--surface); color: var(--text, inherit); border: 1px solid var(--border); }
.plan-banner--renewal { background: color-mix(in srgb, var(--primary, #7c3aed) 12%, var(--surface)); }
.renewal-admin { margin-bottom: 18px; }
.renewal-admin__list { display: grid; gap: 14px; }
.renewal-admin__card { border: 1px solid var(--border); border-left: 4px solid var(--primary, #7c3aed); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); display: grid; gap: 10px; }
.renewal-admin__card--payment_confirmed { border-left-color: #f59e0b; }
.renewal-admin__card--payment_pending { border-left-color: #0ea5e9; }
.renewal-admin__card--on_hold { border-left-color: #94a3b8; }
.renewal-admin__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.renewal-admin__company { font-size: 1.02rem; }
.renewal-admin__meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); }
.renewal-admin__meta strong { color: var(--text, inherit); }
.renewal-admin__alert { margin: 0; }
.renewal-admin__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.renewal-admin__sent p { margin: 4px 0; }
.renewal-admin__send summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.renewal-admin__form { display: grid; gap: 12px; margin-top: 8px; }
.renewal-admin__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 8px; border-top: 1px dashed var(--border); }
.renewal-admin__confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.renewal-admin__confirm .input { width: 230px; max-width: 100%; }
.pending-companies { margin-bottom: 18px; border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--border)); }
.tag--requested, .tag--payment_confirmed { background: #fef3c7; color: #92400e; }
.tag--payment_pending { background: #e0f2fe; color: #075985; }
.tag--on_hold { background: #f1f5f9; color: #334155; }
.tag--confirmed { background: #dcfce7; color: #166534; }
.tag--refused { background: #fee2e2; color: #991b1b; }
.calendar-confirm-host { z-index: 140; }
.calendar-confirm { width: min(460px, 100%); }
.calendar-confirm__body { padding: 20px 22px; display: grid; gap: 14px; }
.calendar-confirm__text { margin: 0; font-size: 1rem; line-height: 1.5; }
.calendar-confirm__times { display: flex; align-items: center; justify-content: center; gap: 14px; }
.calendar-confirm__time { font-size: 1.35rem; font-weight: 700; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.calendar-confirm__time--to { border-color: var(--primary, #7c3aed); color: var(--primary, #7c3aed); }
.calendar-confirm__arrow { font-size: 1.3rem; color: var(--muted); }
.calendar-confirm__pro { margin: 0; color: var(--muted); text-align: center; }
.calendar__ghost.is-pending { opacity: .9; outline: 2px dashed var(--primary, #7c3aed); }

/* ==========================================================================
   v2.9.3
   ========================================================================== */

/* Item 5 — mensagens vazias do assistente de marcação ocupam a largura toda
   (antes ficavam presas numa coluna de 92px da grelha de horas) e em negrito. */
.slots > .empty-state,
.option-grid > .empty-state { grid-column: 1 / -1; width: 100%; max-width: none; box-sizing: border-box; font-weight: 700; color: var(--text); }

/* Item 1 — serviços / profissionais sem disponibilidade no dia escolhido. */
.option.is-unavailable,
.option:disabled { opacity: .55; cursor: not-allowed; transform: none; background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 6px, var(--border) 6px, var(--border) 7px); }
.option.is-unavailable:hover,
.option:disabled:hover { transform: none; border-color: var(--border); }
.option__note { display: block; margin-top: 2px; font-size: .68rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--danger, #dc2626); }

/* Item 2 — atendimento concluído bloqueado para o profissional. */
.lock-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.manage-locked { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--radius, 14px); border: 1px solid #f59e0b; background: rgba(245, 158, 11, .12); }

/* Item 4 — categorias com fotografia de fundo em faixa horizontal (touch). */
.category-scroller { position: relative; }
.categories.categories--scroll { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 4px 2px 12px; scroll-snap-type: x mandatory; scroll-padding-left: 2px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; }
.categories--scroll::-webkit-scrollbar { height: 6px; }
.categories--scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.categories--scroll > .category { flex: 0 0 176px; scroll-snap-align: start; }
.category.category--photo { position: relative; isolation: isolate; overflow: hidden; height: 132px; padding: 0; gap: 0; align-items: stretch; justify-content: flex-end; text-align: left; border: 0; color: #fff; background: linear-gradient(135deg, var(--brand-500, #7c3aed), var(--brand-700, #5b21b6)); box-shadow: 0 6px 18px rgba(20, 10, 40, .16); }
.category--photo .category__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.category--photo .category__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8, 5, 18, .94) 0%, rgba(8, 5, 18, .74) 25%, rgba(8, 5, 18, .32) 45%, rgba(8, 5, 18, 0) 55%); }
.category--photo .category__fallback { position: absolute; top: 10px; right: 12px; z-index: -1; font-size: 2.4rem; line-height: 1; opacity: .4; }
.category--photo .category__body { display: grid; gap: 2px; padding: 12px 14px; }
.category--photo .category__name { color: #fff; font-size: 1rem; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.category--photo .category__count { color: rgba(255, 255, 255, .9); font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.category--photo:hover { transform: translateY(-2px); }
.category--photo:hover .category__img { transform: scale(1.06); }
.category.category--photo.is-active { background: linear-gradient(135deg, var(--brand-500, #7c3aed), var(--brand-700, #5b21b6)); }
.category--photo.is-active::after { content: ""; position: absolute; inset: 0; border: 3px solid var(--brand-400, #a78bfa); border-radius: inherit; pointer-events: none; }
.category-scroller__arrow { display: none; position: absolute; top: calc(50% - 6px); z-index: 2; width: 38px; height: 38px; transform: translateY(-50%); border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); cursor: pointer; font-size: 1.4rem; line-height: 1; }
.category-scroller__arrow--prev { left: -8px; }
.category-scroller__arrow--next { right: -8px; }
.category-scroller__arrow:disabled { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
    .category-scroller.has-overflow .category-scroller__arrow { display: grid; place-items: center; }
}
@media (max-width: 640px) {
    .categories--scroll > .category { flex-basis: 150px; }
    .category.category--photo { height: 118px; }
}

/* Item 4 — imagem da categoria no painel global. */
.thumb-category { display: block; width: 64px; height: 44px; object-fit: cover; border-radius: 8px; }
.form-image-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.form-image-preview img { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

/* Item 6 — período personalizado nas estatísticas globais. */
.stats-period { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 8px 0 10px; }
.stats-period__field { display: grid; gap: 4px; min-width: 140px; }
.stats-period__field label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.stats-period__actions { display: flex; gap: 8px; }
.stats-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
