/* ==========================================================================
   SISTEMA DE BARBEARIA - DESIGN SYSTEM E FOLHA DE ESTILOS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Paleta de Cores */
    --bg-dark: #090a0f;
    --bg-card: rgba(30, 36, 50, 0.35);
    --bg-card-solid: rgba(30, 36, 50, 0.35);
    --bg-input: rgba(30, 35, 48, 0.6);
    --primary-gold: #d4af37;
    --primary-gold-hover: #f3cf5a;
    --primary-gold-dim: rgba(212, 175, 55, 0.15);
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    --border-color: rgba(212, 175, 55, 0.2);
    --border-light: rgba(255, 255, 255, 0.08);
    --danger: #ef4444;
    --success: #10b981;
    
    /* Fontes e Transições */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET E CONFIGURAÇÕES BÁSICAS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) rgba(9, 10, 15, 0.5);
}

/* Personalização da barra de rolagem (WebKit - Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(9, 10, 15, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.05);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
    border-color: rgba(212, 175, 55, 0.2);
}


body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   TELA DE LOGIN E FUNDO RESPONSIVO (BLUR DE ROSTO)
   ========================================================================== */

/* Container do background com proporção exata da imagem (1920x1080) */
.bg-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vmax;
    height: calc(100vmax * (1080 / 1920));
    min-width: 100vw;
    min-height: 100vh;
    z-index: -2;
    overflow: hidden;
}

/* Garantindo que cobre o viewport respeitando o aspect ratio */
@media (min-aspect-ratio: 1920/1080) {
    .bg-wrapper {
        width: 100vw;
        height: calc(100vw * (1080 / 1920));
    }
}
@media (max-aspect-ratio: 1920/1080) {
    .bg-wrapper {
        height: 100vh;
        width: calc(100vh * (1920 / 1080));
    }
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fundo da tela do dashboard */
.bg-dashboard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.bg-dashboard img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    display: block;
}

/* Overlay de desfoque posicionado exatamente na face do cliente */
.face-blur-overlay {
    position: absolute;
    top: 50%;         /* Ajustado para ficar exatamente sobre o rosto */
    left: 71.5%;       /* na proporção da imagem */
    width: 11%;
    height: 17%;
    border-radius: 50%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: none;
    z-index: 1;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4), 
                0 0 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Escurecer o fundo geral para não ofuscar e dar legibilidade */
.login-screen {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 20px;
}

/* Quadro de login centralizado (Glassmorphism) */
.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-top: 1px solid rgba(212, 175, 55, 0.3); /* Linha gold sutil no topo */
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: var(--transition-normal);
}

.login-card:hover {
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 
                0 0 30px rgba(212, 175, 55, 0.05);
}

.login-logo {
    max-height: 100px;
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* ==========================================================================
   INPUTS E GRUPOS DE FORMULÁRIO
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-light);
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus {
    border-color: var(--primary-gold);
    background-color: rgba(30, 35, 48, 0.8);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

/* Senha com visualização */
.password-input-wrapper .form-input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary-gold);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ==========================================================================
   BOTÕES E COMPONENTES DE AÇÃO
   ========================================================================== */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-gold), #b39228);
    color: #0b0c10;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
    margin-top: 10px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-gold-hover), var(--primary-gold));
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(1px);
}

.btn-submit:disabled {
    background: #4b5563;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    pointer-events: none;
}

.toast {
    background-color: var(--bg-card-solid);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--primary-gold);
    color: var(--text-light);
    padding: 18px 28px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.65), 0 0 1px 1px rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    max-width: 450px;
    width: 90vw;
    opacity: 0;
    animation: popIn 0.4s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.98rem;
    pointer-events: auto;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

@keyframes popIn {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   LAYOUT DO DASHBOARD ADMINISTRATIVO
   ========================================================================== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: rgba(9, 10, 15, 0.55);
}

