/* =========================================================================
 * CGADV — Pagina publica de agendamento
 * Consistente com o design system do sistema interno (CSS vars + tipografia).
 * Mobile-first. DM Sans em todos os elementos (alinhado com o sistema).
 * ========================================================================= */

:root {
    /* Cores (paleta CGADV) */
    --pbk-preto: #0A0A0A;
    --pbk-preto-profundo: #141416;
    --pbk-preto-elevado: #1E1E22;
    --pbk-dourado: #D4AF5C;
    --pbk-dourado-hover: #E2C472;
    --pbk-dourado-subtle: rgba(212, 175, 92, 0.10);
    --pbk-branco: #FFFFFF;

    /* Tipografia — identica ao sistema interno */
    --pbk-font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;

    /* Tamanhos de texto (escala do sistema) */
    --pbk-text-xs: 0.75rem;    /* 12px */
    --pbk-text-sm: 0.875rem;   /* 14px */
    --pbk-text-base: 1rem;     /* 16px */
    --pbk-text-lg: 1.125rem;   /* 18px */
    --pbk-text-xl: 1.25rem;    /* 20px */
    --pbk-text-2xl: 1.5rem;    /* 24px */
    --pbk-text-3xl: 2rem;      /* 32px */

    /* Espacamentos */
    --pbk-space-1: 0.25rem;
    --pbk-space-2: 0.5rem;
    --pbk-space-3: 0.75rem;
    --pbk-space-4: 1rem;
    --pbk-space-5: 1.25rem;
    --pbk-space-6: 1.5rem;
    --pbk-space-8: 2rem;

    /* Radius */
    --pbk-radius-xs: 6px;
    --pbk-radius-sm: 8px;
    --pbk-radius: 12px;
    --pbk-radius-lg: 16px;

    /* Tracking */
    --pbk-tracking-tight: -0.015em;

    /* LIGHT MODE (default) */
    --pbk-bg: #F5F5F7;
    --pbk-surface: #FFFFFF;
    --pbk-surface-2: #FAFAFA;
    --pbk-border: rgba(0, 0, 0, 0.08);
    --pbk-text: #1D1D1F;
    --pbk-text-secondary: #48484A;
    --pbk-text-muted: #8E8D92;
    --pbk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --pbk-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --pbk-shadow-gold: 0 4px 14px rgba(212, 175, 92, 0.22);
    --pbk-slot-bg: #FFFFFF;
    --pbk-slot-text: #1D1D1F;
}

