:root {
    --portal-dark: #17202a;
    --portal-accent: #e76f00;
    --portal-soft: #f5f7fa;
}

body { background: var(--portal-soft); color: #17202a; min-height: 100vh; }
.portal-header { background: var(--portal-dark); box-shadow: 0 4px 18px rgba(0,0,0,.16); }
.portal-nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.portal-brand { color: #fff; text-decoration: none; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.portal-brand img { width: 86px; max-height: 54px; object-fit: contain; }
.portal-nav nav { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-nav nav a { color: #e9ecef; text-decoration: none; padding: 9px 11px; border-radius: 9px; }
.portal-nav nav a:hover, .portal-nav nav a:focus { background: rgba(255,255,255,.12); color: #fff; }
.portal-card { border: 0; border-radius: 16px; box-shadow: 0 10px 30px rgba(23,32,42,.08); }
.portal-stat { border-left: 4px solid var(--portal-accent); }
.portal-footer { color: #6c757d; padding: 24px 0 36px; text-align: center; font-size: .9rem; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg,#17202a,#2f4053); }
.login-card { width: min(100%, 440px); border: 0; border-radius: 20px; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.login-logo { max-width: 135px; max-height: 80px; object-fit: contain; }
.marks { display: flex; flex-wrap: wrap; gap: 6px; }
.mark { background: #edf2f7; border-radius: 8px; padding: 5px 8px; white-space: nowrap; }
.table-espelho td { vertical-align: middle; }

@media (max-width: 850px) {
    .portal-nav { align-items: flex-start; flex-direction: column; padding-top: 14px; padding-bottom: 14px; }
    .portal-nav nav { width: 100%; }
    .portal-nav nav a { flex: 1 1 45%; }
}

@media print {
    body { background: #fff; }
    main.container { max-width: 100%; padding: 0 !important; }
    .portal-card { box-shadow: none; border: 1px solid #ddd; }
    .btn, form { display: none !important; }
}
