:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #17233a;
    background: #f4f7fb;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f4f7fb; }
a { color: #145da0; }
button, input, select { font: inherit; }
.portal-shell { min-height: 100vh; display: flex; flex-direction: column; }
.portal-header {
    min-height: 68px; display: flex; align-items: center; gap: 28px; padding: 0 32px;
    background: #fff; border-bottom: 1px solid #dbe4ef; box-shadow: 0 2px 12px rgba(28, 55, 90, .05);
}
.portal-brand { display: inline-flex; align-items: center; gap: 10px; color: #17233a; text-decoration: none; font-weight: 750; letter-spacing: .08em; }
.portal-brand img, .portal-auth-brand img { width: 38px; height: 38px; object-fit: contain; }
.portal-brand small { color: #3576a8; font-weight: 600; letter-spacing: 0; }
.portal-header nav { display: flex; gap: 6px; flex: 1; }
.portal-header nav a { color: #40516d; text-decoration: none; padding: 10px 13px; border-radius: 8px; }
.portal-header nav a.active, .portal-header nav a:hover { color: #0f558c; background: #edf5fb; }
.portal-logout { margin-left: auto; }
.portal-logout button { border: 0; background: transparent; color: #40516d; cursor: pointer; padding: 10px; }
.portal-main { flex: 1; width: min(1120px, calc(100% - 32px)); margin: 32px auto; }
.portal-main > h1 { font-size: 1.8rem; margin: 0 0 18px; }
.portal-card, .portal-auth-card { background: #fff; border: 1px solid #dbe4ef; border-radius: 14px; box-shadow: 0 8px 28px rgba(28, 55, 90, .07); padding: 26px; }
.portal-card h2 { margin-top: 0; }
.portal-auth-card { width: min(440px, calc(100% - 24px)); margin: 54px auto; }
.portal-auth-brand { display: flex; align-items: center; gap: 12px; }
.portal-auth-brand h1 { font-size: 1.45rem; margin: 0; }
.portal-form { display: grid; gap: 15px; margin-top: 24px; }
.portal-form label { display: grid; gap: 7px; font-weight: 600; color: #354862; }
.portal-form input { width: 100%; min-height: 44px; border: 1px solid #b7c7d9; border-radius: 8px; padding: 10px 12px; }
.portal-form .portal-check { display: flex; flex-direction: row; align-items: center; font-weight: 400; }
.portal-form .portal-check input { width: auto; min-height: auto; }
.portal-primary { min-height: 44px; border: 0; border-radius: 8px; background: #145da0; color: #fff; font-weight: 700; cursor: pointer; }
.portal-alert, .portal-success { margin: 18px 0 0; padding: 12px; border-radius: 8px; }
.portal-alert { background: #fff1f1; color: #8a2525; }
.portal-success { background: #eaf8ef; color: #23653b; }
.portal-help, .portal-muted { color: #63738a; font-size: .92rem; }
.portal-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.portal-facts div { padding: 14px; border-radius: 9px; background: #f5f8fc; }
.portal-facts dt { font-size: .78rem; color: #6c7a8d; text-transform: uppercase; letter-spacing: .06em; }
.portal-facts dd { margin: 5px 0 0; font-weight: 650; }
.portal-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #e3e9f0; }
th { color: #55667d; font-size: .82rem; text-transform: uppercase; }
.portal-loading { padding: 24px; color: #63738a; }
footer { padding: 22px; text-align: center; color: #728197; font-size: .82rem; }
@media (max-width: 720px) {
    .portal-header { align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
    .portal-header nav { width: 100%; order: 3; overflow-x: auto; }
    .portal-logout { margin-left: auto; }
}
