/* =============================================================
   SISPESQUISAS — CSS Principal
   ============================================================= */

:root {
    --sidebar-width:   260px;
    --sidebar-bg:      #1a1d29;
    --sidebar-hover:   rgba(255,255,255,.06);
    --sidebar-active:  rgba(13,110,253,.25);
    --topbar-height:   60px;
}

/* =============================================================
   LAYOUT GERAL
   ============================================================= */

body.sidebar-fixed {
    display: flex;
    min-height: 100vh;
    background: #f4f6fb;
}

/* =============================================================
   SIDEBAR
   ============================================================= */

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform .25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,.72);
    padding: 9px 20px;
    border-radius: 6px;
    margin: 2px 8px;
    transition: background .15s, color .15s;
    font-size: .9rem;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--sidebar-active);
    color: #6ea8fe;
    font-weight: 600;
}

.sidebar-section-label {
    list-style: none;
    padding: 14px 20px 4px;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.35);
}

.sidebar-divider {
    border-color: rgba(255,255,255,.08);
    margin: 8px 0;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0 0 12px;
}

.sidebar-footer .nav-link {
    padding: 10px 20px;
    margin: 2px 8px;
    border-radius: 6px;
    color: rgba(255,255,255,.5);
    font-size: .9rem;
    transition: background .15s, color .15s;
}

.sidebar-footer .nav-link:hover {
    background: rgba(220,53,69,.15);
    color: #ea868f;
}

/* Avatar circular com iniciais */
.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* =============================================================
   CONTEÚDO PRINCIPAL
   ============================================================= */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left .25s;
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-content {
    flex: 1;
    padding-top: 1rem;
}

/* =============================================================
   CARDS
   ============================================================= */

.card {
    border-radius: 10px;
}

.icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =============================================================
   RESPONSIVE — Mobile: sidebar como overlay
   ============================================================= */

@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 16px rgba(0,0,0,.3);
    }

    .main-content {
        margin-left: 0;
    }
}

/* =============================================================
   PÁGINA DE AUTENTICAÇÃO
   ============================================================= */

.auth-page .card {
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

/* =============================================================
   SURVEY — Formulário de pesquisa pública
   ============================================================= */

.nota-label .star-btn {
    display: inline-block;
    padding: 4px 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

input[type="radio"]:checked + label .star-btn {
    background: #fff3cd;
    border-color: #ffc107;
}

/* =============================================================
   BADGES DE STATUS DAS PESQUISAS
   ============================================================= */

.badge-rascunho  { background-color: #6c757d !important; }
.badge-ativa     { background-color: #198754 !important; }
.badge-pausada   { background-color: #ffc107 !important; color: #000 !important; }
.badge-encerrada { background-color: #dc3545 !important; }
.badge-arquivada { background-color: #adb5bd !important; }

/* =============================================================
   DATATABLES — ajustes visuais
   ============================================================= */

table.dataTable thead th {
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
}

/* =============================================================
   SCROLLBAR personalizada (webkit)
   ============================================================= */

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }
