@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url('../fonts/material-symbols-outlined.woff2') format('woff2');
}
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #1e4890;
}

/* The tenant shell defaults the cursor to an arrow (see TenantLayout.razor.css).
   Restore the text caret only for real text-entry fields, and keep hyperlinks
   as a pointer. */
input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]):not([type="color"]):not([type="file"]),
textarea,
[contenteditable="true"] {
    cursor: text;
}

a[href] {
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: #1e4890;
    border-color: #1e4890;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #001f3f;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-input-border-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-focus) 20%, transparent);
}

.form-control:focus::placeholder,
input:focus::placeholder,
textarea:focus::placeholder {
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    transition: opacity 0.2s ease;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #74c365;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #dde0d5;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1e4890;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* Login Layout */
.login-layout {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f6f7ed;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
}

.login-card {
    background: #fff;
    border: 1px solid #dde0d5;
    border-radius: 0;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-name {
    font-weight: 700;
    font-size: 1rem;
    color: #111;
}

.logo-subtitle {
    font-size: 0.65rem;
    color: #888;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1.75rem;
}

.login-card .form-group {
    margin-bottom: 1.25rem;
}

    .login-card .form-group label {
        display: block;
        font-size: 0.875rem;
        font-weight: 500;
        color: #111;
        margin-bottom: 0.4rem;
    }

.login-card .form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #dde0d5;
    border-radius: 0;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

    .login-card .form-control:focus {
        border-color: #111;
        box-shadow: none;
        outline: none;
    }

    .login-card .form-control.input-error {
        border-color: #dc3545 !important;
    }

.form-group {
    margin-bottom: 1.15rem;
}

    .form-group label {
        display: block;
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--color-text-muted);
        margin-bottom: 0.35rem;
    }

.form-control {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-input-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--color-input-bg);
    box-sizing: border-box;
    transition: border-color 0.15s;
}

select.form-control {
    appearance: auto;
}

.form-control.input-error {
    border-color: var(--color-input-border-error) !important;
}

    .form-control.input-error:focus {
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-error) 20%, transparent);
    }

.field-error-message {
    display: block;
    font-size: 0.75rem;
    color: var(--color-feedback-danger-text);
    margin-top: 0.3rem;
}

.field-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

.password-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 0.8rem;
    color: #111;
    text-decoration: underline;
}

    .forgot-link:hover {
        color: #333;
    }

