@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
/* Destaca o asterisco dos campos obrigatórios em vermelho */
.required {
    color: #d32f2f;
    font-weight: bold;
    margin-left: 2px;
}
/* Filtros de clientes - responsivo */
@media (max-width: 600px) {
    .table-card.contact-list-filters {
        max-width: 98vw !important;
        padding: 0 !important;
        border-radius: 12px;
    }
    .filter-stack {
        padding: 8px 2vw 8px 2vw !important;
        gap: 6px !important;
    }
    .filter-row {
        flex-direction: column !important;
        gap: 6px !important;
    }
    .form-group {
        min-width: 0 !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    #refreshContactsBtn {
        width: 100% !important;
        max-width: none !important;
    }
}
/* === TIMELINE - VISUALIZAÇÃO DE HORÁRIOS CLÁSSICA === */
.day-view {
    display: grid;
    grid-template-columns: 72px 1fr 1fr 1fr;
    gap: 12px;
    align-items: start;
}
.hours {
    width: 72px;
    font-size: 12px;
    color: #6b7280;
}
.timeline {
    position: relative;
    border: 1px solid #e6e7eb;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.timeline.center {
    background: #f8fafc;
    border-color: #d1d5db;
}
.timeline-title {
    padding: 8px 10px;
    background: linear-gradient(180deg,#f3f0ff,#e5e7eb);
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 1px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    height: 60px;
    box-sizing: border-box;
}
.timeline-year {
    font-size: 16px;
    font-weight: 700;
    color: #6b46c1;
    line-height: 1.0;
}
.timeline-month {
    font-size: 13px;
    font-weight: 600;
    color: #7c3aed;
    line-height: 1.0;
}
.timeline-weekday {
    font-size: 11px;
    font-weight: 500;
    color: #8b5cf6;
    line-height: 1.0;
}
.timeline-body {
    position: relative;
    min-height: 960px;
    flex: 1;
    margin-top: 60px;
}
.hour-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    border-top: 1px dashed rgba(0,0,0,0.06);
    box-sizing: border-box;
}
.reservation-block {
    position: absolute;
    /* left e width são definidos via JS para layout lado a lado */
    border-radius: 6px;
    padding: 6px 8px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.reservation-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16,24,40,0.15);
}
.reservation-label {
    display: block;
    font-size: 12px;
    opacity: 0.95;
}
.room-title {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
    grid-column: 1/-1;
    color: #6b46c1;
}
.date-badge {
    font-size: 13px;
    color: #374151;
}
.create-overlay {
    position: fixed;
    z-index: 1200;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 30px rgba(2,6,23,0.12);
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    min-width: 200px;
}
.create-overlay strong { display: block; margin-bottom: 6px; }
.create-overlay .controls { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.create-overlay button { padding: 6px 10px; border-radius: 5px; border: 1px solid rgba(0,0,0,0.06); background: #f3f4f6; cursor: pointer; }
.create-overlay button.primary { background: #2563eb; color: #fff; border: none; }
@media (max-width:900px) {
    .day-view { grid-template-columns: 56px 1fr; grid-auto-flow: row; }
    .timeline { min-height: 720px; }
}
.month-grid.empty {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
.month-table tbody td.day-has-reservation.status-confirmed {
    background: var(--status-confirmed) !important;
    color: white !important;
}
.month-table tbody td.day-has-reservation.status-pending {
    background: var(--status-pending) !important;
    color: #374151 !important;
}
.month-table tbody td.day-has-reservation.status-waitlist {
    background: var(--status-waitlist) !important;
    color: white !important;
}
.month-table tbody td.day-has-reservation.status-cancelled {
    background: var(--status-cancelled) !important;
    color: white !important;
}
/* Centralizar o link do dia dentro da célula */
.month-table td a.day-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    text-decoration: none;
}
/* (moved @import to top to satisfy CSS spec) */
/* ===================================================================
    CAUIM SMARTSPACE - CSS MASTER
    Arquivo único consolidado para toda a aplicação
    =================================================================== */

/* === VARIÁVEIS CSS - TEMA ROXO ESCURO === */
:root {
    /* Cores principais - roxo escuro igual à logo */
    --primary: #4a1ec4;
    --primary-600: #3b1a9c;
    --primary-700: #2d1374;
    
    /* Cores neutras */
    --text: #414141;
    --text-secondary: #555;
    --bg: #f2f4f6;
    --card: #ffffff;
    --muted: #7a7a7a;
    --border: #e7e7e9;
    --row-alt: #f7f7fb;
    
    /* Cores de estado */
    --ok: #18a957;
    --warn: #d97706;
    --danger: #dc2626;
    
    /* Aliases para compatibilidade */
    --cauim-purple: var(--primary);
    --cauim-purple-600: var(--primary-600);
    --cauim-purple-700: var(--primary-700);
    --color-primary-500: var(--primary);
    --color-primary-600: var(--primary-600);
    --color-border-subtle: #e2e2e2;
    --color-bg-card: var(--card);
    --color-bg-input: #fff;
    --color-text: #222;
    --color-text-secondary: var(--text-secondary);
}

/* === RESET E BASE === */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: Inter, sans-serif !important;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* === LAYOUT PRINCIPAL === */
.container,
.container-fluid {
    max-width: 100%; /* Removido limite fixo para ocupar toda a resolução */
    margin: 18px auto;
    padding: 0 18px !important; /* Padding consistente */
    width: 100%;
    box-sizing: border-box;
}

/* Wrapper central para páginas com conteúdo limitado */
.page-center {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
}

/* === HEADER === */
.cauim-header {
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    max-width: 100%; /* Usa toda a largura */
    margin: 0 auto;
}



.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo { 
    height: 72px; 
    display: block; 
}



/* === NAVEGAÇÃO PRINCIPAL === */
.nav-container {
    border-top: 1px solid var(--border);
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    position: relative;
}

.main-nav {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: center;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    position: absolute;
    right: 18px;
}

.main-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary) !important;
    padding: 8px 18px;
    border-radius: 8px;
    color: white !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: background 0.2s ease-in-out;
    font-size: 15px;
    border: 1px solid var(--primary) !important;
}

.main-nav .nav-link:hover { 
    background: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
}

.main-nav .nav-link.active {
    background: var(--primary-700) !important;
    box-shadow: 0 0 0 2px rgba(74, 30, 196, 0.25);
    color: white !important;
    border-color: var(--primary-700) !important;
}

.main-nav .nav-link i {
    color: white !important;
}

/* Garante que os links de navegação sejam sempre clicáveis */
.main-nav .nav-link {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10001 !important;
}

/* Botão de logout com estilo EXATAMENTE igual aos nav-links */
.main-nav .nav-link.logout-btn,
.nav-link.logout-btn {
    /* Força todos os estilos idênticos aos nav-links */
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: var(--primary) !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    color: white !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: background 0.2s ease-in-out !important;
    font-size: 15px !important;
    border: 1px solid var(--primary) !important;
    cursor: pointer !important;
    font-family: inherit !important;
    /* Remove estilos padrão de botão */
    margin: 0 !important;
    min-height: auto !important;
    line-height: normal !important;
    /* Remove estilos de botão padrão do browser */
    appearance: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.main-nav .nav-link.logout-btn:hover,
.nav-link.logout-btn:hover {
    background: var(--primary-600) !important;
    border-color: var(--primary-600) !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.logout-btn i {
    color: white !important;
}

/* Botão de logout com ícone CDN no canto direito */
.logout-icon-btn {
    background: transparent !important;
    border: none !important;
    padding: 4px !important;
    cursor: pointer !important;
    transition: transform 0.2s ease-in-out !important;
}

.logout-icon-btn:hover {
    transform: scale(1.1) !important;
}

/* === BOTÕES === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    height: 40px;
    font-family: inherit;
    /* Padrão roxo do sistema para todos os botões */
    background: var(--primary);
    color: white;
}

.btn:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}

/* Garante que links com classe btn mantenham o estilo de botão */
a.btn {
    color: white !important;
    text-decoration: none !important;
}

a.btn:hover {
    color: white !important;
    text-decoration: none !important;
}

/* Botões primários - sempre roxo escuro */
.btn.primary,
.btn-primary,
button.primary,
input[type="submit"],
.page-title .btn,
.form-actions .btn.primary {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.btn.primary:hover,
.btn-primary:hover,
button.primary:hover,
input[type="submit"]:hover,
.page-title .btn:hover,
.form-actions .btn.primary:hover {
    background: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
}

/* Botões secundários/ghost */
.btn.ghost {
    background: transparent !important;
    border: 1px solid var(--color-border-subtle) !important;
    color: var(--color-text-secondary) !important;
}

.btn.ghost:hover {
    background: #fafafa;
}

/* Botões pequenos */
.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 8px;
    height: auto;
}

/* Botão offset (Novo Cliente) */
.btn-offset {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    margin-left: -2cm;
    margin-top: 0.5cm;
}

.btn-offset:hover {
    background: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
}

/* Ícones nos botões */
.btn i {
    color: inherit !important;
}

/* === TÍTULOS E CABEÇALHOS === */
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 14px 0;
}

