:root {
    --portal-primary: #0a4c94;
    --portal-primary-dark: #083b72;
    --portal-accent: #f6b41b;
    --portal-bg: #f3f7fb;
    --portal-surface: #ffffff;
    --portal-text: #1e293b;
    --portal-muted: #64748b;
    --portal-border: #dbe3ef;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Outfit", sans-serif;
    color: var(--portal-text);
}

.portal-body {
    background: linear-gradient(140deg, #edf4ff 0%, #f8fbff 50%, #eef6ff 100%);
    min-height: 100vh;
}

.portal-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.portal-sidebar {
    background: linear-gradient(180deg, #0b3f7a 0%, #082d57 100%);
    color: #fff;
    padding: 24px 16px;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.portal-brand img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.portal-brand strong {
    display: block;
    font-size: 1rem;
    line-height: 1.2;
}

.portal-brand small {
    color: #d2def3;
}

.portal-nav {
    display: grid;
    gap: 8px;
}

.portal-nav a {
    color: #eaf1fd;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    transition: 0.2s ease;
    font-weight: 500;
}

.portal-nav a i {
    margin-right: 8px;
}

.portal-nav a:hover,
.portal-nav a.active {
    background: rgba(246, 180, 27, 0.18);
    color: #fff;
}

.portal-main {
    padding: 24px;
}

.portal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.portal-topbar h1 {
    margin: 0;
    font-size: 1.3rem;
}

.portal-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.portal-card .card-body {
    padding: 18px;
}

.portal-metric {
    border-radius: 14px;
    border: 1px solid var(--portal-border);
    background: var(--portal-surface);
    padding: 14px;
}

.portal-metric h3 {
    font-size: 0.95rem;
    color: var(--portal-muted);
    margin-bottom: 8px;
}

.portal-metric p {
    font-size: 1.7rem;
    margin: 0;
    font-weight: 700;
    color: var(--portal-primary);
}

.portal-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at top right, rgba(246, 180, 27, 0.25), transparent 32%),
        radial-gradient(circle at bottom left, rgba(10, 76, 148, 0.2), transparent 34%),
        #f2f7fd;
}

.portal-auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--portal-border);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
    padding: 28px;
}

.portal-auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.portal-auth-brand img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #edf2fb;
}

.portal-auth-brand h1 {
    margin: 0;
    font-size: 1.25rem;
}

.portal-auth-brand p {
    margin: 2px 0 0;
    color: var(--portal-muted);
}

.table thead th {
    background: #f8fbff;
}

.portal-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.result-sheet {
    border: 1px solid var(--portal-border);
    border-radius: 12px;
    padding: 16px;
}

.result-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.result-meta div {
    background: #f8fbff;
    border-radius: 8px;
    border: 1px solid var(--portal-border);
    padding: 8px 10px;
    font-size: 0.92rem;
}

@media (max-width: 992px) {
    .portal-shell {
        grid-template-columns: 1fr;
    }

    .portal-sidebar {
        padding-bottom: 12px;
    }

    .portal-main {
        padding: 14px;
    }

    .portal-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .result-meta {
        grid-template-columns: 1fr;
    }
}

@media print {
    .portal-sidebar,
    .portal-topbar,
    .no-print {
        display: none !important;
    }

    .portal-shell,
    .portal-main {
        display: block;
        padding: 0;
        margin: 0;
        background: #fff;
    }

    .portal-card,
    .result-sheet {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