.btn-login {
    width: 100%;
    padding: 0.7rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-login:hover {
        background: #333;
    }

    .btn-login:disabled {
        background: #666;
        cursor: not-allowed;
    }

/* Tenants Page */
.tenants-page {
    width: 100%;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

    .page-header h1 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #111;
        margin: 0;
    }

.btn-create {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 0;
    padding: 0.55rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

    .btn-create:hover:not(:disabled) {
        background: #333;
    }

    .btn-create:disabled {
        background: #666;
        cursor: not-allowed;
    }

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

    .filters-row .filters-box {
        display: flex;
        min-width: 50%;
    }

        .filters-row .filters-box div {
            padding: 0 10px;
        }

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

    .search-box .search-icon {
        position: absolute;
        left: 5%;
        top: 50%;
        transform: translateY(-50%);
        color: #9ca3af;
    }

    .search-box input {
        width: 100%;
        padding: 0.55rem 0.75rem 0.55rem 2.25rem;
        border: 1px solid #e5e7eb;
        border-radius: 0;
        font-size: 0.875rem;
        background: #fff;
        box-sizing: border-box;
    }

        .search-box input:focus {
            outline: none;
            border-color: #111;
        }

.tenant-count {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

.table-container {
    background: var(--color-surface-default);
    border: 1px solid var(--color-border-default);
    border-radius: 8px;
}

.table-clip {
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.tenants-table {
    width: 100%;
    border-collapse: collapse;
    /* Non-interactive cells shouldn't show the text (I-beam) cursor;
       .tr-clickable and .sortable-header restore pointer where needed. */
    cursor: default;
}

    .tenants-table thead th {
        text-align: left;
        padding: 0.75rem 1rem;
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--color-table-text-header);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-bottom: 1px solid var(--color-table-border);
        background: var(--color-surface-highlighted);
    }

    .tenants-table tbody td {
        padding: 1.14rem 1rem;
        font-size: 0.875rem;
        color: var(--color-text-primary);
        border-bottom: 1px solid var(--color-table-border);
        vertical-align: middle;
        transition: background-color 0.12s, border-color 0.12s;
    }

    .tenants-table tbody tr:last-child td {
        border-bottom: none;
    }

    .tenants-table tbody tr:hover td {
        background-color: var(--color-table-row-hover);
        border-bottom-color: var(--color-table-border-hover);
    }

    .tenants-table tbody tr.tr-selected td {
        background-color: var(--color-table-row-selected);
        border-bottom-color: var(--color-table-border-selected);
    }

    .tenants-table tbody tr.tr-selected {
        box-shadow: inset 3px 0 0 var(--color-brand-primary);
    }

.tenants-table tbody tr.tr-clickable {
    cursor: pointer;
}

.cell-empty {
    color: var(--color-text-muted, #9ca3af);
    font-size: 0.85rem;
}

.cell-trunc {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Preco em promocao: original riscado + promocional em destaque.
   Global (nao isolado) porque aparece em grids, formularios, PDV e landing. */
.price-original {
    text-decoration: line-through;
    color: var(--color-text-tertiary);
    font-size: var(--text-body-sm-size);
    margin-right: var(--spacing-2);
}

.price-promo {
    color: var(--color-feedback-success);
    font-weight: var(--font-weight-semibold);
    margin-right: var(--spacing-2);
}

.price-current {
    margin-right: var(--spacing-2);
}

/* =============================================
   AVATAR DE COLABORADOR

   Global (nao isolado) porque dois donos renderizam o mesmo avatar: o filtro
   "Filtrar Colaboradores" na pagina da Agenda e o cabecalho das colunas do split
   (AgendaDayView). CSS isolado de pagina nao alcanca o markup de um componente.
   As cores vem inline, do EmployeeColorHelper.
   ============================================= */

.emp-avatars {
    display: flex;
    align-items: center;
    padding-right: 13px;
}

.emp-avatars .emp-avatar {
    margin-right: -10px;
}

.emp-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7.5px;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
    border: 1.5px solid var(--color-surface-default);
}

/* =============================================
   AGENDA CARDS
   Design System BF — file agspqlY2NkbtepY3X30QYO, node 1226:25751.

   Global (nao isolado) porque AgendaDayView, AgendaWeekView e AgendaMonthView
   renderizam o mesmo card. Manter tres copias foi justamente o que deixou o
   layout divergir do design system.

   Nomes de classe e os ids `book-block-{id}` / `book-pill-{id}` sao contrato:
   TenantAgenda.OpenBookPopover ancora o BookDetailPopover por prefixo de id.
   ============================================= */

.book-block,
.month-pill {
    /* Hachura do bloqueio: o Figma usa #9BA336 fixo; derivar da marca mantem a
       coerencia nos seis temas (no limonada resolve para #99A135). */
    --agenda-hatch: color-mix(in srgb, var(--color-border-brand) 70%, black);
}

/* ── Cor do card ──
   As variantes abaixo leem `--card-color` / `--card-border` / `--card-fg` /
   `--card-fg-secondary` SEMPRE com fallback embutido no ponto de uso, e nunca
   como declaracao aqui no `.book-block`: uma declaracao no proprio elemento
   ganha do valor herdado, e a cor injetada pela coluna do split (que e um
   ancestral) nunca chegaria. Com o fallback no `var()`, quem nao esta em split
   cai na marca — o visual da grade mesclada, de Semana, Mes e Programacao.

   Quem injeta e o AgendaDayColumn no split da visao Dia, via
   EmployeeColorHelper.GetCardStyle (Figma 1557:65724). */

.book-block {
    position: absolute;
    z-index: 2;
    display: flex;
    box-sizing: border-box;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    color: var(--color-text-primary);
    /* Container das duration steps abaixo. O padding fica no body de proposito:
       assim a altura consultada e a altura real do card (60/45/30/15min). Um
       `border` de verdade encolheria o content box em 2px e jogaria o card de
       45min no layout de 30min — por isso as bordas sao `inset box-shadow`. */
    container-type: size;
}

.book-block:hover {
    opacity: 0.9;
}

.book-block-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 4px 8px;
    overflow: hidden;
}

/* ── Escala tipografica ── */
.book-block-title {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--color-text-primary);
    overflow: hidden;
    flex-shrink: 0;
}

.book-block-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-block-service,
.book-block-time {
    font-weight: 400;
    line-height: 1.3;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.book-block-service {
    font-size: 11px;
}

.book-block-time {
    font-size: 10px;
}

/* Icone de alerta — Material Symbols `emergency_home`, mesmo glifo exportado
   pelo Figma. A cor muda por variante (ver blocos de variante abaixo). */
.book-block-alert,
.month-pill-alert {
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
    font-variation-settings: "FILL" 1;
}

/* ── Duration steps (variantes `size` do Figma) ──
   >= 45px: nome + servico + horario, alinhado ao topo (60min e 45min)
   30–45px: nome + servico, centralizado verticalmente (30min)
   < 30px:  so o nome, centralizado (15min — o piso Math.Max(h, 28) cai aqui) */
@container (max-height: 44.9px) {
    .book-block-body {
        justify-content: center;
    }

    .book-block-time {
        display: none;
    }
}

@container (max-height: 29.9px) {
    .book-block-service {
        display: none;
    }
}

/* Agendamentos sobrepostos espremem o card. A posicao na grade ja indica o
   horario, entao o horario e a primeira linha a sair. */
@container (max-width: 96px) {
    .book-block-time {
        display: none;
    }
}

/* ── Confirmado / Em andamento ──
   O Figma nao tem variante InProgress; ela reaproveita Confirmed. */
.book-block.status-confirmed,
.book-block.status-inprogress {
    background: var(--card-color, var(--color-brand-primary));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* O card solido e o unico que precisa de texto na cor do card: num fundo navy ou
   verde o `--color-text-primary` some. Fora do split o fallback JA E o
   `--color-text-primary`, entao a grade mesclada nao muda. */
.book-block.status-confirmed .book-block-title,
.book-block.status-inprogress .book-block-title {
    color: var(--card-fg, var(--color-text-primary));
}

.book-block.status-confirmed .book-block-service,
.book-block.status-confirmed .book-block-time,
.book-block.status-inprogress .book-block-service,
.book-block.status-inprogress .book-block-time {
    color: var(--card-fg-secondary, var(--color-text-secondary));
}

.book-block.status-confirmed .book-block-alert,
.book-block.status-inprogress .book-block-alert {
    color: var(--card-fg, var(--color-text-primary));
}

/* ── Agendado — card contornado com barra de destaque solida ── */
.book-block.status-scheduled {
    background: var(--color-input-bg);
    box-shadow: inset 0 0 0 1px var(--card-border, var(--color-border-brand));
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.1));
}

.book-block.status-scheduled .book-block-alert {
    color: var(--card-border, var(--color-border-brand));
}

/* ── Concluido — preenchimento lavado, tipografia mais quieta ──
   O Figma pinta #ECF48A com 20% de branco por cima (#F0F6A1). Como mistura da
   cor do card, acompanha os seis temas e as cores de colaborador do split.
   O texto NAO usa `--card-fg`: o fundo lavado e claro em qualquer cor, entao
   branco seria ilegivel — os tokens de texto abaixo ficam fixos. */
.book-block.status-completed {
    background: color-mix(in srgb, var(--card-color, var(--color-brand-primary)) 50%, white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.book-block.status-completed .book-block-title {
    color: var(--color-text-secondary);
}

.book-block.status-completed .book-block-service,
.book-block.status-completed .book-block-time {
    color: var(--color-text-tertiary);
}

/* ── Bloqueio — mesmo card, barra hachurada ──
   Nao recebe cor de colaborador: bloqueio le como bloqueio em qualquer coluna.
   `--block-sm` vem do C# (altura renderizada < 45px). Um @container nao serve
   aqui: o proprio .book-block e o container, e regras de container query nao
   estilizam o container. */
.book-block--block {
    background: var(--color-button-header-bg-active);
    box-shadow: inset 0 0 0 1px var(--color-border-brand);
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.1));
}

.book-block--block-sm {
    box-shadow: inset 0 0 0 1px var(--color-border-subtle);
}

/* Barra de destaque — 4px na borda esquerda, com o texto deslocado 9px
   (4px da barra + 5px de gap), como no Figma. */
.book-block.status-scheduled .book-block-body,
.book-block--block .book-block-body {
    padding-left: 9px;
}

.book-block.status-scheduled::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background-color: var(--card-border, var(--color-border-brand));
}

.book-block--block::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background-color: var(--color-border-brand);
}