.page-title h1 {
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.1px;
    margin: 0;
    font-size: 1.5rem;
}

/* Títulos de formulários em geral */
h1, h2, h3 {
    color: var(--primary);
}

/* Títulos específicos de páginas de formulário */
body h1:first-of-type,
.container h1:first-child,
.container-fluid h1:first-child {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.2rem;
}

/* Títulos de seções dentro de formulários */
.form-section h1,
.form-section h2,
.form-section h3 {
    color: var(--primary);
    font-size: 1rem;
}

/* === CARTÕES E LISTAGENS === */
.card-elevated,
.table-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 16px;
}

/* === TABELAS === */
.table,
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.table thead th,
.table-modern thead th {
    background: #f3e8ff;
    color: var(--primary);
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 18px;
    text-align: left;
}

.table tbody td,
.table-modern tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:nth-child(even),
.table-modern tbody tr:nth-child(even) {
    background: var(--row-alt);
}

.table tbody tr:hover,
.table-modern tbody tr:hover {
    background: #fafafa;
}

.table .tight {
    white-space: nowrap;
}

/* === FORMULÁRIOS === */
.form-section {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--color-border-subtle);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.form-section h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.form-section h2 i {
    margin-right: 8px;
    font-size: 1.1rem;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border-subtle);
    border-radius: 4px;
    font-size: 14px;
    font-family: Inter, sans-serif;
    font-weight: 300;
    background: var(--color-bg-input);
    color: var(--color-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(74, 30, 196, 0.1);
}

