/* Estilos globais da plataforma (site público + painel administrativo) */

:root {
    --cor-primaria: #0d6efd;
    --cor-secundaria: #198754;
    --sombra-suave: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 16px rgba(15, 23, 42, .05);
    --sombra-media: 0 4px 12px rgba(15, 23, 42, .10);
    --sombra-forte: 0 16px 40px rgba(15, 23, 42, .14);
    --raio-card: 1rem;
    --raio-pill: 999px;
    --raio-campo: .65rem;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.navbar-brand img {
    max-height: 42px;
}

/* ===== Sistema visual (polimento inspirado no design da Plataforma EAD-ODCS) ===== */

/* Cards: cantos arredondados, sombra suave em camadas, sem borda dura */
.card {
    border: none;
    border-radius: var(--raio-card);
    box-shadow: var(--sombra-suave);
    transition: box-shadow .15s ease;
}

.card-header {
    border-radius: var(--raio-card) var(--raio-card) 0 0 !important;
}

.card-footer {
    border-radius: 0 0 var(--raio-card) var(--raio-card) !important;
}

/* Botões: formato pílula, com leve elevação no hover */
.btn {
    border-radius: var(--raio-pill);
    font-weight: 500;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: var(--sombra-media);
}

/* Badges em formato pílula */
.badge {
    border-radius: var(--raio-pill);
    font-weight: 500;
}

/* Campos de formulário levemente mais arredondados */
.form-control,
.form-select {
    border-radius: var(--raio-campo);
}

/* Dropdowns e modais combinando com os cards (offcanvas fica de fora: é painel encostado na borda da tela) */
.dropdown-menu,
.modal-content,
.toast {
    border-radius: var(--raio-card);
    box-shadow: var(--sombra-forte);
    border: none;
}

.alert {
    border-radius: .85rem;
    border: none;
}

/* Navbar pública: sombra suave em vez de apenas borda inferior */
.navbar.sticky-top {
    box-shadow: 0 2px 16px rgba(15, 23, 42, .06);
}

.card-servico {
    transition: transform .15s ease, box-shadow .15s ease;
    height: 100%;
}

.card-servico:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-media);
}

/* Faixa colorida no topo do card de serviço quando não há imagem cadastrada */
.card-servico-faixa {
    height: 6px;
    width: 100%;
}

/* Selo circular com a cor do serviço, ao lado do título */
.card-servico-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1rem;
    flex-shrink: 0;
}

