/* ================================================================
   GUIA MÉDICO LOCAL — Identidade Visual Unimed
   ================================================================ */

:root {
    --unimed-green:      #00843D;
    --unimed-dark-green: #005C28;
    --unimed-citric:     #78BE20;
    --unimed-orange:     #E87722;
    --unimed-light:      #F0F7F2;
    --sidebar-width:     250px;
    --topbar-height:     60px;
}

body.publico-body {
    font-family: 'Trebuchet MS', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--unimed-light);
    color: #1a2e1a;
}

/* ================================================================
   NAVBAR / HERO (site público)
   ================================================================ */
.publico-navbar {
    background: var(--unimed-dark-green);
}
.publico-navbar .navbar-brand {
    font-weight: 700;
    color: #fff;
}
.publico-navbar-sub {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}
.publico-navbar-logo {
    height: 38px;
    width: auto;
}

.publico-hero {
    background: linear-gradient(135deg, var(--unimed-dark-green) 0%, var(--unimed-green) 100%);
    color: #fff;
    padding: 2.5rem 0;
}
.publico-hero h1 {
    font-size: 1.6rem;
    font-weight: 700;
}
.publico-hero p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* ================================================================
   BUSCA PÚBLICA
   ================================================================ */
.publico-busca-form {
    background: #fff;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    margin-top: -2.5rem;
    position: relative;
    z-index: 5;
}

.btn-unimed {
    background-color: var(--unimed-green);
    border-color: var(--unimed-green);
    color: #fff;
}
.btn-unimed:hover, .btn-unimed:focus {
    background-color: var(--unimed-dark-green);
    border-color: var(--unimed-dark-green);
    color: #fff;
}

/* ================================================================
   CARDS
   ================================================================ */
.publico-card {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.publico-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}

.publico-card-especialidades {
    margin-top: 0.5rem;
}

.publico-card-contato {
    color: #4a5c4a;
    line-height: 1.6;
}
.publico-card-contato i {
    color: var(--unimed-green);
    width: 1.1em;
}

/* ================================================================
   BADGES / ÍCONES DE CERTIFICAÇÃO
   ================================================================ */
.publico-badge-tipo {
    background: var(--unimed-dark-green);
    color: #fff;
    font-weight: 500;
}

.publico-badge-especialidade {
    background: var(--unimed-light);
    color: var(--unimed-dark-green);
    border: 1px solid var(--unimed-citric);
    font-weight: 500;
    margin: 0.1rem;
}

.publico-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.publico-card-icones {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ================================================================
   MODAL DE DETALHE
   ================================================================ */
.publico-endereco {
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ================================================================
   FOOTER
   ================================================================ */
.publico-footer {
    color: #6c8a6c;
    font-size: 0.85rem;
}

/* ================================================================
   ADMIN — base (mesmo padrão de sidebar/topbar do AdminHub)
   ================================================================ */
body.admin-body {
    font-family: 'Trebuchet MS', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--unimed-light);
    color: #1a2e1a;
}

/* ----- SIDEBAR ----- */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--unimed-dark-green);
    color: #fff;
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.28s ease;
}

.sidebar-brand {
    background: rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.sidebar-brand img {
    height: 30px;
    background: #fff;
    border-radius: 6px;
    padding: 3px;
}
.brand-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.brand-sub {
    font-size: 0.68rem;
    color: var(--unimed-citric);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.badge-perfil {
    background: rgba(255, 255, 255, 0.1);
    color: var(--unimed-citric);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.86rem;
    padding: 0.52rem 1rem;
    border-radius: 0.375rem;
    margin: 1px 0;
    border-left: 3px solid transparent;
    transition: all 0.18s;
}
#sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border-left-color: rgba(120, 190, 32, 0.6);
}
#sidebar .nav-link.active {
    color: #fff;
    background: rgba(120, 190, 32, 0.18);
    border-left-color: var(--unimed-citric);
    font-weight: 600;
}

.sidebar-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.12);
}
.text-sidebar-muted {
    color: rgba(255, 255, 255, 0.32);
    font-size: 0.7rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    z-index: 1035;
}
.sidebar-overlay.active { display: block; }