/* Hachura cruzada: linhas a ±45°, passo de 5px na vertical — que da
   5/√2 ≈ 3.54px no eixo perpendicular do gradiente.

   O traco e de 1px, nao os 0.5px do SVG do Figma: a 1x (dpr 1) meio pixel cai
   abaixo da grade de rasterizacao, o antialiasing dissolve a linha na cor de
   base e a barra fica lisa — a hachura sumia justamente nas telas comuns. O
   angulo e o passo seguem o spec; so a espessura foi dobrada para sobreviver. */
.book-block--block::before,
.month-pill--block::before {
    background-image:
        repeating-linear-gradient(45deg, var(--agenda-hatch) 0 1px, transparent 1px 3.54px),
        repeating-linear-gradient(-45deg, var(--agenda-hatch) 0 1px, transparent 1px 3.54px);
}

/* ── Pilulas da visao mensal (variante `MensalView`) ── */
.month-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    box-sizing: border-box;
    height: 15px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    line-height: 15px;
    color: var(--color-text-primary);
    overflow: hidden;
    cursor: pointer;
}

.month-pill:hover {
    opacity: 0.85;
}

.month-pill-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* O texto acompanha `--card-fg` pelo mesmo motivo do card solido da grade: num
   fundo navy ou verde o `--color-text-primary` some. Sem cor de colaborador o
   fallback JA E ele, entao a pilula da marca nao muda. */
.month-pill--confirmed,
.month-pill--inprogress {
    background: var(--card-color, var(--color-brand-primary));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: var(--card-fg, var(--color-text-primary));
}

.month-pill--confirmed .month-pill-alert,
.month-pill--inprogress .month-pill-alert {
    color: var(--card-fg, var(--color-text-primary));
}

.month-pill--scheduled {
    background: var(--color-input-bg);
    box-shadow: inset 0 0 0 1px var(--card-border, var(--color-border-brand));
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.1));
}

.month-pill--scheduled .month-pill-alert {
    color: var(--card-color, var(--color-brand-primary));
}

/* Concluido na mensal nao tem preenchimento: vira ponto + texto apagado, para
   o trabalho ja feito recuar e a celula ser carregada pelo que ainda vem. */
.month-pill--completed {
    gap: 4px;
    padding: 0 9px;
    color: var(--color-text-secondary);
}

.month-pill--completed::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--card-color, var(--color-brand-primary)) 50%, white);
}

/* Sem variante no Figma — a Agenda filtra cancelados antes de renderizar, entao
   isto so sobrevive como fallback. Mantido como estava. */
.month-pill--cancelled {
    background: #9ca3af;
    color: #6b7280;
    text-decoration: line-through;
}

.month-pill--block {
    background: var(--color-button-header-bg-active);
    box-shadow: inset 0 0 0 1px var(--color-border-subtle);
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.1));
    padding-left: 9px;
    pointer-events: none;
}

/* `--card-border` so existe nas pilulas de agendamento: a do Bloqueio nunca recebe
   cor de colaborador e por isso cai no fallback, mesmo compartilhando a regra. */
.month-pill--scheduled::before,
.month-pill--block::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background-color: var(--card-border, var(--color-border-brand));
}

