/* ===== Cílios — componentes e telas. Cores, fontes e raios: veja tema.css ===== */
*, *::before, *::after {
    box-sizing: border-box;
}



a { color: var(--deep); }
h1, h2, h3, h4 { color: var(--deep); }
:focus-visible { outline: 2px solid var(--deep); outline-offset: 2px; }
.navbar-dark .navbar-nav .nav-link { color: rgba(255, 255, 255, 0.88); }
.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus { color: #fff; }

body {
    background: var(--cream);
    font-family: var(--font-body);
    color: var(--ink);
    overflow-x: hidden;
}

h1, h2, h3, h4, .fs-4 {
    font-family: var(--font-display);
}

/* ---------- navbar ---------- */
/* ---------- navbar ---------- */
.navbar.bg-dark {
    background: var(--deep) !important;
}
.navbar-brand {
    font-family: var(--font-display);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-crown { width: 22px; height: auto; object-fit: contain; display: inline-block; vertical-align: middle; }

/* ---------- Home ---------- */

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 26px;
}
.home-eyebrow {
    color: var(--rose-400);
    font-size: 0.76rem;
    margin: 0;
    font-weight: 600;
}
.home-greeting {
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: var(--rose-700);
    margin: 2px 0 0;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}
.action-tile {
    background: var(--paper);
    border-radius: var(--r-lg);
    box-shadow: var(--card-shadow);
    padding: 18px 16px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.action-tile:hover { }
.action-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--rose-600);
}
.action-icon svg { width: 18px; height: 18px; }
.action-label { font-weight: 600; font-size: 0.9rem; color: var(--ink); }

.action-tile.primary { background: var(--brand); }
.action-tile.primary .action-icon { background: rgba(58, 44, 43, 0.10); color: var(--on-brand); }
.action-tile.primary .action-label { color: var(--on-brand); }

.home-empty {
    text-align: center;
    color: var(--ink-soft);
    padding: 30px 0;
}
.home-empty svg { width: 34px; height: 34px; color: var(--rose-300); margin-bottom: 8px; }
.home-empty p { margin: 0; font-size: 0.9rem; }

/* ---------- botões e componentes bootstrap sobrescritos ---------- */
.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
    font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-strong);
    border-color: var(--brand-strong);
    color: #fff;
}
.btn-outline-secondary { color: var(--rose-600); border-color: var(--rose-300); }
.btn-outline-secondary:hover { background-color: var(--rose-500); border-color: var(--rose-500); }
.btn-outline-success { color: var(--rose-700); border-color: var(--rose-300); }
.btn-outline-success:hover { background-color: var(--rose-600); border-color: var(--rose-600); }
.text-bg-success { background-color: var(--rose-600) !important; }
.text-bg-primary { background-color: var(--rose-700) !important; }
.text-bg-warning { background-color: var(--gold) !important; color: #fff !important; }
.card { border-radius: var(--r-lg); border: none; box-shadow: var(--card-shadow); }
.badge { color: #fff; font-size: 0.85rem; }
.table td, .table th { vertical-align: middle; }

/* ===================================================================
   Telas customizadas (login, calendário, agenda do dia) — sem bootstrap
   =================================================================== */

.beauty-shell {
    max-width: 430px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    min-height: 100vh;
}

/* ---------- Login ---------- */

.auth-crown { text-align: center; margin-bottom: 4px; }
.auth-crown img { width: 54px; height: auto; object-fit: contain; }

.brand-name {
    text-align: center;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 1.5rem;
    color: var(--deep);
    margin: 4px 0 0;
}

.brand-script {
    text-align: center;
    font-family: 'Alex Brush', cursive;
    font-size: 2.1rem;
    color: var(--brand-strong);
    margin: -6px 0 18px;
}

.brand-divider { border: none; border-top: 1px solid var(--rose-200); width: 70%; margin: 0 auto 32px; }

.login-box { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--card-shadow); padding: 28px 24px 32px; text-align: center; }
.login-box h2 { font-family: var(--font-display); color: var(--deep); font-size: 1.15rem; margin-bottom: 22px; }

.input-pill {
    width: 100%;
    background: var(--rose-50);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 13px 20px;
    margin-bottom: 14px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease;
}
.input-pill::placeholder { color: var(--rose-400); }
.input-pill:focus { border-color: var(--rose-300); background: var(--paper); }

.btn-pill {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 13px 20px;
    margin-top: 6px;
    background: var(--brand);
    color: var(--on-brand);
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
}
.btn-pill:hover { filter: brightness(1.04); }

.auth-error { color: var(--rose-700); background: var(--rose-50); border-radius: var(--r-md); padding: 10px 14px; font-size: 0.85rem; margin-bottom: 14px; }

.offline-banner {
    display: none;
    background: var(--gold);
    color: #fff;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.offline-banner.show { display: block; }

/* ---------- Agenda / Calendário / Dia ---------- */

.agenda-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.voltar-link { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.voltar-link:hover { color: var(--deep); text-decoration: underline; }

.avatar-wrap { position: relative; width: 44px; height: 44px; }
.avatar-crown { position: absolute; top: -12px; right: -8px; transform: rotate(12deg); }
.avatar-crown img { width: 26px; height: auto; object-fit: contain; }
.avatar-circle {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--brand); color: var(--on-brand);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
}

.agenda-title { font-family: var(--font-display); font-weight: 700; color: var(--deep); font-size: 1.1rem; margin: 0 0 14px; }

/* ---- calendário (painel do mês e escolha de data na página pública) ---- */
.calendar-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px 12px 12px;
    margin-bottom: 22px;
}

.cal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 6px 16px; }
.cal-ym { margin: 0; font-size: 0.82rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cal-month {
    margin: 2px 0 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.1rem, 10vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.035em;
    color: var(--deep);
}
.cal-arrows { display: flex; gap: 6px; flex-shrink: 0; }
.cal-arrows .nav-arrow {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--paper); color: var(--deep);
    font-size: 1.3rem; line-height: 1; padding: 0;
}
.cal-arrows .nav-arrow:hover { background: var(--cream); }
.cal-arrows .nav-arrow.disabled { color: var(--mute); background: transparent; }