/* Sidebar Lateral */
.sidebar {
    width: 260px;
    background-color: rgba(13, 15, 20, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.sidebar-logo {
    width: 45px;
    height: 45px;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.menu-item:hover, .menu-item.active {
    color: var(--primary-gold);
    background-color: var(--primary-gold-dim);
}

.menu-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.sidebar-footer {
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
    margin-top: 20px;
}

.user-profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-gold-dim);
    color: var(--primary-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1px solid var(--border-color);
}

.user-details {
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Área de Conteúdo Principal */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 110px 40px 40px 40px;
    min-height: 100vh;
}

/* Global Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background: rgba(13, 15, 20, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 70px;
    z-index: 99;
    transition: all 0.3s ease;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}

.top-bar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
}

.top-bar-btn svg {
    width: 20px;
    height: 20px;
}

.top-bar-btn.logout-btn {
    gap: 8px;
    padding: 10px 16px;
    font-weight: 600;
    color: #f87171;
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.15);
}

.top-bar-btn.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #f87171;
    color: #fff;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0d0f14;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 20px;
}

.content-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
}

.content-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   CARDS E GRIDS
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background-color: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: var(--transition-fast);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-color);
}

.info-badge {
    background-color: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    padding: 8px 18px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: var(--transition-fast);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.info-badge:hover {
    border-color: var(--border-color);
    transform: translateY(-1px);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gold);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-gold-dim);
    color: var(--primary-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ==========================================================================
   TABELAS DE DADOS
   ========================================================================== */
.table-container {
    background-color: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.table-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.table-bar-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-add {
    background-color: var(--primary-gold);
    color: #0b0c10;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-add:hover {
    background-color: var(--primary-gold-hover);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.btn-add svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: rgba(255,255,255,0.02);
    padding: 16px 24px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
}

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
    color: var(--text-light);
}

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

.data-table tr:hover td {
    background-color: rgba(255,255,255,0.01);
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.superuser {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.role-badge.owner {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.role-badge.barber {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    background: none;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-action:hover {
    color: var(--text-light);
    background-color: rgba(255,255,255,0.05);
}

.btn-action.delete:hover {
    color: var(--danger);
    background-color: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.2);
}

.btn-action.info:hover {
    color: var(--primary-gold);
    background-color: var(--primary-gold-dim);
    border-color: var(--border-color);
}

.sub-client-link {
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-gold);
    cursor: pointer;
    transition: var(--transition-fast);
}

.sub-client-link:hover {
    color: var(--primary-gold-hover) !important;
    border-bottom-style: solid;
}

.btn-action svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease-out;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background-color: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    overflow: hidden;
    transform: translateY(-30px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.modal-backdrop.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-close:hover {
    color: var(--text-light);
}

.btn-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    background-color: rgba(255,255,255,0.01);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-light);
    border-radius: 6px;
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.05);
}

.btn-primary {
    background-color: var(--primary-gold);
    color: #0b0c10;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--primary-gold-hover);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
    border: 1px solid var(--danger);
    border-radius: 6px;
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-danger:hover {
    background-color: #b91c1c; /* Vermelho mais escuro no hover */
    border-color: #b91c1c;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   TELA DE CARREGAMENTO / LOADERS
   ========================================================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.4s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-gold);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   RESPONSIVIDADE GERAL
   ========================================================================== */
@media (max-width: 768px) {
    .sidebar {
        width: 100% !important;
        height: 65px !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        border-right: none !important;
        border-top: 1px solid var(--border-light) !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 0 !important;
        z-index: 1000 !important;
        background-color: rgba(13, 15, 20, 0.95) !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important;
    }
    
    .sidebar::-webkit-scrollbar {
        display: none !important;
    }
    
    .sidebar-title, .user-details, .sidebar-footer, .sidebar-header {
        display: none !important;
    }
    
    .sidebar-menu {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 10px !important;
        gap: 15px !important;
        height: 100% !important;
        width: auto !important;
    }

    .sidebar-menu li {
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        flex-shrink: 0 !important;
    }

    .menu-item {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 8px 12px !important;
        gap: 4px !important;
        font-size: 0.65rem !important;
        color: var(--text-muted) !important;
        border-radius: 8px !important;
        min-width: 55px !important;
    }

    .menu-item span {
        display: none !important;
    }

    .menu-item svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 85px 15px 85px 15px !important;
        width: 100% !important;
        min-width: 100% !important;
    }
    
    .top-bar {
        left: 0 !important;
        padding: 10px 15px !important;
        width: 100% !important;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .table-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .btn-add {
        width: 100%;
        justify-content: center;
    }

    /* Modal Registrar Atendimento no Mobile */
    section#tab-attendances {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        background: rgba(10, 12, 18, 0.98) !important;
        z-index: 2000 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 20px 15px 80px 15px !important;
    }

    section#tab-attendances .content-header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    section#tab-attendances .table-container {
        padding: 15px !important;
        margin: 0 auto !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
    }

    .mobile-back-btn {
        display: block !important;
    }

    /* Correção do formulário de Assinatura no Mobile para evitar transbordamento de datas */
    #subscription-form {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
    }

    #subscription-form .form-group {
        margin: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    #subscription-form .form-input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    #subscription-form button[type="submit"] {
        margin-top: 10px !important;
        width: 100% !important;
        height: 46px !important;
    }
}

