@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f6fa;
    overflow-x: hidden;
    color: #3f4254;
}

/* --- Estilos da Tela de Login --- */
#login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f6 0%, #eaf1ff 100%);
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 1.5rem;
    box-shadow: 0 15px 35px rgba(43, 47, 76, 0.1);
    border: none;
    background-color: #ffffff;
    padding: 3rem 2.5rem;
}

.login-icon-wrapper {
    position: relative;
}

.login-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a5ba;
    z-index: 10;
}

.login-input {
    background-color: #f8f9fa;
    border: 1px solid #eaedf2;
    border-radius: 0.75rem;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    font-size: 0.95rem;
    color: #3f4254;
    transition: all 0.2s ease-in-out;
}

.login-input:focus {
    background-color: #ffffff;
    border-color: #2b2f4c;
    box-shadow: 0 0 0 4px rgba(43, 47, 76, 0.1);
    outline: none;
}

.btn-login {
    background-color: #2b2f4c;
    color: #ffffff;
    border-radius: 0.75rem;
    padding: 0.9rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(43, 47, 76, 0.2);
}

.btn-login:hover {
    background-color: #1a1d36;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(43, 47, 76, 0.3);
}

/* --- Estilos da Dashboard --- */
#dashboard-view {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#dashboard-view.active {
    display: block;
    opacity: 1;
}

/* --- Sidebar --- */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #eaedf2;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: #f0efff;
    color: #5c55c8;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.search-sidebar {
    margin: 0 1.5rem 1.5rem 1.5rem;
    background-color: #f5f6fa;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-sidebar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.nav-link-custom {
    color: #6c7293;
    padding: 0.8rem 1.2rem;
    margin: 0.2rem 1.2rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.2s;
}

.nav-link-custom:hover {
    background-color: #f5f6fa;
    color: #2b2f4c;
}

.nav-link-custom.active-link {
    color: #fff;
    background-color: #2b2f4c;
    box-shadow: 0 4px 10px rgba(43, 47, 76, 0.2);
}

.user-profile-sidebar {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eaedf2;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

/* --- Main Content --- */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: all 0.3s;
    padding: 0;
    /* Removido o padding geral para permitir que a barra cole no topo */
}

main {
    padding: 0 2rem 2rem 2rem;
    /* Adicionado padding apenas no conteúdo dos gráficos */
}

.topbar-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 900;
    background-color: rgba(245, 246, 250, 0.95);
    /* Cor de fundo com leve transparência */
    backdrop-filter: blur(10px);
    /* Efeito de vidro fosco no scroll */
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
}

.stat-card {
    border: 1px solid #f0f2f6;
    border-radius: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
    background: #fff;
    transition: transform 0.2s;
}

.icon-box {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.bg-soft-blue {
    background-color: #eaf1ff;
    color: #3b71fe;
}

.bg-soft-purple {
    background-color: #f0efff;
    color: #5c55c8;
}

.bg-soft-indigo {
    background-color: #e6e5fb;
    color: #4338ca;
}

.text-dark-blue {
    color: #1a1d36;
}

.bg-dark-blue {
    background-color: #2b2f4c;
}

.credit-card {
    background: linear-gradient(135deg, #373b5a 0%, #22263d 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(43, 47, 76, 0.2);
}

.action-btn {
    background: #f5f6fa;
    border: 1px solid #eaedf2;
    border-radius: 0.75rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1d36;
    font-size: 1.1rem;
    transition: 0.2s;
}

.action-btn:hover {
    background: #eaedf2;
}

/* --- Badges da Tabela --- */
.badge-soft-success {
    background: #e0f8e9;
    color: #1fb154;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.8rem;
}

.badge-soft-purple {
    background: #f0efff;
    color: #5c55c8;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.8rem;
}

.badge-soft-pink {
    background: #ffe4f0;
    color: #e83e8c;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.8rem;
}

.badge-soft-blue {
    background: #eaf1ff;
    color: #3b71fe;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.8rem;
}

.table> :not(caption)>*>* {
    padding: 1rem 0.5rem;
    border-bottom-color: #f0f2f6;
    color: #6c7293;
    font-size: 0.9rem;
}

/* Garantir que o botão hambúrguer suma no desktop */
@media (min-width: 992px) {
    #sidebar-toggle {
        display: none !important;
    }
}

/* Responsividade */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show-sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    main {
        padding: 0 1rem 1rem 1rem;
    }

    .topbar-simple {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .overlay.active {
        display: block;
    }
}


/* --- Sistema de Notificações Toast Moderno --- */
.modern-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 40px);
}

.modern-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border-radius: 1rem;
    padding: 14px 16px;
    box-shadow: 0 10px 30px rgba(43, 47, 76, 0.14);
    border-left: 4px solid #3b71fe;
    animation: toastSlideIn 0.3s ease forwards;
}