/* DARK MODE — aplicado em preview dentro do admin (segue tema do sistema) */
html[data-theme="dark"] {
    --pbk-bg: #0A0A0A;
    --pbk-surface: #141416;
    --pbk-surface-2: #1E1E22;
    --pbk-border: rgba(255, 255, 255, 0.06);
    --pbk-text: #F5F5F7;
    --pbk-text-secondary: #A1A1A6;
    --pbk-text-muted: #8E8D92;
    --pbk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --pbk-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --pbk-shadow-gold: 0 4px 14px rgba(212, 175, 92, 0.28);
    --pbk-slot-bg: #1E1E22;
    --pbk-slot-text: #F5F5F7;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--pbk-font-sans);
    background: var(--pbk-bg);
    color: var(--pbk-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: var(--pbk-tracking-tight);
    transition: background 0.2s ease;
}

a { color: var(--pbk-dourado); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------ Layout principal ------ */

.pbk-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pbk-header {
    background: var(--pbk-preto);
    padding: var(--pbk-space-5) var(--pbk-space-4);
    border-bottom: 3px solid var(--pbk-dourado);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pbk-brand img {
    max-width: 180px;
    height: auto;
    display: block;
}

.pbk-theme-btn {
    position: absolute;
    right: var(--pbk-space-4);
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid rgba(212, 175, 92, 0.35);
    color: var(--pbk-dourado);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--pbk-font-sans);
}
.pbk-theme-btn:hover {
    background: var(--pbk-dourado-subtle);
    border-color: var(--pbk-dourado);
}
.pbk-theme-btn svg { display: block; }
html[data-theme="light"] .pbk-theme-btn .pbk-theme-moon { display: block; }
html[data-theme="light"] .pbk-theme-btn .pbk-theme-sun { display: none; }
html[data-theme="dark"] .pbk-theme-btn .pbk-theme-sun { display: block; }
html[data-theme="dark"] .pbk-theme-btn .pbk-theme-moon { display: none; }

.pbk-main {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: var(--pbk-space-5) var(--pbk-space-4) var(--pbk-space-8);
}

.pbk-footer {
    background: var(--pbk-preto);
    color: #6E6D73;
    text-align: center;
    padding: var(--pbk-space-4);
    font-size: var(--pbk-text-xs);
}
.pbk-footer a { color: var(--pbk-dourado); }

/* ------ Barra de preview ------ */

.pbk-preview-bar {
    background: var(--pbk-dourado-subtle);
    border-left: 3px solid var(--pbk-dourado);
    color: var(--pbk-text);
    padding: var(--pbk-space-3) var(--pbk-space-4);
    border-radius: var(--pbk-radius-sm);
    margin-bottom: var(--pbk-space-5);
    font-size: var(--pbk-text-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--pbk-space-2);
}
.pbk-preview-bar a { color: var(--pbk-dourado); font-weight: 600; }
.pbk-preview-bar code {
    background: rgba(212, 175, 92, 0.10);
    color: var(--pbk-dourado);
    padding: 2px 8px;
    border-radius: var(--pbk-radius-xs);
    font-size: 0.85em;
    font-family: var(--pbk-font-sans);
}
html[data-theme="dark"] .pbk-preview-bar code {
    background: rgba(212, 175, 92, 0.12);
}

/* ------ Alerts ------ */

.pbk-alert {
    padding: var(--pbk-space-3) var(--pbk-space-4);
    border-radius: var(--pbk-radius-sm);
    margin-bottom: var(--pbk-space-5);
    border-left: 3px solid;
    font-size: var(--pbk-text-sm);
}
.pbk-alert-erro { background: rgba(255,69,58,0.08); border-color: #FF453A; color: #C23B3B; }
.pbk-alert-sucesso { background: rgba(48,209,88,0.08); border-color: #30D158; color: #285029; }
.pbk-alert-aviso { background: var(--pbk-dourado-subtle); border-color: var(--pbk-dourado); color: #6B5215; }
html[data-theme="dark"] .pbk-alert-erro { color: #FF6B6B; }
html[data-theme="dark"] .pbk-alert-sucesso { color: #4ADE80; }
html[data-theme="dark"] .pbk-alert-aviso { color: var(--pbk-dourado-hover); }

/* ------ Hero (home) ------ */

.pbk-hero { text-align: center; margin-bottom: var(--pbk-space-6); }
.pbk-hero h1 {
    font-family: var(--pbk-font-sans);
    font-size: 2rem;
    font-weight: 700;
    color: var(--pbk-text);
    margin: 0 0 var(--pbk-space-2) 0;
    letter-spacing: -0.025em;
    line-height: 1.15;
}
.pbk-hero p {
    font-size: var(--pbk-text-base);
    color: var(--pbk-text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

/* ------ Cards (home) ------ */

.pbk-event-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--pbk-space-4);
}
.pbk-event-card {
    background: var(--pbk-surface);
    border-radius: var(--pbk-radius);
    padding: var(--pbk-space-6);
    border: 1px solid var(--pbk-border);
    border-left: 4px solid var(--pbk-dourado);
    box-shadow: var(--pbk-shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    display: block;
}
.pbk-event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pbk-shadow-md);
    text-decoration: none;
}
.pbk-event-card h3 {
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-lg);
    font-weight: 600;
    margin: 0 0 var(--pbk-space-2) 0;
    color: var(--pbk-text);
    letter-spacing: -0.015em;
    line-height: 1.3;
}
.pbk-event-card .pbk-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pbk-space-3);
    color: var(--pbk-text-muted);
    font-size: var(--pbk-text-sm);
    margin: var(--pbk-space-2) 0 var(--pbk-space-3) 0;
}
.pbk-event-card p {
    margin: 0;
    color: var(--pbk-text-secondary);
    font-size: var(--pbk-text-sm);
    line-height: 1.6;
}

/* ------ Picker (info + slots) ------ */

.pbk-picker {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--pbk-space-4);
}

.pbk-info-box {
    background: var(--pbk-surface);
    border-radius: var(--pbk-radius);
    padding: var(--pbk-space-6);
    box-shadow: var(--pbk-shadow-sm);
    border: 1px solid var(--pbk-border);
    border-left: 4px solid var(--pbk-dourado);
    min-width: 0;
}
.pbk-info-box .pbk-kicker {
    color: var(--pbk-text-muted);
    font-size: var(--pbk-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 var(--pbk-space-2) 0;
    font-weight: 600;
}
.pbk-info-box h1 {
    font-family: var(--pbk-font-sans);
    font-size: 1.5rem;           /* 24px — evita quebra em 'Consulta Online (30 min)' em 360px */
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--pbk-space-3) 0;
    color: var(--pbk-text);
    letter-spacing: -0.025em;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
}
.pbk-descricao {
    color: var(--pbk-text-secondary);
    font-size: var(--pbk-text-sm);
    line-height: 1.6;
    margin: 0 0 var(--pbk-space-4) 0;
}

.pbk-meta-list {
    list-style: none;
    padding: 0;
    margin: var(--pbk-space-3) 0 0 0;
}
.pbk-meta-list li {
    padding: var(--pbk-space-2) 0;
    border-bottom: 1px solid var(--pbk-border);
    font-size: var(--pbk-text-sm);
    display: grid;
    grid-template-columns: minmax(80px, auto) 1fr;
    gap: var(--pbk-space-3);
    align-items: baseline;
}
.pbk-meta-list li:last-child { border-bottom: none; }
.pbk-meta-list li > span:first-child {
    color: var(--pbk-text-muted);
    font-size: var(--pbk-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.pbk-meta-list li > span:last-child {
    color: var(--pbk-text);
    font-weight: 500;
    text-align: right;
}

/* ------ Slots box ------ */

.pbk-slots-box {
    background: var(--pbk-surface);
    border-radius: var(--pbk-radius);
    padding: var(--pbk-space-5);
    box-shadow: var(--pbk-shadow-sm);
    border: 1px solid var(--pbk-border);
    min-width: 0;
}

.pbk-date-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--pbk-space-4);
    gap: var(--pbk-space-2);
}
.pbk-date-nav h3 {
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-lg);
    font-weight: 600;
    margin: 0;
    text-align: center;
    flex: 1;
    color: var(--pbk-text);
    letter-spacing: -0.015em;
}
.pbk-btn-nav {
    background: transparent;
    border: 1px solid var(--pbk-border);
    border-radius: var(--pbk-radius-sm);
    width: 36px;
    height: 36px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s ease;
    color: var(--pbk-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-lg);
    -webkit-tap-highlight-color: transparent;
}
.pbk-btn-nav:hover:not(:disabled) {
    background: var(--pbk-surface-2);
    border-color: var(--pbk-text-muted);
    color: var(--pbk-text);
}
.pbk-btn-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pbk-day-group { margin-bottom: var(--pbk-space-5); }
.pbk-day-group:last-child { margin-bottom: 0; }
.pbk-day-group h4 {
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-xs);
    font-weight: 600;
    color: var(--pbk-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 var(--pbk-space-3) 0;
    padding-bottom: var(--pbk-space-2);
    border-bottom: 2px solid var(--pbk-dourado);
}

.pbk-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: var(--pbk-space-2);
}
.pbk-slot {
    background: var(--pbk-slot-bg);
    border: 1px solid rgba(212, 175, 92, 0.45);
    color: var(--pbk-slot-text);
    padding: 0.7rem 0.6rem;
    border-radius: var(--pbk-radius-sm);
    cursor: pointer;
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-sm);
    font-weight: 500;
    letter-spacing: var(--pbk-tracking-tight);
    text-align: center;
    transition: all 0.15s ease;
    box-shadow: var(--pbk-shadow-sm);
    -webkit-tap-highlight-color: transparent;
    /* NAO usar tnum — deixa numerais proporcionais, consistente com DM Sans */
}
.pbk-slot:hover {
    background: var(--pbk-dourado);
    border-color: var(--pbk-dourado);
    color: var(--pbk-preto);
    transform: translateY(-1px);
    box-shadow: var(--pbk-shadow-gold);
}
.pbk-slot.selected {
    background: var(--pbk-preto);
    border-color: var(--pbk-preto);
    color: var(--pbk-dourado);
    box-shadow: var(--pbk-shadow-md);
}
html[data-theme="dark"] .pbk-slot.selected {
    background: var(--pbk-dourado);
    border-color: var(--pbk-dourado);
    color: var(--pbk-preto);
}