.badge-status-AGUARDANDO_CONFIRMACAO { background: #ffc107; color: #212529; }
.badge-status-CONFIRMADO { background: #0d6efd; }
.badge-status-CANCELADO_CLIENTE,
.badge-status-CANCELADO_ADMIN,
.badge-status-CANCELADO_SISTEMA { background: #dc3545; }
.badge-status-EM_ATENDIMENTO { background: #6f42c1; }
.badge-status-ATENDIDO { background: #198754; }
.badge-status-NAO_COMPARECEU { background: #6c757d; }
.badge-status-LISTA_ESPERA { background: #fd7e14; }

/* Linhas da agenda diária (Admin > Agenda > dia), tons claros dos status acima */
.linha-agenda { border-left: 5px solid transparent; transition: transform .1s ease; }
.linha-agenda:hover { transform: translateX(2px); }
.linha-agenda-AGUARDANDO_CONFIRMACAO { background: #fff8e1; border-left-color: #ffc107; }
.linha-agenda-CONFIRMADO { background: #e7f1ff; border-left-color: #0d6efd; }
.linha-agenda-CANCELADO_CLIENTE,
.linha-agenda-CANCELADO_ADMIN,
.linha-agenda-CANCELADO_SISTEMA { background: #fdecee; border-left-color: #dc3545; opacity: .75; }
.linha-agenda-EM_ATENDIMENTO { background: #f1e9fb; border-left-color: #6f42c1; }
.linha-agenda-ATENDIDO { background: #e6f4ea; border-left-color: #198754; }
.linha-agenda-NAO_COMPARECEU { background: #eceeef; border-left-color: #6c757d; }
.linha-agenda-LISTA_ESPERA { background: #fef0e6; border-left-color: #fd7e14; }
.linha-agenda-bloqueado-manual { background: #f3f3f4; border-left-color: #495057; }

.cartao-turno { cursor: pointer; border: 2px solid transparent; transition: border-color .15s ease; }
.cartao-turno.ativo { border-color: #0d6efd; }
.cartao-turno .icone-turno {
    width: 56px; height: 56px; border-radius: 50%; background: #e9ecef;
    display: flex; align-items: center; justify-content: center; margin: 0 auto .4rem;
    font-size: 1.4rem; color: #6c757d;
}

/* ===== Sidebar administrativo (estilo inspirado no menu lateral da Plataforma EAD-ODCS) ===== */
.sidebar-admin {
    min-height: 100vh;
    min-width: 250px;
    width: 250px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #1a1e24 0%, #212529 100%);
    box-shadow: 2px 0 16px rgba(0, 0, 0, .12);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Decoração sutil no canto superior, na cor institucional primária */
.sidebar-admin::after {
    content: '';
    position: absolute;
    top: -110px;
    right: -110px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--bs-primary-rgb, 13, 110, 253), .18) 0%, transparent 65%);
    pointer-events: none;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: 1.1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    position: relative;
    z-index: 1;
}

.admin-sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
    text-decoration: none;
    color: #fff;
}

.admin-sidebar-brand-link .logo-topo {
    max-height: 40px;
    max-width: 100%;
}

.admin-sidebar-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: .6rem;
    background: var(--cor-primaria);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.admin-sidebar-brand-text {
    font-weight: 600;
    font-size: .95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-sidebar-nav {
    flex: 1 1 auto;
    padding: .85rem .75rem;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.admin-nav-kicker {
    margin: 1rem .5rem .3rem;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .35);
}

.admin-nav-kicker.mt-0 {
    margin-top: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .625rem .85rem;
    margin-bottom: .15rem;
    border-radius: .6rem;
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    font-weight: 500;
    font-size: .85rem;
    position: relative;
    transition: background .15s, color .15s;
}

.admin-nav-link i {
    font-size: 1.05rem;
    opacity: .8;
    width: 1.3rem;
    text-align: center;
    flex-shrink: 0;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.admin-nav-link.is-active {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.admin-nav-link.is-active::before {
    content: '';
    position: absolute;
    left: -.75rem;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--cor-primaria);
}

.admin-nav-link.is-active i {
    opacity: 1;
    color: var(--cor-primaria);
}

/* Barra de acessibilidade e tema claro/escuro (acima do cabeçalho do admin) */
.admin-a11y-bar {
    background: #212529;
    color: #fff;
    font-size: .8125rem;
    padding-top: .35rem;
    padding-bottom: .35rem;
}

.admin-a11y-btn {
    border: none;
    background: transparent;
    color: #fff;
    font-weight: 500;
    font-size: .8125rem;
    padding: .15rem .35rem;
    cursor: pointer;
    line-height: 1;
    transition: color .15s, opacity .15s;
}

.admin-a11y-btn:hover {
    color: var(--cor-primaria);
    opacity: .95;
}

.admin-a11y-divider {
    width: 1px;
    height: 1.1rem;
    background: rgba(255, 255, 255, .2);
}

.admin-theme-icon {
    font-size: .8rem;
    color: rgba(255, 255, 255, .75);
}

.admin-theme-switch {
    position: relative;
    display: inline-block;
    width: 2.35rem;
    height: 1.15rem;
    cursor: pointer;
}

.admin-theme-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-theme-switch-track {
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
    transition: background .2s;
}

.admin-theme-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(1.15rem - 4px);
    height: calc(1.15rem - 4px);
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.admin-theme-switch-input:checked + .admin-theme-switch-track .admin-theme-switch-thumb {
    transform: translateX(1.2rem);
}

.admin-theme-switch-input:checked + .admin-theme-switch-track {
    background: rgba(255, 255, 255, .35);
}

/* Escala de fonte (acessibilidade admin) */
html.admin-fs--1 { font-size: 93.75%; }
html.admin-fs-1 { font-size: 106.25%; }
html.admin-fs-2 { font-size: 112.5%; }

/* Botão de acessibilidade */
#botao-acessibilidade {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    transition: bottom .2s ease;
}

/* Evita sobreposição com o aviso de cookies quando ambos estão visíveis */
body.tem-aviso-cookies #botao-acessibilidade {
    bottom: 100px;
}

@media (max-width: 767px) {
    body.tem-aviso-cookies #botao-acessibilidade {
        bottom: 220px;
    }
}

body.fonte-grande { font-size: 1.15rem; }
body.alto-contraste { filter: contrast(1.2); background: #000; color: #fff; }
body.alto-contraste a { color: #ffd400; }

/* Aviso de cookies (estilo inspirado na Plataforma EAD-ODCS) */
.cookie-consent-bar {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
}

.cookie-consent-inner {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    border-left: 6px solid var(--cor-primaria);
    border-radius: var(--raio-card);
    box-shadow: var(--sombra-forte);
    padding: .9rem 1rem;
    display: flex;
    align-items: center;
    gap: .9rem;
}

.cookie-consent-icon {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: var(--raio-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--cor-secundaria) 20%, #fff);
    color: var(--cor-secundaria);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.cookie-consent-text {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    color: #334155;
    font-size: .92rem;
}

.cookie-consent-text strong {
    color: #0f172a;
    font-weight: 600;
}

.cookie-consent-text a {
    color: var(--cor-primaria);
    text-decoration: underline;
}

.cookie-consent-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.cookie-btn {
    border: 0;
    border-radius: var(--raio-pill);
    padding: .55rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 500;
    font-size: .86rem;
}

.cookie-btn-primary {
    background: var(--cor-primaria);
    color: #fff;
}

.cookie-btn-primary:hover {
    filter: brightness(.92);
}

.cookie-btn-outline {
    background: color-mix(in srgb, var(--cor-secundaria) 15%, #fff);
    color: var(--cor-secundaria);
}

.cookie-btn-outline:hover {
    background: color-mix(in srgb, var(--cor-secundaria) 25%, #fff);
}

@media (max-width: 767px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-consent-actions {
        width: 100%;
        margin-left: 0;
    }
}

.campo-bloqueado-cep {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.linha-fila-chamando { background-color: #d1e7dd !important; font-weight: bold; }
.linha-fila-concluido { opacity: .55; }
.linha-fila-aguardando { }