.modern-toast.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

.modern-toast.success { border-left-color: #1fb154; }
.modern-toast.danger  { border-left-color: #ef4444; }
.modern-toast.warning { border-left-color: #f59e0b; }
.modern-toast.info    { border-left-color: #3b71fe; }

.modern-toast-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 2px;
}

.modern-toast.success .modern-toast-icon { color: #1fb154; }
.modern-toast.danger .modern-toast-icon  { color: #ef4444; }
.modern-toast.warning .modern-toast-icon { color: #f59e0b; }
.modern-toast.info .modern-toast-icon    { color: #3b71fe; }

.modern-toast-content { flex: 1; }
.modern-toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a1d36;
    margin-bottom: 2px;
}
.modern-toast-msg {
    font-size: 0.82rem;
    color: #6c7293;
}
.modern-toast-close {
    background: transparent;
    border: none;
    color: #a0a5ba;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(30px); }
}

/* --- Ícone de Confirmação Global --- */
.confirm-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}
.confirm-icon-circle.danger  { background: #fef2f2; color: #ef4444; }
.confirm-icon-circle.warning { background: #fffbeb; color: #f59e0b; }
.confirm-icon-circle.primary { background: #eaf1ff; color: #3b71fe; }
.confirm-icon-circle.success { background: #e0f8e9; color: #1fb154; }

/* --- Seleção de Permissões por Página --- */
.perm-card-check {
    border: 1.5px solid #eaedf2;
    border-radius: 0.85rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fbfcfe;
    user-select: none;
}
.perm-card-check:hover {
    border-color: #cbd5e1;
    background-color: #f5f6fa;
}
.perm-card-check:has(input:checked) {
    border-color: #2b2f4c;
    background-color: #f0f3ff;
}


/* ==========================================================================
   COMPATIBILIDADE DE GRID & FORMULÁRIOS (Bootstrap 5 + Bootstrap 6 Alpha)
   ========================================================================== */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }

.form-select {
    display: block;
    width: 100%;
    padding: 0.55rem 2.25rem 0.55rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    color: #3f4254;
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c7293' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 10px;
    border: 1px solid #eaedf2;
    border-radius: 0.65rem;
    appearance: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus {
    border-color: #2b2f4c;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(43, 47, 76, 0.08);
}

@media (min-width: 576px) {
    .col-sm-4 { flex: none; width: 33.333333%; }
    .col-sm-6 { flex: none; width: 50%; }
    .col-sm-12 { flex: none; width: 100%; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (min-width: 768px) {
    .col-md-2 { flex: none; width: 16.666667%; }
    .col-md-3 { flex: none; width: 25%; }
    .col-md-4 { flex: none; width: 33.333333%; }
    .col-md-5 { flex: none; width: 41.666667%; }
    .col-md-6 { flex: none; width: 50%; }
    .col-md-8 { flex: none; width: 66.666667%; }
    .col-md-12 { flex: none; width: 100%; }
    .d-md-flex { display: flex !important; }
    .text-md-end { text-align: right !important; }
}

@media (min-width: 992px) {
    .col-lg-3 { flex: none; width: 25%; }
    .col-lg-4 { flex: none; width: 33.333333%; }
    .col-lg-6 { flex: none; width: 50%; }
    .col-lg-8 { flex: none; width: 66.666667%; }
    .col-lg-12 { flex: none; width: 100%; }
    .d-lg-none { display: none !important; }
}

@media (min-width: 1200px) {
    .col-xl-3 { flex: none; width: 25%; }
    .col-xl-4 { flex: none; width: 33.333333%; }
    .col-xl-6 { flex: none; width: 50%; }
    .col-xl-8 { flex: none; width: 66.666667%; }
}

/* ==========================================================================
   COMPONENTES DE UI/UX REFINADOS (KPIs, Toolbar, Botões e Tabelas)
   ========================================================================== */
.kpi-card {
    border: 1px solid #eef0f6;
    border-radius: 1rem;
    background: #ffffff;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 2px 12px rgba(43, 47, 76, 0.03);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 100%;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(43, 47, 76, 0.06);
}

.kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c7293;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
}

.kpi-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1a1d36;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.kpi-sub {
    font-size: 0.75rem;
    color: #8e94a9;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Toolbar de Filtros e Ações */
.toolbar-card {
    border: 1px solid #eef0f6;
    border-radius: 1rem;
    background: #ffffff;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 12px rgba(43, 47, 76, 0.03);
}

.search-box-modern {
    position: relative;
    flex: 1 1 260px;
    max-width: 380px;
}

.search-box-modern i {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8e94a9;
    font-size: 0.88rem;
    pointer-events: none;
}

.search-box-modern input {
    width: 100%;
    height: 40px;
    padding: 0.45rem 0.9rem 0.45rem 2.4rem;
    font-size: 0.88rem;
    color: #3f4254;
    background-color: #f8f9fb;
    border: 1px solid #eaedf2;
    border-radius: 0.65rem;
    transition: all 0.2s ease;
}

.search-box-modern input:focus {
    background-color: #ffffff;
    border-color: #2b2f4c;
    box-shadow: 0 0 0 3px rgba(43, 47, 76, 0.08);
    outline: none;
}

.filter-select-modern {
    height: 40px;
    width: auto;
    min-width: 165px;
    font-size: 0.88rem;
    background-color: #f8f9fb;
    border: 1px solid #eaedf2;
    border-radius: 0.65rem;
    padding: 0.45rem 2.2rem 0.45rem 0.85rem;
    color: #3f4254;
}

.btn-primary-modern {
    height: 40px;
    padding: 0 1.15rem;
    background-color: #2b2f4c;
    color: #ffffff;
    border: none;
    border-radius: 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(43, 47, 76, 0.15);
}

.btn-primary-modern:hover {
    background-color: #1a1d36;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(43, 47, 76, 0.22);
}

.btn-action-table {
    width: 34px;
    height: 34px;
    border-radius: 0.55rem;
    border: 1px solid #eaedf2;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

.btn-action-table:hover:not(:disabled) {
    background: #f5f6fa;
    transform: translateY(-1px);
}

.btn-action-table:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* ==========================================================================
   DROPDOWN DE PERFIL E LOGOUT SEGURO (TOPBAR)
   ========================================================================== */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 255px;
    background: #ffffff;
    border: 1px solid #eaedf2;
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(43, 47, 76, 0.14);
    padding: 0.5rem;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background-color: #f8f9fb;
    border-radius: 0.75rem;
}

.user-dropdown-divider {
    height: 1px;
    background-color: #f0f2f6;
    margin: 0.4rem 0;
}

.user-dropdown-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.65rem;
    font-size: 0.86rem;
    font-weight: 500;
    color: #3f4254;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.user-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.user-dropdown-item:hover {
    background-color: #f5f6fa;
    color: #1a1d36;
}

.user-dropdown-item.text-danger:hover {
    background-color: #fef2f2;
    color: #dc2626 !important;
}


/* ==========================================================================
   SISTEMA DE MODAIS ELEGANTE (CONFIRM DIALOG & FORM MODALS)
   ========================================================================== */
.custom-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.custom-modal-backdrop.show {
    opacity: 1;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    padding: 1rem;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: auto;
    pointer-events: none;
    transform: translateY(16px) scale(0.96);
    opacity: 0;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-dialog.modal-lg {
    max-width: 760px;
}

.modal-dialog.modal-xl,
.modal-dialog.modal-recibos-dialog {
    max-width: 960px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #ffffff;
    background-clip: padding-box;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    outline: 0;
}

.modal-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid #f0f2f6;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.4;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f2f6;
    border-bottom-right-radius: 1.25rem;
    border-bottom-left-radius: 1.25rem;
}

.form-label {
    display: inline-block;
    margin-bottom: 0.35rem;
}

.form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #2b2f4c;
    cursor: pointer;
    flex-shrink: 0;
}

/* --- Modal de Confirmação Premium --- */
.elegant-confirm-card {
    max-width: 410px !important;
}

.elegant-confirm-card .modal-content {
    border-radius: 1.35rem;
    padding: 1.75rem 1.6rem 1.5rem 1.6rem;
    border: 1px solid #eef0f6;
    box-shadow: 0 24px 48px rgba(26, 29, 54, 0.18);
}

.confirm-icon-wrapper {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.15rem auto;
    font-size: 1.65rem;
    position: relative;
}

.confirm-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.45;
}

.confirm-icon-wrapper.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}
.confirm-icon-wrapper.danger::after {
    background: #fef2f2;
}

.confirm-icon-wrapper.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}
.confirm-icon-wrapper.warning::after {
    background: #fffbeb;
}

.confirm-icon-wrapper.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}
.confirm-icon-wrapper.success::after {
    background: #f0fdf4;
}

.confirm-icon-wrapper.primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}
.confirm-icon-wrapper.primary::after {
    background: #eff6ff;
}

.confirm-item-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 0.9rem;
}

.confirm-notice-box {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    text-align: left;
    background: #f8f9fb;
    border: 1px solid #eaedf2;
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.confirm-notice-box i {
    color: #64748b;
    margin-top: 2px;
}

.btn-confirm-cancel {
    height: 42px;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0 1.1rem;
    transition: all 0.15s ease;
}

.btn-confirm-cancel:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
}

.btn-confirm-proceed {
    height: 42px;
    border-radius: 0.75rem;
    border: none;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all 0.18s ease;
}

.btn-confirm-proceed.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}
.btn-confirm-proceed.danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
}

.btn-confirm-proceed.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}
.btn-confirm-proceed.warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
}

