* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* =====================
   DESIGN SYSTEM
===================== */
:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;

    --text: #0f172a;
    --text-muted: #64748b;

    --border: #e2e8f0;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;

    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;

    --radius: 16px;
    --shadow: 0 8px 30px rgba(0,0,0,0.06);
    --primary: <?= $corPrimaria ?>;


}

/* DARK MODE */
[data-theme="dark"] {
    --bg: #020617;
    --surface: #0f172a;
    --surface-2: #111827;

    --text: #e5e7eb;
    --text-muted: #94a3b8;

    --border: #1f2937;

    --primary: #3b82f6;
    --primary-hover: #2563eb;

    --shadow: 0 10px 40px rgba(0,0,0,0.5);

    color-scheme: dark;

    --primary-hover: <?= $corPrimariaDark ?>;
    --sidebar-color: <?= $corPrimariaDark ?>;
    --sidebar-color-hover: <?= escurecer($corPrimariaDark, 15) ?>;

}

:root{

}

body {
    transition: background 0.25s ease, color 0.25s ease;
}

.card, .panel {
    transition: all 0.25s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    text-decoration: none;
}


.btn{
    display:inline-block;
    font-weight:400;
    line-height:1.5;
    color:#212529;
    text-align:center;
    text-decoration:none;
    vertical-align:middle;
    cursor:pointer;
    user-select:none;
    border:1px solid transparent;
    padding:.375rem .75rem;
    font-size:1rem;
    border-radius:.375rem;
    transition:all .15s ease-in-out;
}

.btn:hover{
    opacity:.9;
}

.btn-primary{
    color:#fff;
    background-color:#0d6efd;
    border-color:#0d6efd;
}

.btn-secondary{
    color:#fff;
    background-color:#6c757d;
    border-color:#6c757d;
}

.btn-success{
    color:#fff;
    background-color:#198754;
    border-color:#198754;
}

.btn-danger{
    color:#fff;
    background-color:#dc3545;
    border-color:#dc3545;
}

.btn-warning{
    color:#000;
    background-color:#ffc107;
    border-color:#ffc107;
}

.btn-info{
    color:#000;
    background-color:#0dcaf0;
    border-color:#0dcaf0;
}

.btn-light{
    color:#000;
    background-color:#f8f9fa;
    border-color:#f8f9fa;
}

.btn-dark{
    color:#fff;
    background-color:#212529;
    border-color:#212529;
}

.btn-link{
    color:#0d6efd;
    background:transparent;
    border:none;
}

.btn-sm{
    padding:.25rem .5rem;
    font-size:.875rem;
    border-radius:.25rem;
}

.btn-lg{
    padding:.5rem 1rem;
    font-size:1.25rem;
    border-radius:.5rem;
}

.layout {
    display: flex;
    min-height: 100vh;
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    overflow: hidden; /* ESSENCIAL */
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* mostra inteiro */
}

.brand h2 {
    font-size: 16px;
    font-weight: 700;
}

.brand p {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 2px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu a {
    color: #cbd5e1;
    padding: 12px 14px;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
} 

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.08);
    color: white;
}

.main {
    flex: 1;
    padding: 32px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 20px;
}

.topbar h1 {
    font-size: 24px;
    margin-bottom: 6px;
}

.subtitle {
    color: var(--muted);
    font-size: 14px;
}

.topbar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}



.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
}

