:root {
    --primary-color: #0B2536;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    /* Fundo escuro elegante combinando com tema de saúde/odontologia (Azul Petróleo Escuro ou similar) */
    background-color: #0B2536; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-wrapper {
    margin-bottom: 30px;
    margin-top: 20px;
}

.logo {
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
}

.login-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 30px 24px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.welcome-title {
    color: #1A365D; /* Cor principal de destaque */
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.4;
}

.welcome-subtitle {
    color: #4A5568;
    font-size: 13px;
    text-align: left;
    margin-bottom: 30px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    position: relative;
    border-bottom: 2px solid #2B6CB0;
    display: flex;
    align-items: center;
    padding-bottom: 8px;
}

.input-icon {
    color: #2B6CB0;
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.input-group input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 15px;
    color: #2D3748;
    background: transparent;
}

.input-group input::placeholder {
    color: #718096;
    font-weight: 500;
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    color: #2B6CB0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password i {
    width: 18px;
    height: 18px;
}

.btn-login {
    background-color: #E2E8F0;
    color: #718096;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: not-allowed;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-login.active {
    background-color: #2B6CB0;
    color: #FFFFFF;
    cursor: pointer;
}

.btn-login.active:hover {
    background-color: #2C5282;
}

.forgot-password {
    display: block;
    text-align: center;
    color: #2B6CB0;
    text-decoration: underline;
    font-size: 14px;
    font-weight: 500;
    margin-top: 24px;
}

.forgot-password:hover {
    color: #2C5282;
}

/* =========================================
   DASHBOARD STYLES
========================================= */

.dashboard-body {
    background-color: #F8FAFC;
    align-items: flex-start;
    min-height: 100vh;
}

.dashboard-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 280px;
    background-color: #0B2536;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: #1A365D;
    border-radius: 4px;
}

.sidebar-header {
    display: flex;
    justify-content: center;
    padding: 24px 20px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    max-width: 140px;
    height: auto;
}

.close-sidebar {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    position: absolute;
    right: 15px;
    top: 25px;
    cursor: pointer;
}

.user-profile {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    border: 3px solid #2B6CB0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.user-details {
    width: 100%;
    font-size: 11px;
    color: #CBD5E0;
    line-height: 1.6;
}

.user-details strong {
    color: #FFFFFF;
    font-weight: 600;
}

.status-active .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #48BB78;
    border-radius: 50%;
    margin-left: 6px;
}

.contrast-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #FFFFFF;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #0B2536;
    transition: .4s;
}
input:checked + .slider { background-color: #48BB78; }
input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #FFFFFF;
}
.slider.round { border-radius: 24px; }
.slider.round:before { border-radius: 50%; }

/* Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #E2E8F0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    position: relative;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.05);
}

.nav-item.active {
    background-color: rgba(255,255,255,0.1);
    color: #FFFFFF;
    font-weight: 600;
}

.nav-item i {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    opacity: 0.8;
}

/* Novas Classes para as Abas e Tabelas */
.app-section {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}
.summary-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    text-align: center;
    border: 1px solid #edf2f7;
}
.summary-card p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.summary-card h2 {
    color: var(--primary-color);
    font-size: 2rem;
}
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    overflow-x: auto;
    border: 1px solid #edf2f7;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}