.pbk-empty {
    text-align: center;
    padding: var(--pbk-space-8) var(--pbk-space-4);
    color: var(--pbk-text-muted);
    font-size: var(--pbk-text-sm);
}

.pbk-loading {
    text-align: center;
    padding: var(--pbk-space-8) var(--pbk-space-4);
    color: var(--pbk-text-muted);
    font-size: var(--pbk-text-sm);
}
.pbk-loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--pbk-dourado);
    border-right-color: transparent;
    border-radius: 50%;
    animation: pbk-spin 0.8s linear infinite;
    margin-left: var(--pbk-space-2);
    vertical-align: middle;
}
@keyframes pbk-spin { to { transform: rotate(360deg); } }

/* ------ Form (inline) ------ */

.pbk-form {
    background: var(--pbk-surface);
    border-radius: var(--pbk-radius);
    padding: var(--pbk-space-6);
    margin-top: var(--pbk-space-5);
    box-shadow: var(--pbk-shadow-sm);
    border: 1px solid var(--pbk-border);
}
.pbk-form h3 {
    font-family: var(--pbk-font-sans);
    margin: 0 0 var(--pbk-space-2) 0;
    font-size: var(--pbk-text-lg);
    color: var(--pbk-text);
    font-weight: 600;
    letter-spacing: -0.015em;
}
.pbk-form .pbk-slot-chip {
    display: inline-block;
    background: var(--pbk-preto);
    color: var(--pbk-dourado);
    padding: var(--pbk-space-1) var(--pbk-space-4);
    border-radius: 999px;
    font-weight: 600;
    font-size: var(--pbk-text-sm);
    margin-bottom: var(--pbk-space-4);
    letter-spacing: var(--pbk-tracking-tight);
}
html[data-theme="dark"] .pbk-form .pbk-slot-chip {
    background: var(--pbk-dourado);
    color: var(--pbk-preto);
}