.card-title {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.card-number {
    font-size: 34px;
    font-weight: 800;
}

.panel {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 22px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    outline: none;
    font-size: 12px;
    transition: 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 16px 14px;
    text-align: left;
    border-bottom: 1px solid #eef2f7;
}

table th {
    color: #64748b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: #f8fafc;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.agendado {
    background: #fef3c7;
    color: #92400e;
}

.badge.confirmado {
    background: #dcfce7;
    color: #166534;
}

.badge.cancelado {
    background: #fee2e2;
    color: #991b1b;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(124,58,237,0.18), transparent 30%),
        #0f172a;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255,255,255,0.96);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}

.auth-card h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.auth-card p {
    color: #64748b;
    margin-bottom: 26px;
}

.auth-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 700;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.info-strip {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.info-pill {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 960px) {
    .layout {
        flex-direction: column;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 20px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

.schedule-grid {
    display: grid;
    gap: 14px;
}

.schedule-slot {
    background: white;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--shadow);
    border: 1px solid #eef2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.schedule-time {
    min-width: 90px;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.schedule-content {
    flex: 1;
}

.schedule-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.schedule-subtitle {
    color: var(--muted);
    font-size: 14px;
}

.schedule-empty {
    background: #f8fafc;
    border: 2px dashed #dbe4ee;
}

.schedule-empty .schedule-title {
    color: #94a3b8;
}

.filters-bar {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.mini-card {
    background: white;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--shadow);
    border: 1px solid #eef2f7;
}

@media (max-width: 960px) {
    .filters-bar {
        grid-template-columns: 1fr;
    }

    .schedule-slot {
        flex-direction: column;
        align-items: flex-start;
    }
}

.schedule-columns {
    overflow-x: auto;
}

.schedule-table {
    min-width: 800px;
    border-collapse: collapse;
}

.schedule-table th {
    background: #0f172a;
    color: white;
    padding: 12px;
}

.schedule-table td {
    border: 1px solid #eef2f7;
    padding: 10px;
    vertical-align: top;
    height: 70px;
}

.slot-empty {
    color: #94a3b8;
    font-size: 13px;
}

.slot-filled {
    background: #eff6ff;
    border-radius: 10px;
    padding: 6px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    background: white;
    border-radius: 12px;
    padding: 10px;
    min-height: 120px;
    box-shadow: var(--shadow);
}

.calendar-day strong {
    display: block;
    margin-bottom: 6px;
}

.calendar-event {
    font-size: 12px;
    background: #dbeafe;
    margin-bottom: 4px;
    padding: 4px 6px;
    border-radius: 6px;
}

.slot-status {
    border-radius: 12px;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

.slot-status small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.95;
}

.slot-bloqueado {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.slot-indisponivel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.slot-intervalo {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.slot-livre {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.slot-ocupado {
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

.slot-clickable {
    cursor: pointer;
    transition: all 0.18s ease;
}

.slot-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 24, 40, 0.08);
    border-color: #22c55e;
}

.form-highlight {
    animation: pulseHighlight 1.2s ease;
}

@keyframes pulseHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35);
    }
    70% {
        box-shadow: 0 0 0 16px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.consulta-clickable {
    cursor: pointer;
    transition: all 0.18s ease;
}

.consulta-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

/* =========================
   MODAL CONSULTA
========================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-box {
    width: 100%;
    max-width: 620px;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    font-size: 16px;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
}

.modal-body {
    padding: 22px;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* clique visual */
.consulta-clickable {
    cursor: pointer;
    transition: all 0.18s ease;
}

.consulta-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.slot-filled {
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.slot-filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

/* AGENDADO */
.slot-agendado {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

/* CONFIRMADO */
.slot-confirmado {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

/* CANCELADO */
.slot-cancelado {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.slot-fora-expediente {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    opacity: 0.9;
}

.timeline-container {
    position: relative;
    height: 72px; /* 60 min * 1.2px */
    border-left: 1px solid #e2e8f0;
}

.consulta-bloco {
    position: absolute;
    left: 6px;
    right: 6px;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: .2s;
}

.consulta-bloco:hover {
    transform: scale(1.02);
    z-index: 2;
}

/* =========================
   ALERTAS PREMIUM
========================= */
.alert-premium {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 20px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    animation: fadeSlideIn 0.35s ease;
}

.alert-sucesso {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-erro {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.alert-close {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: inherit;
    line-height: 1;
}

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

.slot-encerrado {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
    opacity: 0.85;
    cursor: not-allowed !important;
}

.slot-encerrado .subslot-time,
.slot-encerrado strong,
.slot-encerrado small {
    color: #64748b !important;
}

.slot-encerrado:hover {
    transform: none !important;
    box-shadow: none !important;
}

.slot-encerrado {
    pointer-events: none;
}

.slot-encerrado-consulta {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #475569;
}

.flash-message {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: 700;
    border: 1px solid transparent;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.flash-sucesso {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.flash-erro {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.toast-dashboard {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 12000;
    min-width: 280px;
    max-width: 380px;
    padding: 16px 18px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(-12px) scale(.98);
    pointer-events: none;
    transition: all .25s ease;
}

.toast-dashboard.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-dashboard.success {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.toast-dashboard.error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.toast-dashboard.info {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.financeiro-card {
    display: none;
    margin-top: 16px;

    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;

    gap: 14px;

    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
}

.financeiro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

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

.financeiro-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.financeiro-valor {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.btn-receber{
    display:inline-block;
    font-weight:400;
    line-height:1.5;
    color:#212529;
    text-align:center;
    text-decoration:none;
    vertical-align:middle;
    cursor:pointer;
    user-select:none;
    border:1px solid transparent;
    padding:.375rem .75rem;
    font-size:1rem;
    border-radius:.375rem;
    transition:all .15s ease-in-out;
    color:#fff;
    background-color:#198754;
    border-color:#198754;

}
}

.btn-receber:hover{
    opacity:.9;
}








/* =========================
   MODAL CANCELAR RECEBIMENTO
========================= */
.modal-overlay-cancelar {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-box-cancelar {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: modalFadeScale .18s ease;
}

@keyframes modalFadeScale {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header-cancelar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #fff5f5, #fff);
}

.modal-kicker-cancelar {
    font-size: 12px;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}

.modal-header-cancelar h3 {
    margin: 0;
    font-size: 24px;
    color: var(--text);
}

.modal-header-cancelar p {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.btn-fechar-modal-cancelar {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
    font-size: 24px;
    cursor: pointer;
    transition: .2s ease;
}

.btn-fechar-modal-cancelar:hover {
    background: #e5e7eb;
}

.modal-body-cancelar {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-body-cancelar label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.modal-body-cancelar textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: .2s ease;
    min-height: 110px;
    font-family: inherit;
}

.modal-body-cancelar textarea:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10);
}

.modal-footer-cancelar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px 24px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.btn-secundario-cancelar,
.btn-danger-cancelar {
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.btn-secundario-cancelar {
    background: #f3f4f6;
    color: #374151;
}

.btn-secundario-cancelar:hover {
    background: #e5e7eb;
}

.btn-danger-cancelar {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}

.btn-danger-cancelar:hover {
    transform: translateY(-1px);
    opacity: 0.98;
}
.financeiro-page {
    padding: 24px;
}

.financeiro-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.financeiro-topo h1 {
    margin: 0;
    font-size: 28px;
    color: #1f2937;
}

.filtros-financeiro {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filtros-financeiro select,
.filtros-financeiro button {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.filtros-financeiro button {
    background: #111827;
    color: white;
    border: none;
    cursor: pointer;
}

.cards-financeiro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card-fin {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-fin span {
    color: #6b7280;
    font-size: 14px;
}

.card-fin strong {
    font-size: 28px;
    color: var(--text);
}

.card-fin.previsto { border-left: 6px solid #3b82f6; }
.card-fin.pendente { border-left: 6px solid #f59e0b; }
.card-fin.recebido { border-left: 6px solid #10b981; }
.card-fin.cancelado { border-left: 6px solid #ef4444; }

.tabela-financeiro-box {
    background: white;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    overflow-x: auto;
}

.tabela-financeiro {
    width: 100%;
    border-collapse: collapse;
}

.tabela-financeiro th,
.tabela-financeiro td {
    padding: 16px;
    border-bottom: 1px solid #f1f1f1;
    text-align: left;
    font-size: 14px;
}

.tabela-financeiro th {
    background: #f9fafb;
    color: #374151;
}

.badge-status {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-status.previsto {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-status.pendente {
    background: #fef3c7;
    color: #b45309;
}

.badge-status.recebido {
    background: #d1fae5;
    color: #047857;
}

.badge-status.cancelado {
    background: #fee2e2;
    color: #b91c1c;
}


.btn-cancelar-recebimento {
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: white;
}




.btn-cancelar-recebimento {
    background: #ef4444;
}

.btn-cancelar-recebimento:hover {
    opacity: 0.92;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box.premium {
    background: var(--surface);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}

.premium-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
    background: var(--surface);
}

.modal-kicker {
    font-size: 12px;
    font-weight: 700;
    color: #10b981;
    text-transform: uppercase;
}

.modal-header h3 {
    margin: 5px 0;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.modal-footer {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


.btn-success {
    background: #10b981;
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

.brand-logo-dinamica {
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.brand-logo-dinamica img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    background: var(--surface);
}

.brand-logo {
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.brand-logo img {
    object-fit: contain !important;
}
.toast-global {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 260px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    opacity: 0;
    transform: translateY(-20px);
    transition: all .25s ease;

    z-index:2147483647 !important;
    pointer-events: none;
}

.toast-global.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-global.success {
    background: #10b981;
}

.toast-global.error {
    background: #ef4444;
}

.logo-upload-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.logo-preview {
    height: 100px;
    border: 2px dashed #d1d5db;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    overflow: hidden;
    padding: 10px;
}

.logo-preview img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
}

.logo-placeholder {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

/* melhora input file */
.logo-upload-box input[type="file"] {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
    font-size: 13px;
    background: var(--surface);
}

/* MOBILE MENU */
.menu-toggle {
    display: none;
    font-size: 22px;
    cursor: pointer;
}



/* =====================
   SIDEBAR BASE
===================== */
.sidebar {
    width: 260px;
    height: 100vh;
    background:linear-gradient(
        180deg,
        var(--sidebar-start),
        var(--sidebar-end)
    );
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* MOBILE */
@media (max-width:768px){

    .sidebar{
        position:fixed !important;
        top:0;
        left:-280px;
        width:280px;
        height:100vh;
        z-index:99999;
        transition:left .3s ease;
    }

    .sidebar.active{
        left:0;
    }

    .overlay{
        position:fixed;
        inset:0;
        background:rgba(0,0,0,.6);
        z-index:99998;
        opacity:0;
        visibility:hidden;
        transition:.3s;
    }

    .overlay.active{
        opacity:1;
        visibility:visible;
    }

    .main{
        margin-left:0 !important;
        width:100% !important;
    }
}

.modal-overlay{
    position:fixed !important;
    inset:0;
    z-index:999999 !important;
    background:rgba(0,0,0,.75);
}

.modal-box{
    position:relative;
    z-index:1000000 !important;
}

.collapse-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* hover */
.collapse-btn:hover {
    background: rgba(255,255,255,0.12);
    transform: scale(1.05);
}

/* SIDEBAR COLLAPSED */
.sidebar.collapsed{
    width:80px;
    padding:20px 10px;
}

.sidebar.collapsed .brand h2,
.sidebar.collapsed .brand p,
.sidebar.collapsed .sidebar-user,
.sidebar.collapsed .menu-title,
.sidebar.collapsed .menu-item .text{
    display:none !important;
}

.sidebar.collapsed .brand{
    justify-content:center;
}

.sidebar.collapsed .menu-item{
    justify-content:center;
}

.sidebar.collapsed .nav-icon{
    margin-right:0;
}
/* BRAND */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.brand h2 {
    font-size: 16px;
    margin: 0;
}

.brand p {
    font-size: 12px;
    opacity: 0.6;
}

/* MENU */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-title {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.5;
    margin: 15px 10px 5px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #cbd5f5;
    transition: 0.2s;
}

.menu-item:hover {
    background:var(--sidebar-color-hover);
    color:#fff;
}

.menu-item.active {
    background:var(--primary);
    color: #fff;
}

.menu-item.logout {
    margin-top: 20px;
    color: #f87171;
}

/* DROPDOWN */
.menu-dropdown .submenu {
    display: none;
    flex-direction: column;
    margin-left: 15px;
}

.menu-dropdown.active .submenu {
    display: flex;
}

.submenu a {
    padding: 8px 10px;
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
}

.submenu a:hover {
    background: #1e293b;
    color: #fff;
}

/* CONTEÚDO */
.main {
    margin-left: 260px;
    padding: 20px;
    transition: 0.3s;
}
 
/* MOBILE */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background:var(--primary);
    color: #fff;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
}



/* OVERLAY */
.overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    top: 0;
    left: 0;
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

/* =====================
   COLAPSADO
===================== */
.sidebar.collapsed {
    width: 70px;
}

/* ESCONDER TEXTOS */
.sidebar.collapsed .menu-title,
.sidebar.collapsed .submenu,
.sidebar.collapsed .brand h2,
.sidebar.collapsed .brand p,
.sidebar.collapsed .menu-item .text {
    display: none;
}

/* CENTRALIZAR ÍCONES */
.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 14px 0;
}

.sidebar.collapsed .menu-item .icon {
    font-size: 16px;
}

/* LOGO MAIS ABAIXO */
.sidebar.collapsed .brand {
    flex-direction: column;
    align-items: center;
    margin-top: 80px;
}

/* TOOLTIP */
.sidebar.collapsed .menu-item {
    position: relative;
}

.sidebar.collapsed .menu-item:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 80px;
    background: #111827;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
}

/* AJUSTE CONTEÚDO */
.main.collapsed {
    margin-left: 70px;
}
.sidebar {
    z-index: 9999;
}

.overlay {
    z-index: 9998;
}

/* melhora fluidez */
.sidebar {
    transition: transform 0.3s ease;
    will-change: transform;
}

@media (max-width: 768px) {

    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
        padding-top: 60px;
    }
}



.sidebar {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin; /* Firefox */
}

/* Chrome */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

@media (max-width:768px){

    .menu-toggle{
        display:block;
        z-index:100001;
    }

    .sidebar{
        position:fixed;
        top:0;
        left:-280px;
        width:280px;
        height:100vh;
        margin:0;
        transform:none !important;
        transition:left .3s ease;
        z-index:99999;
    }

    .sidebar.active{
        left:0;
    }

    .main{
        margin-left:0 !important;
        width:100% !important;
        padding:70px 10px 10px 10px;
    }

    .overlay{
        position:fixed;
        inset:0;
        background:rgba(0,0,0,.65);
        z-index:99998;
        display:none;
    }

    .overlay.active{
        display:block;
    }
}

@media (max-width:768px){

    .tabela-financeiro-box{
        overflow-x:auto;
    }

    .tabela-financeiro{
        min-width:900px;
    }
}

@media (max-width:768px){

    #modalVenda{
        padding:0 !important;
    }

    #modalVenda .modal-box{
        width:100vw !important;
        height:100vh !important;
        max-width:none !important;
        max-height:none !important;
        border-radius:0 !important;
        margin:0 !important;
    }

    #modalVenda .modal-body{
        overflow-y:auto;
        height:calc(100vh - 140px);
    }
}

.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;

    width: 48px;
    height: 48px;

    border-radius: 50%;
    border: none;

    background: var(--surface);
    color: var(--text);

    box-shadow: 0 10px 25px rgba(0,0,0,0.2);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    cursor: pointer;

    transition: all 0.25s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}



.theme-toggle {
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.7);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(15,23,42,0.7);
}

/* dark melhora contraste */
[data-theme="dark"] .theme-toggle {
    background: #020617;
}

@media (max-width: 768px) {
    .theme-toggle {
        bottom: 15px;
        right: 15px;
    }


}

.schedule-slot,
.mini-card,
.card-fin,
.tabela-financeiro-box,
.calendar-day {
    background: var(--card);
    border-color: var(--border);
}

table th {
    background: var(--card);
    color: var(--muted);
}

table td {
    border-color: var(--border);
}

input,
select,
textarea {
    background: var(--card);
    color: var(--text);
}

[data-theme="dark"] .modal-box,
[data-theme="dark"] .modal-box-cancelar {
    background: #020617;
}

[data-theme="dark"] .auth-card {
    background: #020617;
    color: var(--text);
}

[data-theme="dark"] .card-fin {
    background: #111827;
}

[data-theme="dark"] .tabela-financeiro th {
    background: #020617;
}

[data-theme="dark"] {
    color-scheme: dark;
}

.card,
.panel,
.mini-card,
.schedule-slot,
.card-fin,
.calendar-day {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

table th {
    background: var(--surface-2);
    color: var(--text-muted);
}

table td {
    border-color: var(--border);
}

input,
select,
textarea {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

/* =====================
   COMPONENTES
===================== */
.card,
.panel,
.mini-card,
.schedule-slot,
.card-fin,
.calendar-day {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* INPUTS */
input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}
/* TABELAS */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: var(--surface-2);
    color: var(--text-muted);
}

table td {
    border-bottom: 1px solid var(--border);
}


/* =====================
   MODAL
===================== */
.modal-box,
.modal-box-cancelar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
}

/* =====================
   AUTH
===================== */
.auth-card {
    background: var(--surface);
    color: var(--text);
}



/* =====================
   TRANSIÇÕES
===================== */
* {
    transition: background 0.25s ease, color 0.25s ease, border 0.25s ease;
}



/* MODAL CANCELAR */
.modal-box-cancelar {
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--border);
}

.modal-header-cancelar {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
}

.modal-header-cancelar h3 {
    color: var(--text);
}

.modal-header-cancelar p {
    color: var(--text-muted);
}

.btn-fechar-modal-cancelar {
    background: var(--surface-2);
    color: var(--text);
}

.modal-body-cancelar label {
    color: var(--text);
}

.modal-body-cancelar textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.modal-footer-cancelar {
    border-top: 1px solid var(--border);
}

.btn-secundario-cancelar {
    background: var(--surface-2);
    color: var(--text);
}

/* FINANCEIRO */
.financeiro-topo h1 {
    color: var(--text);
}

.filtros-financeiro select,
.filtros-financeiro button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.filtros-financeiro button {
    background: var(--primary);
    color: #fff;
}

.card-fin {
    background: var(--surface);
    border: 1px solid var(--border);
}

.card-fin span {
    color: var(--text-muted);
}

.card-fin strong {
    color: var(--text);
}

.tabela-financeiro-box {
    background: var(--surface);
    border: 1px solid var(--border);
}

.tabela-financeiro th {
    background: var(--surface-2);
    color: var(--text-muted);
}

.tabela-financeiro td {
    border-bottom: 1px solid var(--border);
}


/* INPUTS (form modal premium) */
.form-group input,
.form-group select,
.form-group textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

/* TOAST */
.toast,
.toast-global {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.table-responsive {
    overflow-x: auto;
}

.table-premium {
    width: 100%;
    border-collapse: collapse;
}

.table-premium th,
.table-premium td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    white-space: nowrap;
}

.table-premium th {
    font-size: 13px;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 18px;
    border-radius: 14px;
    color: #fff;
    font-weight: 700;
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    animation: slideIn .25s ease;
    opacity: 1;
    transition: all .25s ease;
}

.toast-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(25px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.modal-box {
    width: 100%;
    max-width: 820px;
    max-height: calc(100vh - 40px);
    background: var(--surface);
    border-radius: 22px;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: auto;
}

.modal-box form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

.premium-modal-header {
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    border-bottom: 1px solid #e6eef8;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.modal-kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 6px;
    letter-spacing: .06em;
}

.modal-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-top: 6px;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
}

.ultra-layout-single {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.full-width-card {
    width: 100%;
}

.ultra-form-card {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ultra-form-header {
    margin-bottom: 22px;
}

.ultra-form-kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 6px;
    letter-spacing: .06em;
}

.ultra-form-header h4 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #0f172a;
}

.ultra-form-header p {
    margin: 0;
    color: #64748b;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 220px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #dbe4ee;
    font-size: 14px;
    background: var(--surface);
}

.ultra-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
    flex-wrap: wrap;
}

.ultra-footer-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ultra-footer-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

.ultra-footer-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-save-ultra {
    min-width: 180px;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .ultra-footer-right {
        flex-direction: column;
        width: 100%;
    }

    .ultra-footer-right .btn {
        width: 100%;
    }
}

/* =====================
   TABLE PREMIUM
===================== */
.table-premium th,
.table-premium td {
    border-bottom: 1px solid var(--border);
}

.table-premium th {
    color: var(--text-muted);
    background: var(--surface-2);
}

/* =====================
   TOAST
===================== */
.toast {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

/* mantém gradiente (ok usar) */
.toast-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

/* =====================
   MODAL HEADER
===================== */
.premium-modal-header {
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    border-bottom: 1px solid var(--border);
}

.modal-kicker {
    color: var(--primary);
}

.modal-subtitle {
    color: var(--text-muted);
}

.modal-close {
    background: var(--surface-2);
    color: var(--text);
}

/* =====================
   FORM ULTRA
===================== */
.ultra-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
}

.ultra-form-header h4 {
    color: var(--text);
}

.ultra-form-header p {
    color: var(--text-muted);
}

.form-group label {
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

/* =====================
   FOOTER MODAL
===================== */
.ultra-footer {
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

.ultra-footer-label {
    color: var(--text-muted);
}

/* =====================
   TABLE PREMIUM
===================== */
.table-premium th,
.table-premium td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.table-premium th {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-2);
}

/* =====================
   TOAST
===================== */
.toast {
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: 700;
    min-width: 280px;
    max-width: 380px;

    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);

    box-shadow: var(--shadow);
}

.toast-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

/* =====================
   MODAL
===================== */
.premium-modal-header {
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    border-bottom: 1px solid var(--border);
}

.modal-kicker {
    color: var(--primary);
}

.modal-subtitle {
    color: var(--text-muted);
}

.modal-close {
    background: var(--surface-2);
    color: var(--text);
}

/* =====================
   FORM ULTRA
===================== */
.ultra-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
}

.ultra-form-header h4 {
    color: var(--text);
}

.ultra-form-header p {
    color: var(--text-muted);
}

.form-group label {
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

/* =====================
   FOOTER
===================== */
.ultra-footer {
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

.ultra-footer-label {
    color: var(--text-muted);

/* LAYOUT */
.bloqueios-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

.topbar-premium {
    margin-bottom: 24px;
}

.topbar-premium h1 {
    font-size: 28px;
    margin: 0;
    font-weight: 800;
    color: #0f172a;
}

.subtitle {
    color: #64748b;
    margin-top: 6px;
    font-size: 14px;
}

/* PANELS */
.premium-panel {
    background: var(--surface);
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.panel-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #eef2f7;
}

.panel-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.panel-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
}

/* FORM */
.form-premium {
    padding: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 46px;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    background: var(--surface);
    transition: 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.10);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.form-check-premium {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}

.checkbox-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.form-actions {
    margin-top: 24px;
}

.btn-lg {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
}

/* TABLE */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-premium {
    width: 100%;
    border-collapse: collapse;
}

.table-premium thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 800;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.table-premium tbody td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table-premium tbody tr:hover {
    background: #fafcff;
}

.cell-main {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.cell-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.muted {
    color: #94a3b8;
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.badge-orange {
    background: #ffedd5;
    color: #ea580c;
}

.badge-green {
    background: #dcfce7;
    color: #15803d;
}

.badge-gray {
    background: #e5e7eb;
    color: #374151;
}

/* AÇÕES */
.acoes-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

/* EMPTY STATE */
.empty-state-premium {
    text-align: center;
    padding: 50px 20px;
}

.empty-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.empty-state-premium h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 18px;
}

.empty-state-premium p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* MODAL */
.custom-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.custom-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.custom-modal-content {
    position: relative;
    background: var(--surface);
    width: 95%;
    max-width: 760px;
    margin: 40px auto;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.20);
    z-index: 2;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-sm {
    max-width: 520px;
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef2f7;
}

.custom-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.close-modal {
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
}

.modal-body {
    padding: 10px 0 18px;
}

.modal-text {
    font-size: 16px;
    color: #0f172a;
    margin-bottom: 8px;
}

.modal-subtext {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* RESPONSIVO */
@media (max-width: 1100px) {
    .bloqueios-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .panel-header,
    .form-premium,
    .custom-modal-content {
        padding: 18px;
    }

    .table-premium thead {
        display: none;
    }

    .table-premium,
    .table-premium tbody,
    .table-premium tr,
    .table-premium td {
        display: block;
        width: 100%;
    }

    .table-premium tr {
        border-bottom: 1px solid #e5e7eb;
        padding: 12px 0;
    }

    .table-premium td {
        padding: 10px 16px;
        border-bottom: none;
    }
}

.page-clinica {
    padding: 20px 24px;
    max-width: 100%;
    margin: 0;
}

.premium-header {
    margin-bottom: 16px;
}

.page-kicker {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 700px;
}

.clinica-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.premium-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.card-top h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.card-top span {
    font-size: 14px;
    color: var(--text-muted);
}

.grid-2,
.grid-3 {
    display: grid;
    gap: 12px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-span-2 {
    grid-column: span 2;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.input-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.08);
}

.color-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-wrap input[type="color"] {
    width: 60px;
    height: 50px;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.color-wrap span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: 14px;
}

.logo-preview-box {
    margin-top: 24px;
}

.logo-preview-box span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.logo-preview {
    min-height: 120px;
    border: 2px dashed var(--border);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    overflow: hidden;
    padding: 16px;
}

.logo-preview img {
    max-height: 100px;
    max-width: 220px;
    object-fit: contain;
}

.logo-placeholder {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.acoes-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.btn-salvar {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    border: none;
    border-radius: 18px;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 190px;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.22);
}

.btn-salvar:hover {
    transform: translateY(-1px);
}

.btn-salvar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 280px;
    max-width: 420px;
    padding: 16px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
    transition: all 0.25s ease;
    z-index: 9999;

    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast.success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
}

.toast.error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}

@media (max-width: 768px) {
    .page-clinica {
        padding: 18px;
    }

    .premium-card {
        padding: 20px;
        border-radius: 20px;
    }

    .grid-span-2 {
        grid-column: span 1;
    }

    .acoes-form {
        justify-content: stretch;
    }

    .btn-salvar {
        width: 100%;
    }
}

.custom-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.custom-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.custom-modal-content {
    position: relative;
    background: var(--surface);
    width: 95%;
    max-width: 720px;
    margin: 40px auto;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    z-index: 2;
    max-height: 90vh;
    overflow-y: auto;
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-modal {
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

/* TOPBAR */
.topbar-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.topbar-premium h1 {
    font-size: 28px;
    margin: 0;
    font-weight: 800;
    color: var(--text);
}

.subtitle {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 14px;
}

/* PANEL PREMIUM */
.premium-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.panel-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

/* FORM PREMIUM */
.form-premium {
    padding: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
    transition: 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.10);
}

/* TABLE PREMIUM */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-premium {
    width: 100%;
    border-collapse: collapse;
}

.table-premium thead th {
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 800;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.table-premium tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table-premium tbody tr:hover {
    background: var(--surface-2);
}

.btn-lg {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.dashboard-page {
    padding: 24px;
    background: var(--bg);
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 30px;
    color: var(--text);
}

.dashboard-header p {
    margin-top: 6px;
    color: var(--text-muted);
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-actions a,
.quick-actions button {
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: white;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: var(--shadow);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border-radius: 22px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.panel {
    background: var(--surface);
    border-radius: 24px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.panel h2 {
    margin: 0 0 18px;
    font-size: 16px;
    color: var(--text);
}

.chart-box {
    height: 300px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 12px;
}

.calendar-header a {
    text-decoration: none;
    background: var(--surface-2);
    color: var(--text);
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 14px;
}

.calendar-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    text-transform: capitalize;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 800;
    color: var(--text-muted);
    padding: 8px 0;
}

.calendar-day,
.calendar-empty {
    min-height: 120px;
    border-radius: 18px;
    padding: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.calendar-day {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: .2s ease;
}

.calendar-day:hover {
    transform: translateY(-2px);
    background: var(--surface);
    border-color: var(--primary);
}

.calendar-day.selected {
    border: 2px solid var(--primary);
    background: var(--surface);
}

.calendar-day.today {
    box-shadow: inset 0 0 0 2px var(--success);
}

.day-number {
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}

.day-count {
    font-size: 12px;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 5px 8px;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 8px;
}

.day-statuses {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.day-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.dot-confirmado { background: #22c55e; }
.dot-pendente { background: #f59e0b; }
.dot-cancelado { background: #ef4444; }
.dot-finalizado { background: #6366f1; }
.dot-default { background: #94a3b8; }

.list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    background: var(--surface-2);
    transition: .2s ease;
    position: relative;
    overflow: hidden;
}

.list-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: .2s ease;
}

.list-item.clickable {
    cursor: pointer;
}

.list-item.clickable:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: var(--surface);
}

.list-item.clickable:hover::after {
    background: var(--primary);
}

.list-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.list-title {
    font-weight: 800;
    color: var(--text);
}

.list-sub {
    color: var(--text-muted);
    font-size: 14px;
}

.badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    text-align: center;
    letter-spacing: .2px;
}

.badge-confirmado {
    background: #dcfce7;
    color: #166534;
}

.badge-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

.badge-pendente {
    background: #fef3c7;
    color: #92400e;
}

.badge-finalizado {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-default {
    background: var(--surface-2);
    color: var(--text-muted);
}

.empty-state {
    color: var(--text-muted);
    padding: 10px 0;
}

.legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.flash-message {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: 700;
    border: 1px solid transparent;
    box-shadow: var(--shadow);
}

.flash-sucesso {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.flash-erro {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .calendar-grid {
        gap: 6px;
    }

    .calendar-day,
    .calendar-empty {
        min-height: 95px;
        padding: 8px;
    }

    .dashboard-page {
        padding: 16px;
    }
}


.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.btn-status-ativo {
    background:#dcfce7; 
    color:#166534; 
    padding:6px 10px; 
    border-radius:999px; 
    font-size:12px; 
    font-weight:600
}

.btn-status-ativo {
    background:#fee2e2; 
    color:#991b1b; 
    padding:6px 10px; 
    border-radius:999px; 
    font-size:12px; 
    font-weight:600;
}
#preview_exclusao {
    font-size: 13px;
    color: #dc2626;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* ===================== */
/* WARNING (AMARELO) */
/* ===================== */

.btn-warning {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1f2937;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

/* ===================== */
/* DANGER (VERMELHO) */
/* ===================== */

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}


/* 🔥 SELECT PADRÃO SISTEMA */
.ts-control {
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    padding: 6px 10px !important;
    font-size: 13px;
    min-height: 34px;

    box-shadow: none !important;
    transition: all 0.2s ease;
}

.ts-control:hover {
    border-color: #c7d2fe !important;
}

.ts-control.focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.2) !important;
}

/* 🔥 DROPDOWN */
.ts-dropdown {
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* 🔥 ITEM */
.ts-dropdown .option {
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
}

.ts-dropdown .option:hover {
    background: #eef2ff;
}

/* 🔥 ITEM SELECIONADO */
.ts-dropdown .active {
    background: #6366f1;
    color: #fff;
}

/* 🔥 PLACEHOLDER */
.ts-control .item {
    font-size: 13px;
}


.toast-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 2147483647 !important;
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
}

.modal-overlay {
    z-index: 9999 !important;
}

.modal-consulta {
    z-index: 10000 !important;
}

#toast.toast-global{
    position:fixed !important;
    top:20px !important;
    right:20px !important;
    z-index:2147483647 !important;
    display:none;
    opacity:0;
    transform:translateY(-10px);
    transition:.3s;
    color:#fff;
    padding:12px 18px;
    border-radius:10px;
    box-shadow:0 10px 30px rgba(0,0,0,.25);
}

#toast.toast-global.show{
    opacity:1;
    transform:translateY(0);
}

#toast.success{
    background:#16a34a;
}

#toast.error{
    background:#dc2626;
}

#toast.warning{
    background:#d97706;
}

.table-responsive{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

.table-responsive table{
    width:100%;
    min-width:900px; /* ajuste conforme a quantidade de colunas */
    border-collapse:collapse;
}

.card-plano-paciente{
    background:linear-gradient(135deg,#eff6ff,#ffffff);
    border:1px solid #bfdbfe;
    border-radius:22px;
    padding:22px;
    margin-bottom:20px;
}

.card-plano-paciente h3{
    margin:0;
    font-size:18px;
}

.plano-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:14px;
    margin-top:18px;
}

.plano-grid small{
    color:#64748b;
    display:block;
    margin-bottom:5px;
}

.plano-grid strong{
    font-size:18px;
}

.barra-plano{
    height:10px;
    background:#dbeafe;
    border-radius:999px;
    overflow:hidden;
    margin-top:18px;
}

.barra-plano span{
    display:block;
    height:100%;
    background:#2563eb;
    border-radius:999px;
}

.sidebar-user{
    margin:8px 14px 18px;
    padding:10px 12px;
    display:flex;
    align-items:center;
    gap:10px;
    border-radius:14px;
    background:rgba(255,255,255,.08);
}

.sidebar-user-avatar{
    width:34px;
    height:34px;
    min-width:34px;
    border-radius:12px;
    background:rgba(255,255,255,.18);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:800;
}

.sidebar-user-info{
    display:flex;
    flex-direction:column;
    min-width:0;
}

.sidebar-user-info strong{
    color:#fff;
    font-size:13px;
    line-height:1.2;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    text-transform:uppercase;
}

.sidebar-user-info span{
    color:rgba(255,255,255,.65);
    font-size:11px;
    margin-top:2px;
}

.sidebar.collapsed .sidebar-user{
    justify-content:center;
    margin:8px 8px 18px;
    padding:10px 0;
}

.sidebar.collapsed .sidebar-user-info{
    display:none;
}

.sidebar.collapsed .sidebar-user-info{
    display: none;
}