.calendar-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.nav-arrow { border: none; background: none; color: var(--deep); font-size: 1.2rem; cursor: pointer; padding: 4px 8px; text-decoration: none; }
.nav-arrow.disabled { color: var(--mute); cursor: default; }

/* salto direto para outro mês/ano */
.cal-jump { margin: 0 6px 12px; font-size: 0.85rem; }
.cal-jump summary { cursor: pointer; color: var(--deep); font-weight: 600; list-style: none; width: fit-content; }
.cal-jump summary::-webkit-details-marker { display: none; }
.cal-jump summary::after { content: " \25BE"; }
.cal-jump form { display: flex; gap: 8px; margin-top: 8px; }
.cal-jump select {
    border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px;
    font-family: var(--font-body); font-weight: 600; color: var(--deep); background: var(--cream);
}

.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; text-align: center; }

/* a primeira linha vira uma pílula contínua */
.weekday {
    background: var(--deep); color: var(--cream);
    font-size: 0.78rem; font-weight: 600; padding: 9px 0;
    margin-bottom: 6px;
}
.weekday:nth-child(7n+1) { border-radius: 999px 0 0 999px; }
.weekday:nth-child(7n) { border-radius: 0 999px 999px 0; }
.weekday:nth-child(n+8) { display: none; }

.day {
    position: relative;
    width: min(40px, 100%); height: 40px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-md);
    font-size: 0.98rem; font-weight: 500; font-variant-numeric: tabular-nums;
    color: var(--ink); text-decoration: none;
}
a.day:hover { background: var(--cream); }
.day.muted, .day.off { color: var(--mute); }