.data-table th {
    background-color: #f7fafc;
    color: #4a5568;
    font-size: 0.85rem;
    font-weight: 600;
}
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-badge.success { background: #e6fffa; color: #38a169; }
.status-badge.warning { background: #fffff0; color: #d69e2e; }
.status-badge.danger { background: #fff5f5; color: #e53e3e; }

.section-subtitle {
    font-size: 1.2rem;
    color: #2D3748;
    margin-bottom: 15px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.service-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #edf2f7;
    text-align: center;
}
.service-box i {
    color: var(--primary-color);
    margin-bottom: 15px;
    width: 32px;
    height: 32px;
}
.service-box h4 {
    color: #2D3748;
    margin-bottom: 10px;
}
.service-box p {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 20px;
    line-height: 1.4;
}
.btn-action {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.btn-action:hover { background: #0b2e2a; }
.btn-action.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-action.btn-outline:hover {
    background: #f7fafc;
}

.financial-header {
    background: linear-gradient(135deg, var(--primary-color), #0b2e2a);
    border-radius: 15px;
    padding: 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 15px rgba(12, 60, 55, 0.2);
    flex-wrap: wrap;
    gap: 20px;
}
.financial-balance p {
    color: #e2e8f0;
    margin-bottom: 10px;
    font-size: 0.9rem;
}
.financial-balance h1 {
    font-size: 2.5rem;
    margin: 0;
}
.financial-actions {
    display: flex;
    gap: 10px;
}
.btn-pix, .btn-boleto {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}
.btn-pix { background: #38bdf8; color: white; }
.btn-boleto { background: rgba(255,255,255,0.2); color: white; }
.btn-pix:hover { background: #0ea5e9; }
.btn-boleto:hover { background: rgba(255,255,255,0.3); }

.tag-green { background-color: #e6fffa; color: #38a169; }

@media (max-width: 768px) {
    .financial-header {
        flex-direction: column;
        text-align: center;
        align-items: stretch;
    }
    .financial-actions {
        flex-direction: column;
    }
}


.nav-item.active {
    background-color: #1A365D;
    border-left: 4px solid #E2A03F; /* Amarelo/Dourado dependendo da marca */
    color: #FFFFFF;
}

.nav-item i {
    width: 18px;
    height: 18px;
    margin-right: 16px;
}

.nav-item .chevron {
    margin-left: auto;
    margin-right: 0;
    width: 16px;
    height: 16px;
}

.nav-divider {
    height: 1px;
    background-color: rgba(255,255,255,0.1);
    margin: 10px 20px;
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #F8FAFC;
    height: 100vh;
    overflow-y: auto;
}

.main-header {
    background-color: #FFFFFF;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.open-sidebar {
    background: transparent;
    border: none;
    color: #0B2536;
    cursor: pointer;
    margin-right: 20px;
    display: none;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1A365D;
}

.content-area {
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.filter-section {
    margin-bottom: 24px;
}

.filter-tabs {
    display: flex;
    gap: 12px;
}

.filter-tabs .tab {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #CBD5E0;
    background: transparent;
    color: #4A5568;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tabs .tab.active {
    background-color: #1A365D;
    color: #FFFFFF;
    border-color: #1A365D;
}

.cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notice-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    border-left: 4px solid transparent;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid #E2E8F0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.notice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.notice-card.unread {
    border-left-color: #E2A03F;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tag {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #FEEBC8;
    color: #C05621;
}

.tag-blue { background-color: #EBF8FF; color: #2B6CB0; }
.tag-green { background-color: #F0FFF4; color: #2F855A; }

.date {
    font-size: 12px;
    color: #A0AEC0;
    font-weight: 500;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #2D3748;
    margin-bottom: 8px;
}

.card-excerpt {
    font-size: 14px;
    color: #718096;
    line-height: 1.5;
    margin-bottom: 16px;
}

.read-more {
    display: flex;
    align-items: center;
    color: #2B6CB0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.read-more i {
    width: 16px;
    height: 16px;
    margin-left: 4px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 37, 54, 0.7);
    z-index: 90;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .close-sidebar, .open-sidebar {
        display: block;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .content-area {
        padding: 20px;
    }
}

/* =========================================
   DEV ADMIN PANEL (SECRET PAGE)
========================================= */
.dev-admin-gate {
    background-color: #000000;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.dev-admin-body {
    background-color: #0A0A0A; /* Fundo extremamente escuro */
    color: #33FF33; /* Verde matrix de terminal */
    font-family: 'Fira Code', monospace;
    margin: 0;
    min-height: 100vh;
}

.security-gate {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #050505;
}

.terminal-box {
    width: 600px;
    background-color: #000000;
    border: 1px solid #33FF33;
    padding: 20px;
    box-shadow: 0 0 15px rgba(51, 255, 51, 0.2);
}

.terminal-header {
    border-bottom: 1px solid #33FF33;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-weight: bold;
}

.terminal-green {
    margin-bottom: 10px;
    font-size: 14px;
}

.terminal-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.prompt {
    color: #33FF33;
    font-weight: bold;
}

#devAuthCode {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: 16px;
    flex: 1;
    outline: none;
    caret-color: #33FF33; /* Cursor verde */
}

#devAuthCode::placeholder {
    color: #555;
}

.terminal-error {
    color: #FF3333;
    font-weight: bold;
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

.dev-admin-active {
    background-color: #111111;
}

.dev-admin-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    display: none; /* Só mostra após senha */
}

.dev-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #2B6CB0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.dev-title {
    color: #2B6CB0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    font-family: 'Inter', sans-serif;
}

.dev-subtitle {
    color: #718096;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.dev-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: #2B6CB0;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    transition: all 0.2s;
}

.dev-btn:hover {
    filter: brightness(1.2);
}

.dev-btn-danger {
    background-color: #E53E3E;
}

.dev-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.dev-card {
    background-color: #1A1A1A;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px;
}

.dev-card h2 {
    color: #A0AEC0;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-form-group {
    margin-bottom: 15px;
}

.dev-form-row {
    display: flex;
    gap: 15px;
}
.dev-form-row .dev-form-group {
    flex: 1;
}

.dev-form label {
    display: block;
    color: #718096;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 6px;
}

.dev-form input, .dev-form select {
    width: 100%;
    background-color: #0A0A0A;
    border: 1px solid #4A5568;
    color: #E2E8F0;
    padding: 10px;
    font-family: 'Inter', sans-serif;
    border-radius: 4px;
    outline: none;
}

.dev-form input:focus, .dev-form select:focus {
    border-color: #3182CE;
    box-shadow: 0 0 5px rgba(49, 130, 206, 0.5);
}

.dev-preview-box {
    background-color: #0B2536; /* Background do dashboard original */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2B6CB0;
}

.dev-preview-profile {
    border-bottom: none;
    padding: 0;
}

/* =========================================
   DRAG, DROP & CROP TOOLS
========================================= */
.drop-zone {
    border: 2px dashed #4A5568;
    border-radius: 8px;
    padding: 20px 10px;
    text-align: center;
    background-color: #0A0A0A;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: #3182CE;
    background-color: rgba(49, 130, 206, 0.1);
}

.drop-zone p { 
    color: #A0AEC0; 
    font-family: 'Inter', sans-serif; 
    font-size: 13px; 
    margin-top: 10px; 
}

.drop-zone i { 
    color: #3182CE; 
    width: 32px; 
    height: 32px; 
}

.crop-container {
    background: #0A0A0A;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.img-wrapper {
    height: 300px; /* Altura fixa para cropper */
    width: 100%;
    overflow: hidden;
    background-color: #000;
}

.img-wrapper img {
    display: block;
    max-width: 100%;
}