.pbk-form-row { margin-bottom: var(--pbk-space-4); }
.pbk-form-row label {
    display: block;
    font-size: var(--pbk-text-xs);
    color: var(--pbk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--pbk-space-1);
    font-weight: 600;
}
.pbk-form-row input[type="text"],
.pbk-form-row input[type="email"],
.pbk-form-row input[type="tel"],
.pbk-form-row textarea,
.pbk-form-row select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--pbk-surface-2);
    border: 1px solid var(--pbk-border);
    border-radius: var(--pbk-radius-sm);
    font-size: var(--pbk-text-base);
    color: var(--pbk-text);
    font-family: var(--pbk-font-sans);
    letter-spacing: var(--pbk-tracking-tight);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.pbk-form-row input:focus,
.pbk-form-row textarea:focus,
.pbk-form-row select:focus {
    outline: none;
    border-color: var(--pbk-dourado);
    background: var(--pbk-surface);
    box-shadow: 0 0 0 3px rgba(212, 175, 92, 0.15);
}
.pbk-form-row textarea { min-height: 80px; resize: vertical; }
.pbk-form-row small {
    color: var(--pbk-text-muted);
    font-size: var(--pbk-text-xs);
    display: block;
    margin-top: var(--pbk-space-1);
}

.pbk-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.pbk-form-submit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--pbk-space-3);
    margin-top: var(--pbk-space-5);
    flex-wrap: wrap;
}

.pbk-btn-primary {
    background: linear-gradient(180deg, var(--pbk-dourado-hover) 0%, var(--pbk-dourado) 100%);
    color: var(--pbk-preto);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--pbk-radius-sm);
    font-weight: 600;
    font-size: var(--pbk-text-sm);
    cursor: pointer;
    font-family: var(--pbk-font-sans);
    letter-spacing: var(--pbk-tracking-tight);
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: var(--pbk-shadow-gold);
    -webkit-tap-highlight-color: transparent;
}
.pbk-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(212, 175, 92, 0.35);
}
.pbk-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.pbk-btn-secondary {
    background: transparent;
    border: 1px solid var(--pbk-border);
    color: var(--pbk-text-secondary);
    padding: 0.65rem 1.25rem;
    border-radius: var(--pbk-radius-sm);
    cursor: pointer;
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-sm);
    font-weight: 500;
    letter-spacing: var(--pbk-tracking-tight);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.pbk-btn-secondary:hover {
    background: var(--pbk-surface-2);
    border-color: var(--pbk-text-muted);
    color: var(--pbk-text);
}