/* painel: dia com agendamento ganha um ponto; hoje ganha o quadrado da cor principal */
.day.has-appt::after {
    content: ""; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
    width: 5px; height: 5px; border-radius: 50%; background: var(--brand-strong);
}
.day.today { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.day.today.has-appt::after { background: var(--on-brand); }

/* página pública: dias com horário livre */
.day.free { background: var(--brand-soft); color: var(--deep); font-weight: 700; }
a.day.free:hover { background: var(--brand); color: var(--on-brand); }

.day:focus-visible, .nav-arrow:focus-visible, .tl-item:focus-visible, .cal-jump summary:focus-visible {
    outline: 2px solid var(--deep); outline-offset: 2px;
}

/* ---- dia: linha do tempo compacta ---- */
.agenda-date-row { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 12px; gap: 12px; }
.agenda-date-row h2 { font-family: var(--font-display); font-weight: 800; color: var(--deep); font-size: 1.7rem; letter-spacing: -0.03em; margin: 0; }
.agenda-date-row span { color: var(--ink-soft); font-size: 0.88rem; font-weight: 500; }

.tl { border-top: 1px solid var(--line); }
.tl-item { display: block; border-bottom: 1px solid var(--line); padding: 14px 2px; cursor: pointer; }
.tl-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.tl-time { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--deep); font-variant-numeric: tabular-nums; line-height: 1.2; }
.tl-time small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.74rem; color: var(--ink-soft); margin-top: 2px; }
.tl-main { border-left: 4px solid var(--svc, var(--brand)); padding-left: 12px; min-width: 0; }
.tl-cliente { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.tl-servico { font-size: 0.86rem; color: var(--ink-soft); margin-top: 1px; }
.tl-valor { text-align: right; font-size: 0.88rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-done { display: block; margin-top: 3px; font-size: 0.74rem; font-weight: 600; color: var(--ok); }
.tl-item.cancelled { cursor: default; }
.tl-item.cancelled .tl-main { border-left-color: var(--mute); }
.tl-item.cancelled .tl-time, .tl-item.cancelled .tl-cliente, .tl-item.cancelled .tl-valor { color: var(--ink-soft); }
.tl-item.cancelled .tl-cliente { text-decoration: line-through; }

.tl-detail-wrapper { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.22s ease; }
.tl-item.open .tl-detail-wrapper { grid-template-rows: 1fr; }
.tl-detail-inner { overflow: hidden; }
.tl-detail {
    margin: 12px 0 0 68px; padding-top: 10px; border-top: 1px dashed var(--line-strong);
    font-size: 0.86rem; color: var(--ink-soft);
    display: flex; flex-direction: column; gap: 6px;
}
.tl-detail a { color: var(--brand-strong); font-weight: 600; text-decoration: none; }
.tl-detail a:hover { text-decoration: underline; }
.tl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 4px; }
.tl-item.cancelled .tl-actions { margin: 8px 0 0 68px; }

@media (prefers-reduced-motion: reduce) {
    .tl-detail-wrapper { transition: none; }
}

/* ---- resumo do mês: linhas simples, sem cartões ---- */
.agenda-list { border-top: 1px solid var(--line); }
.agenda-list-item { border-bottom: 1px solid var(--line); padding: 12px 2px; cursor: pointer; }
.agenda-list-summary { display: flex; justify-content: space-between; align-items: center; color: var(--ink); font-weight: 600; font-size: 0.92rem; }
.agenda-list-summary .chevron { transition: transform 0.15s ease; color: var(--ink-soft); }
.agenda-list-item.open .chevron { transform: rotate(180deg); }
.agenda-list-detail { display: none; margin-top: 8px; }
.agenda-list-item.open .agenda-list-detail { display: block; }
.agenda-list-detail-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.86rem; color: var(--ink-soft); padding: 4px 0; }
.agenda-list-detail-row a { color: var(--brand-strong); font-weight: 600; text-decoration: none; }

.agenda-empty { color: var(--ink-soft); font-size: 0.92rem; padding: 18px 0; }

.section-label { color: var(--ink-soft); font-size: 0.86rem; font-weight: 600; margin: 24px 0 10px; }

/* ---------- botões de ícone (tabelas) ---------- */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--r-md);
    background: var(--rose-50);
    color: var(--rose-600);
    text-decoration: none;
    margin-right: 4px;
    transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--rose-100); color: var(--rose-700); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { background: var(--danger-soft); }


/* ---------- Foto de perfil (avatar real, sem a coroinha) ---------- */
.avatar-wrap { text-decoration: none; }
.avatar-circle.avatar-photo {
    object-fit: cover;
    display: block;
}

/* ---------- Tela de Conta ---------- */
.conta-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--card-shadow);
}
.conta-avatar-inicial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: var(--on-brand);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.4rem;
}

