/* =========================================================
   SIGATI — Sistema de Gestão de TI — SEMEC Paragominas
   ========================================================= */

:root {
    --sidebar-w: 240px;
    --header-h: 60px;
    --navy: #1B2A4A;
    --navy-hover: #243559;
    --accent: #2E86DE;
    --accent-hover: #1A6DC0;
    --gold: #E8A020;
    --bg: #F3F6FB;
    --surface: #FFFFFF;
    --border: #E2E8F0;
    --text: #1A202C;
    --muted: #718096;
    --green: #276749;
    --green-bg: #C6F6D5;
    --red: #9B2335;
    --red-bg: #FED7D7;
}

.sg-kpi-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sg-kpi-link:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(27,42,74,.12);
}
.sg-kpi-link:focus-visible {
    outline: 3px solid rgba(46,134,222,.28);
    outline-offset: 2px;
}
.sg-kpi-link.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46,134,222,.16);
}
.sg-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}
.sg-action-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ── Reset / Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); }

/* ── Layout ───────────────────────────────────────────── */
.sg-wrap {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────── */
.sg-sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 200;
    box-shadow: 2px 0 12px rgba(0,0,0,0.25);
}

.sg-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px 6px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
}
.sg-brand:hover { color: #fff; }

.sg-brand-icon {
    background: var(--accent);
    color: #fff;
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 800; letter-spacing: 0;
    flex-shrink: 0;
}

.sg-brand-sub {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.38);
    padding: 2px 20px 14px;
    letter-spacing: 0.3px;
}

/* Nav items */
.sg-nav {
    list-style: none;
    padding: 4px 10px;
    margin: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    scrollbar-color: #94A3B8 #1E293B;
}

/* Identidade e rodapé permanecem visíveis enquanto as opções rolam. */
.sg-sidebar > .sg-sidebar-identity,
.sg-sidebar > .sg-sidebar-foot {
    flex-shrink: 0;
}

.sg-nav-section {
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    color: rgba(255,255,255,0.60);
    text-transform: uppercase;
    padding: 16px 14px 5px;
}

.sg-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 10px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.84rem;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
    user-select: none;
    line-height: 1.3;
}
.sg-nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding-left: 18px;
}
.sg-nav-item.active {
    background: linear-gradient(90deg, #2563EB, #38BDF8) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(37,99,235,0.35);
    padding-left: 18px;
}
.sg-nav-item.disabled {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}
.sg-nav-item .bi { font-size: 0.92rem; width: 18px; flex-shrink: 0; text-align: center; }

/* Sidebar footer */
.sg-sidebar-foot {
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.07);
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
}

/* ── Main area ────────────────────────────────────────── */
.sg-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header ───────────────────────────────────────────── */
.sg-header {
    height: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0; z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sg-page-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.sg-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sg-user-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sg-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

/* Perfil badges */
.badge-diretor {
    background: var(--gold) !important;
    color: #1A202C !important;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
}
.badge-tecnico {
    background: var(--accent) !important;
    color: #fff !important;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
}

/* ── Content ──────────────────────────────────────────── */
.sg-content {
    padding: 24px;
    flex: 1;
}

/* ── Stat cards ───────────────────────────────────────── */
.sg-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow 0.15s;
}
.sg-stat:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.07); }

.sg-stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.sg-stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 3px;
}

.sg-stat-label {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
}

/* ── Card / Panel ─────────────────────────────────────── */
.sg-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.sg-panel-head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sg-panel-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

/* ── Table ────────────────────────────────────────────── */
.sg-table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.sg-table table { margin: 0; }

.sg-table thead th {
    background: #F7FAFC;
    border-bottom: 1px solid var(--border) !important;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    padding: 11px 16px;
}

.sg-table tbody td {
    padding: 11px 16px;
    font-size: 0.85rem;
    color: var(--text);
    border-bottom: 1px solid #F0F4F8 !important;
    vertical-align: middle;
}