.month-pill--scheduled {
    padding-left: 9px;
}

.month-pill-more {
    font-size: 0.68rem;
    color: var(--color-text-secondary);
    padding: 1px 4px;
    cursor: pointer;
}

.month-pill-more:hover {
    color: var(--color-text-primary);
    text-decoration: underline;
}

/* Expenses — shrink Tipo / Data columns to their content */
.tenants-table th.exp-col-type,
.tenants-table td.exp-col-type,
.tenants-table th.exp-col-date,
.tenants-table td.exp-col-date {
    width: 1%;
    white-space: nowrap;
}

/* Expenses — operational group (collapsible category rollup) rows */
.exp-group-cell {
    white-space: nowrap;
}

.exp-group-chevron {
    font-size: 1.1rem;
    vertical-align: middle;
    margin-right: 0.35rem;
    color: var(--color-text-muted);
    transition: transform 0.15s ease;
}

.exp-group-chevron--open {
    transform: rotate(90deg);
}

.exp-group-name {
    font-weight: 600;
}

.exp-group-count {
    margin-left: 0.4rem;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

.tenants-table tbody tr.exp-child-row td {
    background: var(--color-surface-subtle);
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    font-size: 0.83rem;
    color: var(--color-text-secondary);
}

/* Zebra striping so stacked child rows are easier to scan */
.tenants-table tbody tr.exp-child-row--alt td {
    background: var(--color-surface-default);
}

.tenants-table tbody tr.exp-child-row td.exp-child-name {
    padding-left: 2.5rem;
}

.tenant-name {
    font-weight: 600;
    color: #111;
}

.tenant-subdomain {
    font-size: 0.75rem;
    color: #9ca3af;
}

.domain-link {
    color: #1e4890;
    text-decoration: none;
    transition: color 0.2s;
}

    .domain-link:hover {
        color: #1e4890;
        text-decoration: underline;
    }

.loading-cell {
    text-align: center;
    padding: 2rem 1rem !important;
    color: #9ca3af;
}

/* Plan Badges */
.badge-plan {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
}

.plan-basic {
    background: #f6f7ed;
    color: #374151;
}

.plan-pro {
    background: #f6f7ed;
    color: #374151;
}

.plan-enterprise {
    background: #f6f7ed;
    color: #374151;
}

.badge-plan--basic {
    background: #00804d;
    color: #fff;
}

/* Pagination */
.pagination-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 10px;
}

.page-btn {
    padding: 0.4rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .page-btn:hover:not(:disabled):not(.active) {
        background: #f6f7ed;
    }

    .page-btn.active {
        background: #111;
        color: #fff;
        border-color: #111;
    }

    .page-btn:disabled {
        color: #d1d5db;
        cursor: not-allowed;
    }

/* Tenant CRUD pages: themed pagination */
.dash-root .page-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--color-surface-default);
    color: var(--color-text-secondary);
    border-color: var(--color-button-border);
    font-size: 0.875rem;
    font-weight: 400;
    flex-shrink: 0;
}

    .dash-root .page-btn:hover:not(:disabled):not(.active) {
        background: var(--color-button-secondary-bg-hover);
        border-color: var(--color-button-border-hover);
        color: var(--color-text-primary);
    }

    .dash-root .page-btn.active {
        background: var(--color-button-primary-bg);
        color: var(--color-text-on-brand);
        border-color: var(--color-button-primary-bg);
        font-weight: 600;
        border-width: 0;
    }

    .dash-root .page-btn:disabled {
        background: var(--color-button-secondary-bg-disabled, #fbfded);
        border-color: var(--color-button-border-disabled, #ecf48a);
        color: var(--color-text-disabled);
        cursor: not-allowed;
    }

    .dash-root .page-btn:disabled .page-nav-icon {
        opacity: 0.45;
    }

.page-nav-icon {
    font-size: 18px;
    font-variation-settings: 'opsz' 18, 'wght' 400, 'FILL' 0, 'GRAD' 0;
    line-height: 1;
    display: block;
}

/* Dashboard Page */
.dashboard-page {
    width: 100%;
}

    .dashboard-page h1 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #111;
        margin: 0 0 2rem;
    }

/* Settings Page */
.settings-page {
    width: 100%;
}

    .settings-page h1 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #111;
        margin: 0 0 2rem;
    }

.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
}

.coming-soon-icon {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.coming-soon h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.5rem;
}

.coming-soon-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.coming-soon-label {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: #f6f7ed;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

/* Sidebar Panel */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 900;
    touch-action: none;
}

.sidebar-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 90vw;
    height: 100dvh;
    background: var(--color-surface-default);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 901;
    display: flex;
    flex-direction: column;
    animation: slide-in-right 0.25s ease;
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Cabecalho — Design System BF, no 1532:25830: faixa de 60px, 24px a esquerda
   e 16px a direita (o botao de fechar tem area propria de 32px). */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    height: 60px;
    padding: 0 16px 0 24px;
    border-bottom: 1px solid var(--color-border-default);
}

    .sidebar-header h2 {
        font-size: 16px;
        font-weight: 600;
        color: var(--color-text-primary);
        margin: 0;
    }

.sidebar-close {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

    .sidebar-close:hover {
        background: var(--color-bg-page);
        color: var(--color-text-primary);
    }

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.create-error {
    padding: 0.65rem 0.85rem;
    background: var(--color-feedback-danger-subtle);
    color: var(--color-feedback-danger);
    border: 1px solid var(--color-feedback-danger-subtle);
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 1rem 0;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border-default);
}

