:root {
            --azul-principal: #004A99;
            --azul-claro: #1A75D3;
            --azul-gradiente-1: #022047;
            --azul-gradiente-2: #084385;
            --preto: #2C3E50;
            --cinza-escuro: #5D6D7E;
            --cinza-claro: #F4F7F6;
            --branco: #FFFFFF;
            --verde: #27AE60;
            --vermelho: #E74C3C;
            --amarelo: #F1C40F;
            --sombra: 0 4px 15px rgba(0,0,0,0.05);
            --sombra-hover: 0 8px 25px rgba(0,0,0,0.1);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Inter', sans-serif;
            color: #333;
            min-height: 100vh;
            background: var(--cinza-claro);
        }
        button:focus, input:focus, select:focus, textarea:focus, a:focus {
            outline: 3px solid rgba(26, 86, 168, 0.35);
            outline-offset: 2px;
        }
        a { text-decoration: none; }

        #landing-page {
            width: 100%;
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            background: linear-gradient(135deg, var(--azul-gradiente-1) 0%, var(--azul-gradiente-2) 100%);
        }

        .landing-container {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            max-width: 1150px;
            width: 100%;
            gap: 5rem;
        }

        .info-section {
            flex: 1;
            color: #ffffff;
            max-width: 520px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .logo-header {
            display: flex;
            align-items: center;
            gap: 1.2rem;
            margin-bottom: 1.5rem;
        }

        .logo-mark {
            width: 56px;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #3c7cd9 0%, #6096f5 100%);
            border-radius: 16px;
            box-shadow: 0 18px 35px rgba(39, 96, 195, 0.12);
        }

        .logo-mark svg {
            width: 34px;
            height: 34px;
        }

        .info-section h1 {
            font-size: 3.2rem;
            font-weight: 700;
            letter-spacing: -1px;
            margin: 0;
            line-height: 1.1;
            font-family: 'Montserrat', sans-serif;
        }

        .info-section p {
            font-size: 1.15rem;
            font-weight: 300;
            line-height: 1.6;
            color: #d1e1f8;
        }

        .login-section {
            flex: 1;
            display: flex;
            justify-content: flex-end;
        }

        .login-card {
            background: #ffffff;
            width: 100%;
            max-width: 460px;
            padding: 3rem 2.5rem;
            border-radius: 24px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
            transition: transform 0.3s ease;
        }

        .login-card h2 {
            text-align: center;
            color: #022047;
            font-size: 1.7rem;
            margin-bottom: 0.5rem;
            font-weight: 700;
            font-family: 'Montserrat', sans-serif;
        }

        .login-card > p {
            text-align: center;
            color: #64748b;
            font-size: 0.95rem;
            margin-bottom: 2rem;
        }

        .login-hint {
            background: #f0f6ff;
            padding: 12px 16px;
            border-radius: 10px;
            margin-bottom: 1.8rem;
            font-size: 0.85rem;
            color: #1a56a8;
            text-align: center;
            border-left: 4px solid var(--azul-claro);
        }
        .login-hint strong { font-weight: 700; }
        .login-hint .user-sugest {
            display: block;
            margin-top: 4px;
            font-weight: 500;
            color: #022047;
        }

        .role-selector {
            display: flex;
            justify-content: space-between;
            margin-bottom: 2.5rem;
            gap: 0.6rem;
        }

        .role-option {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 1rem 0.2rem;
            border: 2px solid #f1f5f9;
            border-radius: 14px;
            cursor: pointer;
            color: #94a3b8;
            background: #f8fafc;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            position: relative;
            font-family: 'Inter', sans-serif;
        }

        .role-option i { font-size: 1.4rem; margin-bottom: 0.6rem; transition: transform 0.3s ease; }
        .role-option span { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; text-align: center; letter-spacing: 0.5px; }
        .role-option:hover { border-color: #1a56a8; color: #1a56a8; background: #ffffff; transform: translateY(-6px); box-shadow: 0 10px 20px rgba(26, 86, 168, 0.12); }
        .role-option:hover i { transform: scale(1.15); }
        .role-option.active { border-color: #1a56a8; color: #1a56a8; background: #f0f6ff; box-shadow: 0 4px 12px rgba(26, 86, 168, 0.15); }

        .input-group { margin-bottom: 1.5rem; }
        .input-group label { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 600; color: #475569; margin-bottom: 0.6rem; }
        .input-group label .field-hint { font-weight: 400; color: #94a3b8; font-size: 0.75rem; }
        .input-group input {
            width: 100%; padding: 1rem 1.2rem; border: 1.5px solid #e2e8f0; border-radius: 12px;
            font-size: 1rem; background: #f8fafc; transition: all 0.3s ease; font-family: 'Inter', sans-serif; color: #333;
        }
        .input-group input:focus { outline: none; border-color: #1a56a8; background: #ffffff; box-shadow: 0 0 0 4px rgba(26, 86, 168, 0.1); }
        .input-group input.error { border-color: var(--vermelho); background: #fff5f5; }
        .input-group .error-message { font-size: 0.75rem; color: var(--vermelho); margin-top: 4px; display: none; }
        .input-group .error-message.show { display: block; }

        .actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.8rem; flex-wrap: wrap; gap: 0.5rem; }
        .actions .remember-me { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: #475569; cursor: pointer; }
        .actions .remember-me input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--azul-principal); cursor: pointer; }
        .actions a { font-size: 0.85rem; color: #1a56a8; text-decoration: none; font-weight: 600; transition: color 0.2s; }
        .actions a:hover { color: #022047; text-decoration: underline; }

        .btn-primary {
            width: 100%; padding: 1.1rem; background: #1a56a8; color: white; border: none; border-radius: 12px;
            font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; font-family: 'Inter', sans-serif;
            box-shadow: 0 4px 12px rgba(26, 86, 168, 0.3); display: flex; align-items: center; justify-content: center; gap: 8px;
        }
        .btn-primary:hover { background: #123e7a; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(26, 86, 168, 0.4); }
        .btn-primary:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(26, 86, 168, 0.3); }
        .btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
        .btn-primary .spinner {
            display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3);
            border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        .system-container { display: none; width: 100%; height: 100vh; }

        /* SIDEBAR COM ROLAGEM */
        .sidebar {
            width: 260px;
            background-color: var(--azul-principal);
            color: var(--branco);
            display: flex;
            flex-direction: column;
            padding: 25px 20px;
            flex-shrink: 0;
            transition: transform 0.3s ease;
            z-index: 1000;
            position: fixed;
            left: 0;
            top: 0;
            height: 100vh;
            overflow-y: auto;
            box-shadow: 4px 0 15px rgba(0,0,0,0.1);
            scrollbar-width: thin;
        }
        .sidebar::-webkit-scrollbar {
            width: 5px;
        }
        .sidebar::-webkit-scrollbar-track {
            background: rgba(255,255,255,0.05);
            border-radius: 10px;
        }
        .sidebar::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.25);
            border-radius: 10px;
        }
        .sidebar .logo-area {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 30px;
            font-size: 22px;
            font-weight: 700;
            font-family: 'Montserrat', sans-serif;
            flex-shrink: 0;
        }
        .sidebar .logo-area i { font-size: 26px; color: #6ba5e3; }
        .sidebar h4 {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: #88b8f0;
            margin: 0 0 12px 10px;
            font-weight: 600;
            flex-shrink: 0;
        }
        .sidebar nav {
            flex: 1;
            overflow-y: visible;
        }
        .sidebar nav ul {
            list-style: none;
            padding-bottom: 10px;
        }
        .sidebar nav ul li { margin-bottom: 5px; }
        .sidebar nav ul li a {
            display: flex; align-items: center; gap: 15px; padding: 12px 15px;
            color: #cce5ff; text-decoration: none; border-radius: 8px;
            transition: all 0.2s ease; font-weight: 500; font-size: 14px; cursor: pointer;
        }
        .sidebar nav ul li a:hover, .sidebar nav ul li a.active { background-color: rgba(255, 255, 255, 0.1); color: var(--branco); font-weight: 600; }
        .sidebar nav ul li a.active { border-left: 4px solid #6ba5e3; padding-left: 11px; }
        .sidebar .logout-area {
            margin-top: auto;
            border-top: 1px solid rgba(255,255,255,0.1);
            padding-top: 20px;
            flex-shrink: 0;
        }
        .sidebar .logout-area a {
            color: #cce5ff;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            font-weight: 500;
        }

        .main-content { margin-left: 260px; display: flex; flex-direction: column; overflow-y: auto; padding: 25px 40px; height: 100vh; width: 100%; background: var(--cinza-claro); }

        .top-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; margin-bottom: 25px; }
        .header-left { display: flex; align-items: center; gap: 15px; }
        .menu-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--azul-principal); cursor: pointer; }
        .top-header h1 { font-size: 24px; font-weight: 700; color: var(--preto); font-family: 'Montserrat', sans-serif; }
        .top-header .user-area { display: flex; align-items: center; gap: 15px; }
        .top-header .avatar {
            width: 42px; height: 42px; border-radius: 50%;
            background: linear-gradient(135deg, var(--azul-claro), var(--azul-principal)); color: white;
            display: flex; justify-content: center; align-items: center; font-weight: 700; font-size: 16px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        .top-header .role-badge { font-size: 13px; font-weight: 500; color: var(--cinza-escuro); background: #E5E7E9; padding: 6px 16px; border-radius: 20px; }
        .profile-menu { position: relative; }
        .profile-trigger { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; cursor: pointer; padding: 4px; border-radius: 12px; color: var(--preto); }
        .profile-trigger:hover, .profile-trigger[aria-expanded="true"] { background: #EEF4FC; }
        .profile-trigger .avatar { transition: transform .2s ease; }
        .profile-trigger:hover .avatar { transform: scale(1.04); }
        .profile-name { max-width: 165px; font-size: 13px; font-weight: 700; text-align: left; line-height: 1.2; }
        .profile-name small { display: block; margin-top: 3px; color: var(--cinza-escuro); font-weight: 500; }
        .profile-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 10px); width: 270px; padding: 10px; border: 1px solid #E1E7EF; border-radius: 14px; background: var(--branco); box-shadow: 0 14px 34px rgba(18,62,122,.18); z-index: 1100; }
        .profile-dropdown.show { display: block; }
        .profile-summary { padding: 10px 12px 14px; border-bottom: 1px solid #EAEDEF; margin-bottom: 6px; }
        .profile-summary strong, .profile-summary span { display: block; }
        .profile-summary span { margin-top: 4px; color: var(--cinza-escuro); font-size: 12px; }
        .profile-dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--cinza-escuro); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
        .profile-dropdown button:hover { background: #F1F6FC; color: var(--azul-principal); }
        .profile-dropdown button.danger:hover { background: #FFF1F1; color: var(--vermelho); }

        .menu-category { margin: 0 0 14px; }
        .menu-category-title { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 9px 10px; border: 0; background: transparent; color: #88b8f0; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: 1.1px; text-align: left; text-transform: uppercase; }
        .menu-category-title i { transition: transform .2s ease; font-size: 10px; }
        .menu-category.collapsed .menu-category-title i { transform: rotate(-90deg); }
        .menu-category.collapsed ul { display: none; }
        .menu-category ul { padding-bottom: 0; }
        .menu-category li { margin-bottom: 3px; }

        .student-list { display: grid; gap: 8px; }
        .student-list-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid #E3EAF3; border-radius: 12px; background: var(--branco); color: var(--preto); cursor: pointer; text-align: left; transition: .2s; }
        .student-list-item:hover, .student-list-item.selected { border-color: var(--azul-claro); background: #F4F8FE; transform: translateX(3px); }
        .student-list-item strong { color: var(--azul-principal); }
        .student-list-item span { color: var(--cinza-escuro); font-size: 13px; }
        .risk-level { padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
        .risk-level.high { background: #FDECEC; color: #B42318; }.risk-level.medium { background: #FFF4DB; color: #9A6700; }.risk-level.low { background: #E7F6EC; color: #177245; }
        .student-detail-panel { margin-top: 18px; padding: 24px; border-radius: 16px; background: var(--branco); box-shadow: var(--sombra); }
        .digital-card { width: min(100%, 390px); overflow: hidden; border-radius: 20px; color: white; background: linear-gradient(135deg, #0D3E7A 0%, #1A56A8 55%, #58A0E8 100%); box-shadow: 0 18px 32px rgba(13,62,122,.28); }
        .digital-card-header { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; background:rgba(0,0,0,.12); font-weight:700; letter-spacing:.7px; }
        .digital-card-body { padding: 22px 20px 18px; display:grid; grid-template-columns:78px 1fr; gap:16px; align-items:center; }
        .student-monogram { width:78px; height:78px; display:grid; place-items:center; border-radius:18px; background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.42); font-size:32px; font-weight:700; }
        .digital-card h3 { margin:0 0 6px; color:white; font-size:18px; }.digital-card p { margin:3px 0; font-size:13px; opacity:.92; }
        .digital-card-footer { display:flex; justify-content:space-between; align-items:center; padding:14px 20px; background:rgba(0,0,0,.16); font-size:11px; }
        .report-card { overflow:hidden; border-radius:16px; background:var(--branco); box-shadow:var(--sombra); }
        .report-card-header { padding:20px 24px; color:white; background:linear-gradient(135deg,var(--azul-principal),var(--azul-claro)); }.report-card-header h3,.report-card-header p { margin:0; color:white; }.report-card-header p { margin-top:5px; opacity:.9; font-size:13px; }
        .report-card table { width:100%; }.report-card td,.report-card th { padding:14px 18px; }
        .details-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; }
        .detail-item { padding:12px; border-radius:10px; background:#F6F9FD; border:1px solid #E5EDF7; }.detail-item span,.detail-item strong { display:block; }.detail-item span { font-size:11px; color:var(--cinza-escuro); text-transform:uppercase; letter-spacing:.4px; }.detail-item strong { margin-top:4px; font-size:14px; color:var(--preto); }
        #view-alu-boletim .table-wrapper { overflow:hidden; border:0; border-radius:16px; }
        #view-alu-boletim .table-header { padding:22px 24px; background:linear-gradient(135deg,var(--azul-principal),var(--azul-claro)); }
        #view-alu-boletim .table-header h3 { color:var(--branco); }
        #view-alu-boletim thead { background:#F1F6FC; } #view-alu-boletim tbody tr:hover { background:#F7FAFE; }

        .action-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 15px; background: var(--branco); padding: 15px 20px; border-radius: 12px; box-shadow: var(--sombra); }
        .action-bar .search-input-wrapper { flex: 1; min-width: 180px; max-width: 300px; }
        .btn-sys-primary {
            background-color: var(--azul-principal); color: var(--branco); border: none;
            padding: 10px 22px; border-radius: 8px; cursor: pointer; font-weight: 600;
            display: flex; align-items: center; gap: 8px; transition: all 0.2s; font-size: 14px;
            white-space: nowrap;
        }
        .btn-sys-primary:hover { background-color: var(--azul-claro); transform: translateY(-1px); box-shadow: var(--sombra); }
        .btn-cancel { padding: 10px 22px; border: 1px solid #BDC3C7; border-radius: 8px; background: transparent; cursor: pointer; font-weight: 600; color: var(--cinza-escuro); transition: 0.2s; font-size: 14px; }
        .btn-cancel:hover { background: #EAEDED; color: var(--preto); }
        .btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

        .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
        .stat-card {
            background-color: var(--branco); padding: 22px; border-radius: 12px;
            box-shadow: var(--sombra); border-left: 5px solid var(--azul-principal);
            display: flex; flex-direction: column; gap: 8px; transition: 0.3s;
        }
        .stat-card:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); }
        .stat-card h3 { font-size: 13px; color: var(--cinza-escuro); text-transform: uppercase; letter-spacing: 0.5px; }
        .stat-card .number { font-size: 28px; font-weight: 700; color: var(--preto); }
        .stat-card.green { border-left-color: var(--verde); }
        .stat-card.red { border-left-color: var(--vermelho); }
        .stat-card.yellow { border-left-color: var(--amarelo); }

        .table-wrapper { width: 100%; overflow-x: auto; background-color: var(--branco); border-radius: 12px; box-shadow: var(--sombra); margin-bottom: 20px; }
        .calendar-panel { display: grid; gap: 18px; }
        .calendar-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; }
        .calendar-month-header { display: flex; align-items: center; gap: 10px; }
        .calendar-nav-btn {
            display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
            border: 1px solid #D1D5DB; border-radius: 999px; background: var(--branco); color: var(--azul-principal);
            cursor: pointer; transition: background 0.2s, transform 0.2s;
        }
        .calendar-nav-btn:hover { background: #eff6ff; transform: translateY(-1px); }
        .calendar-summary span { display: inline-flex; align-items: center; gap: 8px; background: #f4f7f6; padding: 10px 14px; border-radius: 12px; color: var(--cinza-escuro); font-size: 0.95rem; }
        .calendar-legend { display: flex; flex-wrap: wrap; gap: 10px; }
        .calendar-selected-info { display: inline-flex; align-items: center; gap: 8px; background: #E8F1FC; color: var(--azul-principal); padding: 10px 14px; border-radius: 12px; font-size: 0.95rem; }
        .day-cell.selected { border-color: var(--azul-principal); background: #E8F1FC; }
        .event-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; cursor: default; }
        .event-chip.PROVA { background: #E74C3C; }
        .event-chip.TRABALHO { background: #F1C40F; color: #102A43; }
        .event-chip.EVENTO { background: #3498DB; }
        .event-chip.REUNIAO { background: #16A085; }
        .event-chip.FERIADO { background: #1ABC9C; }
        .event-chip.CONSELHO { background: #2C3E50; }
        .event-chip.PLANTAO { background: #8E44AD; }
        .calendar-grid-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; text-align: center; margin-bottom: 10px; }
        .calendar-grid-header div { font-size: 12px; font-weight: 700; color: var(--cinza-escuro); }
        .month-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
        .day-cell { min-height: 96px; background: var(--branco); border: 1px solid #EAEDED; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 10px; transition: transform 0.2s, border-color 0.2s; cursor: pointer; }
        .day-cell:hover { transform: translateY(-2px); border-color: #D1D5DB; }
        .day-cell.inactive { opacity: 0.5; background: #F8F9FA; cursor: default; }
        .day-cell.today { border: 2px solid var(--azul-claro); }
        .day-cell .day-number { font-size: 14px; font-weight: 700; color: var(--preto); }
        .day-cell .event-markers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
        .event-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
        .calendar-event-list { display: grid; gap: 10px; margin-top: 14px; }
        .calendar-event-item { background: #F8FAFF; padding: 14px 16px; border-radius: 14px; border: 1px solid #E0E7FF; }
        .calendar-event-item h4 { margin: 0 0 8px 0; font-size: 15px; font-weight: 700; color: var(--preto); }
        .calendar-event-item .event-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--cinza-escuro); }
        .calendar-event-item p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--cinza-escuro); }
        .calendar-event-item .event-markers { margin-top: 10px; }
        .event-dot.PROVA { background: #E74C3C; }
        .event-dot.TRABALHO { background: #F1C40F; }
        .event-dot.EVENTO { background: #3498DB; }
        .event-dot.REUNIAO { background: #16A085; }
        .event-dot.FERIADO { background: #1ABC9C; }
        .event-dot.CONSELHO { background: #2C3E50; }
        .event-dot.PLANTAO { background: #8E44AD; }
        .room-status { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
        .room-status.Confirmado { background: #E8F8F5; color: #117A65; }
        .room-status.Pendente { background: #FEF5E7; color: #B7950B; }
        .room-status.Cancelado { background: #FDEDEC; color: #C0392B; }
        .table-header { padding: 20px; border-bottom: 1px solid #EAEDED; display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; }
        .table-header h3 { font-size: 16px; font-weight: 700; color: var(--preto); }
        table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 600px; }
        th { text-align: left; padding: 15px 20px; color: var(--cinza-escuro); font-weight: 600; background: #F8F9F9; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
        td { padding: 15px 20px; border-bottom: 1px solid #F2F4F4; vertical-align: middle; color: var(--preto); font-weight: 500; }
        tr:hover td { background-color: #F8F9FA; }
        tr:last-child td { border-bottom: none; }

        .status-badge { padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; text-transform: uppercase; }
        .status-badge.active { background-color: #E8F8F5; color: #117A65; }
        .status-badge.inactive { background-color: #FDEDEC; color: #C0392B; }
        .status-badge.neutral { background-color: #EBF0F3; color: var(--cinza-escuro); }
        .status-badge.warning { background-color: #FEF5E7; color: #B7950B; }

        .icon-btn {
            background: none; border: none; cursor: pointer; width: 32px; height: 32px;
            border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
            color: var(--cinza-escuro); transition: 0.2s; font-size: 14px; margin-right: 4px;
        }
        .icon-btn:hover { background: #EAEDED; color: var(--azul-principal); }
        .icon-btn.danger:hover { background: #FDEDEC; color: var(--vermelho); }
        .icon-btn.success:hover { background: #E8F8F5; color: var(--verde); }

        .search-input-wrapper { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
        .search-input-wrapper i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--cinza-escuro); font-size: 13px; }
        .search-input-wrapper input { width: 100%; padding: 10px 15px 10px 36px; border: 1px solid #D5DBDB; border-radius: 8px; outline: none; font-size: 14px; font-family: 'Montserrat', sans-serif; }
        .search-input-wrapper input:focus { border-color: var(--azul-claro); }

        .comunicado-card { background: var(--branco); border-radius: 12px; padding: 20px; box-shadow: var(--sombra); margin-bottom: 15px; border-left: 5px solid var(--azul-claro); }
        .comunicado-card .com-meta { font-size: 12px; color: var(--cinza-escuro); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
        .comunicado-card h4 { font-size: 15px; margin-bottom: 8px; color: var(--preto); font-weight: 700; }
        .comunicado-card p { font-size: 14px; color: var(--cinza-escuro); line-height: 1.6; white-space: pre-wrap; }
        .destino-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; background: #EAF2FB; color: var(--azul-principal); letter-spacing: 0.5px; }

        .batch-table input[type=number] { width: 85px; padding: 8px; border: 1px solid #D5DBDB; border-radius: 6px; text-align: center; font-family: 'Montserrat', sans-serif; }
        .presence-toggle { display: flex; justify-content: flex-end; }
        .presence-toggle button { padding: 8px 12px; border-radius: 999px; border: 1px solid #D5DBDB; background: #F8F9F9; cursor: pointer; font-weight: 600; font-size: 12px; transition: 0.2s; color: var(--cinza-escuro); min-width: 90px; }
        .presence-toggle button.active { background: #FDEDEC; border-color: var(--vermelho); color: #C0392B; }
        .presence-toggle button:not(.active) { background: #E8F8F5; border-color: var(--verde); color: #117A65; }

        .info-hint { background: #F2F4F4; padding: 12px 15px; border-radius: 8px; font-size: 12px; color: #5D6D7E; border-left: 3px solid var(--azul-claro); margin-bottom: 18px; line-height: 1.6; }
        .empty-state { text-align: center; padding: 40px 20px; color: var(--cinza-escuro); font-size: 14px; }
        .empty-state i { font-size: 32px; display: block; margin-bottom: 10px; opacity: 0.4; }
        .risk-summary { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
        .risk-summary-item { flex: 1; min-width: 170px; padding: 14px 16px; border-radius: 12px; background: #fff; box-shadow: var(--sombra); color: var(--cinza-escuro); font-size: 13px; }
        .risk-summary-item strong { display: block; margin-top: 5px; color: var(--preto); font-size: 22px; }
        .risk-summary-item.critical { border-left: 5px solid var(--vermelho); }
        .risk-summary-item.warning { border-left: 5px solid var(--amarelo); }
        .risk-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
        .risk-reason { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #FEF5E7; color: #8A6D00; font-size: 11px; font-weight: 700; }
        .context-banner { background: linear-gradient(135deg, var(--azul-principal), var(--azul-claro)); color: white; padding: 14px 20px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }

        /* IA CHAT STYLES */
        .ia-chat-container {
            display: flex;
            flex-direction: column;
            height: 100%;
            max-height: 600px;
            background: var(--branco);
            border-radius: 12px;
            box-shadow: var(--sombra);
            overflow: hidden;
        }
        .ia-chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 16px;
            background: #fafbfc;
            min-height: 300px;
            max-height: 480px;
        }
        .ia-message {
            max-width: 85%;
            padding: 14px 18px;
            border-radius: 18px;
            font-size: 14px;
            line-height: 1.6;
            word-wrap: break-word;
            background: var(--branco);
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
            align-self: flex-start;
            border: 1px solid #e9edf2;
        }
        .ia-message.user {
            align-self: flex-end;
            background: var(--azul-principal);
            color: white;
            border: none;
        }
        .ia-message .ia-avatar {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
            color: var(--azul-principal);
            margin-bottom: 6px;
        }
        .ia-message.user .ia-avatar { color: rgba(255,255,255,0.8); }
        .ia-quick-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 12px 20px 16px;
            background: var(--branco);
            border-top: 1px solid #e9edf2;
        }
        .ia-quick-actions button {
            background: #f0f6ff;
            border: none;
            padding: 6px 16px;
            border-radius: 30px;
            font-size: 13px;
            font-weight: 500;
            color: var(--azul-principal);
            cursor: pointer;
            transition: 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .ia-quick-actions button:hover {
            background: var(--azul-principal);
            color: white;
            transform: translateY(-1px);
        }
        .ia-input-area {
            display: flex;
            gap: 10px;
            padding: 12px 20px 20px;
            background: var(--branco);
            border-top: 1px solid #e9edf2;
        }
        .ia-input-area input {
            flex: 1;
            padding: 12px 16px;
            border: 1px solid #d5dbdb;
            border-radius: 30px;
            font-size: 14px;
            outline: none;
            font-family: 'Inter', sans-serif;
            transition: 0.2s;
        }
        .ia-input-area input:focus {
            border-color: var(--azul-claro);
            box-shadow: 0 0 0 3px rgba(26,117,211,0.15);
        }
        .ia-input-area button {
            padding: 12px 24px;
            background: var(--azul-principal);
            color: white;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            font-weight: 600;
            transition: 0.2s;
            font-size: 14px;
        }
        .ia-input-area button:hover {
            background: var(--azul-claro);
            transform: scale(1.02);
        }
        .ia-input-area label.btn-sys-primary {
            padding: 10px 14px;
            cursor: pointer;
            background: var(--cinza-escuro);
            border-radius: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .ia-input-area label.btn-sys-primary:hover {
            background: var(--preto);
        }

        .toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
        .toast {
            min-width: 250px; max-width: 340px; background: var(--branco); color: var(--preto); padding: 15px 20px; border-radius: 8px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14px;
            transform: translateX(120%); transition: transform 0.3s ease; border-left: 5px solid var(--azul-principal);
        }
        .toast.show { transform: translateX(0); }
        .toast.success { border-left-color: var(--verde); }
        .toast.error { border-left-color: var(--vermelho); }

        .modal-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.6); backdrop-filter: blur(3px);
            display: none; justify-content: center; align-items: center; z-index: 2000;
            opacity: 0; transition: opacity 0.3s ease; padding: 20px;
        }
        .modal-overlay.show { display: flex; opacity: 1; }
        .modal {
            background: var(--branco); width: 90%; max-width: 550px; border-radius: 16px;
            padding: 30px; box-shadow: 0 15px 30px rgba(0,0,0,0.3);
            transform: translateY(20px); transition: transform 0.3s ease;
            max-height: 90vh; overflow-y: auto; position: relative;
        }
        .modal-overlay.show .modal { transform: translateY(0); }

        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; border-bottom: 1px solid #EAEDED; padding-bottom: 15px; }
        .modal-header h2 { color: var(--preto); font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
        .close-modal { font-size: 24px; cursor: pointer; color: var(--cinza-escuro); transition: 0.2s; background: none; border: none; }
        .close-modal:hover { color: var(--vermelho); }

        .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
        .form-group { display: flex; flex-direction: column; gap: 6px; }
        .form-group.full-width { grid-column: 1 / -1; }
        .form-group label { font-size: 13px; font-weight: 600; color: var(--cinza-escuro); }
        .form-group input, .form-group select, .form-group textarea {
            padding: 12px 15px; border: 1px solid #D5DBDB; border-radius: 8px; outline: none; transition: 0.3s; font-size: 14px; background: #FDFEFE;
            font-family: 'Montserrat', sans-serif;
        }
        .form-group textarea { resize: vertical; min-height: 90px; }
        .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--azul-claro); box-shadow: 0 0 0 3px rgba(26, 117, 211, 0.15); background: #FFF; }
        .form-group input:disabled, .form-group select:disabled { background: #F2F4F4; color: var(--cinza-escuro); cursor: not-allowed; }
        .form-hint { font-size: 12px; color: var(--cinza-escuro); margin-top: -2px; }
        .modal-footer { margin-top: 30px; display: flex; justify-content: flex-end; gap: 12px; }

        .sidebar-backdrop { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }

        /* Estilo da carteirinha */
        .carteirinha {
            background: linear-gradient(135deg, #f0f6ff 0%, #ffffff 100%);
            border-radius: 20px;
            padding: 30px 25px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.12);
            border: 2px solid var(--azul-principal);
            max-width: 380px;
            margin: 0 auto;
            position: relative;
            transition: transform 0.3s;
        }
        .carteirinha:hover { transform: translateY(-5px); }
        .carteirinha .cabecalho {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid var(--azul-claro);
        }
        .carteirinha .avatar-carteira {
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--azul-principal), var(--azul-claro));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 30px;
            font-weight: 700;
            flex-shrink: 0;
        }
        .carteirinha .info-carteira h3 {
            font-size: 18px;
            margin: 0;
            color: var(--preto);
        }
        .carteirinha .info-carteira p {
            margin: 4px 0 0;
            font-size: 13px;
            color: var(--cinza-escuro);
        }
        .carteirinha .detalhes {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px 16px;
            margin: 15px 0;
        }
        .carteirinha .detalhes span {
            font-size: 13px;
            color: var(--cinza-escuro);
        }
        .carteirinha .detalhes span strong {
            color: var(--preto);
            display: block;
            font-size: 14px;
        }
        .carteirinha .qr-code {
            display: flex;
            justify-content: center;
            margin: 12px 0;
        }
        .carteirinha .servicos {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin-top: 12px;
        }
        .carteirinha .servicos .badge-servico {
            background: #e8f5e9;
            color: #2e7d32;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .carteirinha .servicos .badge-servico i { font-size: 12px; }

        .lista-alunos-click {
            cursor: pointer;
            transition: background 0.2s;
            padding: 10px 15px;
            border-radius: 8px;
            margin-bottom: 6px;
            background: var(--branco);
            border: 1px solid #e9edf2;
        }
        .lista-alunos-click:hover {
            background: #f0f6ff;
            border-color: var(--azul-claro);
        }
        .lista-alunos-click .info-aluno {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
        }
        .lista-alunos-click .info-aluno .nome {
            font-weight: 600;
            color: var(--azul-principal);
        }
        .lista-alunos-click .info-aluno .detalhe {
            font-size: 13px;
            color: var(--cinza-escuro);
        }

        @media (max-width: 900px) {
            .profile-name { display: none; }
            .profile-trigger > .fa-chevron-down { display: none; }
            .profile-dropdown { width: min(270px, calc(100vw - 30px)); }
            .sidebar { transform: translateX(-100%); width: 260px; }
            .sidebar.open { transform: translateX(0); }
            .sidebar-backdrop.show { display: block; }
            .main-content { margin-left: 0; padding: 20px; width: 100%; }
            .menu-toggle { display: block; }
            .top-header h1 { font-size: 20px; }
            .form-grid { grid-template-columns: 1fr; }
            .action-bar { flex-direction: column; align-items: stretch; }
            .search-input-wrapper { max-width: none; }
            .carteirinha .detalhes { grid-template-columns: 1fr; }
        }/* HORIZON SGE 7.0 — formulário administrativo */
.hsg-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#fff;padding:16px;border:1px solid #ddd;border-radius:8px}.hsg-field{display:flex;flex-direction:column;gap:5px}.hsg-field textarea,.hsg-field input,.hsg-field select{width:100%;box-sizing:border-box}.hsg-field textarea{min-height:110px}.hsg-advanced{grid-column:1/-1;margin-top:4px}.hsg-advanced textarea{width:100%;min-height:180px;font-family:monospace}.hsg-form-grid .hsg-field:nth-child(1){grid-column:1/-1}@media(max-width:900px){.hsg-form-grid{grid-template-columns:1fr}}


/* ============================================================
   HORIZON SGE 11.0 — RESPONSIVIDADE MOBILE E TABLET
   ============================================================ */
*,*::before,*::after{box-sizing:border-box}
html,body{max-width:100%;overflow-x:hidden}
body{margin:0;-webkit-text-size-adjust:100%;text-rendering:optimizeLegibility}
button,input,select,textarea{max-width:100%}
img,svg,video,canvas{max-width:100%;height:auto}
.main-content{min-width:0;width:calc(100% - 260px);box-sizing:border-box}
.view-section{min-width:0}
.table-wrapper{max-width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.table-wrapper table{min-width:720px}
.btn-group,.actions{flex-wrap:wrap}
.action-bar>*{min-width:0}
.search-input-wrapper{width:min(100%,300px)}
.form-grid,.hsg-form-grid{min-width:0}
.modal-overlay{overflow:auto;-webkit-overflow-scrolling:touch}
.modal{width:min(94vw,550px);max-height:calc(100vh - 32px);overflow:auto}

@media (min-width:901px) and (max-width:1180px){
  .main-content{padding:22px 24px}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .top-header h1{font-size:21px}
  .action-bar{gap:10px}
  .action-bar .search-input-wrapper{max-width:260px}
  .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:900px){
  .system-container{height:100dvh;min-height:100vh}
  .sidebar{width:min(86vw,300px);padding:20px 16px;box-shadow:10px 0 30px rgba(0,0,0,.22)}
  .main-content{width:100%;height:100dvh;min-height:100vh;margin-left:0;padding:16px 14px 28px;overflow-y:auto}
  .top-header{position:sticky;top:0;z-index:900;margin:0 -14px 18px;padding:10px 14px 12px;background:rgba(246,248,250,.96);backdrop-filter:blur(8px);border-bottom:1px solid #e5e7eb}
  .top-header h1{font-size:18px;line-height:1.2}
  .header-left{gap:9px;min-width:0}
  .header-left h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .menu-toggle{padding:7px;min-width:42px;min-height:42px}
  .user-area{gap:7px!important}
  .icon-btn{min-width:40px;min-height:40px}
  .profile-trigger{min-width:40px;min-height:40px}
  .profile-trigger .avatar{width:38px;height:38px}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .stat-card{padding:15px 13px;border-radius:12px}
  .stat-card h3{font-size:11px;line-height:1.25}
  .stat-card .number{font-size:23px}
  .action-bar{padding:13px;gap:10px;margin-bottom:16px}
  .action-bar>p{width:100%;margin:0}
  .action-bar .search-input-wrapper,.action-bar .btn-group,.action-bar>.btn-sys-primary,.action-bar>.btn-cancel{width:100%;max-width:none}
  .btn-group{display:flex;gap:8px}
  .btn-group>*{flex:1 1 150px}
  .btn-sys-primary,.btn-cancel{min-height:42px}
  .form-grid,.hsg-form-grid{grid-template-columns:1fr!important;gap:12px}
  .form-group.full-width,.hsg-advanced{grid-column:1!important}
  .table-header{padding:14px 15px;gap:8px;flex-wrap:wrap}
  .table-header h3{font-size:15px}
  .table-wrapper{border-radius:10px;margin-bottom:14px}
  .table-wrapper table{min-width:680px;font-size:12px}
  .table-wrapper th,.table-wrapper td{padding:10px 9px;white-space:nowrap}
  .modal-overlay{padding:8px}
  .modal{width:100%;max-width:none;border-radius:14px;padding:18px;max-height:calc(100dvh - 16px)}
  .modal-header{margin-bottom:16px;padding-bottom:12px}
  .modal-header h2{font-size:17px}
  .modal-footer{margin-top:20px;display:grid;grid-template-columns:1fr 1fr}
  .modal-footer button{width:100%;min-height:44px}
  .carteirinha{max-width:100%;padding:22px 17px}
  .risk-summary{grid-template-columns:1fr!important}
  .ia-chat-container{max-width:100%;overflow:hidden}
}

@media (max-width:600px){
  .main-content{padding:12px 10px 24px}
  .top-header{margin:0 -10px 14px;padding:8px 10px 10px}
  .top-header h1{font-size:16px}
  .stats-grid{grid-template-columns:1fr 1fr;gap:8px}
  .stat-card{padding:12px 10px;min-height:82px}
  .stat-card .number{font-size:20px}
  .profile-dropdown{right:-4px}
  .profile-summary{padding:9px 10px 12px}
  .action-bar{padding:11px}
  .search-input-wrapper input{min-height:42px}
  .btn-group{width:100%}
  .btn-group>*{flex:1 1 100%;width:100%}
  .table-wrapper table{min-width:620px}
  .table-wrapper th,.table-wrapper td{padding:9px 8px}
  .modal-footer{grid-template-columns:1fr}
  .modal{padding:15px}
  .form-group input,.form-group select,.form-group textarea{font-size:16px;min-height:44px}
  .hsg-field input,.hsg-field select,.hsg-field textarea{font-size:16px;min-height:44px}
}

@media (max-width:380px){
  .stats-grid{grid-template-columns:1fr}
  .user-area .icon-btn:first-child{display:none}
  .sidebar{width:92vw}
}

@media (pointer:coarse){
  .sidebar nav ul li a{min-height:44px;padding-top:12px;padding-bottom:12px}
  button,.btn-sys-primary,.btn-cancel,.icon-btn{touch-action:manipulation}
}

/* HORIZON SGE 12.0 — PWA / experiência mobile */
.hsg-install-app{position:fixed;right:18px;bottom:18px;z-index:1200;display:none;align-items:center;gap:8px;border:0;border-radius:999px;padding:12px 16px;background:var(--azul-principal,#004A99);color:#fff;font-weight:700;box-shadow:0 10px 28px rgba(0,0,0,.22);cursor:pointer}
.hsg-install-app.show{display:flex}
.hsg-offline-badge{position:fixed;left:18px;bottom:18px;z-index:1199;display:none;padding:8px 12px;border-radius:999px;background:#7f1d1d;color:#fff;font-size:12px;font-weight:700;box-shadow:0 6px 18px rgba(0,0,0,.18)}
.hsg-offline-badge.show{display:block}
.hsg-quick-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:16px}
.hsg-quick-card{border:1px solid #e2e8f0;border-radius:14px;background:#fff;padding:15px;box-shadow:0 4px 14px rgba(15,23,42,.05)}
.hsg-quick-card strong{display:block;margin-bottom:6px;color:var(--azul-principal)}
.hsg-quick-card small{color:#64748b;line-height:1.45}
@media(max-width:600px){.hsg-install-app{right:10px;bottom:10px;left:10px;justify-content:center}.hsg-offline-badge{left:10px;bottom:62px}.hsg-quick-grid{grid-template-columns:1fr}}

/* HORIZON SGE 13.0 — Inteligência de Gestão */
.hsg-inteligencia-panel{margin:18px 0;padding:18px;background:linear-gradient(135deg,#fff,#f8fbff);border:1px solid #dbe7f5;border-radius:16px;box-shadow:0 6px 18px rgba(15,23,42,.05)}.hsg-int-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.hsg-int-head h3{margin:0 0 4px}.hsg-int-head small{color:#64748b}.hsg-int-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.hsg-int-grid>div{padding:13px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}.hsg-int-grid strong{display:block;font-size:23px}.hsg-int-grid span{font-size:11px;color:#64748b}.hsg-int-error{color:#64748b}.hsg-admin-int .hsg-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin:20px 0}.hsg-admin-int .hsg-kpi{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px;box-shadow:0 4px 14px rgba(15,23,42,.05)}.hsg-admin-int .hsg-kpi span{display:block;color:#64748b;font-size:12px;text-transform:uppercase}.hsg-admin-int .hsg-kpi strong{display:block;font-size:27px;margin-top:8px}.hsg-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.hsg-admin-grid section{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px}.hsg-admin-grid h2{margin-top:0}.hsg-table-scroll{overflow:auto}
@media(max-width:900px){.hsg-admin-grid{grid-template-columns:1fr}.hsg-int-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.hsg-inteligencia-panel{padding:14px}.hsg-int-grid{grid-template-columns:1fr 1fr;gap:8px}.hsg-int-grid>div{padding:11px}.hsg-int-grid strong{font-size:20px}}


/* ============================================================
   HORIZON SGE 14.0 — Central Operacional e responsividade
   ============================================================ */
.hsg-central14{margin:18px 0;background:#fff;border:1px solid #dbe7f5;border-radius:18px;padding:18px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.hsg-central14-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.hsg-central14-head h3{margin:2px 0 3px;font-size:19px}.hsg-central14-head small{color:#64748b}.hsg-eyebrow{font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--azul-principal,#004A99)}
.hsg-central14-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:15px}.hsg-central14-kpis>div{border:1px solid #e2e8f0;border-radius:13px;padding:13px;background:#f8fbff}.hsg-central14-kpis strong{display:block;font-size:24px;color:#0f172a}.hsg-central14-kpis span{font-size:11px;color:#64748b}
.hsg-central14-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.hsg-central14-card{border:1px solid #e2e8f0;border-radius:13px;padding:14px}.hsg-central14-card h4{margin:0 0 10px;font-size:14px}.hsg-pending-row,.hsg-agenda-row{display:flex;align-items:center;gap:9px;padding:9px 0;border-top:1px solid #eef2f7}.hsg-pending-row:first-of-type,.hsg-agenda-row:first-of-type{border-top:0}.hsg-pending-row strong{display:block;font-size:12px}.hsg-pending-row small{display:block;color:#64748b;font-size:10px;margin-top:2px}.hsg-pending-dot{width:9px;height:9px;border-radius:50%;background:#94a3b8;flex:0 0 auto}.hsg-pending-dot.alta{background:#f59e0b}.hsg-pending-dot.critica{background:#dc2626}.hsg-agenda-row b{font-size:11px;min-width:72px;color:#475569}.hsg-agenda-row span{font-size:12px}.hsg-empty14{padding:12px 0;color:#64748b;font-size:12px}
@media(max-width:900px){.hsg-central14-kpis{grid-template-columns:repeat(2,1fr)}.hsg-central14-grid{grid-template-columns:1fr}}
@media(max-width:600px){.hsg-central14{padding:13px;border-radius:14px}.hsg-central14-head h3{font-size:16px}.hsg-central14-kpis{gap:7px}.hsg-central14-kpis>div{padding:10px}.hsg-central14-kpis strong{font-size:20px}.hsg-agenda-row b{min-width:62px}.hsg-central14-card{padding:11px}}

/* HORIZON SGE 14.0 — Portal do Responsável */
.hsg-responsavel-panel{margin-top:18px}.hsg-resp-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}.hsg-resp-card{display:flex;gap:13px;padding:18px;background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 6px 18px rgba(15,23,42,.05)}.hsg-resp-avatar{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:#e8f1ff;color:var(--azul-principal,#004A99);font-weight:800;font-size:20px;flex:0 0 auto}.hsg-resp-card h3{margin:0 0 3px;font-size:16px}.hsg-resp-card p{margin:0;color:#64748b;font-size:12px}.hsg-resp-stats{display:flex;gap:10px;margin-top:13px;flex-wrap:wrap}.hsg-resp-stats span{font-size:11px;color:#64748b;padding:7px 9px;background:#f8fafc;border-radius:9px}.hsg-resp-stats b{color:#0f172a;margin-right:4px}
@media(max-width:600px){.hsg-resp-grid{grid-template-columns:1fr}.hsg-resp-card{padding:14px}}

/* ============================================================
   HORIZON SGE 15.0 — UX operacional, agenda e comunicação
   ============================================================ */
.hsg15-host{margin-top:18px}.hsg15-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px;padding:20px;border-radius:18px;background:linear-gradient(135deg,#fff,#f5f8ff);border:1px solid rgba(35,75,150,.10)}.hsg15-toolbar h2{margin:4px 0;font-size:25px}.hsg15-toolbar p{margin:0;color:var(--cinza-escuro)}.hsg15-eyebrow{font-size:11px;font-weight:800;letter-spacing:.12em;color:var(--azul-principal)}.hsg15-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:18px}.hsg15-card{background:#fff;border:1px solid #e7ebf2;border-radius:18px;padding:18px;box-shadow:0 5px 20px rgba(0,0,0,.04)}.hsg15-card h3{margin:0 0 15px}.hsg15-day{border-top:1px solid #edf0f5;padding:12px 0}.hsg15-day:first-child{border-top:0}.hsg15-dayhead{display:flex;justify-content:space-between;margin-bottom:8px}.hsg15-dayhead span,.hsg15-event small,.hsg15-task small,.hsg15-message small{display:block;color:var(--cinza-escuro);font-size:12px}.hsg15-event{display:flex;gap:10px;padding:10px;border-radius:12px;background:#f8faff;margin:7px 0}.hsg15-dot{width:9px;height:9px;border-radius:50%;background:var(--azul-claro);margin-top:5px;flex:none}.hsg15-mini-grid,.hsg15-task-kpis{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.hsg15-mini-grid div,.hsg15-task-kpis div{padding:16px;border-radius:14px;background:#f7f9fc}.hsg15-mini-grid strong,.hsg15-task-kpis strong{display:block;font-size:25px}.hsg15-mini-grid span,.hsg15-task-kpis span{color:var(--cinza-escuro);font-size:12px}.hsg15-task-kpis{grid-template-columns:repeat(4,1fr);margin-bottom:18px}.hsg15-task-list{display:flex;flex-direction:column;gap:8px}.hsg15-task{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px;border:1px solid #edf0f4;border-radius:14px}.hsg15-task.done{opacity:.65}.hsg15-task-type{font-size:10px;font-weight:800;text-transform:uppercase;color:var(--azul-principal);display:block;margin-bottom:3px}.hsg15-message{display:flex;justify-content:space-between;gap:12px;padding:14px 0;border-top:1px solid #edf0f4}.hsg15-message:first-of-type{border-top:0}.hsg15-message p{margin:7px 0 0;color:#445}.hsg15-doc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.hsg15-doc-card{background:#fff;border:1px solid #e7ebf2;border-radius:18px;padding:18px}.hsg15-doc-icon{width:45px;height:45px;border-radius:13px;display:grid;place-items:center;background:#eef4ff;color:var(--azul-principal);font-size:19px;margin-bottom:12px}.hsg15-doc-card h3{margin:0 0 5px}.hsg15-doc-card p{font-size:13px;color:var(--cinza-escuro)}.hsg15-doc-actions{display:flex;gap:8px;align-items:center;margin-top:15px}.hsg-empty15{padding:30px;text-align:center;color:var(--cinza-escuro)}
@media(max-width:900px){.hsg15-grid{grid-template-columns:1fr}.hsg15-task-kpis{grid-template-columns:repeat(2,1fr)}.hsg15-doc-grid{grid-template-columns:repeat(2,1fr)}.hsg15-toolbar{align-items:flex-start;flex-direction:column}.hsg15-toolbar .btn-sys-primary{width:100%}}
@media(max-width:600px){.hsg15-doc-grid{grid-template-columns:1fr}.hsg15-card{padding:14px}.hsg15-task{align-items:flex-start}.hsg15-mini-grid{grid-template-columns:1fr 1fr}}

/* HORIZON 17.0 */
.hsg17-host{margin-top:18px}.hsg17-toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px;padding:22px;border-radius:20px;background:linear-gradient(135deg,#fff,#f4f8ff);border:1px solid rgba(35,75,150,.10)}.hsg17-toolbar h2{margin:4px 0;font-size:26px}.hsg17-toolbar p{margin:0;color:var(--cinza-escuro)}.hsg17-eyebrow{font-size:11px;font-weight:800;letter-spacing:.12em;color:var(--azul-principal)}.hsg17-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.hsg17-kpis>div{background:#fff;border:1px solid #e7ebf2;border-radius:16px;padding:18px}.hsg17-kpis span{display:block;color:var(--cinza-escuro);font-size:12px}.hsg17-kpis strong{display:block;font-size:28px;margin-top:4px}.hsg17-card{background:#fff;border:1px solid #e7ebf2;border-radius:18px;padding:20px;box-shadow:0 5px 20px rgba(0,0,0,.035)}.hsg17-card-head{display:flex;justify-content:space-between;margin-bottom:15px}.hsg17-card h3{margin:0}.hsg17-table-wrap{overflow:auto}.hsg17-table-wrap table{width:100%;border-collapse:collapse}.hsg17-table-wrap th,.hsg17-table-wrap td{text-align:left;padding:13px 10px;border-bottom:1px solid #edf0f4;white-space:nowrap}.hsg17-bar{width:120px;height:7px;background:#e9eef6;border-radius:99px;overflow:hidden;display:inline-block;vertical-align:middle;margin-right:6px}.hsg17-bar span{display:block;height:100%;background:var(--azul-principal);border-radius:99px}.hsg17-loading{text-align:center;padding:40px;color:var(--cinza-escuro)}.hsg17-result{padding:18px;border-radius:14px;background:#f7f9fc}.hsg17-result.error{border:1px solid #f1c8c8;background:#fff6f6}.hsg17-result.success{border:1px solid #bfe3ce;background:#f5fff8}.hsg17-valid{display:flex;gap:12px;align-items:center}.hsg17-valid i{font-size:28px;color:#198754}.hsg17-valid span{display:block;color:#52606d;font-size:13px;margin-top:3px}.hsg17-result dl{display:grid;grid-template-columns:140px 1fr;gap:8px 14px;margin:18px 0 0}.hsg17-result dt{font-weight:700;color:#52606d}.hsg17-result dd{margin:0}
@media(max-width:900px){.hsg17-kpis{grid-template-columns:repeat(2,1fr)}.hsg17-toolbar{align-items:flex-start;flex-direction:column}.hsg17-toolbar button{width:auto}.hsg17-result dl{grid-template-columns:1fr}.hsg17-result dt{margin-top:6px}}
@media(max-width:600px){.hsg17-kpis{grid-template-columns:1fr 1fr}.hsg17-card{padding:14px}.hsg17-toolbar{padding:16px}.hsg17-toolbar h2{font-size:21px}}


/* ============================================================
   HORIZON SGE 18.0 — MOBILE FIRST / DOCUMENTOS / CARTEIRA PRO
   ============================================================ */
html{font-size:16px}*{box-sizing:border-box}.main-content,.view-section,.page-header,.action-bar,.table-wrapper,.calendar-panel,.student-detail-panel{min-width:0}.table-wrapper{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-wrapper table{min-width:680px}.action-bar{align-items:flex-start}.btn-sys-primary,.btn-cancel,.icon-btn,button{touch-action:manipulation}.search-input-wrapper{min-width:0}.search-input-wrapper input{min-width:0}.modal-overlay{padding:12px}.modal{width:min(100%,760px);max-height:calc(100dvh - 24px);overflow:auto}.form-grid{min-width:0}
.hsg18-card-stage{display:grid;grid-template-columns:minmax(280px,430px) minmax(220px,1fr);gap:22px;align-items:center;background:linear-gradient(135deg,#f8fbff,#eef4fb);border:1px solid #dce7f3;border-radius:22px;padding:22px;box-shadow:0 12px 35px rgba(15,23,42,.07)}
.hsg18-student-card{width:100%;aspect-ratio:85/54;border-radius:20px;overflow:hidden;background:linear-gradient(135deg,#073168,#1b75d2);color:#fff;padding:18px;box-shadow:0 18px 38px rgba(7,49,104,.28);position:relative}.hsg18-student-card:after{content:'';position:absolute;width:160px;height:160px;border-radius:50%;right:-55px;top:-65px;background:rgba(255,255,255,.10)}.hsg18-card-top,.hsg18-card-bottom{display:flex;justify-content:space-between;align-items:center;position:relative;z-index:1}.hsg18-card-top{font-size:14px;font-weight:800;letter-spacing:.08em}.hsg18-card-top b{opacity:.85}.hsg18-card-main{display:flex;gap:14px;align-items:center;position:relative;z-index:1;height:calc(100% - 54px)}.hsg18-photo{width:64px;height:64px;flex:0 0 64px;border-radius:16px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.35);display:grid;place-items:center;font-size:27px;font-weight:800}.hsg18-card-info{min-width:0}.hsg18-card-info small{font-size:7px;letter-spacing:.1em;opacity:.75}.hsg18-card-info h3{font-size:17px;margin:3px 0 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsg18-card-info p{margin:2px 0;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsg18-card-bottom{font-size:7px;opacity:.85;position:relative;z-index:1}.hsg18-card-actions{display:flex;flex-direction:column;align-items:center;gap:12px}.hsg18-qr-box{background:#fff;padding:10px;border-radius:16px;text-align:center;box-shadow:0 8px 20px rgba(15,23,42,.08)}.hsg18-qr-box small{display:block;color:#64748b;font-size:8px;margin-top:6px;max-width:150px;word-break:break-all}.hsg18-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.hsg18-service-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:15px}.hsg18-service-grid>div{background:#fff;border:1px solid #e4eaf1;border-radius:14px;padding:12px;display:grid;grid-template-columns:auto 1fr;gap:5px 8px;align-items:center}.hsg18-service-grid i{color:var(--azul-principal);grid-row:span 2}.hsg18-service-grid span{font-size:11px;color:#64748b}.hsg18-service-grid b{font-size:11px;color:#15803d}
.hsg18-doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:15px}.hsg18-doc-person{background:#fff;border:1px solid #e5eaf0;border-radius:18px;padding:16px;display:grid;grid-template-columns:auto 1fr;gap:10px;box-shadow:0 6px 18px rgba(15,23,42,.04)}.hsg18-person-avatar{width:46px;height:46px;border-radius:14px;background:#eaf2ff;color:var(--azul-principal);display:grid;place-items:center;font-weight:800}.hsg18-doc-person h3{margin:0;font-size:15px}.hsg18-doc-person p{margin:4px 0;color:#64748b;font-size:11px}.hsg18-doc-types{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px}.hsg18-doc-type{border:1px solid #e1e8f0;background:#f8fafc;border-radius:12px;padding:10px;text-align:left;display:flex;gap:8px;align-items:center;cursor:pointer}.hsg18-doc-type i{color:var(--azul-principal)}.hsg18-doc-type span{font-size:10px;color:#334155}.hsg18-doc-preview{padding:8px 4px 2px}.hsg18-doc-brand{display:flex;justify-content:center;gap:6px;align-items:center;color:var(--azul-principal);font-size:20px;font-weight:900;letter-spacing:.08em}.hsg18-doc-brand b{color:#1b75d2}.hsg18-doc-status{display:flex;align-items:center;justify-content:center;gap:10px;margin:18px 0;padding:13px;background:#f2fbf5;border:1px solid #c9ecd4;border-radius:14px;text-align:left}.hsg18-doc-status i{color:#198754;font-size:26px}.hsg18-doc-status strong,.hsg18-doc-status small{display:block}.hsg18-doc-status small{font-size:11px;color:#64748b;margin-top:3px}.hsg18-doc-preview>h3{font-size:18px;margin:12px 0 7px}.hsg18-doc-preview>p{font-size:13px;line-height:1.6;color:#475569}.hsg18-doc-preview #hsg18-doc-qr{display:inline-block;background:#fff;padding:10px;border:1px solid #e5eaf0;border-radius:15px}.hsg18-code{margin:12px auto;padding:10px;background:#f8fafc;border-radius:10px;color:#64748b;font-size:11px}.hsg18-code b{color:#0f172a;word-break:break-all}.hsg18-doc-preview .hsg18-actions{margin-top:12px}
@media(max-width:900px){.sidebar{z-index:1200}.top-header{z-index:1000}.main-content{padding-left:12px;padding-right:12px}.top-header{margin-left:-12px;margin-right:-12px;padding-left:12px;padding-right:12px}.profile-name,.profile-trigger>i{display:none}.hsg18-card-stage{grid-template-columns:1fr;padding:15px}.hsg18-student-card{max-width:430px;margin:auto}.hsg18-card-actions{flex-direction:row;justify-content:center;flex-wrap:wrap}.hsg18-service-grid{grid-template-columns:1fr 1fr}.stats-grid{grid-template-columns:1fr 1fr!important}.form-grid{grid-template-columns:1fr 1fr!important}.action-bar{gap:10px}.action-bar .btn-group{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}.action-bar .btn-group button{width:100%;margin:0}.hsg17-toolbar,.hsg15-toolbar{padding:15px;border-radius:15px}.hsg15-grid{gap:12px}.hsg15-card{border-radius:15px}.modal-footer{position:sticky;bottom:0;background:#fff;padding-bottom:max(10px,env(safe-area-inset-bottom));z-index:2}}
@media(max-width:600px){body{overflow-x:hidden}.main-content{padding:10px 10px 24px}.top-header{margin-left:-10px;margin-right:-10px;padding:8px 10px}.top-header h1{font-size:16px}.user-area{gap:4px!important}.icon-btn,.menu-toggle,.profile-trigger{min-width:38px!important;width:38px!important;height:38px!important}.profile-trigger .avatar{width:34px;height:34px}.stats-grid{gap:7px!important}.stat-card{padding:11px 9px!important;min-height:88px}.stat-card h3{font-size:10px!important}.stat-card .number{font-size:22px!important}.form-grid{grid-template-columns:1fr!important}.action-bar{padding:12px!important;flex-direction:column}.action-bar>*,.action-bar .btn-group{width:100%!important}.action-bar .btn-group{grid-template-columns:1fr!important}.search-input-wrapper{width:100%!important;max-width:none!important}.table-wrapper{border-radius:12px}.table-wrapper table{min-width:620px}.calendar-panel{padding:10px!important}.calendar-grid-header,.month-calendar{font-size:10px}.modal-overlay{padding:7px}.modal{max-height:calc(100dvh - 14px);border-radius:16px}.modal-header{padding:14px}.modal-header h2{font-size:16px}.modal-footer{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}.modal-footer button{width:100%}.hsg18-card-stage{padding:10px;border-radius:16px}.hsg18-student-card{border-radius:15px;padding:12px}.hsg18-card-main{gap:9px}.hsg18-photo{width:48px;height:48px;flex-basis:48px;border-radius:12px;font-size:21px}.hsg18-card-info h3{font-size:13px}.hsg18-card-info p{font-size:7px}.hsg18-card-top{font-size:11px}.hsg18-card-bottom{font-size:6px}.hsg18-card-actions{gap:8px}.hsg18-qr-box{padding:7px}.hsg18-qr-box canvas,.hsg18-qr-box img{width:92px!important;height:92px!important}.hsg18-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.hsg18-actions button{width:100%;padding:10px 7px;font-size:10px}.hsg18-service-grid{gap:7px}.hsg18-service-grid>div{padding:9px}.hsg18-doc-grid{grid-template-columns:1fr}.hsg18-doc-types{grid-template-columns:1fr}.hsg18-doc-type{min-height:44px}.hsg17-kpis{gap:7px!important}.hsg17-kpis>div{padding:11px!important}.hsg17-kpis strong{font-size:20px!important}.hsg17-table-wrap th,.hsg17-table-wrap td{padding:9px 7px}.hsg15-task-kpis{grid-template-columns:1fr 1fr!important}.hsg15-toolbar h2{font-size:18px!important}.hsg15-toolbar p{font-size:11px}.hsg15-doc-card{padding:13px}.student-list{max-height:280px;overflow:auto}.student-list-item{width:100%;padding:11px!important}.page-header{padding:0!important}.page-header h2{font-size:19px}.empty-state{padding:24px 12px!important}.btn-sys-primary,.btn-cancel{min-height:42px}.sidebar{width:min(88vw,320px)}}
@media(max-width:380px){.hsg18-student-card{padding:9px}.hsg18-card-main{gap:6px}.hsg18-photo{width:42px;height:42px;flex-basis:42px}.hsg18-card-info h3{font-size:11px}.hsg18-card-info p{font-size:6px}.hsg18-card-info small{font-size:5px}.hsg18-card-bottom{font-size:5px}.hsg18-actions{grid-template-columns:1fr}.hsg18-service-grid{grid-template-columns:1fr 1fr}.stats-grid{grid-template-columns:1fr!important}}

/* ============================================================
   HORIZON SGE 19.0 — PROFESSIONAL UI / MOBILE / PRINT
   ============================================================ */
:root{--h19-ink:#132238;--h19-muted:#64748b;--h19-border:#e2e8f0;--h19-surface:#fff;--h19-soft:#f5f8fc;--h19-primary:#073168;--h19-secondary:#1b75d2}
.hsg19-shell{display:grid;gap:18px}.hsg19-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:20px;background:linear-gradient(135deg,#fff,#f4f8fd);border:1px solid var(--h19-border);border-radius:20px}.hsg19-toolbar h2{margin:3px 0 5px;font-size:24px;color:var(--h19-ink)}.hsg19-toolbar p{margin:0;color:var(--h19-muted);font-size:13px}.hsg19-eyebrow{font-size:10px;font-weight:900;letter-spacing:.13em;color:var(--h19-secondary)}
.hsg19-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.hsg19-kpi{padding:16px;border:1px solid var(--h19-border);border-radius:16px;background:#fff;box-shadow:0 5px 18px rgba(15,23,42,.04)}.hsg19-kpi span{font-size:11px;color:var(--h19-muted);display:block}.hsg19-kpi strong{font-size:25px;color:var(--h19-ink);display:block;margin-top:4px}.hsg19-kpi small{font-size:10px;color:#16a34a}.hsg19-report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.hsg19-report-card{background:#fff;border:1px solid var(--h19-border);border-radius:18px;padding:17px;box-shadow:0 6px 20px rgba(15,23,42,.04);display:flex;flex-direction:column;gap:10px}.hsg19-report-card .icon{width:42px;height:42px;border-radius:13px;background:#eaf2ff;color:var(--h19-primary);display:grid;place-items:center;font-size:18px}.hsg19-report-card h3{margin:0;font-size:15px;color:var(--h19-ink)}.hsg19-report-card p{margin:0;color:var(--h19-muted);font-size:11px;line-height:1.55;flex:1}.hsg19-actions{display:flex;gap:8px;flex-wrap:wrap}.hsg19-actions button{min-height:38px}.hsg19-table{width:100%;border-collapse:collapse}.hsg19-table th,.hsg19-table td{padding:11px;border-bottom:1px solid #edf1f5;text-align:left;font-size:11px}.hsg19-table th{font-size:10px;color:#52606d;background:#f7f9fc}.hsg19-empty{padding:30px;text-align:center;color:#718096;background:#f8fafc;border:1px dashed #d8e0e9;border-radius:14px}.hsg19-print-only{display:none}
.hsg19-doc-paper{background:#fff;border:1px solid #dbe3ec;border-radius:18px;padding:28px;max-width:820px;margin:auto;box-shadow:0 12px 35px rgba(15,23,42,.08);color:#172b4d}.hsg19-doc-paper header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:2px solid #e8eef5;padding-bottom:18px;margin-bottom:24px}.hsg19-doc-paper .brand{font-weight:900;font-size:22px;letter-spacing:.08em;color:#073168}.hsg19-doc-paper .brand b{color:#1b75d2}.hsg19-doc-paper .meta{text-align:right;color:#64748b;font-size:10px}.hsg19-doc-paper h1{text-align:center;font-size:21px;margin:24px 0;color:#132238}.hsg19-doc-paper p{font-size:13px;line-height:1.8}.hsg19-doc-paper .field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.hsg19-doc-paper .field{padding:12px;background:#f7f9fc;border-radius:10px}.hsg19-doc-paper .field small{display:block;color:#64748b;font-size:9px}.hsg19-doc-paper .field strong{font-size:12px}.hsg19-signature{margin-top:55px;text-align:center}.hsg19-signature div{border-top:1px solid #334155;max-width:240px;margin:0 auto;padding-top:6px;font-size:10px}.hsg19-qr{display:flex;justify-content:center;margin:20px 0}.hsg19-status{padding:12px;border-radius:12px;background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;font-size:11px}
@media(max-width:1100px){.hsg19-kpis{grid-template-columns:repeat(3,1fr)}.hsg19-report-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.hsg19-toolbar{padding:15px;border-radius:15px;flex-direction:column}.hsg19-toolbar h2{font-size:20px}.hsg19-kpis{grid-template-columns:1fr 1fr;gap:8px}.hsg19-kpi{padding:12px}.hsg19-kpi strong{font-size:21px}.hsg19-report-grid{grid-template-columns:1fr}.hsg19-actions{display:grid;grid-template-columns:1fr 1fr}.hsg19-actions button{width:100%}.hsg19-doc-paper{padding:17px;border-radius:14px}.hsg19-doc-paper header{flex-direction:column;gap:10px}.hsg19-doc-paper .meta{text-align:left}.hsg19-doc-paper .field-grid{grid-template-columns:1fr}.hsg19-doc-paper h1{font-size:18px}.hsg19-doc-paper p{font-size:12px}}
@media(max-width:380px){.hsg19-kpis{grid-template-columns:1fr}.hsg19-actions{grid-template-columns:1fr}.hsg19-toolbar p{font-size:10px}}
@media print{body{background:#fff!important}.sidebar,.top-header,.page-header,.action-bar,.no-print,.hsg19-actions{display:none!important}.main-content{margin:0!important;padding:0!important}.hsg19-print-only{display:block}.hsg19-doc-paper{box-shadow:none;border:0;border-radius:0;max-width:none;padding:10mm}.hsg19-doc-paper header{break-inside:avoid}.hsg19-table{font-size:9pt}.modal-overlay{position:static!important;background:#fff!important;padding:0!important}.modal{display:block!important;max-height:none!important;box-shadow:none!important;max-width:none!important;width:100%!important}.modal-header,.modal-footer{display:none!important}}

/* HORIZON SGE 20.0 — ERP / MOBILE FIRST */
.hsg20-shell{display:grid;gap:16px}.hsg20-top{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:18px;border:1px solid #e2e8f0;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.05)}.hsg20-top h2{margin:0;font-size:21px;color:#132238}.hsg20-top p{margin:4px 0 0;color:#64748b;font-size:12px}.hsg20-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.hsg20-kpi{padding:15px;border-radius:16px;background:#fff;border:1px solid #e2e8f0}.hsg20-kpi small{display:block;color:#64748b;font-size:10px}.hsg20-kpi strong{display:block;margin-top:4px;font-size:25px;color:#132238}.hsg20-panel{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:16px}.hsg20-panel h3{margin:0 0 12px;font-size:15px;color:#132238}.hsg20-actions{display:flex;gap:8px;flex-wrap:wrap}.hsg20-table{width:100%;border-collapse:collapse}.hsg20-table th,.hsg20-table td{padding:10px;border-bottom:1px solid #edf1f5;text-align:left;font-size:11px}.hsg20-table th{background:#f8fafc;color:#64748b;font-size:10px}.hsg20-badge{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:9px;font-weight:800}.hsg20-timeline{display:grid;gap:8px}.hsg20-step{display:flex;gap:10px;align-items:flex-start;padding:11px;border-radius:12px;background:#f8fafc}.hsg20-step i{margin-top:2px;color:#2563eb}.hsg20-mobile-nav{display:none}
@media(max-width:900px){.hsg20-grid{grid-template-columns:repeat(2,1fr)}.hsg20-top{align-items:flex-start;flex-direction:column}.hsg20-panel{padding:13px}.hsg20-mobile-nav{display:grid;position:fixed;left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));grid-template-columns:repeat(5,1fr);gap:4px;padding:7px;border:1px solid #dbe3ec;border-radius:18px;background:rgba(255,255,255,.96);box-shadow:0 12px 30px rgba(15,23,42,.15);z-index:1300;backdrop-filter:blur(12px)}.hsg20-mobile-nav button{border:0;background:transparent;min-height:48px;border-radius:12px;color:#64748b;font-size:9px;display:grid;place-items:center;gap:2px}.hsg20-mobile-nav button i{font-size:16px}.hsg20-mobile-nav button.active{background:#eff6ff;color:#1d4ed8;font-weight:800}.main-content{padding-bottom:88px!important}}
@media(max-width:560px){.hsg20-grid{grid-template-columns:1fr 1fr;gap:8px}.hsg20-kpi{padding:11px}.hsg20-kpi strong{font-size:21px}.hsg20-table-wrap{overflow-x:auto}.hsg20-table{min-width:620px}.hsg20-actions{display:grid;grid-template-columns:1fr 1fr}.hsg20-actions>*{width:100%}.hsg20-top h2{font-size:18px}.hsg20-top p{font-size:10px}}
@media(max-width:360px){.hsg20-grid{grid-template-columns:1fr}.hsg20-mobile-nav{left:5px;right:5px}.hsg20-mobile-nav button{font-size:8px}}
@media print{.hsg20-mobile-nav{display:none!important}.hsg20-top,.hsg20-panel{box-shadow:none}.hsg20-shell{gap:8px}}

/* HORIZON SGE 21/22 ERP */
.hsg21-shell{background:#f7f9fc;border:1px solid #e6ebf2;border-radius:20px;padding:20px;color:#172033}.hsg21-head{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:18px}.hsg21-head span{font-size:11px;font-weight:800;letter-spacing:.12em;color:#51709c}.hsg21-head h2{margin:4px 0;font-size:25px}.hsg21-head p{margin:0;color:#68758a}.hsg21-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0}.hsg21-kpi{background:#fff;border:1px solid #e3e9f2;border-radius:16px;padding:15px;box-shadow:0 5px 18px rgba(24,40,72,.05)}.hsg21-kpi span{display:block;color:#61718a;font-size:12px;font-weight:700}.hsg21-kpi strong{display:block;font-size:27px;margin:7px 0}.hsg21-kpi small{color:#8290a5}.hsg21-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.hsg21-panel{background:#fff;border:1px solid #e3e9f2;border-radius:16px;padding:16px;min-width:0}.hsg21-panel h3{margin:0 0 12px}.hsg21-table-wrap{overflow:auto}.hsg21-table{width:100%;border-collapse:collapse;font-size:13px}.hsg21-table th,.hsg21-table td{padding:11px 9px;border-bottom:1px solid #edf0f5;text-align:left;white-space:nowrap}.hsg21-table th{font-size:11px;text-transform:uppercase;color:#7a879b}.hsg21-badge{display:inline-flex;padding:5px 9px;border-radius:999px;background:#edf4ff;color:#245a9a;font-weight:700;font-size:11px}.hsg21-mini{border:1px solid #d5dce7;background:#fff;border-radius:8px;padding:5px 8px;cursor:pointer}.hsg21-duo{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.hsg21-duo div{background:#f6f8fb;border-radius:12px;padding:16px;text-align:center}.hsg21-duo b{display:block;font-size:26px}.hsg21-duo small{color:#748198}.hsg21-mobile-nav{display:none}
@media(max-width:1100px){.hsg21-kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.hsg21-shell{padding:14px;border-radius:15px}.hsg21-head{align-items:flex-start;flex-direction:column}.hsg21-head h2{font-size:21px}.hsg21-kpis{grid-template-columns:repeat(2,1fr)}.hsg21-grid2{grid-template-columns:1fr}.hsg21-mobile-nav{display:flex;position:fixed;z-index:9999;left:10px;right:10px;bottom:10px;background:rgba(255,255,255,.97);border:1px solid #dfe5ee;border-radius:18px;padding:7px;box-shadow:0 12px 35px rgba(20,35,65,.18);gap:4px}.hsg21-mobile-nav button{flex:1;border:0;background:transparent;border-radius:12px;padding:8px 4px;color:#617087;font-size:10px}.hsg21-mobile-nav button i{display:block;font-size:16px;margin-bottom:3px}.hsg21-mobile-nav button.active{background:#eef4ff;color:#1554a0;font-weight:800}body{padding-bottom:82px}}
@media(max-width:520px){.hsg21-kpis{grid-template-columns:1fr 1fr}.hsg21-kpi{padding:12px}.hsg21-kpi strong{font-size:22px}.hsg21-duo{grid-template-columns:1fr}}


/* HORIZON SGE 23.0 — Operações 360 */
.hsg23-shell{display:grid;gap:16px;background:#f7f9fc;border:1px solid #e3e9f2;border-radius:22px;padding:20px;color:#172033}.hsg23-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:20px;border-radius:18px;background:linear-gradient(135deg,#ffffff,#f2f7ff);border:1px solid #dce6f2}.hsg23-hero>div:first-child span{font-size:10px;font-weight:900;letter-spacing:.14em;color:#52709b}.hsg23-hero h2{margin:5px 0;font-size:26px}.hsg23-hero p{margin:0;color:#68758a}.hsg23-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.hsg23-actions button{border:1px solid #d6dfeb;background:#fff;border-radius:11px;padding:10px 12px;font-weight:800;color:#24466f;cursor:pointer}.hsg23-actions button:hover{transform:translateY(-1px);box-shadow:0 5px 16px rgba(25,55,95,.08)}.hsg23-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.hsg23-k{background:#fff;border:1px solid #e0e7f0;border-radius:16px;padding:14px;min-width:0}.hsg23-k i{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#edf4ff;color:#1d5ea8;margin-bottom:9px}.hsg23-k span{display:block;font-size:11px;color:#718096;font-weight:800}.hsg23-k strong{display:block;font-size:25px;margin-top:3px}.hsg23-k small{display:block;color:#8a96a8;font-size:10px;margin-top:2px}.hsg23-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.hsg23-grid>section{background:#fff;border:1px solid #e0e7f0;border-radius:17px;padding:16px;min-width:0}.hsg23-panel-head{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:12px}.hsg23-panel-head h3{margin:0;font-size:15px}.hsg23-panel-head small{color:#8390a3}.hsg23-scroll{overflow:auto}.hsg23-scroll table{width:100%;border-collapse:collapse;min-width:500px}.hsg23-scroll th,.hsg23-scroll td{padding:10px 8px;border-bottom:1px solid #edf1f5;text-align:left;font-size:11px}.hsg23-scroll th{background:#f8fafc;color:#77859a;text-transform:uppercase;font-size:9px;letter-spacing:.04em}.hsg23-badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#eef5ff;color:#205ca1;font-weight:800}.hsg23-empty{text-align:center!important;color:#94a0b1;padding:22px!important}.hsg23-statlist{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.hsg23-statlist div{padding:15px;background:#f7f9fc;border-radius:13px;text-align:center}.hsg23-statlist i{display:block;color:#2563a8;font-size:18px;margin-bottom:5px}.hsg23-statlist b{display:block;font-size:22px}.hsg23-statlist span{font-size:10px;color:#78869a}
@media(max-width:1050px){.hsg23-kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:800px){.hsg23-shell{padding:13px;border-radius:16px}.hsg23-hero{flex-direction:column;padding:15px}.hsg23-actions{justify-content:flex-start}.hsg23-actions button{flex:1;min-width:145px}.hsg23-kpis{grid-template-columns:1fr 1fr}.hsg23-grid{grid-template-columns:1fr}.hsg23-statlist{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:480px){.hsg23-kpis{grid-template-columns:1fr 1fr;gap:8px}.hsg23-k{padding:11px}.hsg23-k strong{font-size:20px}.hsg23-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.hsg23-actions button{min-width:0;width:100%;font-size:10px}.hsg23-statlist{grid-template-columns:1fr}.hsg23-hero h2{font-size:21px}}


/* ============================================================
   HORIZON SGE 25 — Login responsivo + UI administrativa
   ============================================================ */
#landing-page{box-sizing:border-box;overflow:auto;min-height:100dvh;height:auto;padding:clamp(16px,3vw,36px)}
#landing-page .landing-container{width:min(1150px,100%);gap:clamp(20px,5vw,72px)}
#landing-page .login-section{min-width:0}
#landing-page .login-card{box-sizing:border-box}
#landing-page .role-selector{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:20px}
#landing-page .role-option{min-width:0;min-height:76px;padding:10px 5px}
#landing-page .role-option i{font-size:1.2rem;margin-bottom:6px}
#landing-page .role-option span{font-size:.62rem;line-height:1.2}
#landing-page .input-group{margin-bottom:14px}
#landing-page .actions{gap:10px;flex-wrap:wrap}
#landing-page #loginBtn{min-height:48px}
.hsg-login-password-wrap{position:relative}
.hsg-login-password-wrap input{padding-right:48px!important}
.hsg-login-password-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;background:transparent;color:#64748b;cursor:pointer;border-radius:9px}
.hsg-login-password-toggle:hover{background:#f1f5f9;color:#1a56a8}

@media (max-width:1100px){
  #landing-page .landing-container{max-width:900px;gap:28px}
  #landing-page .info-section{max-width:360px}
  #landing-page .info-section h1{font-size:2.35rem}
  #landing-page .info-section p{font-size:.95rem}
  #landing-page .login-card{padding:2rem 1.6rem;max-width:480px}
}
@media (max-width:900px){
  #landing-page{align-items:flex-start;justify-content:center;padding:20px 14px 24px}
  #landing-page .landing-container{flex-direction:column;justify-content:flex-start;align-items:stretch;gap:18px;max-width:680px;margin:auto}
  #landing-page .info-section{max-width:none;align-items:center;text-align:center}
  #landing-page .logo-header{margin-bottom:7px;gap:10px}
  #landing-page .logo-mark{width:46px;height:46px;border-radius:13px}
  #landing-page .logo-mark svg{width:28px;height:28px}
  #landing-page .info-section h1{font-size:1.8rem}
  #landing-page .info-section p{font-size:.82rem;line-height:1.4;margin:0;max-width:600px}
  #landing-page .login-section{justify-content:center;width:100%}
  #landing-page .login-card{max-width:none;width:100%;padding:20px 18px;border-radius:18px}
  #landing-page .login-card h2{font-size:1.35rem}
  #landing-page .login-card>p{margin-bottom:14px;font-size:.82rem}
  #landing-page .role-selector{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-bottom:17px}
  #landing-page .role-option{min-height:70px;border-width:1.5px;border-radius:11px}
  #landing-page .role-option i{font-size:1.05rem}
  #landing-page .role-option span{font-size:.56rem}
}
@media (max-width:600px){
  #landing-page{padding:12px 10px 18px}
  #landing-page .landing-container{gap:10px;max-width:460px}
  #landing-page .info-section p{display:none}
  #landing-page .info-section h1{font-size:1.55rem}
  #landing-page .logo-mark{width:40px;height:40px}
  #landing-page .logo-mark svg{width:24px;height:24px}
  #landing-page .login-card{padding:16px 13px;border-radius:16px;box-shadow:0 16px 35px rgba(0,0,0,.2)}
  #landing-page .login-card h2{font-size:1.2rem;margin-bottom:4px}
  #landing-page .login-card>p{font-size:.75rem;margin-bottom:11px}
  #landing-page .role-selector{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:14px}
  #landing-page .role-option{min-height:60px;padding:7px 4px}
  #landing-page .role-option:nth-child(5){grid-column:1/-1;width:50%;justify-self:center}
  #landing-page .role-option i{font-size:1rem;margin-bottom:3px}
  #landing-page .role-option span{font-size:.58rem}
  #landing-page .input-group{margin-bottom:10px}
  #landing-page .input-group label{font-size:.72rem;margin-bottom:4px}
  #landing-page .input-group input{min-height:44px;font-size:.88rem}
  #landing-page .actions{font-size:.72rem;justify-content:space-between;margin-bottom:10px}
  #landing-page #loginBtn{min-height:46px;font-size:.82rem}
}
@media (max-width:380px){
  #landing-page .login-card{padding:13px 10px}
  #landing-page .role-option{min-height:55px}
  #landing-page .role-option span{font-size:.52rem}
  #landing-page .input-group input{min-height:42px}
}

/* Administração WordPress — visual consistente e profissional */
body.wp-admin .hsg-admin-int,body.wp-admin .hsg24-admin,body.wp-admin .hsg23-admin,body.wp-admin .wrap.hsg-admin-int{max-width:1440px}
.hsg-admin-int h1,.hsg24-admin h1,.hsg23-admin h1{font-weight:700;letter-spacing:-.02em;margin-bottom:6px}
.hsg-admin-int>p,.hsg24-admin>p,.hsg23-admin>p{color:#64748b;font-size:14px;margin-top:0}
.hsg-admin-int .hsg-kpis,.hsg24-kpis,.hsg23-admin-kpis{margin:20px 0 24px}
.hsg-admin-int .hsg-kpi,.hsg24-kpis>div,.hsg23-admin-kpi{transition:transform .15s ease,box-shadow .15s ease}
.hsg-admin-int .hsg-kpi:hover,.hsg24-kpis>div:hover,.hsg23-admin-kpi:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(15,23,42,.08)}
.hsg-admin-grid,.hsg24-grid,.hsg23-admin-grid{align-items:start}
.hsg-admin-grid section,.hsg24-grid section,.hsg23-admin-grid section{overflow:hidden}
.hsg-admin-grid .widefat,.hsg24-grid .widefat,.hsg23-admin-grid .widefat{border:0;box-shadow:none}
.hsg-admin-grid .widefat th,.hsg24-grid .widefat th,.hsg23-admin-grid .widefat th{font-size:11px;text-transform:uppercase;letter-spacing:.03em;color:#64748b}
.hsg-admin-grid .widefat td,.hsg24-grid .widefat td,.hsg23-admin-grid .widefat td{vertical-align:middle}
.hsg-admin-int .postbox,.hsg24-admin .postbox,.hsg23-admin .postbox{border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 4px 18px rgba(15,23,42,.04)}
.hsg-admin-int .postbox h2,.hsg24-admin .postbox h2,.hsg23-admin .postbox h2{padding:16px 18px;margin:0;border-bottom:1px solid #edf1f5;font-size:15px}
@media(max-width:782px){
  body.wp-admin .wrap{margin-right:12px}
  .hsg-admin-int .hsg-kpis,.hsg24-kpis,.hsg23-admin-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hsg-admin-grid,.hsg24-grid,.hsg23-admin-grid{grid-template-columns:1fr}
  .hsg24-actions,.hsg23-admin-actions{display:flex;flex-wrap:wrap;gap:8px}
  .hsg24-actions .button,.hsg23-admin-actions .button{margin:0}
}
@media(max-width:480px){
  .hsg-admin-int .hsg-kpis,.hsg24-kpis,.hsg23-admin-kpis{grid-template-columns:1fr}
}


/* ============================================================
   HORIZON SGE 26 — ERP 2.0 / DARK MODE / ADMIN UX
   ============================================================ */
.hsg24-shell{color:var(--h26-text,#172033);background:transparent}
.hsg24-hero{position:relative;overflow:hidden;background:linear-gradient(135deg,var(--azul-gradiente-1),var(--azul-gradiente-2));border:1px solid rgba(255,255,255,.08);padding:30px 32px;min-height:170px}
.hsg24-hero:after{content:"";position:absolute;width:260px;height:260px;right:-90px;top:-110px;border-radius:50%;background:rgba(255,255,255,.08)}
.hsg24-hero>div{position:relative;z-index:1}.hsg24-hero h2{font-size:clamp(25px,3vw,34px);letter-spacing:-.03em}.hsg24-actions{position:relative;z-index:2}.hsg24-actions button{backdrop-filter:blur(8px);transition:.2s}.hsg24-actions button:hover{transform:translateY(-2px);background:rgba(255,255,255,.2)}
.hsg24-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.hsg24-k{position:relative;overflow:hidden;min-height:122px;padding:18px 19px;background:var(--h26-card,#fff);border-color:var(--h26-border,#e6ebf2);color:var(--h26-text,#172033);transition:transform .18s,box-shadow .18s}.hsg24-k:hover{transform:translateY(-3px);box-shadow:0 15px 35px rgba(15,23,42,.09)}.hsg24-k i{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:rgba(26,117,211,.1);color:var(--azul-claro)}
.hsg24-k strong{font-size:28px}.hsg24-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.hsg24-panel{background:var(--h26-card,#fff);border-color:var(--h26-border,#e6ebf2);color:var(--h26-text,#172033);box-shadow:0 8px 28px rgba(15,23,42,.055)}.hsg24-head{padding-bottom:12px;border-bottom:1px solid var(--h26-border,#e6ebf2)}.hsg24-head h3{letter-spacing:-.01em}.hsg24-scroll{border-radius:12px}.hsg24-scroll th{background:var(--h26-muted,#f6f8fb);color:var(--h26-muted-text,#64748b)}.hsg24-scroll td,.hsg24-scroll th{border-color:var(--h26-border,#e6ebf2)}.hsg24-mini{background:rgba(39,174,96,.1);color:#16844b}.hsg24-menu-item{margin-top:5px}

/* Tema escuro consistente: páginas, cartões, tabelas, formulários, modais e navegação. */
body.hsg-dark{--h26-bg:#0b1220;--h26-card:#111a2b;--h26-card2:#172235;--h26-border:#26344b;--h26-text:#edf3fb;--h26-muted:#172235;--h26-muted-text:#9eabc0;--cinza-claro:#0b1220;--branco:#111a2b;--preto:#edf3fb;--cinza-escuro:#aab6c8;background:#0b1220;color:#edf3fb}
body.hsg-dark .main-content,body.hsg-dark .content-area,body.hsg-dark .view-section{background:#0b1220;color:#edf3fb}
body.hsg-dark .top-header,body.hsg-dark .stat-card,body.hsg-dark .table-wrapper,body.hsg-dark .action-bar,body.hsg-dark .calendar-container,body.hsg-dark .calendar-event-item,body.hsg-dark .modal,body.hsg-dark .profile-dropdown,body.hsg-dark .hsg15-card,body.hsg-dark .hsg16-card,body.hsg-dark .hsg17-card,body.hsg-dark .hsg18-card,body.hsg-dark .hsg19-card,body.hsg-dark .hsg20-card,body.hsg-dark .hsg23-panel,body.hsg-dark .hsg24-panel,body.hsg-dark .hsg24-k{background:#111a2b!important;color:#edf3fb;border-color:#26344b!important}
body.hsg-dark input,body.hsg-dark select,body.hsg-dark textarea{background:#0d1626!important;color:#edf3fb!important;border-color:#31425d!important}
body.hsg-dark input::placeholder,body.hsg-dark textarea::placeholder{color:#718099}
body.hsg-dark table th{background:#172235!important;color:#aab6c8!important}body.hsg-dark table td{border-color:#26344b!important;color:#dbe4f1}
body.hsg-dark .table-header,body.hsg-dark .hsg24-head{border-color:#26344b!important}body.hsg-dark .table-header h3,body.hsg-dark h2,body.hsg-dark h3,body.hsg-dark h4{color:#edf3fb}
body.hsg-dark .profile-name,body.hsg-dark .icon-btn{color:#dce6f4}body.hsg-dark .profile-dropdown button{color:#dbe4f1}body.hsg-dark .profile-dropdown button:hover{background:#172235}
body.hsg-dark .hsg24-k span,body.hsg-dark .hsg24-k small,body.hsg-dark .hsg24-head span{color:#9eabc0}.hsg24-shell{--h26-text:#172033}
body.hsg-dark .hsg24-shell{--h26-text:#edf3fb;--h26-card:#111a2b;--h26-border:#26344b;--h26-muted:#172235;--h26-muted-text:#9eabc0}
body.hsg-dark .hsg24-k i{background:rgba(84,153,232,.14)}

@media (max-width:900px){.hsg24-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.hsg24-grid{grid-template-columns:1fr}.hsg24-hero{padding:24px}.hsg24-actions button{flex:1 1 calc(50% - 8px)}}
@media (max-width:520px){.hsg24-kpis{grid-template-columns:1fr}.hsg24-hero{border-radius:18px;padding:20px}.hsg24-panel{padding:14px}.hsg24-actions button{flex-basis:100%}}

/* Login ainda mais compacto em retrato */
@media (max-width:900px){
 #landing-page .landing-container{gap:12px}
 #landing-page .login-card{padding:18px 16px}
 #landing-page .role-selector{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 #landing-page .role-option:nth-child(4){grid-column:auto}
 #landing-page .role-option:nth-child(5){grid-column:auto;width:auto}
}
@media (max-width:600px){#landing-page .role-selector{grid-template-columns:repeat(2,minmax(0,1fr));}.hsg24-shell{padding-bottom:80px}}

/* ============================================================
   HORIZON SGE 27 — TEMA ESCURO UNIFICADO
   ============================================================ */
html.hsg-dark, body.hsg-dark { color-scheme: dark; }
body.hsg-dark #horizon-sge-app,
body.hsg-dark #app-container,
body.hsg-dark .main-content,
body.hsg-dark .content-area { background:#0b1220 !important; color:#e8eef7 !important; }
body.hsg-dark .sidebar { background:#0a1020 !important; border-right:1px solid #26344b !important; }
body.hsg-dark .sidebar a,
body.hsg-dark .sidebar span,
body.hsg-dark .sidebar i { color:#cbd6e6; }
body.hsg-dark .sidebar a.active,
body.hsg-dark .sidebar a:hover { background:#16243a !important; color:#fff !important; }
body.hsg-dark .top-header { background:#101a2c !important; border-bottom:1px solid #26344b !important; box-shadow:0 3px 16px rgba(0,0,0,.18) !important; }
body.hsg-dark .page-title,
body.hsg-dark #page-title,
body.hsg-dark .profile-name,
body.hsg-dark .profile-name small { color:#f3f7fc !important; }
body.hsg-dark .icon-btn,
body.hsg-dark .profile-trigger { color:#dce7f5 !important; }
body.hsg-dark .profile-dropdown { background:#111a2b !important; border-color:#2a3a53 !important; box-shadow:0 18px 45px rgba(0,0,0,.35) !important; }
body.hsg-dark .profile-dropdown button { color:#dce7f5 !important; }
body.hsg-dark .profile-dropdown button:hover { background:#18263d !important; }
body.hsg-dark .view-section,
body.hsg-dark .action-bar,
body.hsg-dark .table-wrapper,
body.hsg-dark .stat-card,
body.hsg-dark .calendar-container,
body.hsg-dark .calendar-event-item,
body.hsg-dark .comunicado-card,
body.hsg-dark .risk-summary,
body.hsg-dark .risk-summary-item,
body.hsg-dark .ia-chat-container,
body.hsg-dark .hsg15-card,
body.hsg-dark .hsg16-card,
body.hsg-dark .hsg17-card,
body.hsg-dark .hsg18-card,
body.hsg-dark .hsg19-card,
body.hsg-dark .hsg20-card,
body.hsg-dark .hsg21-card,
body.hsg-dark .hsg23-panel,
body.hsg-dark .hsg24-panel,
body.hsg-dark .hsg15-doc-card,
body.hsg-dark .hsg15-task,
body.hsg-dark .hsg15-message { background:#111a2b !important; color:#e8eef7 !important; border-color:#2a3a53 !important; }
body.hsg-dark h1,body.hsg-dark h2,body.hsg-dark h3,body.hsg-dark h4,body.hsg-dark h5,
body.hsg-dark strong,body.hsg-dark b { color:#f2f6fb !important; }
body.hsg-dark p,body.hsg-dark small,body.hsg-dark label,
body.hsg-dark .action-bar p,body.hsg-dark .hsg15-eyebrow,
body.hsg-dark .hsg15-dayhead span { color:#aebbd0 !important; }
body.hsg-dark input,body.hsg-dark select,body.hsg-dark textarea,
body.hsg-dark .search-input-wrapper { background:#0d1728 !important; color:#eef4fb !important; border-color:#334660 !important; }
body.hsg-dark option { background:#111a2b; color:#eef4fb; }
body.hsg-dark input:focus,body.hsg-dark select:focus,body.hsg-dark textarea:focus { border-color:#4d9bea !important; box-shadow:0 0 0 3px rgba(77,155,234,.14) !important; }
body.hsg-dark table { background:#111a2b !important; color:#e8eef7 !important; }
body.hsg-dark table thead th { background:#17243a !important; color:#b8c6d9 !important; border-color:#2a3a53 !important; }
body.hsg-dark table tbody td { background:#111a2b !important; color:#dce5f1 !important; border-color:#26364e !important; }
body.hsg-dark table tbody tr:hover td { background:#162238 !important; }
body.hsg-dark .modal-overlay { background:rgba(2,6,23,.78) !important; }
body.hsg-dark .modal-content,
body.hsg-dark .modal { background:#111a2b !important; color:#e8eef7 !important; border-color:#2a3a53 !important; }
body.hsg-dark .btn-cancel,
body.hsg-dark .btn-secondary,
body.hsg-dark .icon-btn { background:#17243a !important; border-color:#334660 !important; }
body.hsg-dark .empty-state,
body.hsg-dark .hsg-empty15 { color:#8fa0b8 !important; background:#0f1929 !important; border-color:#293951 !important; }
body.hsg-dark .status-badge,
body.hsg-dark .destino-tag { border-color:#334660 !important; }
body.hsg-dark .hsg15-toolbar,
body.hsg-dark .hsg15-toolbar > div { color:#eef4fb !important; }
body.hsg-dark .hsg15-grid,
body.hsg-dark .hsg15-doc-grid { color:#e8eef7; }
body.hsg-dark .hsg24-hero { box-shadow:0 14px 40px rgba(0,0,0,.25); }

/* O alto contraste não faz mais parte da interface; o tema escuro é a única alternativa visual. */


/* HORIZON SGE 28 — UI consistente, dark mode real e prontuário */
:root{color-scheme:light;}
body.hsg-dark{color-scheme:dark;--hsg-bg:#0b1220;--hsg-panel:#111a2a;--hsg-panel-2:#172235;--hsg-text:#e8edf5;--hsg-muted:#aeb9c9;--hsg-border:#29374a;--hsg-input:#0f1725;--hsg-hover:#1d2a3d;--cinza-claro:#111a2a;--cinza-escuro:#aeb9c9;--branco:#e8edf5;--preto:#e8edf5;}
body.hsg-dark,body.hsg-dark #horizon-sge-app{background:var(--hsg-bg)!important;color:var(--hsg-text)!important;}
body.hsg-dark .main-content,body.hsg-dark .view-section,body.hsg-dark .content-area{background:var(--hsg-bg)!important;color:var(--hsg-text)!important;}
body.hsg-dark .top-header,body.hsg-dark .sidebar{background:#0f1725!important;border-color:var(--hsg-border)!important;}
body.hsg-dark .top-header{box-shadow:0 1px 0 var(--hsg-border)!important;}
body.hsg-dark .sidebar{box-shadow:8px 0 28px rgba(0,0,0,.25);}
body.hsg-dark .sidebar a,body.hsg-dark .menu-category-title,body.hsg-dark .profile-name,body.hsg-dark .profile-name small,body.hsg-dark .table-header h3,body.hsg-dark h1,body.hsg-dark h2,body.hsg-dark h3,body.hsg-dark h4,body.hsg-dark label,body.hsg-dark strong{color:var(--hsg-text)!important;}
body.hsg-dark .table-wrapper,body.hsg-dark .stat-card,body.hsg-dark .action-bar,body.hsg-dark .card,body.hsg-dark .modal,body.hsg-dark .modal-header,body.hsg-dark .modal-footer,body.hsg-dark .profile-dropdown,body.hsg-dark .dropdown,body.hsg-dark .day-cell,body.hsg-dark .calendar-event-item,body.hsg-dark .comunicado-card,body.hsg-dark .student-detail-panel{background:var(--hsg-panel)!important;border-color:var(--hsg-border)!important;color:var(--hsg-text)!important;}
body.hsg-dark table,body.hsg-dark thead,body.hsg-dark tbody,body.hsg-dark tr,body.hsg-dark td,body.hsg-dark th{border-color:var(--hsg-border)!important;color:var(--hsg-text)!important;background:transparent!important;}
body.hsg-dark tbody tr:hover,body.hsg-dark .menu-item:hover,body.hsg-dark .profile-dropdown button:hover{background:var(--hsg-hover)!important;}
body.hsg-dark input,body.hsg-dark select,body.hsg-dark textarea{background:var(--hsg-input)!important;color:var(--hsg-text)!important;border-color:var(--hsg-border)!important;}
body.hsg-dark input::placeholder,body.hsg-dark textarea::placeholder{color:#7f8da1!important;}
body.hsg-dark .icon-btn,body.hsg-dark .btn-cancel{background:var(--hsg-panel-2)!important;color:var(--hsg-text)!important;border-color:var(--hsg-border)!important;}
body.hsg-dark .profile-dropdown{box-shadow:0 22px 60px rgba(0,0,0,.45)!important;}
body.hsg-dark .search-input-wrapper{background:var(--hsg-input)!important;border-color:var(--hsg-border)!important;}
body.hsg-dark .search-input-wrapper i{color:var(--hsg-muted)!important;}
body.hsg-dark .empty-state,body.hsg-dark .empty-state *,body.hsg-dark .hsg-empty15,body.hsg-dark small{color:var(--hsg-muted);}
body.hsg-dark .toast{box-shadow:0 12px 36px rgba(0,0,0,.5)!important;}

.hsg28-shell{display:flex;flex-direction:column;gap:18px;animation:hsg28fade .24s ease both}.hsg28-eyebrow{display:block;font-size:11px;font-weight:800;letter-spacing:.12em;color:var(--azul-principal);text-transform:uppercase;margin-bottom:5px}.hsg28-toolbar{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;flex-wrap:wrap;background:linear-gradient(135deg,rgba(0,74,153,.08),rgba(26,117,211,.03));border:1px solid var(--cinza-borda);border-radius:20px;padding:22px 24px}.hsg28-toolbar h2{margin:0;font-size:27px}.hsg28-toolbar p{margin:5px 0 0;color:var(--cinza-escuro)}.hsg28-search{min-width:280px;max-width:420px;flex:1;position:relative}.hsg28-search i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#789}.hsg28-search input{width:100%;padding-left:40px;height:46px;border:1px solid var(--cinza-borda);border-radius:12px;background:var(--branco)}.hsg28-grid2,.hsg28-history-columns,.hsg28-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.hsg28-card,.hsg28-history-card{background:var(--branco);border:1px solid var(--cinza-borda);border-radius:18px;padding:20px;box-shadow:0 8px 28px rgba(15,35,60,.06)}.hsg28-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.hsg28-card-head h3{margin:0}.hsg28-profile-hero,.hsg28-history-head{display:flex;align-items:center;gap:18px;padding:24px;border-radius:22px;background:linear-gradient(135deg,#0f315f,#0a67b8);color:#fff;box-shadow:0 16px 36px rgba(0,74,153,.18)}.hsg28-profile-avatar-wrap{flex:0 0 auto}.hsg28-profile-copy{flex:1}.hsg28-profile-copy h2{margin:0;color:#fff;font-size:28px}.hsg28-profile-copy p{margin:4px 0 0;color:rgba(255,255,255,.8)}.hsg28-profile-actions{display:flex;gap:8px;flex-wrap:wrap}.hsg28-file-btn{position:relative;overflow:hidden;cursor:pointer;display:inline-flex;align-items:center;gap:7px}.hsg28-file-btn input{position:absolute;inset:0;opacity:0;cursor:pointer}.hsg28-avatar{width:92px;height:92px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.18);color:#fff;font-size:26px;font-weight:800;overflow:hidden;border:3px solid rgba(255,255,255,.65);object-fit:cover}.hsg28-avatar img{width:100%;height:100%;object-fit:cover}.hsg28-avatar.mini{width:48px;height:48px;font-size:15px;border:0}.hsg28-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hsg28-detail-grid div{padding:13px;border-radius:13px;background:var(--cinza-claro)}.hsg28-detail-grid small,.hsg28-detail-grid strong{display:block}.hsg28-detail-grid small{color:var(--cinza-escuro);margin-bottom:3px}.hsg28-security{display:flex;gap:14px;align-items:flex-start;padding:14px;border-radius:14px;background:rgba(22,163,74,.08)}.hsg28-security>i{font-size:24px;color:var(--verde)}.hsg28-security p{margin:4px 0 0;color:var(--cinza-escuro);font-size:13px}.hsg28-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.hsg28-student-result{border:1px solid var(--cinza-borda);background:var(--branco);border-radius:14px;padding:12px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer;color:inherit}.hsg28-student-result:hover{border-color:var(--azul-principal);transform:translateY(-1px)}.hsg28-student-result>div:nth-child(2){flex:1}.hsg28-student-result strong,.hsg28-student-result small{display:block}.hsg28-student-result small{color:var(--cinza-escuro);margin-top:3px}.hsg28-student-result>i{color:var(--azul-principal)}.hsg28-history-head{background:linear-gradient(135deg,#16324f,#175e9d)}.hsg28-history-head h2,.hsg28-history-head p{color:#fff;margin:0}.hsg28-history-head p{opacity:.82;margin-top:4px}.hsg28-history-head>div:nth-child(2){flex:1}.hsg28-history-actions{display:flex;gap:8px;flex-wrap:wrap}.hsg28-history-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.hsg28-history-metrics>div{padding:14px;border:1px solid var(--cinza-borda);border-radius:14px;background:var(--cinza-claro);text-align:center}.hsg28-history-metrics strong{display:block;font-size:22px;color:var(--azul-principal)}.hsg28-history-metrics span{font-size:12px;color:var(--cinza-escuro)}.hsg28-history-columns>section{border:1px solid var(--cinza-borda);border-radius:15px;padding:16px}.hsg28-history-columns h3{margin-top:0}.hsg28-timeline-row,.hsg28-grade-row{display:flex;gap:12px;padding:11px 0;border-bottom:1px solid var(--cinza-borda)}.hsg28-timeline-row:last-child,.hsg28-grade-row:last-child{border-bottom:0}.hsg28-timeline-row>span{min-width:48px;font-weight:800;color:var(--azul-principal)}.hsg28-timeline-row strong,.hsg28-timeline-row small,.hsg28-grade-row strong,.hsg28-grade-row small{display:block}.hsg28-timeline-row small,.hsg28-grade-row small{color:var(--cinza-escuro);margin-top:2px}.hsg28-grade-row{justify-content:space-between}.hsg28-grade-row>b{font-size:13px}.hsg28-model-tabs{display:flex;gap:8px;flex-wrap:wrap}.hsg28-model-tabs button{border:1px solid var(--cinza-borda);background:var(--branco);padding:10px 14px;border-radius:12px;cursor:pointer;color:inherit}.hsg28-model-tabs button.active{background:var(--azul-principal);color:#fff;border-color:var(--azul-principal)}.hsg28-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hsg28-card label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700;margin-bottom:13px}.hsg28-card label input,.hsg28-card label textarea{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid var(--cinza-borda);border-radius:10px;font:inherit;background:var(--branco);color:inherit}.hsg28-preview{position:sticky;top:20px}.hsg28-paper{min-height:430px;margin-top:12px;background:#fff;border:1px solid #ddd;border-radius:6px;padding:34px;box-shadow:0 12px 30px rgba(0,0,0,.08);color:#222}.hsg28-paper-logos{display:flex;justify-content:space-between;font-size:10px;color:#666}.hsg28-paper h1{text-align:center;font-size:19px;margin:45px 0 28px;color:#111}.hsg28-paper p{font-size:13px;line-height:1.75;color:#222;white-space:pre-wrap}.hsg28-paper small{display:block;margin-top:60px;color:#666}.hsg28-doc-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hsg28-doc-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px;border:1px solid var(--cinza-borda);border-radius:13px;background:var(--cinza-claro)}.hsg28-doc-row strong,.hsg28-doc-row small{display:block}.hsg28-doc-ok{color:var(--verde);font-size:12px;text-decoration:none}.hsg28-doc-pending{color:var(--cinza-escuro);font-size:12px}.hsg28-doc-history{margin-top:18px;border-top:1px solid var(--cinza-borda);padding-top:15px}.hsg28-doc-history>div{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--cinza-borda)}.hsg28-doc-history a{color:var(--azul-principal)}.hsg28-modal-wide{max-width:900px;width:min(900px,94vw)}.hsg-empty28,.hsg28-loading,.hsg28-error{padding:28px;text-align:center;border:1px dashed var(--cinza-borda);border-radius:16px;color:var(--cinza-escuro)}.hsg28-error{color:var(--vermelho);border-color:rgba(220,38,38,.35)}.hsg28-doc-checklist{display:flex;gap:6px;flex-wrap:wrap}.hsg28-doc-checklist span{padding:6px 9px;border-radius:999px;background:var(--cinza-claro);font-size:11px;color:var(--cinza-escuro)}.hsg-avatar-photo img{width:100%;height:100%;border-radius:50%;object-fit:cover}
body.hsg-dark .hsg28-toolbar,body.hsg-dark .hsg28-card,body.hsg-dark .hsg28-history-card,body.hsg-dark .hsg28-student-result,body.hsg-dark .hsg28-model-tabs button,body.hsg-dark .hsg28-paper,body.hsg-dark .hsg28-doc-row{background:var(--hsg-panel)!important;border-color:var(--hsg-border)!important;color:var(--hsg-text)!important}.hsg28-paper{background:#fff!important;color:#222!important}
@keyframes hsg28fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(max-width:900px){.hsg28-grid2,.hsg28-history-columns,.hsg28-editor-grid{grid-template-columns:1fr}.hsg28-result-grid{grid-template-columns:1fr 1fr}.hsg28-history-metrics{grid-template-columns:1fr 1fr}.hsg28-profile-hero,.hsg28-history-head{align-items:flex-start;flex-wrap:wrap}.hsg28-profile-copy{min-width:220px}.hsg28-doc-upload-grid,.hsg28-form-grid{grid-template-columns:1fr}.hsg28-preview{position:static}}
@media(max-width:560px){.hsg28-result-grid{grid-template-columns:1fr}.hsg28-toolbar h2{font-size:22px}.hsg28-detail-grid{grid-template-columns:1fr}.hsg28-history-actions{width:100%}.hsg28-history-actions button{flex:1}}

body.hsg-dark .form-grid,.hsg-dark .form-grid{color:var(--hsg-text);} body.hsg-dark .table-header,body.hsg-dark .modal-header,body.hsg-dark .modal-footer{background:var(--hsg-panel)!important;color:var(--hsg-text)!important;} body.hsg-dark .menu-category{border-color:var(--hsg-border)!important;} body.hsg-dark .menu-category-title i,body.hsg-dark .sidebar .logout-area a{color:var(--hsg-muted)!important;} body.hsg-dark .status-badge,body.hsg-dark .destino-tag{filter:saturate(.85) brightness(.95);}

.hsg28-uploadline{display:block;margin-top:5px}.hsg28-uploadline .hsg28-file-btn{display:inline-flex;font-size:11px;padding:7px 10px}.hsg28-history-head .hsg28-eyebrow{color:rgba(255,255,255,.75)}

/* HORIZON SGE 28.1 — acabamento visual e acessibilidade */
.hsg281-designer{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(340px,.95fr);gap:20px;align-items:start}.hsg281-controls{min-width:0}.hsg281-preview-panel{position:sticky;top:16px}.hsg281-placeholders{display:flex;flex-wrap:wrap;gap:7px;margin-top:7px}.hsg281-placeholders button{border:1px solid var(--cinza-borda);background:var(--cinza-claro);color:inherit;border-radius:999px;padding:7px 9px;font-size:11px;cursor:pointer}.hsg281-placeholders button:hover{border-color:var(--azul-principal);color:var(--azul-principal)}.hsg281-test-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.hsg281-test-row select{flex:1;min-width:220px}.hsg281-paper{position:relative;min-height:670px;background:#fff;color:#222;border:1px solid #d7dee8;border-radius:10px;box-shadow:0 18px 40px rgba(15,35,60,.12);overflow:hidden}.hsg281-paper-logo{position:absolute;top:14px;width:52px;height:42px;object-fit:contain}.hsg281-paper-logo.left{left:14px}.hsg281-paper-logo.right{right:14px}.hsg281-paper-head{text-align:center;color:#445;min-height:30px}.hsg281-paper h1{margin:38px 0 26px;color:#111;font-size:22px}.hsg281-paper p{line-height:1.72;margin:0;white-space:normal}.hsg281-paper footer{position:absolute;left:7%;right:7%;bottom:22px;text-align:center;border-top:1px solid #dfe5ec;padding-top:10px;font-size:10px;color:#687386}.hsg281-signature{position:absolute;left:15%;right:15%;bottom:92px;text-align:center;min-height:35px}.hsg281-signature small{display:block;color:#6d7888}.hsg281-watermark{position:absolute;inset:45% 0 auto;text-align:center;font-size:48px;font-weight:900;letter-spacing:.08em;color:rgba(0,74,153,.05);transform:rotate(-24deg);pointer-events:none}.hsg281-model-steps{display:flex;gap:8px;flex-wrap:wrap}.hsg281-model-steps span{padding:9px 12px;border:1px solid var(--cinza-borda);border-radius:12px;color:var(--cinza-escuro);font-size:12px;background:var(--branco)}.hsg281-model-steps span.active{border-color:var(--azul-principal);color:var(--azul-principal)}.hsg281-model-steps b{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--cinza-claro);margin-right:5px}.hsg281-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.hsg281-profile-strip{display:flex;align-items:center;gap:16px;padding:18px;border-radius:18px;background:linear-gradient(135deg,#0f315f,#0a67b8);color:#fff;margin-bottom:18px}.hsg281-profile-strip>div:nth-child(2){flex:1}.hsg281-profile-strip h3{margin:0;color:#fff;font-size:23px}.hsg281-profile-strip p{margin:3px 0 0;color:rgba(255,255,255,.82)}.hsg281-profile-actions{display:flex;gap:8px;flex-wrap:wrap}.hsg281-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:18px}.hsg281-kpis>div{background:var(--cinza-claro);border:1px solid var(--cinza-borda);border-radius:14px;padding:13px;text-align:center}.hsg281-kpis b{display:block;font-size:21px;color:var(--azul-principal)}.hsg281-kpis span{display:block;font-size:11px;color:var(--cinza-escuro);margin-top:2px}.hsg281-doc-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hsg281-doc-summary span{display:flex;align-items:center;gap:7px;padding:8px 9px;border-radius:10px;background:var(--cinza-claro);font-size:11px}.hsg281-doc-summary .ok{color:var(--verde)}.hsg281-doc-summary .pending{color:var(--cinza-escuro)}.hsg281-row{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--cinza-borda)}.hsg281-row:last-child{border-bottom:0}.hsg281-row>div{display:flex;flex-direction:column;gap:3px}.hsg281-row b{color:var(--azul-principal)}.hsg281-row span,.hsg281-row small{color:var(--cinza-escuro)}.hsg281-student-result{padding-right:14px}.hsg281-result-meta{font-size:11px;color:var(--azul-principal);white-space:nowrap}.hsg281-doc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hsg281-doc-card{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;border:1px solid var(--cinza-borda);background:var(--cinza-claro);padding:12px;border-radius:14px}.hsg281-doc-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:rgba(0,74,153,.09);color:var(--azul-principal)}.hsg281-doc-info strong,.hsg281-doc-info small{display:block}.hsg281-doc-info small{font-size:11px;color:var(--cinza-escuro);margin-top:3px;overflow-wrap:anywhere}.hsg281-doc-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:flex-end}.hsg281-doc-actions .btn-sys-primary,.hsg281-doc-actions .btn-cancel{padding:8px 10px;font-size:11px}.hsg281-file-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--cinza-borda)}.hsg281-file-row span:first-child{display:flex;flex-direction:column;gap:2px}.hsg281-file-row small{color:var(--cinza-escuro)}.hsg281-global-error{position:fixed;right:18px;bottom:18px;z-index:99999;max-width:390px}.hsg281-global-error>div{display:grid;gap:6px;background:var(--branco);border:1px solid var(--cinza-borda);box-shadow:0 16px 40px rgba(0,0,0,.18);border-radius:16px;padding:16px}.hsg281-global-error span{color:var(--cinza-escuro);font-size:13px}
body.hsg-dark{--cinza-claro:#182334;--cinza-borda:#2b3b50;--branco:#111a2a;--cinza-escuro:#aebbd0;--preto:#eef4fb;background:#0b1220!important}html{transition:background-color .2s,color .2s}.hsg-dark .top-header,.hsg-dark .sidebar,.hsg-dark .profile-dropdown,.hsg-dark .modal,.hsg-dark .table-wrapper,.hsg-dark .action-bar,.hsg-dark .stat-card,.hsg-dark .hsg281-doc-card,.hsg-dark .hsg281-model-steps span{background:#111a2a!important}.hsg-dark .hsg281-paper{background:#fff!important;color:#222!important}.hsg-dark .hsg281-paper h1,.hsg-dark .hsg281-paper p{color:#222!important}.hsg-dark .hsg281-paper footer,.hsg-dark .hsg281-paper small{color:#637082!important}.hsg-dark .hsg281-global-error>div{background:#111a2a!important;color:#eef4fb!important}.hsg-dark .hsg281-global-error span{color:#aebbd0!important}
@media(max-width:1000px){.hsg281-designer,.hsg281-grid{grid-template-columns:1fr}.hsg281-preview-panel{position:static}.hsg281-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.hsg281-doc-grid{grid-template-columns:1fr}}
@media(max-width:620px){.hsg281-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.hsg281-profile-strip{align-items:flex-start;flex-wrap:wrap}.hsg281-profile-actions{width:100%}.hsg281-doc-card{grid-template-columns:auto 1fr}.hsg281-doc-actions{grid-column:1 / -1;justify-content:flex-start}.hsg281-file-row{align-items:flex-start;flex-direction:column}.hsg281-result-meta{display:none}}
.hsg281-inline-upload{display:block;margin-top:5px}.hsg281-inline-upload .hsg28-file-btn{font-size:10px;padding:6px 9px}

/* ============================================================
   HORIZON SGE 28.2 — Consolidação visual e modo escuro
   ============================================================ */
.hsg282-master-card{overflow:hidden}.hsg282-master-layout{display:grid;grid-template-columns:180px 1fr;gap:24px;align-items:start}.hsg282-master-photo{display:grid;gap:10px;justify-items:center}.hsg282-master-photo .hsg28-avatar{width:128px;height:128px;font-size:34px}.hsg282-master-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hsg282-master-fields label{display:grid;gap:6px;font-size:12px;font-weight:700;color:var(--cinza-escuro)}.hsg282-master-fields input{width:100%;border:1px solid var(--cinza-borda);background:var(--branco);color:var(--preto);border-radius:10px;padding:10px;font:inherit}.hsg282-doc-table{display:grid;gap:0}.hsg282-doc-table .hsg281-row{padding:15px;background:var(--branco)}
html{color-scheme:light}.hsg-dark, body.hsg-dark{color-scheme:dark}body.hsg-dark{background:#0b1220!important;color:#eaf1fa!important}body.hsg-dark #app,body.hsg-dark #horizon-sge-app{background:#0b1220!important;color:#eaf1fa!important}body.hsg-dark .main-content,body.hsg-dark .content-area,body.hsg-dark .view-section{background:#0b1220!important}body.hsg-dark .sidebar{background:#0e1727!important;border-color:#233149!important}body.hsg-dark .top-header{background:#101a2b!important;border-color:#26364e!important}body.hsg-dark .profile-dropdown,body.hsg-dark .dropdown-menu,body.hsg-dark .modal{background:#111d30!important;color:#eaf1fa!important;border-color:#2b3c55!important}body.hsg-dark .card,body.hsg-dark .stat-card,body.hsg-dark .table-wrapper,body.hsg-dark .action-bar,body.hsg-dark .hsg28-card,body.hsg-dark .hsg281-doc-card,body.hsg-dark .hsg281-model-steps span,body.hsg-dark .hsg282-master-card,body.hsg-dark .hsg282-doc-table .hsg281-row{background:#111d30!important;border-color:#2b3c55!important;color:#eaf1fa!important}body.hsg-dark input,body.hsg-dark textarea,body.hsg-dark select{background:#0d1728!important;color:#eaf1fa!important;border-color:#344760!important}body.hsg-dark input::placeholder,body.hsg-dark textarea::placeholder{color:#8393a9!important}body.hsg-dark table{color:#eaf1fa!important}body.hsg-dark th{background:#152239!important;color:#d9e5f2!important}body.hsg-dark td{border-color:#26364e!important}body.hsg-dark .menu-item,body.hsg-dark .sidebar a{color:#ccd8e7!important}body.hsg-dark .menu-item.active,body.hsg-dark .menu-item:hover{background:#173b66!important;color:#fff!important}body.hsg-dark .btn-cancel{background:#162438!important;color:#dbe7f3!important;border-color:#344760!important}body.hsg-dark .hsg28-student-result{background:#111d30!important;border-color:#2b3c55!important;color:#eaf1fa!important}body.hsg-dark .hsg28-student-result:hover{background:#15263e!important}body.hsg-dark .hsg28-loading,body.hsg-dark .hsg28-error,body.hsg-dark .hsg-empty28,body.hsg-dark .hsg-empty15{background:#111d30!important;border-color:#344760!important;color:#b8c6d7!important}body.hsg-dark .hsg28-doc-row,body.hsg-dark .hsg281-row{background:transparent!important;border-color:#2b3c55!important}body.hsg-dark .hsg28-model-tabs button{background:#111d30!important;color:#bdc9d8!important;border-color:#2b3c55!important}body.hsg-dark .hsg28-model-tabs button.active{background:#174b82!important;color:#fff!important;border-color:#2f7dca!important}
@media(max-width:800px){.hsg282-master-layout{grid-template-columns:1fr}.hsg282-master-fields{grid-template-columns:1fr}}

/* ============================================================
   HORIZON SGE 28.3 — Mobile Polish + Login UI + Theme Tokens
   ============================================================ */
:root{
  --hsg-accent:#1a6fd0;
  --hsg-accent-strong:#0e56a8;
  --hsg-accent-soft:#edf5ff;
  --hsg-surface:#ffffff;
  --hsg-surface-2:#f7f9fc;
  --hsg-border:#dfe6ef;
  --hsg-text:#172033;
  --hsg-muted:#68778c;
}

/* Base layout: prevent horizontal drift caused by mixed-width legacy modules. */
html,body,#horizon-sge-app,#system-container,.system-container{width:100%;max-width:100%;overflow-x:hidden}
.view-section,.main-content,.content-area,.profile-view-group{max-width:100%;min-width:0}

/* Login: six roles, consistent proportions on every breakpoint. */
#landing-page{
  min-height:100dvh;
  height:auto;
  padding:clamp(18px,4vw,48px);
  overflow-y:auto;
  background:linear-gradient(135deg,#071b38 0%,#0b4b8e 55%,#0f6bb8 100%);
}
#landing-page .landing-container{width:min(1120px,100%);gap:clamp(24px,5vw,70px)}
#landing-page .info-section{min-width:0}
#landing-page .login-section{min-width:0}
#landing-page .login-card{
  width:100%;
  max-width:500px;
  padding:clamp(22px,3vw,36px);
  border:1px solid rgba(255,255,255,.42);
  background:var(--hsg-surface);
  color:var(--hsg-text);
  border-radius:24px;
  box-shadow:0 24px 70px rgba(2,18,40,.30);
}
#landing-page .login-card h2{color:#102b4d}
#landing-page .login-card>p{color:#64748b}
#landing-page .role-selector{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:0 0 22px;
}
#landing-page .role-option{
  width:100%;
  min-width:0;
  min-height:82px;
  padding:12px 8px;
  border:1px solid #dfe7f1;
  border-radius:14px;
  background:#f7faff;
  color:#7a899d;
  box-shadow:none;
  transform:none;
}
#landing-page .role-option i{font-size:1.25rem;margin:0 0 7px}
#landing-page .role-option span{font-size:.66rem;line-height:1.25;word-break:normal}
#landing-page .role-option:hover{background:#fff;border-color:#8db9e9;color:var(--hsg-accent);transform:translateY(-2px);box-shadow:0 8px 18px rgba(24,97,168,.10)}
#landing-page .role-option.active{background:var(--hsg-accent-soft);border-color:var(--hsg-accent);color:var(--hsg-accent-strong);box-shadow:0 5px 16px rgba(26,111,208,.13)}
#landing-page .input-group input{min-height:48px;background:#fbfcfe;color:#172033;border-color:#dce4ee}
#landing-page .input-group input:focus{background:#fff;border-color:var(--hsg-accent);box-shadow:0 0 0 4px rgba(26,111,208,.11)}
#landing-page .input-group label{color:#43536a}
#landing-page .actions{margin-bottom:16px}
#landing-page .btn-primary,#landing-page #loginBtn{min-height:50px;background:linear-gradient(135deg,#195fae,#1d78d8);box-shadow:0 9px 20px rgba(26,95,174,.23)}
#landing-page .btn-primary:hover,#landing-page #loginBtn:hover{background:linear-gradient(135deg,#124c91,#1768bd)}

/* Login in dark theme. */
body.hsg-dark #landing-page{background:radial-gradient(circle at 15% 15%,rgba(45,125,210,.18),transparent 35%),linear-gradient(135deg,#050b15 0%,#0b1625 55%,#0e2035 100%)}
body.hsg-dark #landing-page .login-card{background:#111d30;border-color:#2b405c;box-shadow:0 24px 70px rgba(0,0,0,.44);color:#eaf1fa}
body.hsg-dark #landing-page .login-card h2{color:#eef5fd}
body.hsg-dark #landing-page .login-card>p{color:#aebbd0}
body.hsg-dark #landing-page .role-option{background:#0e1929;border-color:#2b3b52;color:#95a6bb}
body.hsg-dark #landing-page .role-option:hover{background:#15263e;border-color:#4a78ab;color:#d9eaff}
body.hsg-dark #landing-page .role-option.active{background:#15385f;border-color:#5ba2e8;color:#fff;box-shadow:0 6px 18px rgba(0,0,0,.24)}
body.hsg-dark #landing-page .input-group label{color:#c5d1df}
body.hsg-dark #landing-page .input-group label .field-hint{color:#8395aa}
body.hsg-dark #landing-page .input-group input{background:#0c1727;border-color:#32455f;color:#edf4fb}
body.hsg-dark #landing-page .input-group input:focus{background:#0e1b2d;border-color:#58a4ec;box-shadow:0 0 0 4px rgba(88,164,236,.12)}
body.hsg-dark #landing-page .actions .remember-me{color:#b8c7d9}
body.hsg-dark #landing-page .actions a{color:#67a9e8}
body.hsg-dark #landing-page .login-hint{background:#102b48;border-color:#4f9ce2;color:#bcdcff}
body.hsg-dark #landing-page .login-hint .user-sugest{color:#e0efff}

/* Authenticated mobile chrome. */
@media (max-width:900px){
  #system-container{min-height:100dvh}
  .sidebar{width:min(82vw,310px);padding:18px 14px}
  .main-content{width:100%;margin:0;padding:12px 12px calc(94px + env(safe-area-inset-bottom));min-height:100dvh;height:auto}
  .top-header{position:sticky;top:0;margin:0 -12px 14px;padding:10px 12px;min-height:58px;gap:10px;background:rgba(246,248,250,.96);backdrop-filter:blur(12px);border-bottom:1px solid var(--hsg-border)}
  .header-left{min-width:0;display:flex;align-items:center;gap:8px}
  .top-header h1{min-width:0;max-width:58vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px}
  .top-header .user-area{gap:6px}
  .icon-btn,.menu-toggle,.profile-trigger{width:40px!important;min-width:40px!important;height:40px!important}
  .profile-trigger{padding:3px!important}
  .profile-trigger .avatar{width:34px;height:34px}
  .profile-dropdown{width:min(300px,calc(100vw - 24px));right:0;max-height:calc(100dvh - 78px);overflow:auto}

  .page-header,.action-bar,.hsg15-toolbar,.hsg17-toolbar,.hsg20-top,.hsg21-head,.hsg24-hero,.hsg281-profile-strip{gap:12px}
  .page-header,.action-bar,.hsg15-toolbar,.hsg17-toolbar,.hsg20-top,.hsg21-head{padding:14px!important}
  .page-header h2,.hsg15-toolbar h2,.hsg17-toolbar h2,.hsg20-top h2{font-size:20px!important;line-height:1.2}
  .form-grid,.hsg15-grid,.hsg17-grid,.hsg21-grid2,.hsg24-grid,.hsg281-grid,.hsg282-master-layout{grid-template-columns:1fr!important}
  .stats-grid,.hsg17-kpis,.hsg21-kpis,.hsg24-kpis,.hsg281-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .hsg15-doc-grid,.hsg23-grid{grid-template-columns:1fr 1fr!important}
  .card,.stat-card,.table-wrapper,.hsg15-card,.hsg17-card,.hsg20-panel,.hsg21-panel,.hsg24-panel,.hsg281-doc-card,.hsg282-master-card{min-width:0}
  .table-wrapper{width:100%;overflow-x:auto}
  .table-wrapper table,.hsg17-table-wrap table,.hsg21-table{min-width:640px}
  .action-bar .btn-group{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;width:100%!important}
  .action-bar .btn-group button{width:100%;margin:0}
  .modal-overlay{padding:8px}
  .modal{width:100%;max-width:720px;max-height:calc(100dvh - 16px);border-radius:18px}
  .modal-footer{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}
  .modal-footer>*{width:100%!important;margin:0!important}
}

@media (max-width:600px){
  #landing-page{padding:14px 10px 22px;align-items:flex-start}
  #landing-page .landing-container{max-width:440px;gap:12px}
  #landing-page .info-section{padding-top:2px}
  #landing-page .logo-header{justify-content:center;gap:9px;margin-bottom:2px}
  #landing-page .logo-mark{width:42px;height:42px;border-radius:12px}
  #landing-page .logo-mark svg{width:25px;height:25px}
  #landing-page .info-section h1{font-size:1.5rem;letter-spacing:-.5px}
  #landing-page .info-section p{display:none}
  #landing-page .login-card{max-width:440px;padding:18px 14px;border-radius:18px;box-shadow:0 18px 42px rgba(0,0,0,.20)}
  #landing-page .login-card h2{font-size:1.18rem;line-height:1.2}
  #landing-page .login-card>p{font-size:.76rem;margin-bottom:13px}
  #landing-page .role-selector{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}
  #landing-page .role-option{min-height:64px;padding:8px 5px;border-radius:12px}
  #landing-page .role-option i{font-size:1.02rem;margin-bottom:4px}
  #landing-page .role-option span{font-size:.59rem}
  #landing-page .role-option:nth-child(5),#landing-page .role-option:nth-child(6){grid-column:auto;width:auto;justify-self:auto}
  #landing-page .input-group{margin-bottom:11px}
  #landing-page .input-group label{font-size:.73rem;margin-bottom:4px}
  #landing-page .input-group input{min-height:45px;padding:10px 11px;font-size:.88rem;border-radius:11px}
  #landing-page .actions{font-size:.72rem;margin-bottom:11px;gap:6px}
  #landing-page .actions .remember-me{font-size:.72rem}
  #landing-page .actions a{font-size:.72rem}
  #landing-page #loginBtn{min-height:46px;font-size:.82rem;border-radius:11px}

  .main-content{padding:9px 9px calc(96px + env(safe-area-inset-bottom))}
  .top-header{margin:0 -9px 12px;padding:8px 9px;min-height:54px}
  .top-header h1{font-size:15px!important;max-width:52vw}
  .top-header .user-area{gap:4px!important}
  .icon-btn,.menu-toggle,.profile-trigger{width:38px!important;min-width:38px!important;height:38px!important}
  .profile-trigger .avatar{width:32px;height:32px}

  .stats-grid,.hsg17-kpis,.hsg21-kpis,.hsg24-kpis,.hsg281-kpis,.hsg15-task-kpis{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .stat-card{padding:11px 9px!important;min-height:84px}
  .stat-card .number{font-size:21px!important}
  .hsg24-k,.hsg17-kpis>div,.hsg21-kpi,.hsg281-kpis>div{padding:11px!important}
  .hsg24-k strong,.hsg17-kpis strong,.hsg21-kpi strong{font-size:21px!important}
  .hsg15-doc-grid,.hsg23-grid{grid-template-columns:1fr!important}
  .hsg15-task{padding:11px;gap:9px}
  .hsg15-toolbar,.hsg17-toolbar,.hsg20-top,.hsg21-head,.hsg24-hero{border-radius:15px!important}
  .hsg24-hero{padding:18px!important;min-height:0}
  .hsg24-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:7px}
  .hsg24-actions button{width:100%;min-width:0}
  .hsg281-profile-strip{padding:14px!important;border-radius:15px!important}
  .hsg281-profile-strip h3{font-size:18px}
  .hsg281-kpis b{font-size:19px}
  .hsg282-master-layout{gap:14px}
  .hsg282-master-photo .hsg28-avatar{width:96px;height:96px;font-size:26px}
  .hsg282-master-fields{grid-template-columns:1fr!important}
  .hsg28-model-tabs,.hsg281-model-steps{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;padding-bottom:2px}
  .hsg28-model-tabs button,.hsg281-model-steps span{flex:0 0 auto;white-space:nowrap}
  .hsg28-detail-grid{grid-template-columns:1fr!important}
  .hsg28-result-grid{grid-template-columns:1fr!important}
  .hsg28-history-metrics{grid-template-columns:1fr 1fr!important}
  .hsg28-history-columns{grid-template-columns:1fr!important}
  .hsg28-editor-grid{grid-template-columns:1fr!important}
  .hsg28-preview{position:static!important}
  .hsg281-designer{grid-template-columns:1fr!important}
  .hsg281-preview-panel{position:static!important}
  .hsg281-doc-grid,.hsg281-doc-summary{grid-template-columns:1fr!important}
  .hsg281-doc-card{grid-template-columns:auto 1fr;align-items:start}
  .hsg281-doc-actions{grid-column:1/-1;justify-content:stretch}
  .hsg281-doc-actions>*{flex:1}
  .hsg281-file-row{align-items:flex-start;flex-direction:column}
  .hsg281-file-row button{width:100%}
  .hsg282-doc-table .hsg281-row{padding:12px 0}
}

@media (max-width:380px){
  #landing-page{padding-left:8px;padding-right:8px}
  #landing-page .login-card{padding:15px 11px}
  #landing-page .role-selector{gap:6px}
  #landing-page .role-option{min-height:59px;padding:7px 3px}
  #landing-page .role-option span{font-size:.54rem}
  #landing-page .input-group input{min-height:43px;font-size:.84rem}
  #landing-page .actions{align-items:flex-start;flex-direction:column}
  #landing-page .actions a{align-self:flex-end}
  .main-content{padding-left:7px;padding-right:7px}
  .top-header{margin-left:-7px;margin-right:-7px;padding-left:7px;padding-right:7px}
  .stats-grid,.hsg17-kpis,.hsg21-kpis,.hsg24-kpis,.hsg281-kpis{gap:6px!important}
  .stat-card,.hsg24-k,.hsg17-kpis>div,.hsg21-kpi{padding:9px 8px!important}
}

/* Dark theme: one coherent token layer for legacy modules. */
body.hsg-dark{
  --cinza-claro:#0b1220;
  --cinza-borda:#293a52;
  --branco:#111d30;
  --preto:#eef4fb;
  --cinza-escuro:#aebbd0;
  --hsg-surface:#111d30;
  --hsg-surface-2:#152239;
  --hsg-border:#2b3c55;
  --hsg-text:#eaf1fa;
  --hsg-muted:#aebbd0;
}
body.hsg-dark .hsg15-event,
body.hsg-dark .hsg15-mini-grid div,
body.hsg-dark .hsg15-task-kpis div,
body.hsg-dark .hsg17-result,
body.hsg-dark .hsg17-bar,
body.hsg-dark .hsg18-service-grid>div,
body.hsg-dark .hsg20-step,
body.hsg-dark .hsg21-duo div,
body.hsg-dark .hsg-resp-stats span,
body.hsg-dark .hsg-central14-kpis>div{background:#152239!important;color:#dce6f2!important;border-color:#2b3c55!important}
body.hsg-dark .hsg20-top,
body.hsg-dark .hsg21-shell,
body.hsg-dark .hsg-central14,
body.hsg-dark .hsg-resp-card,
body.hsg-dark .hsg17-card,
body.hsg-dark .hsg15-toolbar,
body.hsg-dark .hsg17-toolbar,
body.hsg-dark .hsg20-panel,
body.hsg-dark .hsg21-panel,
body.hsg-dark .hsg24-hero,
body.hsg-dark .hsg281-profile-strip{border-color:#2b3c55!important}
body.hsg-dark .hsg20-top p,
body.hsg-dark .hsg21-head p,
body.hsg-dark .hsg-resp-card p,
body.hsg-dark .hsg15-toolbar p,
body.hsg-dark .hsg17-toolbar p,
body.hsg-dark .hsg24-head span,
body.hsg-dark .hsg17-result dt,
body.hsg-dark .hsg17-result dd{color:#aebbd0!important}
body.hsg-dark .hsg20-table th,
body.hsg-dark .hsg21-table th,
body.hsg-dark .hsg17-table-wrap th{background:#152239!important;color:#bdc9d8!important}
body.hsg-dark .hsg20-table td,
body.hsg-dark .hsg21-table td,
body.hsg-dark .hsg17-table-wrap td{border-color:#2b3c55!important;color:#dbe5f0!important}
body.hsg-dark .hsg21-mini{background:#16263b!important;color:#dbe7f4!important;border-color:#344760!important}
body.hsg-dark .hsg-resp-avatar{background:#15365d!important;color:#9ed0ff!important}

/* Mobile bottom navigation: always readable over the content and dark-mode aware. */
@media(max-width:900px){
  .hsg21-mobile-nav,.hsg20-mobile-nav{
    left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));
    bottom:max(8px,env(safe-area-inset-bottom));
    border-radius:18px;
    padding:6px;
    background:rgba(255,255,255,.97);
    border:1px solid #d9e2ec;
    box-shadow:0 12px 35px rgba(15,23,42,.18);
    backdrop-filter:blur(14px);
  }
  .hsg21-mobile-nav button,.hsg20-mobile-nav button{min-width:0;min-height:48px;padding:7px 3px;color:#617087;font-size:9px;line-height:1.1}
  .hsg21-mobile-nav button i,.hsg20-mobile-nav button i{font-size:15px}
  .hsg21-mobile-nav button.active,.hsg20-mobile-nav button.active{background:#eaf3ff;color:#1554a0}
  body.hsg-dark .hsg21-mobile-nav,body.hsg-dark .hsg20-mobile-nav{background:rgba(17,29,48,.97);border-color:#2b3c55;box-shadow:0 14px 36px rgba(0,0,0,.45)}
  body.hsg-dark .hsg21-mobile-nav button,body.hsg-dark .hsg20-mobile-nav button{color:#aebbd0}
  body.hsg-dark .hsg21-mobile-nav button.active,body.hsg-dark .hsg20-mobile-nav button.active{background:#173b66;color:#fff}
}

@media print{
  #landing-page{background:#fff!important}
}

/* HORIZON SGE 28.4 — identidade institucional e navegação funcional */
.horizon-corner-brand{display:flex;align-items:center;gap:9px;align-self:flex-start;margin-bottom:18px;font-size:14px;font-weight:800;letter-spacing:.4px;color:#fff;opacity:.95}
.horizon-mini-mark{width:30px;height:30px;display:grid;place-items:center}
.horizon-mini-mark svg,.horizon-mini-mark img{width:30px!important;height:30px!important}
.institution-brand{display:flex;align-items:center;gap:14px;max-width:480px;padding:16px 18px;margin-bottom:18px;border:1px solid rgba(255,255,255,.18);border-radius:18px;background:rgba(255,255,255,.08);backdrop-filter:blur(8px)}
.institution-logo-wrap{width:58px;height:58px;min-width:58px;display:grid;place-items:center;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,.15)}
.institution-logo-wrap img{width:100%;height:100%;object-fit:contain;padding:7px}
.institution-logo-wrap i{font-size:25px;color:#1a56a8}
.institution-label{display:block;font-size:10px;text-transform:uppercase;letter-spacing:1.2px;color:#bdd9f7;font-weight:700;margin-bottom:4px}
.institution-brand h2{margin:0;color:#fff;font-size:clamp(18px,2vw,25px);line-height:1.15}
.school-context-banner{display:flex;align-items:center;gap:14px;padding:15px 18px;margin-bottom:18px;border-radius:14px;background:linear-gradient(135deg,var(--azul-principal),var(--azul-claro));color:#fff;box-shadow:var(--sombra)}
.school-context-banner>i{font-size:21px}
.school-context-banner strong,.school-context-banner span{display:block}
.school-context-banner strong{font-size:15px}
.school-context-banner span{margin-top:3px;font-size:12px;opacity:.9}
@media(max-width:900px){
 .horizon-corner-brand{align-self:center;margin-bottom:6px;font-size:12px}
 .institution-brand{width:100%;box-sizing:border-box;justify-content:flex-start;margin-bottom:8px;padding:12px 14px}
 .institution-logo-wrap{width:46px;height:46px;min-width:46px}
 .institution-brand h2{font-size:17px}
}
@media(max-width:600px){
 .institution-brand{border-radius:14px}
 .institution-logo-wrap{width:40px;height:40px;min-width:40px}
 .institution-brand h2{font-size:15px}
 .horizon-corner-brand{font-size:11px}
 .school-context-banner{padding:12px 14px}
}

#landing-page .logo-header{display:none!important}

/* HORIZON SGE 28.5 — login: identidade institucional central + HORIZON no canto superior esquerdo */
#landing-page{position:relative;min-height:100vh;overflow:hidden}
#landing-page .landing-container{position:relative;z-index:1}
.login-branding-layer{position:absolute;top:22px;left:26px;z-index:5}
.login-branding-layer .horizon-corner-brand{margin:0;display:flex;align-items:center;gap:8px;font-size:14px}
.login-branding-layer .horizon-mini-mark{width:28px;height:28px}
.login-branding-layer .horizon-mini-mark svg{width:28px;height:28px}
.login-branding-layer sup{font-size:.52em;top:-.58em;position:relative;margin-left:1px}
.login-institution-panel{justify-content:center}
.institution-brand-login{width:min(520px,100%);max-width:520px;margin-bottom:24px}
.institution-brand-login .institution-logo-wrap{width:96px;height:96px;min-width:96px;border-radius:18px}
.institution-brand-login .institution-logo-wrap img{padding:9px;object-fit:contain}
.institution-brand-login .institution-brand-copy h2{font-size:clamp(20px,2.4vw,30px)}
.login-platform-copy h1{font-size:clamp(2.5rem,4.4vw,3.5rem)}
@media(max-width:900px){
 #landing-page{padding:78px 18px 24px;align-items:flex-start;overflow:auto}
 #landing-page .landing-container{flex-direction:column;gap:20px;align-items:stretch}
 .login-branding-layer{top:16px;left:16px}
 .login-branding-layer .horizon-corner-brand{font-size:12px}
 .login-institution-panel{max-width:none;align-items:center;text-align:center}
 .institution-brand-login{justify-content:center;text-align:left}
 .login-section{justify-content:center}
}
@media(max-width:600px){
 #landing-page{padding:72px 12px 20px}
 .login-branding-layer{left:12px;top:12px}
 .institution-brand-login{padding:12px 14px}
 .institution-brand-login .institution-logo-wrap{width:68px;height:68px;min-width:68px}
 .institution-brand-login .institution-brand-copy h2{font-size:17px}
 .login-platform-copy h1{font-size:2rem}
 .login-platform-copy p{font-size:.98rem}
}


/* HORIZON SGE 28.6 — login final: logo configurável no canto + identidade institucional limpa */
.login-branding-layer .horizon-corner-brand{
  align-items:center;
  justify-content:flex-start;
  min-height:32px;
  white-space:nowrap;
  text-align:left;
}
.login-branding-layer .horizon-mini-mark{
  width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;overflow:hidden;border-radius:6px;
}
.login-branding-layer .horizon-mini-mark img{
  width:100%;height:100%;object-fit:contain;display:block;
}
.login-branding-layer .horizon-mini-mark.has-custom-logo{
  background:transparent;
}
.login-branding-layer .horizon-corner-brand sup{
  font-size:.52em;line-height:0;position:relative;top:-.58em;margin-left:1px;
}
#landing-page .login-platform-copy{
  margin-top:8px;
}
#landing-page .login-platform-copy h1{
  margin:0;
  font-size:clamp(2rem,4vw,3.25rem);
  line-height:1.05;
  letter-spacing:-.035em;
}
#landing-page .login-platform-copy p{display:none!important}
@media(max-width:600px){
  #landing-page .login-platform-copy h1{font-size:clamp(1.75rem,8vw,2.35rem);line-height:1.08}
  .login-branding-layer .horizon-mini-mark{width:28px;height:28px;flex-basis:28px}
}

/* 28.7 - Central da Unidade Escolar */
.hsg-school-link{border:0;background:transparent;color:var(--azul-principal);font:inherit;font-weight:800;cursor:pointer;padding:0;text-align:left;display:inline-flex;align-items:center;gap:7px}
.hsg-school-link:hover{text-decoration:underline}
.hsg-school-open-btn{padding:7px 11px!important;font-size:12px!important;display:inline-flex;align-items:center;gap:6px}
.hsg-school-detail-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:20px}
.hsg-school-detail-head h2{font-size:30px;margin:9px 0 5px}
.hsg-school-detail-head p{margin:0;color:var(--cinza-escuro)}
.hsg-school-head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.hsg-school-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.hsg-school-kpis>div{background:var(--branco);border:1px solid var(--borda);border-radius:14px;padding:16px 18px;display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;column-gap:10px;box-shadow:0 4px 16px rgba(24,39,75,.05)}
.hsg-school-kpis i{grid-row:1/3;align-self:center;font-size:22px;color:var(--azul-principal)}
.hsg-school-kpis b{font-size:24px;line-height:1.1}.hsg-school-kpis span{font-size:12px;color:var(--cinza-escuro)}
.hsg-school-detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px;margin-bottom:18px}
.hsg-person-row{display:flex;align-items:center;gap:11px;padding:11px 0;border-bottom:1px solid var(--borda)}.hsg-person-row:last-child{border-bottom:0}.hsg-person-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#eaf2ff;color:var(--azul-principal);flex:0 0 auto}.hsg-person-row strong,.hsg-person-row span{display:block}.hsg-person-row span{font-size:12px;color:var(--cinza-escuro);margin-top:2px}.hsg-detail-list{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.hsg-detail-list small,.hsg-detail-list strong{display:block}.hsg-detail-list small{color:var(--cinza-escuro);font-size:11px;text-transform:uppercase;letter-spacing:.5px}.hsg-detail-list strong{margin-top:4px}
@media(max-width:900px){.hsg-school-kpis{grid-template-columns:repeat(2,1fr)}.hsg-school-detail-grid{grid-template-columns:1fr}.hsg-school-detail-head{flex-direction:column}.hsg-detail-list{grid-template-columns:1fr}}
@media(max-width:540px){.hsg-school-kpis{grid-template-columns:1fr}.hsg-school-detail-head h2{font-size:24px}.hsg-school-head-actions{width:100%}.hsg-school-head-actions .btn-sys-primary{width:100%}}

/* 28.8 — modo de gestão integral da unidade pela Secretaria de Educação */
.hsg-unit-menu-head{margin:10px 12px 16px;padding:14px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.05);display:flex;flex-direction:column;gap:6px}.hsg-unit-menu-head span{font-size:10px;letter-spacing:.12em;opacity:.65;font-weight:700}.hsg-unit-menu-head strong{font-size:14px;line-height:1.3;color:#fff}.hsg-unit-exit{margin-top:6px;border:0;background:transparent;color:#b9c7dc;text-align:left;padding:4px 0;cursor:pointer;font-size:11px}.hsg-unit-exit:hover{color:#fff}


/* HORIZON SGE 28.9 — refinamento de identidade, controle da rede e mobile */
.hsg29-control-panel{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:20px 22px;margin:18px 0;border:1px solid rgba(0,74,153,.12);border-radius:18px;background:linear-gradient(135deg,rgba(0,74,153,.06),rgba(26,117,211,.035));box-shadow:0 8px 24px rgba(15,23,42,.04)}
.hsg29-eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--azul-principal);margin-bottom:5px}
.hsg29-control-panel h3{margin:0 0 5px;font-size:18px;color:var(--preto)}.hsg29-control-panel p{margin:0;color:var(--cinza-escuro);font-size:13px}
.hsg29-control-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.hsg29-control-actions button{border:1px solid #dbe4ee;background:#fff;color:#334155;border-radius:11px;padding:10px 12px;font-weight:700;cursor:pointer}.hsg29-control-actions button.primary{background:var(--azul-principal);color:#fff;border-color:var(--azul-principal)}
.hsg-student-link{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--azul-principal);font:inherit;font-weight:750;padding:0;cursor:pointer;text-align:left}.hsg-student-link:hover{text-decoration:underline}
@media(max-width:780px){.hsg29-control-panel{display:block;padding:17px}.hsg29-control-actions{justify-content:flex-start;margin-top:13px}.hsg29-control-actions button{flex:1 1 calc(50% - 8px);min-width:140px}.login-branding-layer{padding:10px 14px}.horizon-corner-brand{max-width:100%;overflow:hidden}.horizon-corner-brand span:last-child{font-size:12px;white-space:nowrap}.institution-brand-login{gap:10px}.institution-logo-wrap{width:52px!important;height:52px!important;min-width:52px!important}.institution-brand-copy h2{font-size:16px;line-height:1.2}.login-platform-copy h1{font-size:22px;line-height:1.15}.role-selector{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.role-option{min-height:62px!important;padding:9px 7px!important}.role-option span{font-size:11px!important;line-height:1.15!important}.login-card{padding:20px 15px!important}.login-section{padding:18px 10px 28px!important}.login-card form{width:100%}.input-group input{min-height:46px}.btn-primary{min-height:48px}}
@media(max-width:420px){.hsg29-control-actions{display:grid;grid-template-columns:1fr 1fr}.hsg29-control-actions button{min-width:0;width:100%}.role-selector{grid-template-columns:1fr 1fr!important}.role-option i{font-size:16px!important}.role-option span{font-size:10px!important}.institution-brand-copy h2{font-size:14px}.login-platform-copy h1{font-size:20px}.horizon-corner-brand{transform:scale(.94);transform-origin:left top}.login-card{border-radius:16px!important}}
/* 28.9 dark theme alignment */
body.hsg-dark .hsg29-control-panel{background:linear-gradient(135deg,rgba(37,99,235,.15),rgba(15,23,42,.65));border-color:rgba(148,163,184,.18)}
body.hsg-dark .hsg29-control-panel h3,body.hsg-dark .hsg29-control-panel p{color:#e5edf7}body.hsg-dark .hsg29-control-actions button{background:#111827;border-color:#334155;color:#e5edf7}.hsg29-control-actions button.primary{color:#fff!important}

/* HORIZON SGE 28.10 — identidade do login + central documental contextual do aluno */
#landing-page .login-branding-layer{position:absolute;top:clamp(14px,2.2vw,28px);left:clamp(14px,2.8vw,42px);right:auto;z-index:8}
#landing-page .login-branding-layer .horizon-corner-brand{font-size:clamp(16px,1.55vw,22px);font-weight:900;letter-spacing:.65px;line-height:1;gap:9px}
#landing-page .login-branding-layer .horizon-mini-mark{width:clamp(30px,2.5vw,36px);height:clamp(30px,2.5vw,36px);flex-basis:clamp(30px,2.5vw,36px)}
#landing-page .login-branding-layer .horizon-mini-mark svg{width:100%;height:100%}
#landing-page .institution-brand-login .institution-brand-copy h2{font-size:clamp(18px,2.05vw,26px)}
#landing-page .login-platform-copy h1{font-size:clamp(1.55rem,2.7vw,2.45rem);line-height:1.08;letter-spacing:-.025em;margin-top:2px}
.hsg281-student-document-hub{max-height:min(88vh,920px);overflow:auto}
.hsg281-doc-hub-grid{display:grid;gap:16px}
.hsg281-hub-section{margin:0}
.hsg281-hub-section .hsg28-card-head p{margin:6px 0 0;color:var(--cinza-escuro);font-size:13px}
.hsg281-count-pill{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border-radius:999px;background:rgba(37,99,235,.10);color:var(--azul-principal);font-size:12px;font-weight:800;white-space:nowrap}
.hsg281-emit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hsg281-emit-card{display:flex;align-items:center;gap:10px;border:1px solid var(--borda,#dce5ef);background:var(--fundo-card,#fff);border-radius:14px;padding:12px 13px;text-align:left;cursor:pointer;color:inherit;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.hsg281-emit-card:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(15,23,42,.08);border-color:var(--azul-claro)}
.hsg281-emit-card>i:last-child{margin-left:auto;color:#8aa0bc}
.hsg281-emit-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:rgba(37,99,235,.10);color:var(--azul-principal);flex:0 0 38px}
.hsg281-emit-card strong,.hsg281-emit-card small{display:block}
.hsg281-emit-card strong{font-size:13px}
.hsg281-emit-card small{font-size:11px;color:var(--cinza-escuro);margin-top:2px}
.hsg281-issued-list{display:grid;gap:8px}
.hsg281-issued-row{display:flex;align-items:center;gap:12px;justify-content:space-between;border:1px solid var(--borda,#dce5ef);border-radius:12px;padding:11px 12px}
.hsg281-issued-row strong,.hsg281-issued-row small{display:block}
.hsg281-issued-row small{color:var(--cinza-escuro);font-size:11px;margin-top:3px}
body.hsg-dark .hsg281-emit-card,body.hsg-dark .hsg281-issued-row{background:#142235;border-color:#2b3c55}
body.hsg-dark .hsg281-emit-card:hover{box-shadow:0 8px 20px rgba(0,0,0,.22)}
body.hsg-dark .hsg281-count-pill{background:rgba(96,165,250,.14);color:#93c5fd}
@media(max-width:700px){
  #landing-page .login-branding-layer{top:12px;left:12px}
  #landing-page .login-branding-layer .horizon-corner-brand{font-size:15px;gap:7px}
  #landing-page .login-branding-layer .horizon-mini-mark{width:28px;height:28px;flex-basis:28px}
  #landing-page .institution-brand-login .institution-brand-copy h2{font-size:17px}
  #landing-page .login-platform-copy h1{font-size:clamp(1.45rem,7vw,2rem)}
  .hsg281-emit-grid{grid-template-columns:1fr}
  .hsg281-student-document-hub{width:calc(100vw - 18px);max-width:none}
}