.pbk-btn-danger {
    background: #C23B3B;
    color: #fff;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: var(--pbk-radius-sm);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--pbk-text-sm);
    font-family: var(--pbk-font-sans);
}
.pbk-btn-danger:hover { background: #D14545; }

.pbk-modalidade-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--pbk-space-2);
}
.pbk-modalidade-opt {
    display: block;
    padding: var(--pbk-space-3);
    background: var(--pbk-surface-2);
    border: 2px solid var(--pbk-border);
    border-radius: var(--pbk-radius-sm);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    font-weight: 500;
    font-size: var(--pbk-text-sm);
    color: var(--pbk-text);
}
.pbk-modalidade-opt:has(input:checked),
.pbk-modalidade-opt.checked {
    background: var(--pbk-dourado-subtle);
    border-color: var(--pbk-dourado);
    color: var(--pbk-text);
}
.pbk-modalidade-opt input { position: absolute; left: -9999px; }

/* ------ Confirmacao / gerenciar ------ */

.pbk-confirm-box {
    background: var(--pbk-surface);
    border-radius: var(--pbk-radius);
    padding: var(--pbk-space-8) var(--pbk-space-6);
    text-align: center;
    box-shadow: var(--pbk-shadow-sm);
    margin-top: var(--pbk-space-5);
    border: 1px solid var(--pbk-border);
    border-top: 4px solid #30D158;
}
.pbk-confirm-box.erro { border-top-color: #C23B3B; }
.pbk-confirm-box .pbk-check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--pbk-dourado);
    color: var(--pbk-preto);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: var(--pbk-space-4);
    font-weight: 800;
}
.pbk-confirm-box h1 {
    font-family: var(--pbk-font-sans);
    font-size: 1.625rem;
    margin: 0 0 var(--pbk-space-2) 0;
    color: var(--pbk-text);
    font-weight: 700;
    letter-spacing: -0.025em;
}
.pbk-confirm-box .pbk-subtitle {
    color: var(--pbk-text-secondary);
    margin: 0 0 var(--pbk-space-6) 0;
    font-size: var(--pbk-text-base);
}

.pbk-confirm-detail {
    background: var(--pbk-surface-2);
    border-radius: var(--pbk-radius-sm);
    padding: var(--pbk-space-4);
    text-align: left;
    margin: var(--pbk-space-4) 0;
    font-size: var(--pbk-text-sm);
    border: 1px solid var(--pbk-border);
}
.pbk-confirm-detail .pbk-row {
    display: grid;
    grid-template-columns: minmax(120px, auto) 1fr;
    gap: var(--pbk-space-3);
    padding: var(--pbk-space-2) 0;
    border-bottom: 1px solid var(--pbk-border);
    align-items: baseline;
}
.pbk-confirm-detail .pbk-row:last-child { border-bottom: none; }
.pbk-confirm-detail .pbk-row .pbk-lbl {
    color: var(--pbk-text-muted);
    font-size: var(--pbk-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.pbk-confirm-detail .pbk-row .pbk-val {
    color: var(--pbk-text);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* ------ Responsive ------ */

@media (min-width: 768px) {
    .pbk-header { padding: var(--pbk-space-6) var(--pbk-space-6); }
    .pbk-theme-btn { right: var(--pbk-space-6); }
    .pbk-main { padding: var(--pbk-space-8) var(--pbk-space-6); }

    .pbk-picker { grid-template-columns: 360px 1fr; }
    .pbk-event-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    .pbk-slots { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
    .pbk-modalidade-opts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

    .pbk-hero h1 { font-size: 2.25rem; }
    .pbk-info-box h1 { font-size: 1.625rem; }
    .pbk-date-nav h3 { font-size: var(--pbk-text-xl); }
    .pbk-event-card h3 { font-size: var(--pbk-text-xl); }
}

@media (min-width: 1024px) {
    .pbk-main { padding: var(--pbk-space-8) var(--pbk-space-6); }
    .pbk-info-box h1 { font-size: 1.75rem; }
}

/* =========================================================================
 * SINGLE PAGE LAYOUT — Step 1 (servico) + Step 2 (data/hora) + Confirmar
 * ========================================================================= */

.pbk-step { margin-bottom: var(--pbk-space-6); }

.pbk-step-label {
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-lg);
    font-weight: 700;
    color: var(--pbk-text);
    margin: 0 0 var(--pbk-space-4) 0;
    letter-spacing: -0.02em;
}
@media (min-width: 768px) {
    .pbk-step-label { font-size: var(--pbk-text-xl); }
}

/* Step 1: Cards de servico */
.pbk-service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--pbk-space-3);
}

.pbk-service-card {
    display: flex;
    align-items: center;
    gap: var(--pbk-space-4);
    padding: var(--pbk-space-5);
    background: var(--pbk-surface);
    border: 2px solid var(--pbk-border);
    border-radius: var(--pbk-radius);
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    width: 100%;
    font-family: var(--pbk-font-sans);
    -webkit-tap-highlight-color: transparent;
}
.pbk-service-card:hover {
    border-color: rgba(212, 175, 92, 0.35);
    transform: translateY(-1px);
    box-shadow: var(--pbk-shadow-sm);
}
.pbk-service-card.selected {
    border-color: var(--pbk-dourado);
    box-shadow:
        0 0 0 4px rgba(212, 175, 92, 0.15),
        0 10px 28px rgba(212, 175, 92, 0.28);
}
html[data-theme="dark"] .pbk-service-card.selected {
    box-shadow:
        0 0 0 4px rgba(212, 175, 92, 0.18),
        0 12px 32px rgba(212, 175, 92, 0.35);
}

.pbk-service-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--pbk-radius-sm);
    background: var(--pbk-dourado-subtle);
    color: var(--pbk-dourado);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s ease;
}
.pbk-service-card.selected .pbk-service-icon {
    background: var(--pbk-dourado);
    color: var(--pbk-preto);
}