label {
    display: block;
    font-weight: 300;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    font-size: 14px;
    font-family: Inter, sans-serif;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 18px;
}

.form-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    height: 40px;
    padding: 8px 14px;
    gap: 8px;
}

/* Grid layout para formulários */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* Formulários e listas mais largos */
.form-section,
.table-card,
.client-form,
.room-schedule-page {
    max-width: 1400px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Tabelas e listas ocupam toda a largura disponível */
.table,
.table-modern {
    width: 100%;
    table-layout: auto;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Texto de ajuda */
.form-section small,
.help-text,
.text-muted {
    font-size: 13px;
    color: var(--muted);
}

/* === AÇÕES E DROPDOWN === */
.actions-cell .action-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions-col {
    white-space: nowrap;
    width: 1%;
    text-align: right;
}

.action-bar {
    display: flex;
    gap: 10px;
}

.icon-btn {
    border: none;
    background: transparent;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    color: #4c4c4c;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(0,0,0,0.05);
}

.icon-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Botões de ação com ícones */
a.btn-icon,
button.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--primary);
    margin: 0 4px;
    padding: 0;
    line-height: 1;
    opacity: 0.98;
    text-decoration: none !important;
    vertical-align: middle;
}

a.btn-icon i,
button.btn-icon i {
    font-size: 14px;
    pointer-events: none;
}