/* ---------- Home: ação principal em destaque ---------- */
.home-primary-action {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--brand);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    color: var(--on-brand);
    text-decoration: none;
    margin-bottom: 14px;
    transition: transform 0.15s ease;
}
.home-primary-action:hover { color: var(--on-brand); }
.home-primary-action .icon-circle {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(58, 44, 43, 0.10);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.home-primary-action .texts { display: flex; flex-direction: column; gap: 2px; }
.home-primary-action .texts strong { font-family: var(--font-display); font-size: 1.05rem; }
.home-primary-action .texts span { font-size: 0.78rem; opacity: 0.9; }

/* ---------- Home: chips de ações secundárias ---------- */
.home-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}
.home-chip {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 108px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper);
    border: 1px solid var(--rose-100);
    border-radius: 999px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 500;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.home-chip:hover { border-color: var(--rose-300); color: var(--ink); }
.home-chip svg { width: 16px; height: 16px; color: var(--rose-500); }

/* ---------- Home: estado vazio mais acolhedor ---------- */
.home-empty-warm {
    text-align: center;
    padding: 34px 20px;
    background: var(--rose-50);
    border-radius: var(--r-lg);
    margin-top: 4px;
}
.home-empty-warm .script {
    font-family: 'Alex Brush', cursive;
    font-size: 1.8rem;
    color: var(--rose-500);
    display: block;
    margin-bottom: 2px;
}
.home-empty-warm p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }

/* ---------- Formulários (Novo Agendamento, etc.) ---------- */
.form-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--paper);
    border-radius: var(--r-lg);
    box-shadow: var(--card-shadow);
    padding: 28px 26px 32px;
}
.form-card h1 { font-size: 1.4rem; margin-bottom: 6px; }
.form-hint {
    font-size: 0.82rem;
    color: var(--ink-soft);
    background: var(--rose-50);
    border-radius: var(--r-md);
    padding: 10px 14px;
    margin-bottom: 24px;
}

.field-group { margin-bottom: 16px; }
.field-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--rose-500);
    margin-bottom: 6px;
}
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.field-row .field-group { min-width: 0; }
.field-row .input-pill {
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
    text-align: left;
    padding-left: 16px;
    padding-right: 12px;
}
.select-pill {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23BC7A91' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 42px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--ink);
    margin: 6px 0 26px;
    cursor: pointer;
}
.toggle-input { display: none; }
.toggle-track {
    width: 40px; height: 22px;
    background: var(--rose-100);
    border-radius: 999px;
    position: relative;
    transition: background 0.15s ease;
    flex-shrink: 0;
}
.toggle-thumb {
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: var(--paper);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.15s ease;
}
.toggle-input:checked + .toggle-track { background: var(--rose-500); }
.toggle-input:checked + .toggle-track .toggle-thumb { transform: translateX(18px); }

.form-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-pill-ghost {
    width: 100%;
    text-align: center;
    border: 1px solid var(--rose-200);
    border-radius: 999px;
    padding: 12px 20px;
    color: var(--rose-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}
.btn-pill-ghost:hover { background: var(--rose-50); color: var(--rose-700); }

/* ---------- Menu hambúrguer (mobile) ---------- */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
    box-shadow: none !important;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h18M3 12h18M3 18h18'/%3E%3C/svg%3E");
}

@media (max-width: 767.98px) {
    .navbar-collapse {
        margin-top: 12px;
        padding: 8px 4px 4px;
        border-top: 1px solid rgba(255,255,255,0.18);
    }
    .navbar-nav .nav-link {
        padding: 10px 4px;
    }
}

/* ---------- Cabeçalho de listas (Agendamentos, Serviços) ---------- */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.list-header h1 { margin: 0; }
.list-header .btn-primary {
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .list-header {
        flex-direction: column;
        align-items: stretch;
    }
    .list-header .btn-primary { width: 100%; text-align: center; }
}

/* ---------- Upload de foto (tela Conta) ---------- */
.form-hint-plain { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 24px; }

.avatar-upload { position: relative; width: 110px; height: 110px; margin: 0 auto 6px; }
.avatar-upload-preview {
    width: 110px; height: 110px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}