.sg-table tbody tr:last-child td { border-bottom: none !important; }
.sg-table tbody tr:hover td { background: #F7FAFC; }

/* Status pills */
.pill-ativo   { background: var(--green-bg); color: var(--green); font-size: 0.72rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.pill-inativo { background: var(--red-bg);   color: var(--red);   font-size: 0.72rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }

.pill-escola      { background: #C6F6D5; color: #276749; font-size: 0.72rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.pill-setor       { background: #BEE3F8; color: #2C5282; font-size: 0.72rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.pill-outro       { background: #E2E8F0; color: #4A5568; font-size: 0.72rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }

/* ── Aviso de construção ──────────────────────────────── */
.sg-wip {
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.82rem;
    color: #92400E;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

/* ── Login page ───────────────────────────────────────── */
.sg-login-wrap {
    min-height: 100vh;
    background: linear-gradient(135deg, #0A1628 0%, #1B2A4A 55%, #0F172A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.sg-login-wrap::before {
    content: '';
    position: absolute;
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(46,134,222,0.14) 0%, transparent 70%);
    top: -120px; right: -120px;
    border-radius: 50%;
    pointer-events: none;
}

.sg-login-wrap::after {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(56,189,248,0.09) 0%, transparent 70%);
    bottom: -80px; left: -80px;
    border-radius: 50%;
    pointer-events: none;
}

.sg-login-card {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 18px;
    padding: 26px 32px 22px;
    width: 100%;
    max-width: 410px;
    margin: auto;
    box-shadow: 0 32px 80px rgba(0,0,0,0.42), 0 0 0 1px rgba(255,255,255,0.06);
    position: relative;
    z-index: 1;
}

.sg-login-logo {
    background: var(--accent);
    color: #fff;
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 900;
    margin: 0 auto 14px;
    letter-spacing: 1px;
}

/* Logo institucional real na tela de login */
.sg-login-logo-img {
    display: inline-block;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin: 0 auto 16px;
    text-align: center;
}

.sg-login-logo-real {
    max-width: 140px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Versão compacta na sidebar */
.sg-sidebar-sigati-version {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.28);
    letter-spacing: 0.6px;
    margin-top: 1px;
}

.sg-login-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.sg-login-sub {
    font-size: 0.76rem;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.4;
}

.sg-login-card .form-control {
    border-radius: 8px;
    border-color: var(--border);
    font-size: 0.85rem;
    padding: 8px 12px;
}
.sg-login-card .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46,134,222,0.15);
}

.sg-login-card .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.sg-login-btn {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 12px;
    width: 100%;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 2px;
}
.sg-login-btn:hover { background: var(--accent-hover); }

.sg-login-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--text);
    font-weight: 600;
    font-size: 0.83rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sg-login-home-btn:hover {
    background: #eef2f7;
    border-color: var(--accent);
    color: var(--accent);
}

.sg-login-foot {
    font-size: 0.71rem;
    color: var(--muted);
    text-align: center;
    margin-top: 14px;
    margin-bottom: 0;
    line-height: 1.45;
}

/* ── Empty state ──────────────────────────────────────── */
.sg-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
}
.sg-empty .bi { font-size: 2.2rem; opacity: 0.35; display: block; margin-bottom: 10px; }
.sg-empty p { font-size: 0.85rem; margin: 0; line-height: 1.6; }