.sidebar-footer-header {
    width: 100%;
}

.sidebar-footer-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
}

.sidebar-footer-actions-start,
.sidebar-footer-actions-end {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* O par Cancelar/confirmar do rodape tem 16px de gap e botoes de 40px/15px
   (no 1532:25866), maiores que o `sm` padrao do AppButton. */
.sidebar-footer-actions-end {
    gap: 16px;
}

/* Campos do painel — "Agendamentos/Select-field" (no 1068:18338):
   rotulo de 14px a 6px do campo, 16px entre campos. */
.sidebar-panel .form-group {
    margin-bottom: 16px;
}

    .sidebar-panel .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }

/* Form Section Dividers (inside sidebar panels) */
.form-section {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.25rem 0 1rem;
}

.form-section-hr {
    flex: 1;
    border: none;
    border-top: 1px solid var(--color-border-subtle);
    margin: 0;
}

.form-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-text-tertiary);
    white-space: nowrap;
}

/* Two-column form row */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Read-only form control */
.form-control-readonly {
    background: var(--color-input-bg-disabled) !important;
    color: var(--color-text-tertiary) !important;
    cursor: default;
}

/* Custom filter select */
.filter-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

    .filter-select-wrapper::after {
        content: '';
        position: absolute;
        right: 0.6rem;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        width: 14px;
        height: 14px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: contain;
    }

.filter-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.55rem 2rem 0.55rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    font-size: 0.875rem;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #374151;
    background: #fff;
    min-width: 140px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

    .filter-select:focus {
        outline: none;
        border-color: #111;
    }

/* Tenant ID cell */
.tenant-id-cell {
    font-size: 0.75rem;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Sortable Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.15s;
}

    .sortable-header:hover {
        color: var(--color-text-heading);
    }

.sort-icon {
    font-size: 1rem;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
    margin-left: 0.25rem;
    color: var(--color-text-heading);
    vertical-align: middle;
    line-height: 1;
    user-select: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.btn-action {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-edit {
    color: #6b7280;
}

    .btn-edit:hover {
        background: var(--color-bg-page);
        border-color: var(--color-brand-primary);
        color: var(--color-text-primary);
    }

.btn-deactivate {
    color: var(--color-feedback-danger);
    border-radius: 8px;
}

    .btn-deactivate:hover:not(:disabled) {
        background: var(--color-feedback-danger-subtle);
        border-color: var(--color-feedback-danger);
    }

    .btn-deactivate:disabled {
        color: #d1d5db;
        cursor: not-allowed;
    }

.btn-delete {
    color: var(--color-feedback-danger);
    border-radius: 8px;
}

    .btn-delete:hover {
        background: var(--color-feedback-danger-subtle);
        border-color: var(--color-feedback-danger);
    }


.text-muted {
    color: #d1d5db;
    font-size: 0.85rem;
}

/* Confirmation Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    z-index: 1050;
    background: rgba(0, 0, 0, 0.4);
}

.modal-dialog {
    background: var(--color-surface-default);
    border-radius: 8px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

    .modal-dialog h3 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--color-text-primary);
        margin: 0 0 0.75rem;
    }

    .modal-dialog p {
        font-size: 0.9rem;
        color: var(--color-text-secondary);
        margin: 0 0 1.5rem;
        line-height: 1.5;
    }

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}


/* Landing Page */
.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.landing-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.landing-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.logo-icon-lg {
    width: 52px;
    height: 52px;
}

.logo-name-lg {
    font-size: 1.35rem;
}

.landing-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.landing-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 2rem;
}

.landing-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-landing-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 2rem;
    background: #111;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    transition: background-color 0.2s;
}

    .btn-landing-primary:hover {
        background: #333;
        color: #fff;
    }

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    margin-bottom: 3rem;
}

.landing-feature {
    text-align: center;
    padding: 1.5rem 1rem;
    border: 1px solid #dde0d5;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: #f6f7ed;
    border-radius: 10px;
    margin: 0 auto 1rem;
    color: #111;
}

.landing-feature h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 0.5rem;
}

.landing-feature p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.landing-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
}

@media (max-width: 640px) {
    .landing-title {
        font-size: 1.5rem;
    }

    .landing-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Dashboard skeleton shimmer animation */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Dashboard reload spinner */
@keyframes dash-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Agenda view switcher (in sidebar between "Criar agendamento" and mini-cal) */
/* Employee form — "Função" segmented selector */
.employee-role-seg {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--color-border-default);
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-bg-page);
    height: 40px;
}

.employee-role-seg-btn {
    flex: 1;
    background: none;
    border: none;
    border-right: 1px solid var(--color-border-default);
    padding: 0 13px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--color-text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

    .employee-role-seg-btn:last-child {
        border-right: none;
    }

    .employee-role-seg-btn:not(:disabled):hover {
        background: var(--color-brand-primary-hover);
        color: var(--color-text-on-brand);
    }

.employee-role-seg-btn--active {
    background: var(--color-brand-primary);
    color: var(--color-text-on-brand);
    font-weight: 600;
}

.employee-role-seg-btn:disabled {
    cursor: default;
}

    .employee-role-seg-btn:disabled:not(.employee-role-seg-btn--active) {
        color: var(--color-text-tertiary);
    }

/* =============================================
   Filter toolbar (Tenant CRUD pages)
   ============================================= */

.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.filter-fields {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.filter-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    width: 220px;
    border: 1px solid var(--color-border-default);
    border-radius: 8px;
    background: var(--color-input-bg);
    padding: 0 0.65rem;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

    .filter-input-wrapper:focus-within {
        border-color: var(--color-input-border-focus);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-focus) 20%, transparent);
    }