.avatar-upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-upload-initial {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand);
    color: var(--on-brand);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.6rem;
}
.avatar-upload-btn {
    position: absolute;
    bottom: 0; right: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--rose-500);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
        cursor: pointer;
    border: 2px solid var(--paper);
}
.avatar-upload-btn svg { width: 16px; height: 16px; }
.avatar-upload-input { display: none; }
.avatar-upload-hint { text-align: center; font-size: 0.78rem; color: var(--ink-soft); margin-top: 8px; margin-bottom: 26px; }
.field-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Tabelas (Agendamentos, Serviços) ---------- */
.table-card {
    background: var(--paper);
    border-radius: var(--r-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}
.table-card table { margin-bottom: 0; }
.table-card thead th {
    background: var(--rose-50);
    color: var(--rose-600);
    font-size: 0.74rem;
    letter-spacing: 0.5px;
    font-weight: 700;
    border-bottom: none;
    padding: 14px 16px;
}
.table-card tbody td {
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}
.table-card tbody tr:hover { background: var(--rose-50); }
.table-card .badge { padding: 6px 12px; border-radius: 999px; font-weight: 500; }

.table-empty {
    text-align: center;
    padding: 44px 20px;
    background: var(--rose-50);
    border-radius: var(--r-lg);
    margin-bottom: 20px;
}
.table-empty .script {
    font-family: 'Alex Brush', cursive;
    font-size: 1.9rem;
    color: var(--rose-500);
    display: block;
    margin-bottom: 4px;
}
.table-empty p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }

/* ---------- Intro de página (título + subtítulo + linha) ---------- */
.page-intro { margin-bottom: 28px; }
.page-intro p { color: var(--ink-soft); font-size: 0.92rem; margin: 4px 0 16px; }
.page-intro hr { border: none; border-top: 1px solid var(--rose-100); margin: 0; }

/* ---------- Botões em pílula ---------- */
.btn-pill {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 13px 20px;
    margin-top: 6px;
    background: var(--brand);
    color: var(--on-brand);
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
}
.btn-pill-auto { width: auto; padding: 13px 30px; }
.btn-pill-danger {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 13px 20px;
    background: var(--danger);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
}
.btn-pill-danger:hover { filter: brightness(1.05); }

/* ---------- Balanço Mensal: cards de resumo ---------- */
.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}
.balance-card {
    background: var(--paper);
    border-radius: var(--r-lg);
    box-shadow: var(--card-shadow);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.balance-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--rose-400);
}
.balance-card.warning::before { background: var(--gold); }
.balance-card.primary::before { background: var(--rose-700); }

.balance-card-top {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-height: 38px;
    margin-bottom: 10px;
}
.balance-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--rose-300);
    display: flex; align-items: center; justify-content: center;
    color: var(--rose-500);
    flex-shrink: 0;
    background: none;
}
.balance-icon svg { width: 14px; height: 14px; }
.balance-card.warning .balance-icon { border-color: var(--champagne); color: var(--warn); }
.balance-card.primary .balance-icon { border-color: var(--rose-700); color: var(--rose-700); }
.balance-label {
    font-size: 0.72rem;
    letter-spacing: 0.6px;
    color: var(--ink-soft);
    font-weight: 600;
    line-height: 1.3;
    padding-top: 3px;
}
.balance-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    margin-top: auto;
}

/* ---------- Balanço Mensal: filtro (Mês / Ano / Filtrar na mesma linha) ---------- */
.balance-filter {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    grid-template-rows: auto 46px;
    column-gap: 14px;
    row-gap: 6px;
    justify-content: start;
    margin: 20px 0 24px;
}
.balance-filter .field-group {
    display: contents;
}
.balance-filter .field-label {
    grid-row: 1;
}
.balance-filter .input-pill,
.balance-filter .btn-pill {
    grid-row: 2;
    height: 46px;
    width: auto;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    line-height: 1;
}
.balance-filter .input-pill { min-width: 140px; }
.balance-filter .btn-pill {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Alertas (sucesso/erro) ---------- */
.alert-success {
    background: var(--ok-soft);
    color: var(--ok);
    border: none;
    border-left: 4px solid var(--ok);
    border-radius: var(--r-lg);
    padding: 14px 18px;
    box-shadow: var(--card-shadow);
    font-size: 0.9rem;
}
.alert-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: none;
    border-left: 4px solid var(--danger);
    border-radius: var(--r-lg);
    padding: 14px 18px;
    box-shadow: var(--card-shadow);
    font-size: 0.9rem;
}
.alert .btn-close { opacity: 0.5; }