a.btn-icon:hover,
a.btn-icon:focus,
button.btn-icon:hover,
button.btn-icon:focus {
    background: rgba(74, 30, 196, 0.08);
    border-color: rgba(74, 30, 196, 0.25);
    color: var(--primary-700);
    outline: none;
}

.btn-icon.view {
    color: var(--primary);
}

.btn-icon.reserve {
    color: var(--primary);
}

.btn-icon.delete {
    color: var(--danger);
}

.btn-icon.delete:hover,
.btn-icon.delete:focus {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
    color: #b91c1c;
}

.btn-icon:focus-visible {
    box-shadow: 0 0 0 3px rgba(74, 30, 196, 0.25);
}

.btn-outline {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    color: #444;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* === ALERTAS === */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.alert.success,
.alert-success {
    background: #e6f7ef;
    border: 1px solid #b4ebce;
    color: #236f4a;
}

.alert.alert-danger {
    background: #fdf2f2;
    border: 1px solid #f5b2b2;
    color: #c53030;
}

/* === BADGES E CHIPS === */
.badge-soft {
    background: #f3e8ff;
    color: var(--primary-600);
    border: 1px solid #e9d5ff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* === PAGINAÇÃO === */
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

.page-link {
    color: var(--primary);
}

.page-link:hover {
    color: var(--primary-600);
}

/* === LINKS === */
a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-600);
}

/* === CORREÇÕES PARA PÁGINAS ESPECÍFICAS === */
/* Garante que overlays não cubram o header */
.create-overlay {
    z-index: 1200 !important;
}

/* Garante que o header fique sempre visível */
.cauim-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
}