.pbk-service-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pbk-service-title {
    font-size: var(--pbk-text-lg);
    font-weight: 600;
    color: var(--pbk-text);
    letter-spacing: -0.015em;
    line-height: 1.3;
}
.pbk-service-desc {
    font-size: var(--pbk-text-sm);
    color: var(--pbk-text-muted);
    line-height: 1.5;
}

/* Step 2: grid de 2 colunas (detalhes + calendario) */
.pbk-step2-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--pbk-space-4);
}

.pbk-detail-card {
    background: var(--pbk-surface);
    border: 1px solid var(--pbk-border);
    border-radius: var(--pbk-radius);
    padding: var(--pbk-space-5);
    min-width: 0;
}
.pbk-detail-kicker {
    color: var(--pbk-text-muted);
    font-size: var(--pbk-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: var(--pbk-space-2);
}
.pbk-detail-card h3 {
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-xl);
    font-weight: 700;
    margin: 0 0 var(--pbk-space-4) 0;
    color: var(--pbk-text);
    letter-spacing: -0.02em;
    line-height: 1.25;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.pbk-detail-list { list-style: none; padding: 0; margin: 0; }
.pbk-detail-list li {
    padding: var(--pbk-space-3) 0;
    border-top: 1px solid var(--pbk-border);
    display: grid;
    grid-template-columns: minmax(100px, auto) 1fr;
    gap: var(--pbk-space-3);
    align-items: baseline;
}
.pbk-detail-list li:first-child { border-top: none; padding-top: 0; }
.pbk-detail-list li .lbl {
    color: var(--pbk-text-muted);
    font-size: var(--pbk-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.pbk-detail-list li .val {
    color: var(--pbk-text);
    font-weight: 500;
    text-align: right;
}

/* Calendario */
.pbk-calendar {
    background: var(--pbk-surface);
    border: 1px solid var(--pbk-border);
    border-radius: var(--pbk-radius);
    padding: var(--pbk-space-5);
    min-width: 0;
}

.pbk-cal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--pbk-space-3);
    margin-bottom: var(--pbk-space-4);
}
.pbk-cal-header h3 {
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-lg);
    font-weight: 600;
    margin: 0;
    color: var(--pbk-text);
    letter-spacing: -0.015em;
    min-width: 180px;
    text-align: center;
}

/* Scroll horizontal de 7 dias (mobile) + grid no desktop */
.pbk-days {
    display: flex;
    gap: var(--pbk-space-1);
    border-bottom: 1px solid var(--pbk-border);
    padding-bottom: var(--pbk-space-4);
    margin-bottom: var(--pbk-space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.pbk-days::-webkit-scrollbar { height: 4px; }
.pbk-days::-webkit-scrollbar-thumb { background: var(--pbk-border); border-radius: 2px; }

/* =========================================================================
 * NOVO: Grid semanal com 2 hor\u00e1rios sugeridos por dia
 * ========================================================================= */

.pbk-week-grid {
    /* Flex para adaptar a N colunas (5 dias uteis na maior parte dos casos,
       menos em semanas parciais). Mobile vira scroll horizontal via override. */
    display: flex;
    gap: var(--pbk-space-2);
    padding-top: var(--pbk-space-3);
    border-top: 1px solid var(--pbk-border);
}
.pbk-day-col { flex: 1 1 0; }

.pbk-day-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--pbk-space-2);
    padding: var(--pbk-space-2) 0;
    min-width: 0;
}