/* ---------- Telas de confirmação (Excluir) ---------- */
.confirm-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--paper);
    border-radius: var(--r-lg);
    box-shadow: var(--card-shadow);
    padding: 30px 26px 32px;
    text-align: center;
}
.confirm-card .confirm-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--danger-soft);
    color: var(--danger);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.confirm-card .confirm-icon svg { width: 24px; height: 24px; }
.confirm-card h1 { font-size: 1.25rem; margin-bottom: 10px; }
.confirm-card p { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 4px; }
.confirm-card .confirm-detail { color: var(--ink); font-weight: 600; margin-bottom: 24px; }

/* ---------- Duração: atalhos, campo somente leitura e aviso de conflito ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
    border: 1px solid var(--rose-200);
    background: var(--paper);
    color: var(--rose-600);
    border-radius: 999px;
    padding: 7px 14px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.chip:hover { background: var(--rose-50); }
.chip.active { background: var(--rose-500); border-color: var(--rose-500); color: #fff; }

.input-pill[readonly] { color: var(--ink-soft); cursor: default; }

.conflict-box {
    background: var(--warn-soft);
    border-left: 4px solid var(--gold);
    border-radius: var(--r-lg);
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 0.86rem;
    color: var(--ink);
}
.conflict-box ul { margin: 8px 0 12px; padding-left: 18px; }
.conflict-box .toggle-row { margin: 0; }

/* ---------- Cancelamento ---------- */
.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--rose-600);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
.link-btn:hover { text-decoration: underline; color: var(--rose-700); }

.appt-card.cancelled { opacity: 0.8; }
.appt-card.cancelled .appt-hora,
.appt-card.cancelled .appt-cliente { text-decoration: line-through; color: var(--ink-soft); }
.cancel-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--rose-100);
}
.cancel-actions form { margin: 0; }

.row-cancelled td { color: var(--ink-soft); text-decoration: line-through; }
.row-cancelled td:last-child { text-decoration: none; }
.filter-link { margin: -8px 0 16px; font-size: 0.85rem; }
.filter-link a { color: var(--rose-600); text-decoration: none; font-weight: 500; }
.filter-link a:hover { text-decoration: underline; }
button.icon-btn { border: none; cursor: pointer; padding: 0; }

/* ---------- Tela de Horários ---------- */
.form-card-wide { max-width: 680px; margin: 0 auto 20px; }
.card-title { font-size: 1.15rem; margin-bottom: 14px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field-row-3 .input-pill { min-width: 0; }
@media (max-width: 520px) { .field-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.week-row { padding: 12px 0; border-top: 1px solid var(--line); }
.week-list .week-row:first-child { border-top: none; }
.week-day { margin: 0 0 8px; font-weight: 600; color: var(--rose-700); }
.week-periods {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 0.85rem;
}
.week-periods .time-pill {
    width: 100px;
    min-width: 0;
    margin: 0;
    padding: 9px 8px;
    min-height: 42px;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
}
.week-row.off .week-periods { opacity: 0.35; pointer-events: none; }
@media (min-width: 640px) {
    .week-row { display: grid; grid-template-columns: 190px 1fr; align-items: center; }
    .week-day { margin: 0; }
}

.block-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
}
.block-item span { display: block; color: var(--ink-soft); font-size: 0.8rem; }
.block-item form { margin: 0; }


/* ---------- Página pública de agendamento ---------- */
.public-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.public-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    background: var(--brand);
    color: var(--on-brand); display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
    box-shadow: var(--card-shadow);
}
.public-eyebrow { color: var(--rose-400); font-size: 0.72rem; font-weight: 600; margin: 0; }
.public-title { font-size: 1.35rem; color: var(--rose-700); margin: 2px 0 0; }
.public-step { font-size: 1.1rem; color: var(--rose-700); margin: 20px 0 14px;}
.public-footer { text-align: center; color: var(--ink-soft); font-size: 0.74rem; margin-top: 30px; }
.public-form { margin-top: 4px; }