/* === RESPONSIVIDADE === */
@media (max-width: 720px) {
    .btn-offset {
        margin-left: 0;
        margin-top: 0.4rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 18px; /* Mantém padding consistente */
    }
    
    .main-nav .nav-link {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .header-top {
        flex-direction: column;
        gap: 12px;
        padding: 16px 18px; /* Mantém padding consistente */
    }
    
    .container,
    .container-fluid {
        padding: 0 18px !important; /* Garante padding consistente em mobile */
    }
    
    .footer {
        margin: 16px 0 20px 0;
        padding: 20px;
    }
}

/* === ÍCONES === */
.icon-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.icon-btn {
    width: 36px;
    height: 36px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* === RODAPÉ === */
.footer {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    padding: 20px;
    margin: 16px 0 20px 0;
    color: #8a8a8a;
    text-align: center;
}

/* === LAYOUT DE PÁGINA === */
.page-wrap {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 16px;
    font-family: Inter, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === TÍTULOS DE VIEWS ESPECÍFICAS === */
/* Títulos como "Editar Reserva", "Novo Cliente", etc. */
div[class*="container"] > h1:first-child,
div[class*="container"] > h2:first-child,
main > h1:first-child,
main > h2:first-child,
.content > h1:first-child,
.content > h2:first-child {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: var(--primary) !important;
    margin-bottom: 1.5rem !important;
    margin-top: 0 !important;
}

/* === UTILITÁRIOS === */
.inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.help {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.dl-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 8px;
    margin: 16px 0;
}

.dl-row dt {
    font-weight: 600;
    color: #444;
}

.dl-row dd {
    margin: 0 0 8px 0;
}

/* === ESCOLHAS/RADIO BUTTONS === */
.choice {
    display: inline-flex;
    gap: 8px;
    background: color-mix(in srgb, #f3e8ff 55%, #fff 45%);
    border: 1px dashed color-mix(in srgb, var(--primary) 30%, #bbb);
    padding: 8px;
    border-radius: 999px;
}

.choice label {
    margin: 0;
    color: #444;
}

.choice input[type="radio"] {
    accent-color: var(--primary);
}

/* ===================================================================
   ESTILOS DE CALENDÁRIO E RESERVAS
   =================================================================== */

/* === VARIÁVEIS DE STATUS === */
:root {
    /* Cores de status das reservas */
    --status-confirmed: #1b5e20; /* Verde Escuro - Status 1 */
    --status-pending: rgba(207, 204, 7, 0.815); /* Cinza Transparente - Status 2 */
    --status-waitlist: #f57c00; /* Amarela - Status 3 */
    --status-cancelled: #757575; /* Cinza - Status 4 */
    
    /* Cores de calendário */
    --weekend-bg: #fafafa;
    --header-bg: #f5f5f7;
    --occupied: #e3f2fd;
    --occupied-contrast: #1976d2;
    --muted-text: #6b7280;
    --accent-color: var(--primary);
}

/* === CONTAINER DE CALENDÁRIO === */
.calendar-container {
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 16px 0;
    padding: 0;
    overflow: hidden;
}

/* === CONTROLES DE FILTRO E LEGENDA === */
.filter-controls, .legend-container {
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-container {
    border-bottom: none;
    border-top: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

.legend-color.confirmed { background: var(--status-confirmed); }
.legend-color.pending { background: var(--status-pending); }
.legend-color.waitlist { background: var(--status-waitlist); }
.legend-color.cancelled { background: var(--status-cancelled); }


/* === CALENDÁRIO MENSAL - VISUAL CARTÃO === */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
    width: 100%;
    margin: 0 auto 24px auto;
    background: transparent;
}
.month-grid {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px 0 rgba(80,40,180,0.08);
    padding: 0 0 18px 0;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    min-height: 420px;
    transition: box-shadow 0.2s;
}
.month-header {
    background: #ede7f6;
    color: #512da8;
    font-weight: 700;
    font-size: 1.15rem;
    text-align: center;
    border-radius: 16px 16px 0 0;
    padding: 16px 0 8px 0;
    border-bottom: 1px solid #e0e0e0;
    letter-spacing: 0.5px;
}
.month-body {
    flex: 1 1 auto;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.month-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 15px;
    background: #fff;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    box-shadow: none;
}
.month-table thead th {
    background: #ede7f6;
    color: #512da8;
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 0;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}
.month-table tbody td {
    min-height: 48px;
    height: 48px;
    background: #fff;
    position: relative;
    text-align: center;
    vertical-align: top;
    border: 1px solid #f0f0f2;
    padding: 0;
    transition: background 0.2s;
    border-radius: 8px;
}
.month-table tbody td.inactive {
    background: var(--weekend-bg) !important;
    color: #bdbdbd !important;
}
.month-table .day-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: #512da8;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
}
.month-table tbody td.day-today {
    background: #ede7f6;
    border: 2px solid #7c4dff;
    z-index: 2;
}
.month-table tbody td.day-has-reservation {
    background: #e1bee7;
    border-left: 4px solid #8e24aa;
}
/* Remove borda lateral das células de status */
.month-table tbody td.day-has-reservation.status-confirmed {
    background: #c8e6c9;
    border-left: none !important;
    border-right: none !important;
}
.month-table tbody td.day-has-reservation.status-cancelled {
    background: #ffcdd2;
    border-left: none !important;
    border-right: none !important;
}
.month-table tbody td.day-has-reservation.status-pending {
    /* Unificado para usar a variável global, removendo o override pastel */
    background: var(--status-pending) !important;
    border-left: none !important;
    border-right: none !important;
}
.month-table tbody td.day-has-reservation.status-waitlist {
    background: #f57c00;
    border-left: none !important;
    border-right: none !important;
}
.month-table tbody td:hover {
    background: #ede7f6;
}
.month-table .reservation-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin: 2px 2px 0 0;
}
.month-table .reservation-dot.status-confirmed {
    background: #388e3c;
}
.month-table .reservation-dot.status-cancelled {
    background: #d32f2f;
}
.month-table .reservation-dot.status-pending {
    background: #fbc02d;
}
@media (max-width: 1100px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    .month-grid {
        min-width: 0;
    }
}

/* === LEGENDA CLÁSSICA === */
.legend {
    display: table;
    width: auto;
    margin: 0 0 12px 0;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
}
.legend-item {
    display: table-row;
}
.legend-color, .legend-item span {
    display: table-cell;
    vertical-align: middle;
    padding: 2px 8px;
}
.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

/* === DIA DO CALENDÁRIO === */
.day-number {
    display: inline-block;
    position: static;
    font-size: 12px;
    color: var(--muted-text);
    background: transparent;
    padding: 0;
    border-radius: 4px;
    font-weight: 700;
    line-height: 1;
}

.day-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.day-link:hover {
    background: rgba(0,0,0,0.1);
    color: white;
}

/* === INDICADOR DE RESERVA === */
.dot {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    opacity: 0.0;
    transition: opacity .12s ease, transform .12s ease;
    transform: scale(.9);
}

td.occupied .dot {
    opacity: 1;
    transform: scale(1);
    background: var(--occupied-contrast);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* === CORES BASEADAS EM STATUS === */
.status-confirmed {
    background: var(--status-confirmed) !important;
    color: white !important;
}

.status-pending {
    background: var(--status-pending) !important;
    color: #374151 !important;
}

.status-waitlist {
    background: var(--status-waitlist) !important;
    color: white !important;
}

.status-cancelled {
    background: var(--status-cancelled) !important;
    color: white !important;
}

.status-confirmed .day-number,
.status-waitlist .day-number,
.status-cancelled .day-number {
    color: white !important;
}

.status-pending .day-number {
    color: #374151 !important;
}

/* === ESTILO LEGADO (COMPATIBILIDADE) === */
.occupied {
    background: var(--occupied);
    color: var(--occupied-contrast);
}

.occupied .day-number {
    color: var(--occupied-contrast);
}

/* === FINS DE SEMANA === */
.month-table tbody tr td:nth-child(1),
.month-table tbody tr td:nth-child(7) {
    background: var(--weekend-bg);
}

/* === SOBREPOSIÇÃO DE STATUS SOBRE FINS DE SEMANA === */


.month-table tbody td.occupied {
    background: var(--occupied) !important;
}

/* === ACESSIBILIDADE === */
.month-table td:focus {
    outline: 3px solid rgba(109,40,217,0.14);
    outline-offset: 2px;
}

.tooltip {
    display: none !important;
}

/* === LOADING E MENSAGENS === */
.loading {
    display: inline-block;
    margin-left: 8px;
    color: var(--muted-text);
    font-size: 13px;
}

.no-room {
    color: var(--muted-text);
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
    padding: 12px;
}

/* === CONTROLES DE PAGINAÇÃO === */
.pagination-controls {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 12px;
}

.pagination-controls button {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination-controls button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === RESPONSIVIDADE === */
@media (max-width: 1000px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-controls, .legend-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .month-container {
        border-right: none;
        border-bottom: 1px solid #f0f0f2;
    }
    
    .month-container:last-child {
        border-bottom: none;
    }
}

@media (max-width: 600px) {
    .month-table tbody td {
        min-height: 48px;
        padding: 4px;
    }
    
    .day-number {
        font-size: 11px;
    }
    
    .month-body {
        padding: 12px;
    }
}

/* === TIMELINE E VISUALIZAÇÃO DE RESERVAS === */
.timeline-container {
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 16px 0;
    overflow: hidden;
}

.timeline-header {
    background: var(--header-bg);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.timeline-title {
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.timeline-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.reservation-item {
    padding: 12px 20px;
    border-left: 4px solid var(--status-confirmed);
    margin-bottom: 1px;
    background: white;
    transition: background 0.2s ease;
}

.reservation-item:hover {
    background: #f8f9fa;
}

.reservation-item.status-pending {
    border-left-color: var(--status-pending);
}

.reservation-item.status-waitlist {
    border-left-color: var(--status-waitlist);
}

.reservation-item.status-cancelled {
    border-left-color: var(--status-cancelled);
}

.reservation-meta {
    font-size: 12px;
    color: var(--muted-text);
    margin-bottom: 4px;
}

.reservation-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.reservation-details {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===================================================================
   ESTILOS DO FORMULÁRIO DE RESERVA
   =================================================================== */

/* Tipografia e labels do formulário */
.client-form,
.client-form .form-control,
.client-form input,
.client-form select,
.client-form textarea,
.client-form label,
.client-form .form-label {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: #111827;
}

.client-form label,
.client-form .form-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 4px;
    display: inline-block;
}

/* Labels específicos do agendamento */
.client-form .schedule-legend.form-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.client-form .weekday-row .form-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.client-form .form-control {
    font-size: 14px;
    line-height: 1.4;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #111827;
}

.client-form .small-input {
    padding: 6px 8px;
    font-size: 13px;
}

.client-form .form-section .section-title {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-form .btn.primary {
    background-color: #2563eb;
    color: #fff;
    border: none;
}

/* Campo obrigatório */
.required {
    color: #dc2626;
    font-weight: bold;
    margin-left: 2px;
}

/* Estilos do agendamento */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.schedule-block {
    background: #ffffff;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.schedule-legend.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.time-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.weekday-checks {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.checkbox-label, .radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    margin: 0;
}

.checkbox-label input, .radio-label input {
    margin: 0;
    width: 14px;
    height: 14px;
}

.radio-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* Estilos do evento */
.grid-span-2 {
    grid-column: 1 / -1;
}

.event-free-price-row {
    display: flex;
    gap: 30px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
    margin-bottom: 0;
}

.form-check-input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.form-check-label {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin: 0;
}

.event-price-section {
    transition: opacity 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.event-price-section.disabled {
    opacity: 0.5;
}

.event-price-section.disabled input {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Input de moeda */
.currency-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 8px;
    z-index: 1;
    color: #6b7280;
    font-weight: 500;
    pointer-events: none;
}

.currency-input {
    padding-left: 32px !important;
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.event-price-section.disabled .currency-symbol {
    color: #9ca3af;
}

.event-price-section.disabled .currency-input {
    background-color: #f3f4f6;
    cursor: not-allowed;
    color: #6b7280;
}

/* Alertas de validação */
.alert {
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fed7aa;
    color: #d97706;
}

.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.alert i {
    font-size: 16px;
}

/* ===================================================================
   ESTILOS DE FORMULÁRIOS GERAIS
   =================================================================== */

/* Utilitários */
.hidden { 
    display: none !important; 
}

/* Campo obrigatório */
.required {
    color: #dc2626;
    font-weight: bold;
    margin-left: 2px;
}

/* Estilos de validação */
.text-danger {
    color: #dc2626 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.validation-summary-errors {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 20px;
}

.validation-summary-errors li {
    margin-bottom: 4px;
}

/* Estados de validação do formulário */
.input-validation-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1) !important;
}

.field-validation-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ===================================================================
   ESTILOS DE VISUALIZAÇÃO DE DETALHES
   =================================================================== */

/* Seções de formulário em modo visualização */
.form-section h3 {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.form-value {
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 0.95rem;
}

/* Responsivo para detalhes */
@media (max-width: 768px) {
    div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}