.pbk-day-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding-bottom: var(--pbk-space-2);
    border-bottom: 1px solid var(--pbk-border);
    margin-bottom: var(--pbk-space-1);
}
.pbk-day-abbrev {
    font-size: var(--pbk-text-xs);
    color: var(--pbk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    font-family: var(--pbk-font-sans);
}
.pbk-day-num {
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-xl);
    color: var(--pbk-text);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* "Sem horários" = chip vermelho sutil (mesma morfologia do .pbk-slot-chip).
   flex:1 + align-items:stretch do pai igualam altura com colunas que tem chips
   — funciona automaticamente seja com 3 ou 4 slots por dia. */
.pbk-day-empty {
    padding: 0.55rem 0.5rem;
    background: rgba(255, 69, 58, 0.08);
    border: 1px solid rgba(255, 69, 58, 0.40);
    color: #C23B3B;
    border-radius: var(--pbk-radius-sm);
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    box-shadow: var(--pbk-shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 60px; /* fallback quando TODAS colunas estao vazias */
}
html[data-theme="dark"] .pbk-day-empty {
    background: rgba(255, 69, 58, 0.12);
    border-color: rgba(255, 69, 58, 0.38);
    color: #FF6B6B;
}

/* Dias passados: chip neutro discreto (nao destaca em vermelho — nao eh "falha",
   eh apenas "fora da janela agendavel") */
.pbk-day-empty.pbk-day-past {
    background: transparent;
    border: 1px dashed var(--pbk-border);
    color: var(--pbk-text-muted);
    opacity: 0.6;
    text-transform: none;
    font-weight: 500;
    letter-spacing: -0.01em;
    box-shadow: none;
}

.pbk-slot-chip {
    padding: 0.55rem 0.5rem;
    background: var(--pbk-surface-2);
    border: 1px solid rgba(212, 175, 92, 0.45);
    color: var(--pbk-text);
    border-radius: var(--pbk-radius-sm);
    cursor: pointer;
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-sm);
    font-weight: 500;
    letter-spacing: -0.01em;
    text-align: center;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: var(--pbk-shadow-sm);
}
.pbk-slot-chip:hover {
    border-color: var(--pbk-dourado);
    background: var(--pbk-dourado-subtle);
    transform: translateY(-1px);
}
.pbk-slot-chip.selected {
    background: var(--pbk-dourado);
    border-color: var(--pbk-dourado);
    color: var(--pbk-preto);
    font-weight: 600;
    box-shadow:
        0 0 0 4px rgba(212, 175, 92, 0.22),
        0 8px 22px rgba(212, 175, 92, 0.35);
}

.pbk-slot-more {
    padding: 0.35rem 0.5rem;
    background: transparent;
    border: 1px dashed var(--pbk-border);
    color: var(--pbk-text-muted);
    border-radius: var(--pbk-radius-sm);
    cursor: pointer;
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.pbk-slot-more:hover {
    border-color: var(--pbk-dourado);
    color: var(--pbk-dourado);
    background: var(--pbk-dourado-subtle);
}

.pbk-week-hint {
    font-size: var(--pbk-text-xs);
    color: var(--pbk-text-muted);
    text-align: center;
    margin: var(--pbk-space-4) 0 0 0;
}
.pbk-week-hint a {
    color: var(--pbk-dourado);
    text-decoration: underline;
}

/* Mobile: scroll horizontal dos dias */
@media (max-width: 767px) {
    .pbk-week-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--pbk-space-2);
    }
    .pbk-day-col {
        min-width: 84px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    .pbk-week-grid::-webkit-scrollbar { height: 4px; }
    .pbk-week-grid::-webkit-scrollbar-thumb { background: var(--pbk-border); border-radius: 2px; }
}
.pbk-day {
    padding: var(--pbk-space-3) var(--pbk-space-3);
    background: transparent;
    border: 1px solid transparent;
    color: var(--pbk-text-secondary);
    cursor: pointer;
    border-radius: var(--pbk-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: all 0.15s ease;
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-xs);
    font-weight: 500;
    text-align: center;
    flex: 1 0 auto;
    min-width: 84px;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
}
.pbk-day-name {
    font-size: var(--pbk-text-sm);
    font-weight: 500;
    letter-spacing: -0.01em;
}
.pbk-day-nota {
    font-size: 10px;
    color: var(--pbk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pbk-day:hover:not(.disabled) {
    background: var(--pbk-dourado-subtle);
    color: var(--pbk-text);
}
.pbk-day.selected {
    background: var(--pbk-dourado-subtle);
    border-color: var(--pbk-dourado);
    color: var(--pbk-text);
    font-weight: 600;
}
.pbk-day.disabled {
    opacity: 0.28;
    cursor: not-allowed;
}
.pbk-day.disabled:hover { background: transparent; }

/* Linha de slots */
.pbk-slots-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--pbk-space-2);
    min-height: 44px;
    align-items: center;
}

.pbk-slot-inline {
    padding: 0.6rem 1.1rem;
    background: var(--pbk-surface-2);
    border: 1px solid rgba(212, 175, 92, 0.45);
    color: var(--pbk-text);
    border-radius: var(--pbk-radius-sm);
    cursor: pointer;
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-sm);
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.pbk-slot-inline:hover {
    border-color: var(--pbk-dourado);
    background: var(--pbk-dourado-subtle);
}
.pbk-slot-inline.selected {
    background: var(--pbk-dourado);
    border-color: var(--pbk-dourado);
    color: var(--pbk-preto);
    font-weight: 600;
    box-shadow:
        0 0 0 4px rgba(212, 175, 92, 0.22),
        0 8px 22px rgba(212, 175, 92, 0.35);
}

/* Botao Confirmar */
.pbk-btn-confirm {
    display: block;
    width: 100%;
    margin-top: var(--pbk-space-6);
    padding: 1rem;
    background: linear-gradient(180deg, var(--pbk-dourado-hover) 0%, var(--pbk-dourado) 100%);
    color: var(--pbk-preto);
    border: none;
    border-radius: var(--pbk-radius);
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-base);
    font-weight: 700;
    letter-spacing: -0.015em;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: var(--pbk-shadow-gold);
    -webkit-tap-highlight-color: transparent;
}
.pbk-btn-confirm:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}
.pbk-btn-confirm:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(212, 175, 92, 0.4);
}