.filter-input-wrapper--phone {
    width: 190px;
}

.filter-search-icon {
    font-size: 20px;
    color: var(--color-input-placeholder);
    font-variation-settings: 'opsz' 20, 'wght' 400, 'FILL' 0, 'GRAD' 0;
    flex-shrink: 0;
    user-select: none;
}

.filter-input {
    flex: 1;
    min-width: 0;
    padding: 0.48rem 0;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--color-text-primary);
    outline: none;
}

/* Tenant area: rounded action buttons + material icon sizing */
.dash-root .btn-action {
    border-radius: 8px;
}

.grid-icon {
    font-size: 16px;
    font-variation-settings: 'opsz' 16, 'wght' 400, 'FILL' 0, 'GRAD' 0;
    line-height: 1;
    display: block;
    padding: 2px 0;
}

/* ── Custom select dropdown (.abf-sel-*) — global, used in forms + filter toolbars ── */
.abf-sel-wrapper {
    width: 100%;
    position: relative;
}

.abf-sel-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 38px;
    padding: 0 10px 0 12px;
    background: var(--color-input-bg);
    border: 1px solid var(--color-input-border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-input-text);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .abf-sel-trigger:hover {
        border-color: var(--color-brand-secondary);
    }

    .abf-sel-trigger:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        background: var(--color-input-bg-disabled);
    }

.form-control:disabled {
    background: var(--color-input-bg-disabled);
    opacity: 0.6;
    cursor: not-allowed;
}

.abf-sel-trigger--open {
    border-color: var(--color-input-border-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-focus) 20%, transparent);
}

.abf-sel-trigger--error {
    border-color: var(--color-input-border-error);
}

.abf-sel-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.abf-sel-placeholder {
    color: var(--color-input-placeholder);
    transition: opacity 0.2s ease;
}

.abf-sel-trigger--open .abf-sel-placeholder {
    opacity: 0.4;
}

.abf-sel-chevron {
    font-size: 18px;
    color: var(--color-text-secondary);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.abf-sel-trigger--open .abf-sel-chevron {
    transform: rotate(180deg);
}

.abf-sel-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    z-index: 200;
    background: var(--color-surface-default);
    border: 1px solid var(--color-border-default);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    padding: 4px 0;
    max-height: 220px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.abf-sel-options {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.abf-sel-options::-webkit-scrollbar {
    width: 4px;
}

.abf-sel-options::-webkit-scrollbar-track {
    background: transparent;
}

.abf-sel-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.abf-sel-option {
    display: block;
    width: 100%;
    padding: 9px 16px;
    background: none;
    border: none;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background 0.1s;
}

    .abf-sel-option:hover {
        background: var(--color-bg-page);
    }

.abf-sel-option--active {
    color: var(--color-brand-active);
    font-weight: 600;
}

.abf-sel-option--disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

    .abf-sel-option--disabled:hover {
        background: none;
    }

.abf-sel-loading {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--color-text-tertiary);
    text-align: center;
}

/* Customer option row: name + phone. Shared by AgendaBookForm and SaleForm customer pickers. */
.abf-cust-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.abf-cust-option-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.abf-cust-option-phone {
    font-size: 12px;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Inline search input that replaces the trigger button when a searchable dropdown is open */
.abf-search-trigger {
    display: block;
    width: 100%;
    height: 38px;
    padding: 0 10px 0 12px;
    background: var(--color-input-bg);
    border: 1px solid var(--color-input-border-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-focus) 20%, transparent);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--color-input-text);
    outline: none;
    box-sizing: border-box;
}

    .abf-search-trigger.abf-sel-trigger--error {
        border-color: var(--color-input-border-error);
        box-shadow: none;
    }

    .abf-search-trigger::placeholder {
        color: var(--color-input-placeholder);
    }

/* Search box inside dropdown panel */
.abf-search-box {
    padding: 6px 10px;
    border-bottom: 1px solid var(--color-border-default);
    background: var(--color-surface-default);
    flex-shrink: 0;
}

.abf-search-input {
    width: 100%;
    border: 1px solid var(--color-border-default);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--color-input-text);
    outline: none;
    background: var(--color-bg-page);
}

    .abf-search-input:focus {
        border-color: var(--color-input-border-focus);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-input-border-focus) 20%, transparent);
    }

/* =============================================
   FilterSearchInput component (.fsi-*)
   ============================================= */

.fsi-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-input-border);
    border-radius: 8px;
    background: var(--color-input-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    width: 220px;
}

    .fsi-wrapper:focus-within {
        border-color: var(--color-input-border-focus);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-focus) 20%, transparent);
    }

.fsi-icon {
    font-size: 16px;
    line-height: 1;
    color: var(--color-input-placeholder);
    font-variation-settings: 'opsz' 16, 'wght' 400, 'FILL' 0, 'GRAD' 0;
    flex-shrink: 0;
    user-select: none;
}