.btn-confirm-proceed.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}
.btn-confirm-proceed.success:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-1px);
}

.btn-confirm-proceed.primary {
    background: linear-gradient(135deg, #3b71fe 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   DESIGN SYSTEM MODERNO: CAMPOS, BOTÕES, CHIPS DE PERMISSÃO E MODAIS DE FORM
   ========================================================================== */
.modal-dialog.modal-user-dialog {
    max-width: 550px;
}

.modal-header-badge {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    background: #eef2ff;
    color: #3b71fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.btn-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #e2e8f0;
}

.btn-secondary-modern {
    height: 40px;
    padding: 0 1.15rem;
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    white-space: nowrap;
    transition: all 0.18s ease;
    cursor: pointer;
}

.btn-secondary-modern:hover {
    background-color: #f8fafc;
    color: #1e293b;
    border-color: #94a3b8;
}

/* Labels e Inputs com Contraste e Foco Refinados */
.form-label-modern {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.38rem;
    letter-spacing: 0.01em;
}

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

.input-icon-wrapper > .input-prefix-icon {
    position: absolute;
    left: 0.9rem;
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
    transition: color 0.15s ease;
}

.input-icon-wrapper:focus-within > .input-prefix-icon {
    color: #3b71fe;
}

.form-input-modern {
    width: 100%;
    height: 42px;
    padding: 0.5rem 0.9rem;
    font-size: 0.875rem;
    color: #1e293b;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.65rem;
    transition: all 0.18s ease;
    outline: none;
}

.input-icon-wrapper .form-input-modern {
    padding-left: 2.35rem;
}

.input-icon-wrapper.has-suffix .form-input-modern {
    padding-right: 2.5rem;
}

.form-input-modern::placeholder {
    color: #94a3b8;
}

.form-input-modern:hover {
    border-color: #cbd5e1;
}

.form-input-modern:focus {
    background-color: #ffffff;
    border-color: #3b71fe;
    box-shadow: 0 0 0 3.5px rgba(59, 113, 254, 0.12);
}

.btn-toggle-pass {
    position: absolute;
    right: 0.5rem;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-toggle-pass:hover {
    color: #334155;
    background-color: #f1f5f9;
}

.form-select-modern {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0.5rem 2.15rem 0.5rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 13px 9px;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.65rem;
    appearance: none;
    transition: all 0.18s ease;
    outline: none;
    cursor: pointer;
}

.form-select-modern:hover {
    border-color: #cbd5e1;
}

.form-select-modern:focus {
    background-color: #ffffff;
    border-color: #3b71fe;
    box-shadow: 0 0 0 3.5px rgba(59, 113, 254, 0.12);
}

/* Chips Compactos de Permissão de Página (1 linha, limpo e moderno) */
.perm-section-box {
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 0.9rem;
    padding: 0.95rem 1rem;
}

.btn-quick-perm {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-quick-perm:hover {
    border-color: #3b71fe;
    color: #3b71fe;
    background: #eff6ff;
}

.perm-chip-modern {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.7rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.16s ease;
    width: 100%;
    margin: 0;
}

.perm-chip-modern:hover {
    border-color: #cbd5e1;
    background: #fcfdff;
}

.perm-chip-modern input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.perm-chip-icon {
    width: 30px;
    height: 30px;
    border-radius: 0.5rem;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: all 0.16s ease;
}

.perm-chip-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
}

.perm-chip-check {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
    transition: all 0.16s ease;
}

.perm-chip-modern:has(input:checked) {
    border-color: #3b71fe;
    background: #f5f8ff;
    box-shadow: 0 2px 6px rgba(59, 113, 254, 0.08);
}

.perm-chip-modern:has(input:checked) .perm-chip-icon {
    background: #dbeafe;
    color: #2563eb;
}

.perm-chip-modern:has(input:checked) .perm-chip-title {
    color: #1e293b;
}

.perm-chip-modern:has(input:checked) .perm-chip-check {
    background: #3b71fe;
    border-color: #3b71fe;
    color: #ffffff;
}

/* Badges de Páginas na Tabela */
.page-access-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.74rem;
    font-weight: 500;
    color: #334155;
}

.page-access-pill i {
    color: #64748b;
    font-size: 0.7rem;
}

/* ==========================================================================
   MÓDULO DE VENDAS (PDV) & RECIBO PERSONALIZADO (ESCOLA ALTERNATIVA)
   ========================================================================== */
.pdv-panel-card {
    background: #ffffff;
    border: 1px solid #eef0f6;
    border-radius: 1.15rem;
    padding: 1.5rem 1.6rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.pdv-header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
}

.pdv-operator-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.55rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pdv-operator-badge i {
    background: #16a34a;
    color: #ffffff;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
}

.pdv-field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.pdv-divider {
    height: 1px;
    background: #edf0f5;
    margin: 1.15rem 0;
}

.btn-pdv-add {
    height: 42px;
    min-width: 52px;
    padding: 0 1rem;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.65rem;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.22);
    transition: all 0.16s ease;
    cursor: pointer;
}

.btn-pdv-add:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(22, 163, 74, 0.3);
}