/* ── Activity badge (sg-badge + modifiers) ────────────── */
.sg-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* Status */
.st-pendente   { background: #EBF4FF; color: #2B6CB0; }
.st-andamento  { background: #FEFCBF; color: #744210; }
.st-aguardando { background: #E9D8FD; color: #553C9A; }
.st-concluido  { background: #C6F6D5; color: #22543D; }
.st-cancelado  { background: #FED7D7; color: #9B2335; }

/* Impacto */
.imp-baixo   { background: #E2E8F0; color: #4A5568; }
.imp-medio   { background: #FEFCBF; color: #744210; }
.imp-alto    { background: #FEEBC8; color: #9C4221; }
.imp-critico { background: #FED7D7; color: #9B2335; }

/* Prioridade */
.pri-baixa   { background: #E2E8F0; color: #4A5568; }
.pri-media   { background: #BEE3F8; color: #2C5282; }
.pri-alta    { background: #FEEBC8; color: #9C4221; }
.pri-urgente { background: #FED7D7; color: #9B2335; }

/* Situação Equipamento */
.sit-em-uso      { background: #C6F6D5; color: #22543D; }
.sit-manutencao  { background: #FEFCBF; color: #744210; }
.sit-estoque     { background: #BEE3F8; color: #2C5282; }
.sit-baixado     { background: #FED7D7; color: #9B2335; }
.sit-perdido     { background: #FEB2B2; color: #742A2A; }

/* Garantia */
.gar-ok         { background: #C6F6D5; color: #22543D; }
.gar-vencendo   { background: #FEFCBF; color: #744210; }
.gar-vencida    { background: #FED7D7; color: #9B2335; }
.gar-sem        { background: #E2E8F0; color: #4A5568; }

/* ── Activity form ────────────────────────────────────── */
.sg-form { max-width: 860px; }

.sg-form-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 22px 22px;
    margin-bottom: 18px;
}

.sg-form-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.sg-form label,
.sg-form .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    display: block;
}

.sg-form .form-control,
.sg-form .form-select {
    font-size: 0.875rem;
    border-radius: 7px;
    border-color: var(--border);
}
.sg-form .form-control:focus,
.sg-form .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46,134,222,0.15);
}

/* ── Info card (detalhe page) ─────────────────────────── */
.sg-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 13px 16px;
}

.sg-info-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    margin-bottom: 4px;
}

.sg-info-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.sg-info-sub {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 2px;
}

/* ── Evidence cards ───────────────────────────────────── */
.sg-ev-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px 12px;
    min-width: 210px;
    max-width: 270px;
    flex-shrink: 0;
}

.sg-ev-icon {
    width: 38px; height: 38px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.ft-jpg, .ft-jpeg, .ft-png { background: #BEE3F8; color: #2B6CB0; }
.ft-pdf                     { background: #FED7D7; color: #9B2335; }
.ft-xlsx                    { background: #C6F6D5; color: #22543D; }
.ft-docx                    { background: #EBF4FF; color: #2C5282; }

.sg-ev-info {
    flex: 1;
    min-width: 0;
}

.sg-ev-title {
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    margin-bottom: 2px;
}

.sg-ev-meta {
    font-size: .7rem;
    color: var(--muted);
    line-height: 1.5;
}

.sg-ev-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

/* ── Dashboard: painel de atenção ─────────────────────── */
.sg-panel-atencao {
    border-color: #FEB2B2;
}
.sg-panel-atencao .sg-panel-head {
    background: #FFF5F5;
    border-bottom-color: #FEB2B2;
}

.sg-alerta-bloco {
    border-radius: 8px;
    padding: 10px 14px;
}
.sg-alerta-critico {
    background: #FFF5F5;
    border: 1px solid #FEB2B2;
}
.sg-alerta-vermelho {
    background: #FFFAF0;
    border: 1px solid #FBBF24;
}
.sg-alerta-amarelo {
    background: #FFFFF0;
    border: 1px solid #F6E05E;
}

.sg-alerta-titulo {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sg-alerta-critico .sg-alerta-titulo  { color: #9B2335; }
.sg-alerta-vermelho .sg-alerta-titulo { color: #92400E; }
.sg-alerta-amarelo  .sg-alerta-titulo { color: #744210; }

.sg-alerta-lista {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sg-alerta-lista li {
    font-size: 0.8rem;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,.05);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.sg-alerta-lista li:last-child { border-bottom: none; }
.sg-alerta-lista a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.sg-alerta-lista a:hover { text-decoration: underline; }

/* Card com borda pulsante para alerta crítico */
.sg-stat-alert {
    border-color: #FEB2B2;
    box-shadow: 0 0 0 2px rgba(239,68,68,.15);
}

/* ── Relatórios ───────────────────────────────────────── */
.sg-rel-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* ═══════════════════════════════════════════════════════════
   FASE 8 — Identidade Institucional e Modernização Visual
   ═══════════════════════════════════════════════════════════ */

/* ── Área de logos na sidebar ────────────────────────────── */
.sg-logo-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 13px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sg-logo-slot {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.06);
    border: 1.5px dashed rgba(255,255,255,0.14);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.46rem;
    font-weight: 700;
    color: rgba(255,255,255,0.18);
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0;
}

.sg-logo-center { flex: 1; text-align: center; padding: 0 8px; }
.sg-logo-center-name {
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255,255,255,0.78);
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.sg-logo-center-sub {
    font-size: 0.57rem;
    color: rgba(255,255,255,0.28);
    letter-spacing: 0.4px;
    margin-top: 1px;
}

/* ── Nav section labels ──────────────────────────────────── */
.sg-nav-section {
    font-size: 0.58rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.6px !important;
    color: rgba(255,255,255,0.2) !important;
    text-transform: uppercase !important;
    padding: 18px 12px 5px !important;
}

/* ── Rodapé institucional ────────────────────────────────── */
.sg-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 9px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--muted);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 4px;
}
.sg-footer-brand { font-weight: 700; color: var(--navy); }

/* ── Stat cards v2 ───────────────────────────────────────── */
.sg-stat-v2 {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 18px 15px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.15s, transform 0.12s;
    box-shadow: inset 3px 0 0 var(--sa-accent, #E2E8F0);
}
.sg-stat-v2:hover {
    transform: translateY(-1px);
    box-shadow: inset 3px 0 0 var(--sa-accent, #E2E8F0),
                0 6px 20px rgba(0,0,0,0.08);
}
.sg-stat-v2.sg-stat-alert {
    border-color: #FEB2B2;
    box-shadow: inset 3px 0 0 #EF4444,
                0 0 0 2px rgba(239,68,68,.12) !important;
}
.sg-stat-v2.sg-stat-alert:hover {
    box-shadow: inset 3px 0 0 #EF4444,
                0 0 0 2px rgba(239,68,68,.12),
                0 6px 20px rgba(239,68,68,.12) !important;
}

.sg-stat-v2-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 14px;
}

.sg-stat-v2-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}

.sg-stat-v2-label {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Placeholders de graficos ────────────────────────────── */
.sg-chart-ph {
    background: #F8FAFC;
    border: 1.5px dashed #CBD5E0;
    border-radius: 10px;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
}
.sg-chart-ph:hover { background: #F1F5F9; border-color: #A0AEC0; }
.sg-chart-ph-icon  { font-size: 1.9rem; color: #CBD5E0; }
.sg-chart-ph-title { font-size: 0.8rem; font-weight: 600; color: #A0AEC0; }
.sg-chart-ph-desc  { font-size: 0.7rem; color: #CBD5E0; max-width: 200px; }

/* ── Empty state inteligente ─────────────────────────────── */
.sg-empty-smart { padding: 52px 24px; text-align: center; }

.sg-empty-smart-icon {
    width: 68px; height: 68px;
    background: linear-gradient(135deg, #EBF4FF, #D6EAF8);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.7rem;
    color: #2471A3;
}

.sg-empty-smart-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.sg-empty-smart-sub {
    font-size: 0.82rem;
    color: var(--muted);
    max-width: 320px;
    margin: 0 auto 18px;
    line-height: 1.6;
}

/* ── Cards KPI (Locais e Usuarios) ───────────────────────── */
.sg-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sg-kpi-icon {
    width: 40px; height: 40px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sg-kpi-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.sg-kpi-lbl {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 600;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ═══════════════════════════════════════════════════════════
   FASE 8.1 — Logo Institucional Real SEMEC
   ═══════════════════════════════════════════════════════════ */

/* Header volta a 60px — título único, sem bloco institucional */
:root { --header-h: 60px; }

/* ── Identity block com logo real ────────────────────────── */
.sg-sidebar-identity {
    display: block;
    text-decoration: none;
    padding: 18px 20px 14px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    transition: background 0.12s;
}
.sg-sidebar-identity:hover { background: rgba(255,255,255,0.03); }

/* Card branco para destacar a logo no fundo escuro */
.sg-sidebar-logo-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.12);
}

.sg-sidebar-logo {
    max-width: 170px;
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.sg-sidebar-sigati-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

/* Badge de versão na sidebar */
.sg-version-badge {
    display: inline-block;
    font-size: 0.60rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.70);
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 2px 8px;
}

.sg-sidebar-sigati-sub {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.35);
    line-height: 1.5;
    letter-spacing: 0.15px;
}

/* ── Cabecalho institucional (header) ────────────────────── */
.sg-institutional-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.sg-inst-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.sg-inst-system {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.3;
}

.sg-inst-org {
    font-size: 0.63rem;
    color: var(--muted);
    font-weight: 400;
    opacity: 0.75;
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════
   FASE 8.4 — Gestão de Sessões e Troca de Senha
   ═══════════════════════════════════════════════════════════ */

/* ── Card de formulário simples (Minha Conta / Senha) ─────── */
.sg-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.sg-form-card-header {
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
    padding: 14px 22px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════════
   FASE 11.2 — Polimento Visual Premium
   ═══════════════════════════════════════════════════════════ */

/* Panel hover lift */
.sg-panel { transition: box-shadow .18s; }
.sg-panel:hover { box-shadow: 0 6px 24px rgba(27,42,74,.08); }

/* Sidebar nav section — contrast + divider line */
.sg-nav-section {
    margin-top: 18px;
    position: relative;
}
.sg-nav-section::before {
    content: '';
    display: block;
    height: 1px;
    background: rgba(255,255,255,.07);
    margin: 0 12px 8px;
}

/* Nav item active indicator */
.sg-nav-item.active {
    background: linear-gradient(90deg, var(--accent), #1A6DC0) !important;
    box-shadow: inset 3px 0 0 rgba(255,255,255,.35);
}
.sg-nav-item { border-radius: 8px; margin: 1px 8px; }

/* Sidebar version tag */
.sg-sidebar-sigati-version {
    font-size: .52rem;
    color: rgba(255,255,255,.3);
    letter-spacing: .5px;
    margin-top: 1px;
}

/* Smooth transitions */
.sg-stat-v2, .sg-panel, .sg-nav-item {
    transition: box-shadow .15s, transform .15s, background .12s;
}

/* Progress bar polish */
.progress-bar { transition: width .4s ease; }

/* KPI gradient cards (already defined inline; ensure no-box-shadow conflict) */
.sg-kpi-grad, .sg-kpi-danger, .sg-kpi-warn {
    box-shadow: 0 4px 18px rgba(27,42,74,.18) !important;
    border-radius: 12px !important;
}

.sg-form-card-body {
    padding: 24px 22px;
}

/* ── Empty state (Sessoes / Usuarios) ────────────────────── */
.sg-empty-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #EBF4FF, #D6EAF8);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.5rem;
    color: #2471A3;
}

.sg-empty-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.sg-empty-sub {
    font-size: 0.82rem;
    color: var(--muted);
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   FASE 11.5 — Sidebar Premium & Locais CRUD
   ═══════════════════════════════════════════════════════════ */

/* Sidebar — separador de seção mais visível */
.sg-nav-section::before {
    background: rgba(255,255,255,0.10) !important;
    margin: 0 4px 6px !important;
}

/* Nav item active — sobrescreve Fase 11.2 com novo gradiente */
.sg-nav-item.active {
    background: linear-gradient(90deg, #2563EB, #38BDF8) !important;
    box-shadow: 0 2px 10px rgba(37,99,235,0.35) !important;
    padding-left: 18px !important;
}

/* Nav item — margem uniforme */
.sg-nav-item { margin: 2px 6px !important; }

/* Sidebar version tag */
.sg-sidebar-sigati-sub {
    color: rgba(255,255,255,0.32);
}

/* Locais — painel de filtros */
#painel-filtros {
    border-left: 3px solid var(--accent);
}

#painel-filtros .sg-panel-head {
    background: #F0F6FF;
}

/* ═══════════════════════════════════════════════════════════
   IDENTIDADE VISUAL OFICIAL — v2.0.0-beta.2
   ═══════════════════════════════════════════════════════════ */

/* ── Logo SIGATI na tela de login ────────────────────────── */
.sg-login-logo-full {
    display: block;
    width: 175px;
    max-height: 165px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto 2px;
}

@media (max-width: 768px) {
    .sg-login-logo-full { width: 155px; max-height: 145px; }
    .sg-login-card { padding: 24px 26px 20px; }
}

@media (max-width: 480px) {
    .sg-login-logo-full { width: 135px; max-height: 125px; }
    .sg-login-card { padding: 20px 18px 18px; max-width: 100%; }
}

@media (max-height: 760px) {
    .sg-login-logo-full { width: 135px; max-height: 125px; }
    .sg-login-card { padding: 18px 26px 16px; }
    .sg-login-sub { margin-bottom: 10px; font-size: 0.73rem; }
    .sg-login-card .mb-3 { margin-bottom: 0.6rem !important; }
    .sg-login-foot { margin-top: 10px; }
}

/* ── Logo SIGATI na sidebar ──────────────────────────────── */
.sg-sidebar-logo-new {
    display: block;
    width: 156px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

/* ── Sidebar identity — remove card branco ───────────────── */
.sg-sidebar-logo-card { display: none; }
.sg-sidebar-sigati-name { display: none; }

/* ── Cabeçalho — título da página ────────────────────────── */
.sg-page-title {
    font-size: 1.0rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    letter-spacing: 0.1px;
}

/* ── Ordenação clicável nas tabelas ──────────────────────── */
.sg-sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    font-size: inherit;
    white-space: nowrap;
    transition: color .15s;
}
.sg-sort-link:hover { color: var(--accent); }
.sg-sort-active     { color: var(--accent); }
.sg-sort-icon       { font-size: .68rem; line-height: 1; opacity: .85; }
.sg-sort-inactive   { opacity: .28; }