/* Collapsible variant: renders as a button until clicked, then expands into the input */
.fsi-collapsed {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 10px;
    background: var(--color-input-bg);
    border: 1px solid var(--color-input-border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s;
}

    .fsi-collapsed:hover {
        border-color: var(--color-brand-secondary);
    }

.fsi-collapsed--active {
    background: var(--color-table-row-default);
    border-color: var(--color-input-border-focus);
    color: var(--color-input-text);
}

    .fsi-collapsed--active .fsi-icon {
        color: var(--color-input-text);
    }

.fsi-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--color-input-text);
    outline: none;
}

    .fsi-input::placeholder {
        color: var(--color-input-placeholder);
    }

/* =============================================
   FilterDropdown component (.fsd-*)
   ============================================= */

.fsd-outer {
    position: relative;
}

.fsd-outer[style*="width:100%"] .fsd-trigger,
.fsd-outer[style*="width: 100%"] .fsd-trigger {
    width: 100%;
}

.fsd-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 10px;
    background: var(--color-input-bg);
    border: 1px solid var(--color-input-border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--color-input-text);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    box-sizing: border-box;
}

    .fsd-trigger:hover {
        border-color: var(--color-brand-secondary);
    }

.fsd-trigger--open {
    border-color: var(--color-input-border-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-input-border-focus) 20%, transparent);
}

/* Has at least one selection */
.fsd-trigger--active {
    background: var(--color-table-row-default);
    border-color: var(--color-input-border-focus);
}

.fsd-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 15px;
    height: 15px;
    padding: 0 5px;
    border-radius: 8px;
    background: var(--color-brand-primary);
    color: var(--color-text-on-brand);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
}

.fsd-icon {
    font-size: 16px;
    line-height: 1;
    color: var(--color-text-secondary);
    font-variation-settings: 'opsz' 16, 'wght' 400, 'FILL' 0, 'GRAD' 0;
    flex-shrink: 0;
}

.fsd-chevron {
    font-size: 16px;
    line-height: 1;
    color: var(--color-text-secondary);
    font-variation-settings: 'opsz' 16, 'wght' 400, 'FILL' 0, 'GRAD' 0;
    flex-shrink: 0;
    margin-left: auto;
    transition: transform 0.15s;
}

.fsd-trigger--open .fsd-chevron {
    transform: rotate(180deg);
}

.fsd-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: var(--color-surface-default);
    border: 1px solid var(--color-border-default);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 200;
    padding: 4px 0;
    overflow: hidden;
}

.fsd-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}

/* Multi-select option row (checkbox / avatar + label) */
.fsd-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    background: none;
    border: none;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--color-input-text);
    cursor: pointer;
    transition: background 0.1s;
}

    .fsd-opt:hover {
        background: var(--color-bg-page);
    }

.fsd-opt--selected {
    background: var(--color-bg-page);
    font-weight: 500;
}

.fsd-opt-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fsd-opt-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 3px;
    border: 1px solid var(--color-input-border);
    background: var(--color-input-bg);
    flex-shrink: 0;
}

.fsd-opt-check--on {
    background: var(--color-brand-primary);
    border-color: var(--color-brand-primary);
}

    .fsd-opt-check .material-symbols-outlined {
        font-size: 11px;
        line-height: 1;
        color: var(--color-text-on-brand);
        font-variation-settings: 'opsz' 11, 'wght' 600, 'FILL' 0, 'GRAD' 0;
    }

.fsd-opt-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid var(--color-avatar-bg-1);
    background: transparent;
    color: var(--color-text-primary);
    font-size: 8px;
    font-weight: 500;
    line-height: 1;
    flex-shrink: 0;
}

.fsd-opt-avatar--on {
    background: var(--color-avatar-bg-1);
    color: var(--color-text-on-brand);
}

    .fsd-opt-avatar .material-symbols-outlined {
        font-size: 14px;
        line-height: 1;
        color: var(--color-text-on-brand);
        font-variation-settings: 'opsz' 14, 'wght' 600, 'FILL' 0, 'GRAD' 0;
    }


/* ThumbnailUpload */
.thumbnail-upload {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
    width: 100%;
}

.thumbnail-placeholder {
    width: 100%;
    height: 132px;
    background: var(--color-surface-default);
    border: 1px dashed var(--color-border-default);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-1);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s;
}
.thumbnail-placeholder:hover {
    border-color: var(--color-brand-active);
}
.thumbnail-placeholder .material-symbols-outlined {
    color: var(--color-text-muted);
}
.thumbnail-placeholder-cta {
    font-size: 0.8125rem;
    color: var(--color-brand-active);
    text-decoration: underline;
}
.thumbnail-placeholder-hint {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
}

.thumbnail-filled {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-8);
    width: 100%;
}
.thumbnail-filled-preview {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-2);
    width: 150px;
    flex-shrink: 0;
}
.thumbnail-filled-preview img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.thumbnail-filename {
    display: block;
    max-width: 100%;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.thumbnail-filled-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--spacing-4);
    height: 100px;
    flex-shrink: 0;
}
.thumbnail-action {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-1);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: underline;
    color: var(--color-brand-active);
    white-space: nowrap;
}
.thumbnail-action .material-symbols-outlined {
    font-size: 18px;
}
.thumbnail-action--danger {
    color: var(--color-feedback-danger-text);
}

