:root {
    --primary: #0e322e;
    --primary-dark: #0a261f;
    --primary-light: #1d544d;
    --bg-soft: #edf3f1;
    --surface: #ffffff;
    --text: #1d2f2c;
    --muted: #6f7d7a;
    --border: #dfeae7;
    --success: #1a8a5a;
    --warning: #d99d00;
    --danger: #c84343;
    --shadow: 0 20px 45px rgba(14, 50, 46, 0.14);
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background: linear-gradient(135deg, #f3f8f7 0%, #e4efe9 100%);
    color: var(--text);
    font-family: 'Poppins', sans-serif !important;
}

.cp {
    cursor: pointer !important;
}

.auth-body {
    background: radial-gradient(circle at top, rgba(14, 50, 46, 0.12), transparent 35%), linear-gradient(135deg, #f5faf9 0%, #e3f0ed 100%);
}

.min-vh-100 {
    min-height: 100vh;
}

.btn:hover{
    background-color: #d99d00 !important;
    color: #0e322e !important;
    border-color: #d99d00 !important;
}

.modal-title {
    color: var(--text);
}

.login-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(14, 50, 46, 0.08);
    border-radius: 26px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.card-topbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 2rem 1.5rem 1.4rem;
    color: #fff;
}

.brand-badge {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 2.1rem;
    font-weight: 800;
    color: #fff;
}

.card-topbar h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 800;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 1.4rem;
}

.form-label {
    font-weight: 600;
    color: var(--text);
}

.form-control,
.form-control:focus {
    border-color: var(--border);
    box-shadow: none;
    border-radius: 12px;
    min-height: 52px;
}

.form-control:focus {
    border-color: rgba(14, 50, 46, 0.35);
    background: #fff;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: 12px;
    min-height: 52px;
    font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.toggle-password {
    border-color: var(--border);
    background: #fff;
    color: var(--primary);
}

.dashboard-body {
    background: #f4f7f6;
}

.topbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 12px 30px rgba(14, 50, 46, 0.2);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.user-wrap {
    color: #fff;
}

.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.user-meta small {
    opacity: 0.8;
}

.info-card,
.panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 28px rgba(15, 43, 39, 0.05);
}

.label {
    display: inline-block;
    text-transform: uppercase;
    color: var(--muted);
}

.info-card h3 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    font-weight: 700;
}

.info-card p,
.panel-head h2 {
    margin: 0;
}

.info-card a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.panel-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.9rem;
}

.panel-head h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.list-group-item {
    border: none;
    border-bottom: 1px solid var(--border);
    padding-left: 0;
    padding-right: 0;
}

.alert {
    border-radius: 14px;
    border: none;
}

#senhaResposta {
    min-height: 24px;
}

@media (max-width: 768px) {
    .card-topbar {
        padding-top: 1.5rem;
    }

    .user-meta {
        display: none;
    }
}

/* =========================================
   PAINEL DE ATENDIMENTO
   Compatível com as variáveis globais do admin
========================================= */

.atendimento-panel {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 4px 18px rgba(14, 50, 46, 0.05);
    overflow: hidden;
    color: var(--text);
}

.atendimento-header {
    padding: 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.atendimento-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.atendimento-header p {
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 0;
}

/* INDICADORES */

.atendimento-stat {
    height: 100%;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.atendimento-stat:hover {
    border-color: var(--primary-light);
    box-shadow: 0 5px 16px rgba(14, 50, 46, .06);
}

.atendimento-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-soft);
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.atendimento-stat-label {
    display: block;
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: 5px;
}

.atendimento-stat-value {
    display: block;
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

/* TÍTULOS */

.atendimento-section-title {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.atendimento-section-description {
    color: var(--muted);
    font-size: .85rem;
    margin: 6px 0 0;
}

/* ACCORDION */

.atendimento-accordion .accordion-item {
    border: 1px solid var(--border);
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--surface);
}

.atendimento-accordion .accordion-button {
    padding: 16px;
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
    gap: 12px;
}

.atendimento-accordion .accordion-button:not(.collapsed) {
    background: var(--bg-soft);
    color: var(--primary);
    box-shadow: none;
}

.atendimento-accordion .accordion-button::after {
    opacity: .75;
}

.atendimento-accordion .accordion-button:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(14, 50, 46, .12);
}

.atendimento-category-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--bg-soft);
    color: var(--primary);
    font-size: 1.1rem;
}

.atendimento-category-text {
    min-width: 0;
    flex: 1;
}

.atendimento-category-name {
    display: block;
    font-weight: 600;
    font-size: .94rem;
}

.atendimento-category-description {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    margin-top: 4px;
}

.atendimento-count {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 0 9px;
    border-radius: 20px;
    background: var(--bg-soft);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 700;
}

/* LISTAS DE REGISTROS */

.atendimento-list .list-group-item {
    padding: 15px 16px;
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

.atendimento-list .list-group-item:last-child {
    border-bottom: 0;
}

.atendimento-record-title {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

.atendimento-record-date {
    display: block;
    font-size: .8rem;
    color: var(--muted);
}

.atendimento-record-link {
    color: var(--primary-light);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color .2s ease;
}

.atendimento-record-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ESTADO VAZIO */

.atendimento-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
}

.atendimento-empty i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-light);
    opacity: .7;
}

/* OBSERVAÇÕES DAS CONSULTAS */

.atendimento-observacao {
    display: block;
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: .83rem;
    white-space: pre-line;
}

.atendimento-observacao strong {
    color: var(--text);
}

/* CARDS DE VÍDEOS E NOTAS FISCAIS */

.atendimento-video-card {
    height: 100%;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.atendimento-video-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 5px 16px rgba(14, 50, 46, .06);
}

.atendimento-video-card h6 {
    color: var(--text);
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.atendimento-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    transition: background .2s ease, border-color .2s ease;
}

.atendimento-action:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

/* BADGES DO BOOTSTRAP */

.atendimento-panel .badge.text-bg-light {
    background: var(--bg-soft) !important;
    color: var(--primary) !important;
    border-color: var(--border) !important;
}

/* RESPONSIVIDADE */

@media (max-width: 575.98px) {
    .atendimento-header {
        padding: 20px;
    }

    .atendimento-stat {
        padding: 15px;
    }

    .atendimento-stat-value {
        font-size: 1.5rem;
    }

    .atendimento-accordion .accordion-button {
        padding: 12px;
        gap: 10px;
    }

    .atendimento-category-icon {
        width: 36px;
        height: 36px;
    }

    .atendimento-category-description {
        font-size: .76rem;
    }

    .atendimento-record-link {
        white-space: normal;
        text-align: right;
    }
}