/* Modal */
.pbk-modal[hidden] { display: none; }
.pbk-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pbk-space-4);
}
.pbk-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.pbk-modal-panel {
    position: relative;
    background: var(--pbk-surface);
    border: 1px solid var(--pbk-border);
    border-radius: var(--pbk-radius-lg);
    padding: var(--pbk-space-6);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.pbk-modal-close {
    position: absolute;
    top: var(--pbk-space-4);
    right: var(--pbk-space-4);
    background: transparent;
    border: none;
    color: var(--pbk-text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.pbk-modal-close:hover {
    background: var(--pbk-surface-2);
    color: var(--pbk-text);
}
.pbk-modal-panel h3 {
    font-family: var(--pbk-font-sans);
    font-size: var(--pbk-text-xl);
    font-weight: 700;
    margin: 0 0 var(--pbk-space-2) 0;
    color: var(--pbk-text);
    letter-spacing: -0.02em;
}
.pbk-modal-panel .pbk-slot-chip {
    display: inline-block;
    background: var(--pbk-preto);
    color: var(--pbk-dourado);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: var(--pbk-text-sm);
    font-weight: 600;
    margin-bottom: var(--pbk-space-4);
}
html[data-theme="dark"] .pbk-modal-panel .pbk-slot-chip {
    background: var(--pbk-dourado);
    color: var(--pbk-preto);
}

/* Responsive */
@media (min-width: 768px) {
    .pbk-service-grid { grid-template-columns: 1fr 1fr; }
    .pbk-step2-grid { grid-template-columns: 340px 1fr; }
    .pbk-step-title { font-size: var(--pbk-text-xl); }
}
@media (min-width: 1024px) {
    .pbk-service-grid { grid-template-columns: 1fr 1fr; gap: var(--pbk-space-4); }
    .pbk-cal-header h3 { font-size: var(--pbk-text-xl); }
    .pbk-day-name { font-size: var(--pbk-text-base); }
}

/* ------ Reduzir movimento ------ */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0s !important; transition-duration: 0s !important; }
}