/* ══════════════════════════════════════════════════════════════════════════
   Barra de período + sidebar do Agenda — compartilhados com o Caixa Diário
   ══════════════════════════════════════════════════════════════════════════
   Figma "Design System BF": toolbar nós 1492:14450 / 1402:26774, sidebar nó
   1380:10219, tela do Caixa nó 1693:62748. Duas páginas renderizam a mesma
   barra e a mesma sidebar, então as regras visuais moram aqui — CSS isolado de
   página não alcança o markup da outra, e duplicar é como os cards da grade
   divergiram do spec. O que continua em cada página é só o POSICIONAMENTO
   (grid-column / grid-row), próprio do layout de cada tela. */

.agenda-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 32px;
    margin-bottom: 16px;
}

.agenda-tb-group {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.agenda-tb-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

/* Pílula contornada (Hoje / seletor de visão) */
.agenda-tb-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 16px;
    background: transparent;
    border: 1.5px solid var(--color-text-primary);
    border-radius: 9999px;
    color: var(--color-text-primary);
    font-family: var(--font-family-base);
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}

.agenda-tb-pill:hover {
    background: var(--color-button-header-bg-active);
}

/* Botão redondo de ícone (setas de período, busca, configurações) */
.agenda-tb-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 7px;
    min-width: 32px;
    background: var(--color-button-header-bg-active);
    border: none;
    border-radius: 9999px;
    color: var(--color-button-header-icon-active);
    cursor: pointer;
    transition: background 0.15s;
}

.agenda-tb-icon-btn:hover:not(:disabled) {
    background: var(--color-brand-primary);
}

.agenda-tb-icon {
    font-size: 18px;
    font-variation-settings: 'opsz' 18, 'wght' 400, 'FILL' 0, 'GRAD' 0;
    line-height: 1;
    display: block;
}

/* A caixa do ícone já está centrada no botão (span de 18px, 7px de folga dos dois
   lados) — quem está torto é o desenho dentro da fonte. Medido em captura a 8x:
   `arrow_forward_ios` caía 1.1px à esquerda do centro, contra 0.3px do
   `arrow_back_ios_new`. O empurrão vai no ícone e não no padding do botão, que
   deslocaria os dois lados. Só vale para este glifo neste tamanho/instância. */
.agenda-tb-icon--fwd {
    transform: translateX(1px);
}

.agenda-tb-label {
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Sidebar (cartão branco: criar + mini-calendário + filtro de colaboradores) ── */
.agenda-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--color-surface-default);
    border: 1px solid var(--color-border-default);
    border-radius: 12px;
    overflow: hidden;
    align-self: start;
}

/* Texto SOBRE a cor de marca — aqui --color-text-on-brand é o token certo. */
.btn-create-booking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    height: 40px;
    margin: 16px 16px 8px;
    padding: 0 16px;
    background: var(--color-brand-primary);
    color: var(--color-text-on-brand);
    border: none;
    border-radius: 8px;
    font-family: var(--font-family-base);
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-create-booking:hover {
    background: var(--color-brand-primary-hover);
}

.btn-create-icon {
    font-size: 20px;
    font-variation-settings: 'opsz' 20, 'wght' 400, 'FILL' 0, 'GRAD' 0;
    line-height: 1;
}

/* ── Filtro de colaboradores ── */
.agenda-emp-section {
    border-top: 1px solid var(--color-border-default);
    padding: 8px 0 4px;
}

.agenda-emp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 16px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.agenda-emp-header:hover {
    color: var(--color-text-primary);
}

.agenda-emp-chevron {
    font-size: 18px;
    color: var(--color-text-tertiary);
    transition: color 0.15s;
}

.agenda-emp-header:hover .agenda-emp-chevron {
    color: var(--color-text-primary);
}

.agenda-emp-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px 4px;
}

.agenda-emp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    font-size: 14px;
    color: var(--color-text-primary);
    background: none;
    border: none;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-family-base);
    width: 100%;
    opacity: 0.6;
}

.agenda-emp-item:hover {
    background: var(--color-surface-subtle);
    opacity: 1;
}

.agenda-emp-item--active {
    background: var(--color-sidebar-item-active-bg);
    border-radius: 8px;
    opacity: 1;
}

.agenda-emp-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Check do item marcado — Figma nó 1557:63127. Só existe no item selecionado; o
   estado não-marcado já é o `opacity: 0.6` do `.agenda-emp-item`. */
.agenda-emp-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-feedback-success);
    color: var(--color-text-inverse);
    font-size: 12px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Cartão de KPI — Dashboard e Caixa Diário
   ══════════════════════════════════════════════════════════════════════════
   Figma "Design System BF" nó 1690:54205, instanciado nas duas telas. A cor de
   destaque entra por `--kpi-accent`; o par ícone/fundo vai inline no
   `.kpi-icon-badge`, porque são as variáveis `color/indicator/*` do Figma e não
   têm equivalente em tokens.css. */
.kpi-row--flat {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.kpi-card {
    background: var(--color-surface-default);
    border-radius: 12px;
    border-left: 4px solid var(--kpi-accent, var(--color-brand-primary));
    box-shadow: var(--shadow-xs);
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.kpi-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    justify-content: space-between;
}

.kpi-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon {
    font-size: 18px !important;
    font-variation-settings: 'opsz' 20, 'wght' 400, 'FILL' 1, 'GRAD' 0;
    line-height: 1;
    color: inherit;
}

.kpi-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1;
}

.kpi-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* Os pontos de quebra do grid ficam em cada pagina: o Dashboard corta em 900px,
   o Caixa em 1024px. */