@media (max-width: 991.98px) {
    #sidebar { transform: translateX(-100%); }
    #sidebar.open { transform: translateX(0); }
}

/* ----- CONTEÚDO PRINCIPAL / TOPBAR ----- */
#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
@media (max-width: 991.98px) {
    #main-content { margin-left: 0; }
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 2px solid var(--unimed-green);
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    box-shadow: 0 1px 6px rgba(0, 132, 61, 0.08);
    flex-shrink: 0;
}
.topbar-page-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--unimed-dark-green);
}
.topbar-user-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: #2a2a2a;
    line-height: 1.2;
}
.topbar-user-email {
    font-size: 0.71rem;
    color: #888;
    line-height: 1;
}
.btn-topbar-toggle {
    color: var(--unimed-dark-green);
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
}

.content-wrapper { flex: 1; }
.content-footer {
    border-top: 1px solid #dde8dd;
    background: #fff;
    flex-shrink: 0;
}
.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--unimed-dark-green);
}

/* ----- KPI CARDS ----- */
.kpi-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.07);
    border-left: 4px solid #ccc;
    transition: transform 0.15s, box-shadow 0.15s;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.1);
}
.kpi-icon { font-size: 1.7rem; margin-bottom: 0.4rem; opacity: 0.85; }
.kpi-value { font-size: 2rem; font-weight: 700; line-height: 1; margin-bottom: 0.2rem; }
.kpi-label { font-size: 0.77rem; color: #666; font-weight: 500; }

.kpi-green  { border-left-color: var(--unimed-green); }
.kpi-green  .kpi-icon, .kpi-green  .kpi-value { color: var(--unimed-green); }
.kpi-citric { border-left-color: var(--unimed-citric); }
.kpi-citric .kpi-icon, .kpi-citric .kpi-value { color: #5a9518; }
.kpi-orange { border-left-color: var(--unimed-orange); }
.kpi-orange .kpi-icon, .kpi-orange .kpi-value { color: var(--unimed-orange); }
.kpi-secondary { border-left-color: #6c757d; }
.kpi-secondary .kpi-icon, .kpi-secondary .kpi-value { color: #6c757d; }

/* ----- BOTÕES ----- */
.btn-outline-unimed {
    color: var(--unimed-green);
    border-color: var(--unimed-green);
    background: transparent;
}
.btn-outline-unimed:hover {
    background-color: var(--unimed-green);
    border-color: var(--unimed-green);
    color: #fff;
}

/* ----- REPETÍVEIS DO FORM DE PRESTADOR ----- */
.admin-repeat-row {
    border: 1px dashed #cfe0d2;
    border-radius: 0.6rem;
    padding: 0.75rem;
    margin-bottom: 0.6rem;
    background: var(--unimed-light);
}
.admin-cert-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #dde8dd;
    border-radius: 0.6rem;
    padding: 0.5rem 0.7rem;
    background: var(--unimed-light);
    cursor: pointer;
}
.admin-cert-option img { width: 22px; height: 22px; }
.admin-cert-option:has(input:checked) {
    border-color: var(--unimed-green);
    background: #e7f4ea;
}

/* ----- LOGIN ----- */
.login-body {
    background: linear-gradient(145deg, var(--unimed-dark-green) 0%, var(--unimed-green) 65%, #1e8c48 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}
.login-wrapper {
    position: relative;
    z-index: 10;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 1.1rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}
.login-header {
    background: linear-gradient(135deg, var(--unimed-dark-green) 0%, var(--unimed-green) 100%);
    color: #fff;
    padding: 2rem 2rem 1.75rem;
    text-align: center;
}
.login-header img { height: 44px; background: #fff; border-radius: 8px; padding: 4px; margin-bottom: 0.75rem; }
.login-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.2rem; }
.login-subtitle { font-size: 0.82rem; opacity: 0.85; margin-bottom: 0; }
.login-body-inner { padding: 1.75rem 2rem 2rem; }
.login-footer {
    border-top: 1px solid #efefef;
    padding: 0.9rem 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: #888;
}