/* ==========================================================================
   ADICIONADO: MÓDULO COMERCIAL & FINANCEIRO (ESTILOS ADICIONAIS)
   ========================================================================== */

/* Barra de Filtros e Abas Secundárias */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    width: fit-content;
    align-items: center;
}

.btn-filter, .btn-sub-tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.btn-filter:hover, .btn-sub-tab:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.04);
}

.btn-filter.active, .btn-sub-tab.active {
    background-color: var(--primary-gold-dim);
    color: var(--primary-gold);
    border: 1px solid var(--border-color);
}

.custom-dates {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

.date-input {
    padding: 6px 12px;
    font-size: 0.85rem;
    height: 34px;
    width: 140px;
}

.btn-apply-filter {
    padding: 6px 15px;
    height: 34px;
    font-size: 0.85rem;
}

/* Gráficos do Dashboard */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.chart-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 20px;
    border-left: 3px solid var(--primary-gold);
    padding-left: 10px;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
}

/* Autocomplete de Clientes */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #11141c;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    margin-top: 4px;
}

.autocomplete-item {
    padding: 10px 16px;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.autocomplete-item:hover {
    background: var(--primary-gold-dim);
    color: var(--primary-gold);
}

/* Listas de Checkboxes de Multi-seleção */
.checkbox-group-list {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    max-height: 160px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.92rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.checkbox-item:hover {
    background: rgba(255,255,255,0.03);
}

.checkbox-item input[type="checkbox"] {
    accent-color: var(--primary-gold);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Botões de Ação de Contato */
.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

.contact-btn.whatsapp {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.contact-btn.whatsapp:hover {
    background: #10b981;
    color: #fff;
}

.contact-btn.call {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
    border: 1px solid var(--border-color);
}

.contact-btn.call:hover {
    background: var(--primary-gold);
    color: var(--text-dark);
}

.badge-tokens {
    background: var(--primary-gold-dim);
    color: var(--primary-gold);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    display: inline-block;
    white-space: nowrap;
}

.badge-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-status.expired {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-type {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    color: var(--text-light);
}

.badge-type.income {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-type.expense {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Botão de Aniversário com Efeito Pulsante */
.contact-btn.birthday-balloon {
    background: rgba(255, 71, 126, 0.15);
    color: #ff477e;
    border: 1px solid rgba(255, 71, 126, 0.3);
    animation: pulse-birthday 1.5s infinite;
}

.contact-btn.birthday-balloon:hover {
    background: #ff477e;
    color: #fff;
}

@keyframes pulse-birthday {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 71, 126, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 71, 126, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 126, 0);
    }
}

/* ==========================================================================
   ESTILOS DE IMPRESSÃO / GERAÇÃO DE PDF
   ========================================================================== */
.print-only {
    display: none !important;
}

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    @page {
        margin: 1.6cm !important;
    }

    .print-only {
        display: block !important;
    }

    /* Esconde elementos indesejados no PDF */
    .sidebar,
    .top-bar,
    .bg-dashboard,
    .filter-bar,
    .action-buttons,
    .header-actions,
    .content-header,
    #toast-container,
    .loading-screen,
    .btn-add {
        display: none !important;
    }

    /* Ajusta o container principal para ocupar toda a largura */
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
        min-height: auto !important;
    }

    .dashboard-layout {
        display: block !important;
    }

    /* Ajusta cores e fontes para impressão */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt !important;
    }

    .content-title {
        color: #000 !important;
        font-size: 20pt !important;
    }

    .content-subtitle {
        color: #555 !important;
        font-size: 11pt !important;
    }

    /* Tabelas */
    .table-container {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .table-header-bar {
        background: #f0f0f0 !important;
        border-bottom: 2px solid #ccc !important;
        color: #000 !important;
    }

    .table-bar-title {
        color: #000 !important;
    }

    .data-table {
        color: #000 !important;
        border-collapse: collapse !important;
        width: 100% !important;
        max-width: 100% !important;
        table-layout: auto !important;
    }

    .data-table th {
        background: #f5f5f5 !important;
        color: #000 !important;
        border-bottom: 2px solid #ccc !important;
        padding: 4px 6px !important;
        font-size: 7.5pt !important;
        font-weight: bold !important;
        text-align: left !important;
        white-space: normal !important;
    }

    .data-table td {
        border-bottom: 1px solid #eee !important;
        color: #000 !important;
        padding: 4px 6px !important;
        font-size: 7.5pt !important;
        max-width: none !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    .badge-type {
        padding: 2px 4px !important;
        font-size: 7pt !important;
        border-radius: 4px !important;
        border: 1px solid #ccc !important;
        background: #f9f9f9 !important;
        color: #000 !important;
    }

    /* Cards Estatísticos no Dashboard */
    .stats-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
    }

    .stat-card {
        flex: 1 1 calc(33.33% - 15px) !important;
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        color: #000 !important;
        padding: 15px !important;
        page-break-inside: avoid;
    }

    .stat-value {
        color: #000 !important;
    }

    .stat-label {
        color: #555 !important;
    }

    .stat-icon {
        display: none !important;
    }

    /* Badges de informação no topo */
    #dashboard-info-badges,
    #history-info-badges {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .info-badge {
        background: #f9f9f9 !important;
        border: 1px solid #ccc !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    .info-badge span,
    .info-badge strong {
        color: #000 !important;
    }

    .info-badge svg {
        fill: #333 !important;
    }

    /* Evitar quebra de página no meio de linhas de tabela ou gráficos */
    tr {
        page-break-inside: avoid !important;
    }

    .chart-card {
        background: #fff !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
    }
}

/* ==========================================================================
   PWA INSTALL BANNER
   ========================================================================== */
.pwa-banner {
    position: fixed;
    top: 15px;
    left: 15px;
    right: 15px;
    background: rgba(30, 36, 50, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--primary-gold, #d4af37);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    z-index: 100000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-banner-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.pwa-banner-text strong {
    color: var(--primary-gold, #d4af37);
    font-size: 0.9rem;
    font-weight: 600;
}

.pwa-banner-text span {
    color: #e2e8f0;
    font-size: 0.75rem;
    line-height: 1.3;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-pwa-action.install {
    background: var(--primary-gold, #d4af37);
    color: #000;
    border: none;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast, all 0.2s);
}

.btn-pwa-action.install:hover {
    background: var(--primary-gold-hover, #f3cf5a);
}

.btn-pwa-action.dismiss {
    background: transparent;
    color: #a0aec0;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: var(--transition-fast, all 0.2s);
}

.btn-pwa-action.dismiss:hover {
    color: #fff;
}

/* ==========================================================================
   MOBILE & VIEWPORT FIXES
   ========================================================================== */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

.mobile-only-logout {
    display: none;
}

@media (max-width: 768px) {
    /* Corrigir imagem de fundo de login desfocada/cortada e sumir com número inferior */
    .bg-image {
        transform: scale(1.18) !important;
        transform-origin: top center !important;
    }
    
    /* Garantir que grids não passem da largura da tela */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    .charts-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Tabelas responsivas (scroll horizontal interno) */
    .table-responsive {
        overflow-x: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 15px;
    }
    
    /* Logout mobile-only no final da barra lateral */
    .mobile-only-logout {
        display: none !important;
    }
    
    .logout-menu-item {
        color: var(--danger, #ef4444) !important;
    }
}

/* ==========================================================================
   WHATSAPP FLOATING WIDGET (LOGIN SCREEN)
   ========================================================================== */
.whats-floating-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: transparent;
    border: 3px solid var(--primary-gold, #d4af37);
    border-radius: 50%;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: var(--transition-fast, all 0.23s);
    animation: bounceIn 1s ease-out;
    overflow: hidden;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.whats-floating-widget:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: #25d366; /* WhatsApp Green */
    box-shadow: 0 10px 35px rgba(37, 211, 102, 0.45);
}

.whats-widget-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.23s;
}

@media (max-width: 768px) {
    .whats-floating-widget {
        bottom: 20px !important;
        right: 20px !important;
        border-width: 1.5px !important;
        width: 90px !important;
        height: 90px !important;
    }
}