/* Tabela do Carrinho Inteligente */
.pdv-cart-container {
    border: 1.5px solid #e2e8f0;
    border-radius: 0.8rem;
    overflow: hidden;
    background: #ffffff;
}

.pdv-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.pdv-cart-table thead tr {
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
}

.pdv-cart-table thead th {
    padding: 0.65rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pdv-cart-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.12s ease;
}

.pdv-cart-table tbody tr:last-child {
    border-bottom: none;
}

.pdv-cart-table tbody tr:hover {
    background-color: #fafbff;
}

.pdv-cart-table tbody td {
    padding: 0.65rem 0.85rem;
    font-size: 0.84rem;
    color: #1e293b;
    vertical-align: middle;
}

.cart-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    overflow: hidden;
}

.cart-qty-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.cart-qty-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cart-qty-val {
    min-width: 28px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e293b;
}

.btn-cart-remove {
    width: 28px;
    height: 28px;
    border-radius: 0.45rem;
    border: none;
    background: #fef2f2;
    color: #ef4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-cart-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.d-none {
    display: none !important;
}

.pdv-discount-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: #16a34a;
    margin-top: 0.4rem;
}

.pdv-discount-hint.d-none {
    display: none !important;
}

.form-textarea-modern {
    width: 100%;
    min-height: 62px;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    color: #1e293b;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.65rem;
    transition: all 0.18s ease;
    outline: none;
    resize: vertical;
}