.svc-card, .svc-summary {
    display: flex; align-items: center; gap: 14px;
    background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--card-shadow);
    padding: 16px 18px; margin-bottom: 12px; text-decoration: none; color: var(--ink);
}
.svc-card { transition: transform 0.15s ease; }
.svc-card:hover { color: var(--ink); }
.svc-summary { margin: 14px 0 4px; }
.svc-summary.big { align-items: flex-start; }
.svc-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.svc-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.svc-info strong { font-size: 0.95rem; }
.svc-info span { font-size: 0.8rem; color: var(--ink-soft); }
.svc-price { font-weight: 600; font-size: 0.9rem; color: var(--rose-600); white-space: nowrap; }

.cal-title { color: var(--deep); font-family: var(--font-display); font-size: 1rem; min-width: 150px; text-align: center; }

.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.slot {
    text-align: center; padding: 12px 0; border-radius: 999px;
    background: var(--paper); border: 1px solid var(--rose-200); color: var(--rose-600);
    font-weight: 600; font-size: 0.95rem; text-decoration: none;
}
.slot:hover { background: var(--rose-500); border-color: var(--rose-500); color: #fff; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent-text { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.4; }
.public-form .toggle-row { align-items: flex-start; margin-bottom: 18px; }

.done-card { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--card-shadow); padding: 26px 22px; text-align: center; }
.done-card h2 { font-size: 1.25rem; color: var(--rose-700); margin: 6px 0 8px; }
.done-icon {
    width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 8px;
    background: var(--rose-100); color: var(--rose-600);
    display: flex; align-items: center; justify-content: center;
}
.done-when { font-weight: 600; margin: 0 0 4px;}
.done-what { color: var(--ink-soft); font-size: 0.88rem; margin: 0 0 4px; }
.done-who { color: var(--ink-soft); font-size: 0.82rem; margin: 0; }
.done-note {
    margin-top: 18px; padding: 14px 16px; border-radius: var(--r-lg);
    background: var(--rose-50); font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5;
    word-break: break-word;
}
.done-note a { color: var(--rose-600); }

/* ---------- Agendamentos online (painel) ---------- */
.online-tag {
    display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
    background: var(--rose-100); color: var(--rose-700);
    font-size: 0.68rem; font-weight: 600; letter-spacing: 0.4px;
    vertical-align: middle; text-decoration: none;
}
.online-banner {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    background: var(--paper); border-left: 4px solid var(--brand); border-radius: var(--r-lg);
    box-shadow: var(--card-shadow); padding: 12px 16px; margin-bottom: 14px;
    text-decoration: none; color: var(--ink); font-size: 0.88rem;
}
.online-banner span:last-child { color: var(--rose-600); font-weight: 600; white-space: nowrap; }

.cap-first::first-letter,
.done-when::first-letter { }

/* ---------- Esqueci a senha / segurança ---------- */
.auth-info { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.5; margin: 0 0 18px; }
.auth-link { margin: 16px 0 0; font-size: 0.82rem; }
.auth-link a { color: var(--rose-600); text-decoration: none; font-weight: 500; }
.auth-link a:hover { text-decoration: underline; }
.form-card + .form-card { margin-top: 20px; }
button.btn-pill-ghost { background: none; cursor: pointer; font-family: var(--font-body); }

/* ---------- Conta: cor da agenda ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.swatch {
    width: 36px; height: 36px; padding: 0; border-radius: 50%;
    border: 2px solid var(--paper); background: var(--sw, var(--paper));
    box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer;
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--deep); }
/* cor do serviço: rádio escondido dentro da bolinha */
.swatch-radio { position: relative; display: inline-block; }
.swatch-radio input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch-radio:has(input:checked) { box-shadow: 0 0 0 2px var(--deep); }
.swatch-radio:has(input:focus-visible) { outline: 2px solid var(--deep); outline-offset: 3px; }

.tema-preview {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 14px 16px; margin-bottom: 8px;
}
.tp-day { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--brand); color: var(--on-brand); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tp-btn { border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 600; padding: 9px 18px; }
.tp-link { color: var(--brand-strong); font-weight: 600; }
.tema-preview.tp-fraca::after { content: "Cor clara demais: o servidor vai pedir outra."; width: 100%; font-size: 0.78rem; color: var(--danger); }

/* Balanço no celular: filtro e tabelas cabem na largura da tela (tabela larga rola dentro do card) */
.table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 420px) {
    .balance-filter { column-gap: 8px; grid-template-columns: minmax(0, 1fr) auto auto; }
    .balance-filter .select-pill { width: 100%; min-width: 0; }
}