.form-textarea-modern:focus {
    background-color: #ffffff;
    border-color: #3b71fe;
    box-shadow: 0 0 0 3.5px rgba(59, 113, 254, 0.12);
}

.btn-pdv-print {
    height: 44px;
    padding: 0 1.4rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.18s ease;
    cursor: pointer;
}

.btn-pdv-print:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32);
}

.btn-pdv-print:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-pdv-clear {
    height: 44px;
    padding: 0 1.15rem;
    background: #ffffff;
    color: #475569;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.65rem;
    font-size: 0.86rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all 0.16s ease;
    cursor: pointer;
}

.btn-pdv-clear:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
}

/* --- Seção Multi-Pagamentos do PDV --- */
.pdv-payment-container {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1.1rem;
}

.btn-pdv-add-payment {
    height: 30px;
    padding: 0 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    font-size: 0.76rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.16s ease;
}

.btn-pdv-add-payment:hover {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.pdv-payment-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.5rem 0.65rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pdv-payment-row:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.pdv-payment-select-wrap {
    flex: 1 1 210px;
}

.pdv-payment-input-wrap {
    position: relative;
    flex: 1 1 130px;
    display: flex;
    align-items: center;
}

.pdv-currency-prefix {
    position: absolute;
    left: 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    pointer-events: none;
    z-index: 2;
}

.input-pag-valor,
.input-pag-valor-parcela {
    padding-left: 2rem !important;
}

.pdv-folha-subrow {
    width: 100%;
    flex: 0 0 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem;
    margin-top: 0.25rem;
    padding: 0.6rem 0.7rem;
    background: #f0f7ff;
    border: 1px dashed #bfdbfe;
    border-radius: 0.55rem;
}

.pdv-folha-subrow.d-none {
    display: none !important;
}

.pdv-folha-field {
    flex: 1 1 180px;
}

.pdv-folha-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.btn-pag-action {
    height: 38px;
    padding: 0 0.7rem;
    border-radius: 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-pag-restante {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.btn-pag-restante:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-pag-remover {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    width: 38px;
    padding: 0;
}

.btn-pag-remover:hover {
    background: #ffe4e6;
    color: #be123c;
}

.pdv-payment-balance-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.65rem 0.9rem;
    margin-top: 0.65rem;
}

.badge-payment-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-payment-status.status-ok {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-payment-status.status-falta {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
}

.badge-payment-status.status-troco {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.recibo-pagamentos-list {
    margin-top: 0.25rem;
}

/* --- Card de Pré-visualização do Recibo (2 Vias A4 + Upload de Logo) --- */
.recibo-preview-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.recibo-logo-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.btn-recibo-logo-upload {
    height: 32px;
    padding: 0 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.16s ease;
}

.btn-recibo-logo-upload:hover {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.btn-recibo-logo-remove {
    height: 32px;
    width: 32px;
    padding: 0;
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.16s ease;
}

.btn-recibo-logo-remove:hover {
    background: #ffe4e6;
    color: #be123c;
}

.hidden {
    display: none !important;
}

.pdv-right-col {
    height: auto;
    max-height: none;
    overflow: visible;
}

.recibo-duas-vias-sheet {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
}

.recibo-via-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 5px solid #0ea5e9;
    border-radius: 0.75rem;
    padding: 0.9rem 1.05rem 0.8rem 1.05rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    color: #1e293b;
}

.recibo-via-card.via-escola {
    border-left-color: #2563eb;
}

.recibo-watermark {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-24deg);
    font-size: 3.4rem;
    font-weight: 800;
    color: rgba(148, 163, 184, 0.07);
    letter-spacing: 0.14em;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    white-space: nowrap;
}

.recibo-paper-content {
    position: relative;
    z-index: 1;
}

.recibo-header-compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1.5px solid #e2e8f0;
    margin-bottom: 0.55rem;
}

.recibo-brand-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.recibo-logo-box {
    width: 48px;
    height: 48px;
    border-radius: 0.55rem;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    cursor: default;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.recibo-logo-box.has-custom-logo {
    border-style: solid;
    border-color: #e2e8f0;
    background: #ffffff;
}

.recibo-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.recibo-logo-fallback {
    font-size: 1.35rem;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recibo-school-texts {
    min-width: 0;
}

.recibo-school-name {
    font-size: 0.96rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

.recibo-school-info {
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.35;
}

.recibo-header-meta {
    text-align: right;
    flex-shrink: 0;
}

.recibo-via-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.18rem 0.55rem;
    border-radius: 0.35rem;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    margin-bottom: 0.25rem;
}

.recibo-via-card.via-escola .recibo-via-badge {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.recibo-num-date {
    font-size: 0.72rem;
    color: #475569;
    line-height: 1.3;
}

.recibo-num-date strong {
    color: #0f172a;
    font-weight: 800;
}

.recibo-client-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    padding: 0.38rem 0.65rem;
    margin-bottom: 0.5rem;
}

.recibo-meta-label {
    font-size: 0.58rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.05rem;
}

.recibo-meta-value {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.recibo-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.35rem 0 0.55rem 0;
}

.recibo-items-table thead th {
    font-size: 0.62rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.28rem 0.3rem;
    border-bottom: 1.5px solid #cbd5e1;
    background: #f8fafc;
}

.recibo-items-table tbody td {
    font-size: 0.75rem;
    color: #1e293b;
    padding: 0.28rem 0.3rem;
    border-bottom: 1px dashed #e2e8f0;
    vertical-align: middle;
}

.recibo-footer-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.35rem;
    border-top: 1.5px solid #1e293b;
}

.recibo-footer-left {
    flex: 1 1 54%;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recibo-footer-right {
    flex: 0 0 40%;
    min-width: 155px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    padding: 0.45rem 0.65rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recibo-signature-box {
    margin-top: 1.15rem;
    text-align: center;
}

.recibo-signature-line {
    width: 88%;
    margin: 0 auto 0.2rem auto;
    border-top: 1px solid #94a3b8;
}

.recibo-signature-label {
    font-size: 0.62rem;
    color: #64748b;
    line-height: 1.2;
}

.recibo-footer-emissor {
    margin-top: 0.2rem;
    font-size: 0.6rem;
    color: #64748b;
}

.recibo-cut-divider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.55rem 0;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.recibo-cut-divider::after {
    content: '';
    flex: 1;
    border-top: 1.5px dashed #cbd5e1;
}

/* Container isolado de reimpressão de recibos: SEMPRE invisível na interface/tela */
.recibo-impressao-isolado,
#reciboImpressaoContainer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* ==========================================================================
   ESTILOS DE IMPRESSÃO (@media print) - 2 VIAS EM FOLHA A4 (EXPANSÍVEL)
   ========================================================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 5mm 6mm;
    }

    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Ocultar rigorosamente toda interface administrativa e cromática */
    nav,
    header,
    aside,
    .sidebar,
    #sidebar,
    .topbar,
    .topbar-simple,
    .overlay,
    #sidebar-overlay,
    .pdv-left-col,
    .recibo-preview-label,
    .recibo-logo-toolbar,
    .pdv-recentes-section,
    .recibos-screen-interface,
    .recibos-pagina-visual,
    .filtros-recibos-grid,
    .table-recibos-desktop,
    .recibos-cards-mobile-container,
    .modern-toast-container,
    .modal,
    .custom-modal-backdrop,
    #userDropdownWrapper,
    #userDropdownMenu,
    #sidebar-toggle,
    .btn,
    button {
        display: none !important;
    }

    .main-content,
    main,
    .container-fluid,
    .row {
        margin: 0 !important;
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }

    .pdv-right-col {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    .recibo-duas-vias-sheet,
    .recibo-impressao-isolado,
    #reciboImpressaoContainer {
        display: block !important;
        visibility: visible !important;
        position: static !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    #reciboImpressaoContainer .recibo-via-card,
    #reciboImpressaoContainer .recibo-via-card.via-escola,
    #reciboImpressaoContainer .recibo-via-card.via-cliente {
        display: block !important;
    }

    #reciboImpressaoContainer .recibo-cut-divider {
        display: flex !important;
    }

    .recibo-via-card {
        border: 1px solid #94a3b8 !important;
        border-left: 4px solid #0ea5e9 !important;
        border-radius: 0.35rem !important;
        box-shadow: none !important;
        padding: 0.42rem 0.65rem 0.35rem 0.65rem !important;
        width: 100% !important;
        margin: 0 !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .recibo-via-card.via-escola {
        border-left-color: #2563eb !important;
    }

    .recibo-logo-box {
        width: 38px !important;
        height: 38px !important;
        border-style: solid !important;
    }

    .recibo-school-name {
        font-size: 0.88rem !important;
        margin-bottom: 0.05rem !important;
    }

    .recibo-school-info {
        font-size: 0.62rem !important;
        line-height: 1.25 !important;
    }

    .recibo-header-compact {
        padding-bottom: 0.28rem !important;
        margin-bottom: 0.28rem !important;
    }

    .recibo-via-badge {
        font-size: 0.58rem !important;
        padding: 0.12rem 0.45rem !important;
        margin-bottom: 0.12rem !important;
    }

    .recibo-num-date {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
    }

    .recibo-client-bar {
        padding: 0.22rem 0.45rem !important;
        margin-bottom: 0.28rem !important;
        border-radius: 0.3rem !important;
    }

    .recibo-meta-label {
        font-size: 0.54rem !important;
    }

    .recibo-meta-value {
        font-size: 0.72rem !important;
    }

    .recibo-items-table {
        margin: 0.2rem 0 0.28rem 0 !important;
    }

    .recibo-items-table thead th {
        padding: 0.18rem 0.25rem !important;
        font-size: 0.56rem !important;
        border-bottom-width: 1px !important;
    }

    .recibo-items-table tbody td {
        padding: 0.18rem 0.25rem !important;
        font-size: 0.68rem !important;
    }

    .recibo-footer-grid {
        padding-top: 0.25rem !important;
        border-top-width: 1.5px !important;
        gap: 0.45rem !important;
    }

    .recibo-footer-left {
        min-width: 150px !important;
    }

    .recibo-footer-right {
        min-width: 145px !important;
        padding: 0.3rem 0.45rem !important;
    }

    .recibo-signature-box {
        margin-top: 0.55rem !important;
    }

    .recibo-signature-line {
        margin-bottom: 0.15rem !important;
    }

    .recibo-signature-label {
        font-size: 0.58rem !important;
    }

    .recibo-footer-emissor {
        margin-top: 0.1rem !important;
        font-size: 0.56rem !important;
    }

    .print\:block,
    .recibo-via-card.via-escola.hidden,
    .recibo-via-card.via-escola.print\:block {
        display: block !important;
    }

    .print\:flex,
    .recibo-cut-divider.hidden,
    .recibo-cut-divider.print\:flex,
    .recibo-cut-divider {
        display: flex !important;
        margin: 2.2mm 0 !important;
        font-size: 0.58rem !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .recibo-header-compact,
    .recibo-client-bar,
    .recibo-footer-grid,
    .recibo-items-table tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .recibo-items-table thead {
        display: table-header-group !important;
    }
}

/* ==========================================================================
   DROPDOWN "CADASTROS" NA SIDEBAR & NAVEGAÇÃO POR ABAS (CENTRAL DE CADASTROS)
   ========================================================================== */
.sidebar-dropdown-group {
    margin: 0.15rem 0;
}

.sidebar-dropdown-toggle {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer;
}

.sidebar-chevron {
    font-size: 0.72rem;
    color: #94a3b8;
    transition: transform 0.22s ease, color 0.22s ease;
}

.sidebar-dropdown-group.open .sidebar-chevron {
    transform: rotate(180deg);
    color: #2b2f4c;
}

.sidebar-dropdown-group.active-parent > .sidebar-dropdown-toggle {
    background-color: #f1f5f9;
    color: #1e293b;
    font-weight: 600;
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0 1rem;
    padding-left: 0.85rem;
    border-left: 2px solid #e2e8f0;
    transition: max-height 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, margin 0.2s ease;
}

.sidebar-dropdown-group.open .sidebar-submenu {
    max-height: 240px;
    opacity: 1;
    margin: 0.25rem 1rem 0.5rem 1.75rem;
}

.sidebar-sublink {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding: 0.52rem 0.8rem;
    margin: 0.15rem 0;
    border-radius: 0.6rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sidebar-sublink i {
    font-size: 0.78rem;
    color: #94a3b8;
    transition: color 0.15s ease;
}

.sidebar-sublink:hover {
    background-color: #f8fafc;
    color: #1e293b;
}

.sidebar-sublink:hover i {
    color: #3b71fe;
}

.sidebar-sublink.active-link {
    background-color: #2b2f4c;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(43, 47, 76, 0.16);
}

.sidebar-sublink.active-link i {
    color: #ffffff !important;
}

/* Abas Segmentadas da Central de Cadastros */
.cadastro-tabs-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: #ffffff;
    border: 1px solid #eef0f6;
    border-radius: 0.9rem;
    padding: 0.4rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.cadastro-tab-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.55rem 1.05rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.cadastro-tab-btn:hover {
    color: #1e293b;
    background: #f8fafc;
}

.cadastro-tab-btn.active {
    background: #2b2f4c;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(43, 47, 76, 0.18);
}

.cadastro-tab-pane {
    display: none;
}

.cadastro-tab-pane.active {
    display: block;
    animation: fadeInTab 0.2s ease;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.text-white {
    color: #ffffff !important;
}

.kpi-card.clickable-kpi {
    cursor: pointer;
}

.kpi-card.clickable-kpi.active-kpi {
    border-color: #3b71fe;
    box-shadow: 0 6px 18px rgba(59, 113, 254, 0.1);
}

/* ==========================================================================
   REFATORAÇÃO UI/UX: RECIBOS EMITIDOS (GRID, TABELA DESKTOP E CARDS MOBILE)
   ========================================================================== */
.filtros-recibos-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 992px) {
    .filtros-recibos-grid.com-operador {
        display: grid;
        grid-template-columns: 3.5fr 2.5fr 2fr 2fr 2fr;
        gap: 12px;
        align-items: flex-end;
    }

    .filtros-recibos-grid.sem-operador,
    .filtros-recibos-grid:not(.com-operador) {
        display: grid;
        grid-template-columns: 5fr 2.5fr 2.5fr 2fr;
        gap: 14px;
        align-items: flex-end;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .filtros-recibos-grid.com-operador {
        display: grid;
        grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr;
        gap: 10px;
        align-items: flex-end;
    }

    .filtros-recibos-grid.sem-operador,
    .filtros-recibos-grid:not(.com-operador) {
        display: grid;
        grid-template-columns: 5fr 2.5fr 2.5fr 2fr;
        gap: 12px;
        align-items: flex-end;
    }
}

.recibos-tabela-desktop-container {
    display: block;
}

.recibos-cards-mobile-container {
    display: none;
}

@media (max-width: 767.98px) {
    .recibos-tabela-desktop-container {
        display: none !important;
    }
    .recibos-cards-mobile-container {
        display: block !important;
    }
}

.btn-action-table.text-danger:hover:not(:disabled) {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.btn-action-table.text-primary:hover:not(:disabled) {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

.btn-subtle-danger {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
    border-radius: 8px !important;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-subtle-danger:hover {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.12);
}

.recibo-card-mobile {
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.recibo-card-mobile:hover {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1 !important;
}

.table-recibos-desktop tbody tr {
    transition: background-color 0.15s ease;
}

.table-recibos-desktop tbody td {
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
    vertical-align: middle;
}

.table-recibos-desktop tbody tr:hover {
    background-color: #f8faff !important;
}

/* ==========================================================================
   DASHBOARD REFACTORING: MODERN CARDS, SPACING & TYPOGRAPHY
   ========================================================================== */
.dash-metric-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 1.25rem; /* rounded-2xl */
    padding: 1.5rem; /* p-6 */
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dash-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    border-color: #cbd5e1;
}

.dash-metric-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-metric-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.35;
}

.dash-metric-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dash-metric-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 0.6rem;
    font-family: system-ui, -apple-system, sans-serif;
}

.dash-metric-footer {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-top: auto;
    padding-top: 0.35rem;
    line-height: 1.4;
}

.dash-content-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 1.25rem; /* rounded-2xl */
    padding: 1.5rem; /* p-6 */
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.dash-content-card:hover {
    border-color: #e2e8f0;
}

.dash-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.dash-table thead th {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.dash-table tbody td {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    vertical-align: middle;
    border-bottom: 1px solid #f8fafc;
}

.dash-table tbody tr {
    transition: background-color 0.15s ease;
}

.dash-table tbody tr:hover {
    background-color: #f8faff !important;
}
