:root {
    --portal-ink: #1f2937;
    --portal-muted: #667085;
    --portal-line: #d7dee8;
    --portal-bg: #f5f7fb;
    --portal-primary: #1d4f91;
    --portal-primary-strong: #173f74;
    --portal-accent: #0f8b8d;
    --portal-success: #2f855a;
    --portal-warning: #b7791f;
    --portal-sidebar: #111827;
    --portal-sidebar-soft: #1f2937;
    --portal-sidebar-width: 286px;
    --portal-topbar-height: 72px;
}

* {
    letter-spacing: 0;
}

body {
    background:
        linear-gradient(180deg, rgba(29, 79, 145, 0.05), transparent 280px),
        var(--portal-bg);
    color: var(--portal-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:not(.login-body) {
    min-height: 100vh;
    padding-top: var(--portal-topbar-height);
    padding-left: var(--portal-sidebar-width);
}

.portal-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--portal-sidebar-width);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--portal-topbar-height);
    gap: 1rem;
    border-bottom: 1px solid rgba(215, 222, 232, 0.9);
    background: rgba(255, 255, 255, 0.94);
    padding: 0.75rem clamp(1rem, 2vw, 1.5rem);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.portal-topbar-left,
.portal-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.portal-topbar-brand {
    display: inline-flex;
    flex-direction: column;
    min-width: 0;
    color: var(--portal-ink);
    line-height: 1.05;
    text-decoration: none;
}

.portal-topbar-brand span {
    font-size: 1.15rem;
    font-weight: 850;
}

.portal-topbar-brand small {
    margin-top: 0.18rem;
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.portal-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #fff;
    color: var(--portal-ink);
    font-size: 1.35rem;
}

.portal-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    flex-direction: column;
    width: var(--portal-sidebar-width);
    background:
        linear-gradient(180deg, rgba(15, 139, 141, 0.16), transparent 34%),
        var(--portal-sidebar);
    color: #fff;
    padding: 1rem;
    box-shadow: 14px 0 36px rgba(15, 23, 42, 0.2);
}

.portal-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    padding: 0.45rem;
}

.portal-sidebar .portal-brand-text,
.portal-mobile-sidebar .portal-brand-text {
    color: #fff;
}

.portal-sidebar .portal-brand-subtitle,
.portal-mobile-sidebar .portal-brand-subtitle {
    color: rgba(255, 255, 255, 0.66);
}

.portal-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    margin: 1rem 0;
    padding: 0.8rem;
}

.portal-user-avatar {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #dbeafe;
    font-size: 1.25rem;
}

.portal-sidebar-user span:last-child {
    min-width: 0;
}

.portal-sidebar-user strong,
.portal-sidebar-user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-sidebar-user strong {
    font-size: 0.95rem;
    font-weight: 800;
}

.portal-sidebar-user small {
    margin-top: 0.1rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.76rem;
    font-weight: 700;
}

.portal-sidebar-nav {
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.1rem;
}

.portal-sidebar-label {
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.4rem 0.6rem;
}

.portal-sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 750;
    text-decoration: none;
    padding: 0.62rem 0.7rem;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.portal-sidebar-link:hover,
.portal-sidebar-link:focus {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(2px);
}

.portal-sidebar-link.active {
    border-color: rgba(20, 184, 166, 0.34);
    background: linear-gradient(135deg, rgba(15, 139, 141, 0.36), rgba(29, 79, 145, 0.34));
    color: #fff;
    box-shadow: inset 3px 0 0 #22d3ee;
}

.portal-sidebar-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.portal-sidebar-trail {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.8rem;
}

.portal-mobile-sidebar {
    width: min(88vw, var(--portal-sidebar-width));
    background: var(--portal-sidebar);
    color: #fff;
}

.portal-mobile-sidebar .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-mobile-sidebar .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.8;
}

body:not(.login-body) main {
    min-height: calc(100vh - var(--portal-topbar-height) - 92px);
}

.portal-navbar {
    position: relative;
    padding: 0.75rem 0;
    background: #fff;
    border-bottom: 1px solid var(--portal-line);
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08);
}

.portal-navbar::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, var(--portal-accent), var(--portal-primary));
    pointer-events: none;
    content: "";
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    padding: 0.35rem 0;
    margin-right: clamp(1rem, 3vw, 2rem);
}

.portal-brand-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-accent));
    color: #fff;
    box-shadow: 0 8px 18px rgba(29, 79, 145, 0.22);
}

.portal-brand-text {
    display: flex;
    flex-direction: column;
    color: var(--portal-ink);
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-brand-title {
    font-size: 1rem;
    font-weight: 800;
}

.portal-brand-subtitle {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--portal-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-gov-badge {
    display: inline-block;
    background: rgba(245,158,11,0.12);
    color: var(--portal-primary);
    font-weight: 800;
    font-size: 0.68rem;
    padding: 0.18rem 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    letter-spacing: 0.06em;
}

.portal-nav-list {
    align-items: center;
    gap: 0.35rem;
}

.portal-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 700;
    line-height: 1;
    padding: 0.5rem 0.9rem !important;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.92rem;
    color: var(--portal-ink);
}

.portal-navbar .form-control-sm {
    background: #fff;
    border: 1px solid var(--portal-line);
    color: var(--portal-ink);
}

.dropdown-menu-dark {
    background: #fff;
    border: 1px solid var(--portal-line);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.dropdown-menu-dark .dropdown-item {
    color: var(--portal-ink);
}

.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
    background: #eef6f6;
    color: var(--portal-primary);
}

.portal-user-chip.dropdown-toggle::after {
    margin-left: 0.6rem;
    color: var(--portal-muted);
}

.portal-navbar .navbar-nav .nav-link {
    color: var(--portal-ink);
}

.portal-navbar .navbar-nav .nav-link:hover,
.portal-navbar .navbar-nav .nav-link:focus {
    background: #f1f6fb;
    border-color: #e0e8f2;
    color: var(--portal-primary);
}

.portal-navbar .navbar-nav .nav-link.active {
    background: #e9f4f4;
    border-color: #c9e3e4;
    box-shadow: none;
    color: #0f6f70;
}

.portal-navbar .navbar-nav .nav-link.active::after {
    position: absolute;
    right: 0.85rem;
    bottom: 0.25rem;
    left: 0.85rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--portal-accent), #63d6d9);
    content: "";
}

.portal-external-first {
    margin-left: 0.4rem;
    padding-left: 0.6rem;
    border-left: 1px solid var(--portal-line);
}

.portal-nav-link-external {
    background: #f8fafc;
}

.portal-navbar .navbar-nav .portal-nav-link-external:hover,
.portal-navbar .navbar-nav .portal-nav-link-external:focus {
    background: #eef6f6;
    border-color: #c9e3e4;
    color: var(--portal-accent);
}

.external-link-icon {
    font-size: 0.72rem;
    opacity: 0.78;
}

.portal-user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 1rem;
}

.portal-user-chip,
.portal-wallet-chip {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    gap: 0.6rem;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--portal-ink) !important;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.45rem 0.75rem;
}

.portal-wallet-chip {
    background: #ecfdf3;
    border-color: #bbebcc;
    color: #166534 !important;
}

.portal-user-chip span,
.portal-wallet-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-logout-btn {
    min-height: 38px;
    border-radius: 999px;
    font-weight: 700;
    padding-right: 0.9rem;
    padding-left: 0.9rem;
    border-color: var(--portal-primary);
    color: var(--portal-primary);
    background: #fff;
}

.portal-logout-btn:hover,
.portal-logout-btn:focus {
    background: var(--portal-primary);
    color: #fff;
    border-color: var(--portal-primary);
}

.portal-navbar .navbar-toggler {
    border-color: var(--portal-line);
    border-radius: 10px;
    padding: 0.4rem 0.55rem;
}

.portal-navbar .navbar-toggler-icon {
    filter: invert(1);
}

.portal-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(15, 139, 141, 0.16);
}

.portal-footer {
    margin-top: 2rem;
    padding: 1rem 0 1.25rem;
    border-top: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, 0.85);
}

.portal-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    color: var(--portal-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.portal-footer-content i {
    margin: 0 0.25rem;
}

.footer-version {
    color: var(--portal-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    body:not(.login-body) {
        padding-left: 0;
        padding-top: 68px;
    }

    .portal-topbar {
        left: 0;
        min-height: 68px;
        padding: 0.65rem 0.8rem;
    }

    .portal-topbar-brand span {
        font-size: 1rem;
    }

    .portal-topbar-brand small {
        font-size: 0.72rem;
    }

    .portal-navbar {
        padding: 0.7rem 0;
    }

    .portal-nav-list {
        margin-top: 0.7rem;
        align-items: stretch;
        gap: 0.4rem;
    }

    .portal-nav-link {
        justify-content: center;
        border-radius: 10px;
    }

    .portal-external-first {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }

    .portal-user-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        padding-left: 0;
        margin-top: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .portal-topbar {
        gap: 0.5rem;
    }

    .portal-topbar-left,
    .portal-topbar-actions {
        gap: 0.45rem;
    }

    .portal-wallet-chip {
        max-width: 132px;
        padding: 0.42rem 0.55rem;
        font-size: 0.82rem;
    }

    .portal-logout-btn {
        width: 42px;
        min-height: 42px;
        border-radius: 8px;
        padding-right: 0;
        padding-left: 0;
    }

    .portal-topbar-brand small {
        display: none;
    }

    body:not(.login-body) main {
        padding-right: 0.75rem !important;
        padding-left: 0.75rem !important;
    }
}

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #f8fafc, #edf3f9);
    color: var(--portal-ink);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 3vw, 2.25rem);
}

.login-frame {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(380px, 440px);
    width: min(100%, 1040px);
    min-height: min(650px, calc(100vh - 3rem));
    background: #fff;
    border: 1px solid #d9e2ee;
    border-radius: 8px;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.login-frame::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2;
    height: 4px;
    background: linear-gradient(90deg, #0b3670 0 42%, #f59e0b 42% 58%, #2f855a 58% 100%);
}

.login-identity {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    background: #0a2b57;
    color: #fff;
    padding: clamp(2rem, 5vw, 3.75rem);
}

.login-identity::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.login-identity > * {
    position: relative;
    z-index: 1;
}

.login-emblem {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: #fff;
    color: #0a2b57;
    font-size: 1.85rem;
    box-shadow: inset 0 -4px 0 #f59e0b;
}

.login-kicker {
    width: fit-content;
    margin: 1.45rem 0 0.7rem;
    border: 1px solid rgba(245, 158, 11, 0.38);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.1);
    color: #fde68a;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
    padding: 0.34rem 0.72rem;
}

.login-identity h1 {
    max-width: 560px;
    margin: 0;
    font-size: clamp(2rem, 3.3vw, 3rem);
    line-height: 1.04;
    font-weight: 850;
}

.login-lead {
    max-width: 500px;
    margin: 0.9rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.62;
}

.login-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    max-width: 560px;
    margin-top: 1.85rem;
}

.login-trust-grid div {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.78rem;
}

.login-trust-grid i {
    display: block;
    margin-bottom: 0.42rem;
    color: #fbbf24;
    font-size: 1.12rem;
}

.login-trust-grid span {
    display: block;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    font-weight: 800;
}

.login-secure-note {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    max-width: 100%;
    margin-top: 1.8rem;
    border-left: 3px solid #f59e0b;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.72rem 0.85rem;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(180deg, #fff, #fbfdff);
    padding: clamp(1.35rem, 4vw, 2.75rem);
}

.login-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.login-card-head h2 {
    margin: 0;
    color: #102a56;
    font-size: clamp(1.65rem, 3vw, 2rem);
    font-weight: 850;
}

.login-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    border: 1px solid rgba(47, 133, 90, 0.22);
    border-radius: 999px;
    background: rgba(47, 133, 90, 0.08);
    color: var(--portal-success);
    font-size: 0.76rem;
    font-weight: 800;
    padding: 0.32rem 0.62rem;
}

.login-status i {
    font-size: 0.48rem;
}

.login-panel .alert {
    border-radius: 8px;
    font-weight: 650;
    padding: 0.82rem 0.9rem;
}

.login-panel .form-label {
    color: #243b5a;
    font-size: 0.86rem;
    font-weight: 800;
}

.login-panel .input-group {
    border: 1px solid #d3deeb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-panel .input-group:focus-within {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 0.16rem rgba(29, 79, 145, 0.11);
}

.login-panel .input-group-text,
.login-panel .form-control,
.login-panel .btn-outline-secondary {
    border: 0;
}

.login-panel .input-group-text {
    background: #f7f9fc;
    color: var(--portal-primary);
    padding-right: 0.7rem;
    padding-left: 0.9rem;
}

.login-panel .form-control {
    min-height: 50px;
    color: var(--portal-ink);
    font-weight: 650;
    box-shadow: none;
}

.login-panel .form-control:focus {
    box-shadow: none;
}

.login-panel .btn-outline-secondary {
    color: #667085;
    background: #fff;
}

.login-panel .form-check-input {
    border-color: #b8c3d1;
}

.login-panel .form-check-input:checked {
    border-color: var(--portal-primary);
    background-color: var(--portal-primary);
}

.login-helper {
    color: var(--portal-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.login-submit {
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    background: #0b3670;
    font-weight: 850;
    box-shadow: 0 14px 26px rgba(11, 54, 112, 0.22);
}

.login-submit:hover,
.login-submit:focus {
    background: #082653;
    box-shadow: 0 16px 30px rgba(11, 54, 112, 0.26);
}

.login-footer-note {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    color: var(--portal-muted);
    font-size: 0.8rem;
    font-weight: 750;
}

.login-footer-note span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

@media (max-width: 991.98px) {
    .login-body {
        background: #eef3f8;
    }

    .login-frame {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-identity {
        min-height: auto;
        padding: 1.55rem;
    }

    .login-identity h1 {
        font-size: clamp(1.75rem, 6vw, 2.45rem);
    }

    .login-lead {
        max-width: 100%;
        margin-top: 0.65rem;
    }

    .login-trust-grid {
        margin-top: 1.15rem;
    }

    .login-secure-note {
        margin-top: 1.15rem;
    }
}

@media (max-width: 575.98px) {
    .login-shell {
        align-items: start;
        padding: 0.75rem;
    }

    .login-frame {
        width: 100%;
        border-radius: 8px;
    }

    .login-identity,
    .login-panel {
        padding: 1.1rem;
    }

    .login-emblem {
        width: 54px;
        height: 54px;
        font-size: 1.55rem;
    }

    .login-kicker {
        margin-top: 1rem;
        font-size: 0.7rem;
    }

    .login-trust-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .login-trust-grid div {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.68rem;
    }

    .login-trust-grid i {
        margin-bottom: 0;
    }

    .login-card-head {
        align-items: center;
        margin-bottom: 1.1rem;
    }

    .login-card-head .brand-mark {
        min-width: 0;
    }

    .login-card-head h2 {
        font-size: 1.38rem;
    }

    .login-status {
        display: none;
    }

    .login-secure-note {
        align-items: flex-start;
        width: 100%;
    }

    .login-footer-note {
        justify-content: flex-start;
    }
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-icon,
.stat-icon,
.category-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(29, 79, 145, 0.1);
    color: var(--portal-primary);
    font-size: 1.35rem;
}

.brand-mark h1,
.page-heading h1 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 700;
}

.brand-mark p,
.page-heading p {
    color: var(--portal-muted);
    margin: 0;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--portal-accent) !important;
}

.stats-grid,
.category-grid {
    display: grid;
    gap: 1rem;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.category-card,
.search-panel,
.results-shell,
.details-page,
.detail-section {
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    min-width: 0;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

a.stat-card:hover,
a.stat-card:focus,
.category-card:hover {
    border-color: #bfd4ec;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.09);
    transform: translateY(-1px);
}

.stat-card p {
    margin: 0 0 0.2rem;
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.stat-card strong {
    font-size: 1.65rem;
    line-height: 1;
}

.stat-icon.vidhwa,
.category-icon.vidhwa {
    background: rgba(190, 76, 91, 0.12);
    color: #a33f4b;
}

.stat-icon.viklang,
.category-icon.viklang {
    background: rgba(15, 139, 141, 0.12);
    color: var(--portal-accent);
}

.stat-icon.total {
    background: rgba(47, 133, 90, 0.12);
    color: var(--portal-success);
}

.stat-icon.wallet {
    background: rgba(245, 158, 11, 0.14);
    color: #a16207;
}

.stat-icon.service {
    background: rgba(15, 139, 141, 0.12);
    color: var(--portal-accent);
}

.stat-icon.lekhpal,
.category-icon.lekhpal {
    background: rgba(18, 63, 122, 0.12);
    color: var(--portal-primary);
}

.wallet-card {
    border-color: #f6d58b;
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    border: 1px solid #c9d7e8;
    border-left: 4px solid var(--portal-accent);
    border-radius: 8px;
    background: #0b2b55;
    color: #fff;
    padding: 1.2rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.dashboard-hero h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    font-weight: 850;
}

.dashboard-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 0.35rem 0 0;
    color: #dce8f8;
}

.dashboard-hero .eyebrow {
    color: #fbbf24 !important;
}

.dashboard-hero .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.48);
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 1rem;
}

.dashboard-action {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.75rem;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #f8fbff;
    color: var(--portal-ink);
    padding: 0.85rem;
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-action:hover,
.dashboard-action:focus {
    border-color: #bfd4ec;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    color: var(--portal-primary-strong);
    transform: translateY(-1px);
}

.dashboard-action > i {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--portal-primary);
    font-size: 1.1rem;
}

.dashboard-action span {
    display: grid;
    min-width: 0;
    gap: 0.1rem;
}

.dashboard-action strong,
.dashboard-action small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-action strong {
    font-weight: 850;
}

.dashboard-action small {
    color: var(--portal-muted);
    font-weight: 650;
}

.dashboard-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    border-top: 1px solid var(--portal-line);
    padding-top: 0.85rem;
}

.dashboard-mini-stat {
    display: grid;
    min-width: 0;
    gap: 0.22rem;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #fff;
    color: var(--portal-ink);
    padding: 0.72rem 0.75rem;
    text-decoration: none;
}

.dashboard-mini-stat:hover,
.dashboard-mini-stat:focus {
    border-color: #bfd4ec;
    color: var(--portal-primary-strong);
}

.dashboard-mini-stat span {
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-mini-stat strong {
    color: var(--portal-primary-strong);
    font-size: 1.28rem;
    font-weight: 900;
    line-height: 1;
}

.admin-summary-stats {
    border-top: 0;
    padding-top: 0;
}

.dashboard-activity-list {
    display: grid;
    gap: 0.65rem;
}

.dashboard-activity-item,
.dashboard-activity-empty {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.7rem;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 0.72rem;
}

.dashboard-activity-item {
    color: var(--portal-ink);
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-activity-item:hover,
.dashboard-activity-item:focus {
    border-color: #bfd4ec;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    color: var(--portal-primary-strong);
    transform: translateY(-1px);
}

.dashboard-activity-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 8px;
    background: #ecfdf3;
    color: var(--portal-success);
}

.dashboard-activity-copy {
    display: grid;
    min-width: 0;
    gap: 0.08rem;
}

.dashboard-activity-copy strong,
.dashboard-activity-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-activity-copy strong {
    font-size: 0.88rem;
    font-weight: 850;
}

.dashboard-activity-copy small,
.dashboard-activity-meta small,
.dashboard-activity-empty {
    color: var(--portal-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.dashboard-activity-meta {
    display: grid;
    justify-items: end;
    gap: 0.25rem;
    margin-left: auto;
    white-space: nowrap;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.wallet-amount {
    display: inline-flex;
    align-items: center;
    min-width: 104px;
    border-radius: 8px;
    background: #ecfdf3;
    color: #166534;
    font-weight: 800;
    padding: 0.35rem 0.55rem;
}

.wallet-note,
.service-price-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #bbebcc;
    border-radius: 8px;
    background: #ecfdf3;
    color: #166534;
    font-weight: 800;
    padding: 0.55rem 0.75rem;
}

.service-rate-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.service-rate-card {
    display: flex;
    gap: 1rem;
    min-width: 0;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

.service-rate-body {
    min-width: 0;
    flex: 1;
}

.service-rate-card h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.service-rate-card p {
    margin: 0.15rem 0 0;
    color: var(--portal-muted);
    overflow-wrap: anywhere;
}

.aadhaar-result {
    min-height: 420px;
}

.aadhaar-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 1rem;
}

.aadhaar-status.success {
    background: #ecfdf3;
    color: #166534;
}

.aadhaar-status.error {
    background: #fff7ed;
    color: #9a3412;
}

.aadhaar-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    padding: 1rem;
    background: #fbfcfe;
}

.aadhaar-profile img,
.aadhaar-photo-placeholder {
    width: 88px;
    height: 108px;
    flex: 0 0 88px;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    object-fit: cover;
    background: #eef2f7;
}

.aadhaar-photo-placeholder {
    display: inline-grid;
    place-items: center;
    color: var(--portal-muted);
    font-size: 2rem;
}

.aadhaar-profile h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.aadhaar-profile p {
    margin: 0.25rem 0 0;
    color: var(--portal-muted);
    font-weight: 700;
}

.otp-transaction-box {
    display: grid;
    gap: 0.28rem;
    border: 1px solid #dbe7f6;
    border-left: 4px solid var(--portal-accent);
    border-radius: 8px;
    background: #f8fbff;
    padding: 0.85rem 0.95rem;
}

.otp-transaction-box span {
    color: var(--portal-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.otp-transaction-box strong {
    color: var(--portal-primary-strong);
    font-size: 0.9rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.otp-transaction-box small {
    color: var(--portal-muted);
    font-weight: 700;
}

.manual-create-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #dbe7f6;
    border-radius: 8px;
    background: #f8fbff;
}

.manual-create-options .form-check {
    margin: 0;
}

.manual-create-options .form-check-label {
    color: var(--portal-primary-strong);
    font-weight: 800;
}

.detail-grid-wide {
    grid-column: 1 / -1;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem;
}

.category-card h2 {
    font-size: 1rem;
    margin: 0 0 0.2rem;
}

.category-card p {
    color: var(--portal-muted);
    margin: 0;
}

.search-panel,
.results-shell {
    padding: clamp(1rem, 2vw, 1.25rem);
}

.icon-btn {
    width: 42px;
    flex: 0 0 42px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.empty-state {
    min-height: 220px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.5rem;
    color: var(--portal-muted);
    border: 1px dashed var(--portal-line);
    border-radius: 8px;
    background: #fbfcfe;
}

.empty-state i {
    font-size: 2rem;
}

.empty-state p {
    margin: 0;
}

.result-table {
    min-width: 1120px;
}

.result-table th {
    font-size: 0.78rem;
    color: var(--portal-muted);
    text-transform: uppercase;
    background: #f8fafc;
}

.table {
    --bs-table-hover-bg: #f8fbff;
}

.table > :not(caption) > * > * {
    padding: 0.8rem 0.75rem;
    vertical-align: middle;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 42px;
    border-color: #cfd8e5;
    border-radius: 8px;
}

.input-group > .form-control,
.input-group > .form-select,
.input-group > .input-group-text {
    border-radius: 0;
}

.input-group > :first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

.input-group > :last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 139, 141, 0.58);
    box-shadow: 0 0 0 0.2rem rgba(15, 139, 141, 0.14);
}

.btn {
    border-radius: 8px;
    font-weight: 750;
}

.result-address {
    max-width: 260px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.registration-link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--portal-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.registration-link:hover,
.registration-link:focus {
    color: var(--portal-primary-strong);
}

.mobile-results {
    display: grid;
    gap: 0.9rem;
}

.result-card {
    background: #fff;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    padding: 1rem;
}

.result-card h3 {
    font-size: 1rem;
    margin: 0;
}

.result-card p {
    margin: 0;
    color: var(--portal-muted);
}

.result-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.result-card dt,
.detail-grid span {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.result-card dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.modal-detail-section + .modal-detail-section {
    margin-top: 1.25rem;
}

.modal-detail-section h6,
.detail-section h2 {
    color: var(--portal-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.detail-grid > div {
    background: #f8fafc;
    border: 1px solid #e5eaf1;
    border-radius: 8px;
    padding: 0.8rem;
    min-width: 0;
}

.detail-grid strong {
    display: block;
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.details-page {
    padding: 1rem;
}

.document-modal-content {
    min-height: 86vh;
}

.document-frame {
    display: block;
    width: 100%;
    height: min(76vh, 760px);
    border: 0;
    background: #f8fafc;
}

.detail-section {
    padding: 1rem;
}

.detail-section + .detail-section {
    margin-top: 1rem;
}

.btn-primary {
    --bs-btn-bg: var(--portal-primary);
    --bs-btn-border-color: var(--portal-primary);
    --bs-btn-hover-bg: var(--portal-primary-strong);
    --bs-btn-hover-border-color: var(--portal-primary-strong);
}

.btn-outline-primary {
    --bs-btn-color: var(--portal-primary);
    --bs-btn-border-color: var(--portal-primary);
    --bs-btn-hover-bg: var(--portal-primary);
    --bs-btn-hover-border-color: var(--portal-primary);
}

@media (max-width: 1199.98px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-mini-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid,
    .service-rate-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .portal-brand {
        max-width: calc(100% - 64px);
        margin-right: 0;
    }

    .portal-brand-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .portal-nav-list {
        gap: 0.25rem;
        padding-top: 0.75rem;
    }

    .portal-nav-link {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }

    .portal-external-first {
        margin-top: 0.35rem;
        margin-left: 0;
        padding-top: 0.45rem;
        padding-left: 0;
        border-top: 1px solid var(--portal-line);
        border-left: 0;
    }

    .portal-user-actions {
        align-items: stretch;
        gap: 0.55rem;
        padding-top: 0.75rem;
        padding-left: 0;
    }

    .portal-user-chip {
        justify-content: center;
        max-width: none;
    }

    .stats-grid,
    .management-grid,
    .dashboard-main-grid,
    .detail-grid,
    .result-card dl {
        grid-template-columns: 1fr;
    }

    .service-rate-card,
    .aadhaar-profile {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading {
        align-items: stretch;
    }

    .page-heading .btn {
        width: 100%;
    }

    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 1rem;
    }

    .dashboard-hero .btn {
        width: 100%;
    }

    .dashboard-action-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-mini-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-activity-item {
        align-items: flex-start;
    }

    .dashboard-activity-meta {
        align-items: flex-end;
        align-self: stretch;
    }

    .profile-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-card .btn {
        width: 100%;
    }
}

/* Premium app shell */
:root {
    --portal-ink: #172033;
    --portal-muted: #697386;
    --portal-line: #e2e8f0;
    --portal-bg: #f3f6fb;
    --portal-primary: #174ea6;
    --portal-primary-strong: #0d3475;
    --portal-accent: #0891b2;
    --portal-success: #138a58;
    --portal-sidebar: #0b1220;
    --portal-sidebar-soft: #111c31;
    --portal-sidebar-width: 292px;
    --portal-topbar-height: 76px;
}

body {
    background:
        linear-gradient(180deg, rgba(23, 78, 166, 0.08) 0, rgba(243, 246, 251, 0) 310px),
        radial-gradient(circle at top right, rgba(8, 145, 178, 0.08), transparent 320px),
        var(--portal-bg);
}

.portal-topbar {
    min-height: var(--portal-topbar-height);
    border-bottom: 1px solid rgba(226, 232, 240, 0.78);
    background: rgba(255, 255, 255, 0.88);
    padding: 0.82rem clamp(1rem, 2.2vw, 1.7rem);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
}

.portal-topbar::before {
    position: absolute;
    right: 1.5rem;
    bottom: -1px;
    left: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(8, 145, 178, 0.34), transparent);
    content: "";
}

.portal-topbar-brand span {
    color: #101828;
    font-size: 1.24rem;
    font-weight: 900;
}

.portal-topbar-brand small {
    color: #7a8699;
    font-size: 0.76rem;
    text-transform: uppercase;
}

.portal-topbar-actions {
    gap: 0.65rem;
    margin-left: auto;
}

.portal-wallet-chip {
    max-width: none;
    min-height: 44px;
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: 8px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
    color: #065f46 !important;
    font-size: 0.94rem;
    font-weight: 900;
    padding: 0.55rem 0.82rem;
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.12);
}

.portal-wallet-chip i {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #10b981;
    color: #fff;
}

.portal-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    border: 1px solid rgba(23, 78, 166, 0.18);
    border-radius: 8px;
    background: #101828;
    color: #fff;
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.16);
}

.portal-logout-btn:hover,
.portal-logout-btn:focus {
    border-color: #101828;
    background: #fff;
    color: #101828;
}

.portal-menu-toggle {
    border-color: rgba(23, 78, 166, 0.14);
    background: #101828;
    color: #fff;
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.14);
}

.portal-sidebar,
.portal-mobile-sidebar {
    background:
        linear-gradient(180deg, rgba(23, 78, 166, 0.28) 0, rgba(8, 145, 178, 0.08) 44%, transparent 100%),
        #0b1220;
}

.portal-sidebar {
    padding: 1.15rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 18px 0 44px rgba(15, 23, 42, 0.28);
}

.portal-sidebar-brand {
    min-height: 62px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.055);
    padding: 0.68rem;
}

.portal-brand-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: linear-gradient(135deg, #22d3ee, #174ea6);
    box-shadow: 0 14px 28px rgba(34, 211, 238, 0.18);
}

.portal-brand-title {
    font-size: 1.05rem;
    font-weight: 900;
}

.portal-brand-subtitle {
    font-size: 0.68rem;
}

.portal-sidebar-user {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.portal-user-avatar {
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
    color: #fff;
}

.portal-sidebar-label {
    color: rgba(226, 232, 240, 0.56);
    padding-top: 0.65rem;
}

.portal-sidebar-link {
    min-height: 48px;
    color: rgba(226, 232, 240, 0.78);
    font-weight: 800;
    padding: 0.66rem 0.72rem;
}

.portal-sidebar-link:hover,
.portal-sidebar-link:focus {
    border-color: rgba(34, 211, 238, 0.18);
    background: rgba(255, 255, 255, 0.075);
    color: #fff;
}

.portal-sidebar-link.active {
    border-color: rgba(34, 211, 238, 0.34);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(29, 78, 216, 0.3));
    box-shadow: inset 3px 0 0 #22d3ee, 0 12px 26px rgba(8, 145, 178, 0.14);
}

.portal-sidebar-icon {
    background: rgba(255, 255, 255, 0.09);
    color: #c7f9ff;
}

.page-heading {
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    padding: clamp(0.9rem, 1.8vw, 1.2rem);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.page-heading h1 {
    color: #101828;
    font-weight: 900;
}

.eyebrow {
    color: #087f9b !important;
}

.stat-card,
.category-card,
.search-panel,
.results-shell,
.details-page,
.detail-section,
.service-rate-card,
.result-card {
    border-color: rgba(226, 232, 240, 0.92);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.065);
}

.stat-card,
.category-card {
    min-height: 112px;
}

.stat-card strong {
    color: #101828;
    font-weight: 900;
}

.stat-icon,
.category-icon {
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.search-panel,
.results-shell {
    border-top: 3px solid rgba(8, 145, 178, 0.18);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(23, 78, 166, 0.045);
    border-color: rgba(226, 232, 240, 0.9);
}

.table thead th,
.result-table th {
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    background: #f8fafc;
    color: #475467;
    font-weight: 900;
}

.form-control,
.form-select,
.input-group-text {
    border-color: #d8e1ee;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.03);
}

.btn-primary {
    --bs-btn-bg: #174ea6;
    --bs-btn-border-color: #174ea6;
    --bs-btn-hover-bg: #0d3475;
    --bs-btn-hover-border-color: #0d3475;
    box-shadow: 0 10px 22px rgba(23, 78, 166, 0.18);
}

.btn-outline-primary,
.btn-outline-secondary {
    background: #fff;
}

.empty-state {
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.portal-footer {
    margin-top: 1.5rem;
    background: transparent;
}

@media (max-width: 991.98px) {
    body:not(.login-body) {
        padding-top: 70px;
    }

    .portal-topbar {
        min-height: 70px;
        border-radius: 0;
    }

    .portal-mobile-sidebar {
        box-shadow: 18px 0 44px rgba(15, 23, 42, 0.32);
    }
}

@media (max-width: 575.98px) {
    .portal-topbar-brand span {
        max-width: 136px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .portal-wallet-chip {
        min-height: 40px;
        max-width: 122px;
        padding: 0.42rem 0.52rem;
    }

    .portal-wallet-chip i {
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
    }

    .page-heading {
        padding: 0.9rem;
    }
}

/* Finder Portal UI */
:root {
    --portal-ink: #1c2434;
    --portal-muted: #667085;
    --portal-line: #d8e0eb;
    --portal-bg: #f4f7fb;
    --portal-primary: #123f7a;
    --portal-primary-strong: #0b2b55;
    --portal-accent: #f59e0b;
    --portal-success: #168a54;
    --portal-danger: #c2413a;
    --portal-pending: #d97706;
    --portal-sidebar: #0d2f5f;
    --portal-sidebar-soft: #123f7a;
    --portal-sidebar-width: 256px;
    --portal-topbar-height: 68px;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background: var(--portal-bg);
    color: var(--portal-ink);
    font-size: 0.95rem;
}

body:not(.login-body) {
    min-height: 100vh;
    padding-top: var(--portal-topbar-height);
    padding-left: var(--portal-sidebar-width);
}

.portal-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1045;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--portal-topbar-height);
    gap: 1rem;
    border-bottom: 1px solid var(--portal-line);
    background: #fff;
    padding: 0.55rem 1rem;
    box-shadow: 0 2px 14px rgba(16, 24, 40, 0.08);
}

.portal-topbar::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--portal-accent);
    content: "";
}

.portal-topbar-left,
.portal-topbar-actions {
    display: flex;
    align-items: center;
    min-width: 0;
}

.portal-topbar-left {
    gap: 0.75rem;
}

.portal-topbar-actions {
    gap: 0.5rem;
    margin-left: auto;
}

.portal-topbar-brand {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    min-width: 0;
    gap: 0.72rem;
    color: var(--portal-primary-strong);
    text-decoration: none;
}

.gov-emblem {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid #c7d3e3;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--portal-primary);
    font-size: 1.25rem;
}

.portal-title-block,
.portal-mobile-title span {
    display: inline-flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.05;
}

.portal-title-block strong,
.portal-mobile-title strong {
    color: var(--portal-primary-strong);
    font-size: 1.02rem;
    font-weight: 850;
}

.portal-title-block small,
.portal-mobile-title small {
    margin-top: 0.18rem;
    color: var(--portal-muted);
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
}

.portal-menu-toggle,
.portal-icon-btn,
.portal-profile-btn,
.portal-logout-btn {
    min-height: 42px;
    border-radius: 8px;
}

.portal-menu-toggle,
.portal-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    padding: 0;
    border: 1px solid var(--portal-line);
    background: #fff;
    color: var(--portal-primary);
    font-size: 1.12rem;
}

.portal-icon-btn {
    position: relative;
}

.portal-icon-btn:hover,
.portal-icon-btn:focus,
.portal-menu-toggle:hover,
.portal-menu-toggle:focus {
    border-color: #b7c6dc;
    background: #f3f6fb;
    color: var(--portal-primary-strong);
}

.portal-notification-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--portal-danger);
}

.portal-wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 42px;
    max-width: none;
    border: 1px solid #b9e5cd;
    border-radius: 8px;
    background: #eefbf4;
    color: #12683f !important;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1;
    padding: 0.45rem 0.7rem;
    box-shadow: none;
}

.portal-wallet-chip i {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 8px;
    background: var(--portal-success);
    color: #fff;
    font-size: 0.95rem;
}

.portal-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid var(--portal-line);
    background: #fff;
    color: var(--portal-ink);
    padding: 0.32rem 0.58rem;
}

.portal-profile-btn:hover,
.portal-profile-btn:focus {
    border-color: #b7c6dc;
    background: #f8fafc;
}

.portal-profile-btn.show,
.portal-profile-btn:active,
.portal-profile-btn:first-child:active {
    border-color: #b7c6dc;
    background: #f8fafc;
    color: var(--portal-ink);
}

.portal-profile-avatar {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 8px;
    background: var(--portal-primary);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 850;
}

.portal-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-photo-thumb {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    width: 46px;
    height: 56px;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--portal-primary-strong);
    font-weight: 900;
}

.user-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.password-panel {
    max-width: 620px;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-photo-large {
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    width: 96px;
    height: 118px;
    flex: 0 0 96px;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--portal-primary-strong);
    font-size: 2rem;
    font-weight: 900;
}

.profile-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-summary h2 {
    margin: 0;
    color: var(--portal-primary-strong);
    font-size: 1.28rem;
    font-weight: 900;
}

.profile-summary p:last-child {
    margin: 0.25rem 0 0;
    color: var(--portal-muted);
    font-weight: 800;
}

.verified-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    border: 1px solid #bbebcc;
    border-radius: 999px;
    background: #ecfdf3;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 900;
    margin-top: 0.6rem;
    padding: 0.28rem 0.58rem;
}

.wallet-low-alert {
    border-color: #fed7aa;
    border-left: 4px solid var(--portal-pending);
    color: #9a3412;
    font-weight: 800;
}

.locked-policy-alert {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--portal-danger);
    border-radius: 8px;
    background: #fff1f2;
    color: #991b1b;
    font-weight: 850;
    padding: 0.76rem 0.85rem;
}

.locked-policy-alert i {
    color: var(--portal-danger);
}

.password-strength {
    display: grid;
    gap: 0.35rem;
}

.password-strength::before {
    display: block;
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #fee2e2;
    content: "";
}

.password-strength span {
    display: block;
    width: 8%;
    height: 7px;
    border-radius: 999px;
    background: var(--portal-danger);
    margin-top: -7px;
    transition: width 0.16s ease, background-color 0.16s ease;
}

.password-strength[data-score="3"] span,
.password-strength[data-score="4"] span {
    background: var(--portal-pending);
}

.password-strength[data-score="5"] span {
    background: var(--portal-success);
}

.password-strength small {
    color: var(--portal-muted);
    font-weight: 700;
}

.session-warning {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: none;
    max-width: 340px;
    border: 1px solid #fed7aa;
    border-left: 4px solid var(--portal-pending);
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
    font-weight: 800;
    padding: 0.85rem 1rem;
}

.session-warning.show {
    display: block;
}

.portal-profile-copy {
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    line-height: 1.05;
}

.portal-profile-copy strong {
    max-width: 130px;
    overflow: hidden;
    color: #1f2937;
    font-size: 0.85rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-profile-copy small {
    margin-top: 0.12rem;
    color: var(--portal-muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.portal-profile-menu {
    min-width: 230px;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.16);
}

.portal-profile-menu .dropdown-header {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.portal-profile-menu .dropdown-header strong {
    color: var(--portal-ink);
}

.portal-profile-menu .dropdown-header span {
    color: var(--portal-muted);
    font-size: 0.78rem;
}

.portal-profile-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 40px;
    font-weight: 700;
}

.portal-sidebar {
    position: fixed;
    top: var(--portal-topbar-height);
    bottom: 0;
    left: 0;
    z-index: 1035;
    display: flex;
    flex-direction: column;
    width: var(--portal-sidebar-width);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--portal-sidebar);
    color: #fff;
    padding: 0.9rem 0.72rem;
    box-shadow: none;
}

.portal-sidebar-head {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin: 0 0.25rem 0.75rem;
    padding: 0.35rem 0.45rem 0.75rem;
}

.portal-sidebar-head strong,
.portal-sidebar-kicker {
    display: block;
}

.portal-sidebar-head strong {
    color: #fff;
    font-size: 1rem;
    font-weight: 850;
}

.portal-sidebar-kicker,
.portal-sidebar-label {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.7rem;
    font-weight: 850;
    text-transform: uppercase;
}

.portal-sidebar-nav {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.1rem 0.18rem 1rem;
}

.portal-sidebar-label {
    padding: 0.75rem 0.55rem 0.35rem;
}

.portal-sidebar-link,
.portal-sidebar-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    gap: 0.62rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9rem;
    font-weight: 750;
    text-align: left;
    text-decoration: none;
    padding: 0.56rem 0.62rem;
}

.portal-sidebar-link > span:not(.portal-sidebar-icon),
.portal-sidebar-button > span:not(.portal-sidebar-icon) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-sidebar-link:hover,
.portal-sidebar-link:focus,
.portal-sidebar-button:hover,
.portal-sidebar-button:focus {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: none;
}

.portal-sidebar-link.active,
.portal-sidebar-button.active {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(23, 78, 166, 0.58);
    color: #fff;
    box-shadow: inset 4px 0 0 var(--portal-accent), 0 10px 22px rgba(2, 6, 23, 0.18);
}

.portal-sidebar-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: currentColor;
    font-size: 0.95rem;
}

.portal-sidebar-link.active .portal-sidebar-icon,
.portal-sidebar-button.active .portal-sidebar-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.portal-sidebar-trail {
    margin-left: auto;
    color: currentColor;
    font-size: 0.78rem;
    transition: transform 0.16s ease;
}

.portal-sidebar-button:not(.collapsed) .portal-sidebar-trail {
    transform: rotate(180deg);
}

.portal-submenu {
    display: grid;
    gap: 0.12rem;
    margin: 0.22rem 0 0.28rem 2.05rem;
    padding-left: 0.58rem;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.portal-submenu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.46rem 0.55rem;
}

.portal-submenu-link:hover,
.portal-submenu-link:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.portal-submenu-link.active {
    background: rgba(245, 158, 11, 0.18);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--portal-accent);
}

.history-user {
    color: var(--portal-ink);
}

.history-user strong {
    display: block;
    color: var(--portal-ink);
    font-weight: 850;
}

.history-user small {
    display: block;
    margin-top: 0.12rem;
    color: var(--portal-muted);
    font-size: 0.76rem;
}

.portal-mobile-sidebar {
    width: min(88vw, var(--portal-sidebar-width));
    background: var(--portal-sidebar);
    color: #fff;
}

.portal-mobile-sidebar .offcanvas-header {
    min-height: var(--portal-topbar-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-mobile-title {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.7rem;
}

.portal-mobile-title .gov-emblem {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.portal-mobile-title strong,
.portal-mobile-title small {
    color: #fff;
}

body:not(.login-body) main {
    min-height: calc(100vh - var(--portal-topbar-height));
}

.page-heading {
    border: 1px solid var(--portal-line);
    border-left: 4px solid var(--portal-accent);
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
}

.page-heading h1 {
    color: var(--portal-primary-strong);
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    font-weight: 850;
}

.eyebrow {
    color: var(--portal-primary) !important;
    font-size: 0.72rem;
    letter-spacing: 0;
}

.stat-card,
.category-card,
.search-panel,
.results-shell,
.details-page,
.detail-section,
.service-rate-card,
.result-card {
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
}

.search-panel,
.results-shell {
    border-top: 3px solid #dbe7f6;
}

.stat-card,
.category-card {
    min-height: 102px;
}

.stat-card strong {
    color: var(--portal-primary-strong);
    font-weight: 850;
}

.stat-icon,
.category-icon,
.brand-icon {
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--portal-primary);
}

.stat-icon.wallet {
    background: #fff7ed;
    color: var(--portal-pending);
}

.stat-icon.total,
.stat-icon.service {
    background: #ecfdf3;
    color: var(--portal-success);
}

.table {
    --bs-table-bg: #fff;
    --bs-table-hover-bg: #f8fbff;
    border-color: var(--portal-line);
}

.table > :not(caption) > * > * {
    padding: 0.78rem 0.72rem;
}

.table thead th,
.result-table th {
    border-bottom: 1px solid var(--portal-line);
    background: #f6f8fb;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 850;
}

.form-label {
    color: #344054;
    font-weight: 750;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 42px;
    border-color: #cfd8e5;
    border-radius: 8px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 0.18rem rgba(18, 63, 122, 0.12);
}

.btn {
    border-radius: 8px;
    font-weight: 750;
}

.btn-primary {
    --bs-btn-bg: var(--portal-primary);
    --bs-btn-border-color: var(--portal-primary);
    --bs-btn-hover-bg: var(--portal-primary-strong);
    --bs-btn-hover-border-color: var(--portal-primary-strong);
    box-shadow: none;
}

.btn-outline-primary {
    --bs-btn-color: var(--portal-primary);
    --bs-btn-border-color: #b7c6dc;
    --bs-btn-hover-bg: var(--portal-primary);
    --bs-btn-hover-border-color: var(--portal-primary);
}

.badge.text-bg-success {
    background-color: var(--portal-success) !important;
}

.badge.text-bg-danger {
    background-color: var(--portal-danger) !important;
}

.badge.text-bg-warning {
    background-color: var(--portal-pending) !important;
}

.alert {
    border-radius: 8px;
}

.modal-content {
    border: 1px solid var(--portal-line);
    border-radius: 8px;
}

.pagination .page-link {
    color: var(--portal-primary);
}

.pagination .active .page-link {
    border-color: var(--portal-primary);
    background: var(--portal-primary);
}

.portal-footer {
    margin-top: 1.5rem;
    border-top: 1px solid var(--portal-line);
    background: transparent;
}

.api-service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.api-service-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
}

.api-service-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.api-service-card h2 {
    color: var(--portal-primary-strong);
    font-size: 1rem;
    font-weight: 850;
    margin: 0;
}

.api-service-card p {
    color: var(--portal-muted);
    font-size: 0.9rem;
    margin: 0.45rem 0 1rem;
}

.api-service-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-top: 1px solid var(--portal-line);
    margin-top: auto;
    padding-top: 0.85rem;
    margin-bottom: 0.85rem;
}

.api-service-meta span {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.api-service-meta strong {
    color: var(--portal-success);
    font-weight: 900;
}

.report-service-list {
    display: grid;
    gap: 0.6rem;
}

.report-service-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 0.72rem 0.8rem;
}

.report-service-list span {
    min-width: 0;
    overflow: hidden;
    color: var(--portal-ink);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-service-list strong {
    color: var(--portal-primary-strong);
    font-weight: 900;
}

.directory-contact-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    margin-left: 0.45rem;
    white-space: nowrap;
}

.directory-search-panel {
    border-top-color: var(--portal-accent);
}

.directory-search-box .form-control,
.directory-search-box .input-group-text {
    min-height: 48px;
}

.directory-table td {
    vertical-align: middle;
}

.directory-sector-badge {
    border: 1px solid #dbe7f6;
    background: #f8fbff;
    color: var(--portal-primary-strong);
    font-weight: 850;
}

.directory-code {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid #dbe7f6;
    border-radius: 8px;
    background: #fff;
    color: var(--portal-ink);
    font-weight: 850;
    padding: 0.22rem 0.48rem;
}

.directory-mobile-cell {
    white-space: nowrap;
}

.directory-mobile-number {
    color: var(--portal-primary-strong);
    font-weight: 850;
}

.report-history {
    display: grid;
    gap: 0.72rem;
}

.report-history-item {
    overflow: hidden;
    border: 1px solid var(--portal-line) !important;
    border-radius: 8px !important;
    background: #fff;
}

.report-history-item .accordion-button {
    gap: 1rem;
    align-items: center;
    background: #fff;
    color: var(--portal-ink);
    box-shadow: none;
    padding: 0.85rem 1rem;
}

.report-history-item .accordion-button:not(.collapsed) {
    border-bottom: 1px solid var(--portal-line);
    background: #f8fbff;
    color: var(--portal-primary-strong);
}

.report-row-title {
    display: grid;
    min-width: 0;
    gap: 0.16rem;
}

.report-row-title strong,
.report-row-title small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-row-title strong {
    color: inherit;
    font-size: 0.93rem;
    font-weight: 850;
}

.report-row-title small {
    color: var(--portal-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.report-row-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    padding-right: 0.4rem;
}

.report-charge {
    min-width: 72px;
    border: 1px solid #dbe7f6;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-align: center;
    padding: 0.24rem 0.5rem;
}

.report-charge.charged {
    border-color: #fecaca;
    background: #fff1f2;
    color: #b42318;
}

.report-history-item .accordion-body {
    padding: 1rem;
}

.money-input {
    min-width: 116px;
}

@media (max-width: 991.98px) {
    body:not(.login-body) {
        padding-left: 0;
        padding-top: var(--portal-topbar-height);
    }

    .portal-topbar {
        min-height: var(--portal-topbar-height);
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .portal-title-block strong {
        max-width: 210px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 1399.98px) {
    .api-service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .api-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    :root {
        --portal-topbar-height: 66px;
    }

    .gov-emblem {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .portal-title-block strong {
        max-width: 124px;
        font-size: 0.92rem;
    }

    .portal-title-block small {
        display: none;
    }

    .portal-topbar-actions {
        gap: 0.35rem;
    }

    .portal-wallet-chip {
        min-height: 38px;
        max-width: 112px;
        padding: 0.36rem 0.46rem;
        font-size: 0.78rem;
    }

    .portal-wallet-chip i {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
    }

    .portal-icon-btn,
    .portal-menu-toggle,
    .portal-profile-btn {
        width: 38px;
        min-height: 38px;
    }

    .portal-profile-btn {
        padding: 0.2rem;
    }

    .portal-profile-avatar {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    body:not(.login-body) main {
        padding-right: 0.75rem !important;
        padding-left: 0.75rem !important;
    }

    .page-heading {
        align-items: stretch;
        padding: 0.9rem;
    }

    .api-service-grid {
        grid-template-columns: 1fr;
    }

    .report-history-item .accordion-button {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-row-badges {
        flex-wrap: wrap;
        margin-left: 0;
        padding-right: 0;
    }
}

/* Premium smart navigation refresh */
:root {
    --portal-sidebar-width: 268px;
    --portal-topbar-height: 70px;
    --nav-navy: #082653;
    --nav-navy-2: #0b3670;
    --nav-rail: #f59e0b;
}

.portal-topbar {
    min-height: var(--portal-topbar-height);
    border-bottom: 1px solid rgba(203, 213, 225, 0.86);
    background: rgba(255, 255, 255, 0.96);
    padding: 0.58rem 1.15rem;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.portal-topbar::before {
    height: 2px;
    background: linear-gradient(90deg, var(--portal-primary-strong), var(--nav-rail), var(--portal-success));
}

.portal-topbar-brand {
    gap: 0.68rem;
}

.gov-emblem {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-color: #d6e0ed;
    background: #f8fbff;
    color: var(--portal-primary-strong);
    box-shadow: inset 0 0 0 4px rgba(23, 78, 166, 0.045);
}

.portal-title-block strong {
    color: #102a56;
    font-size: 1rem;
    letter-spacing: 0;
}

.portal-title-block small {
    color: #64748b;
    font-size: 0.7rem;
    letter-spacing: 0;
}

.portal-topbar-actions {
    gap: 0.48rem;
}

.portal-icon-btn,
.portal-menu-toggle {
    width: 40px;
    min-height: 40px;
    border-color: #d8e2ef;
    background: #fff;
    color: #25466f;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.portal-icon-btn:hover,
.portal-icon-btn:focus,
.portal-menu-toggle:hover,
.portal-menu-toggle:focus {
    border-color: #b8c9df;
    background: #f7faff;
    color: var(--portal-primary-strong);
}

.portal-wallet-chip {
    min-height: 40px;
    border-color: #bde8d0;
    border-radius: 8px;
    background: #f0fbf5;
    color: #075d37 !important;
    padding: 0.42rem 0.68rem;
}

.portal-wallet-chip i {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    border-radius: 7px;
}

.portal-profile-btn {
    min-height: 40px;
    border-color: #d8e2ef;
    border-radius: 8px;
    background: #fff;
    padding: 0.28rem 0.52rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.portal-profile-btn:hover,
.portal-profile-btn:focus,
.portal-profile-btn.show,
.portal-profile-btn:active,
.portal-profile-btn:first-child:active {
    border-color: #b8c9df;
    background: #f7faff;
}

.portal-profile-avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 7px;
    background: #123f7a;
}

.portal-profile-copy strong {
    color: #172033;
}

.portal-profile-menu {
    margin-top: 0.5rem !important;
    border-color: #d9e3ef;
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

.portal-sidebar,
.portal-mobile-sidebar {
    background:
        linear-gradient(180deg, rgba(14, 62, 126, 0.98), rgba(6, 31, 70, 0.98)),
        var(--nav-navy);
}

.portal-sidebar {
    top: var(--portal-topbar-height);
    width: var(--portal-sidebar-width);
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    padding: 0.86rem 0.78rem;
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.10);
}

.portal-sidebar-head {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin: 0 0.25rem 0.62rem;
    padding: 0.25rem 0.45rem 0.55rem;
}

.portal-sidebar-head strong {
    overflow: hidden;
    color: #fff;
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-sidebar-kicker {
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.66rem;
    letter-spacing: 0;
}

.portal-sidebar-nav {
    padding: 0.18rem 0.08rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.portal-menu-group {
    margin-bottom: 0.16rem;
}

.portal-sidebar-link,
.portal-sidebar-button {
    position: relative;
    min-height: 42px;
    gap: 0.62rem;
    border-radius: 8px;
    color: rgba(241, 245, 249, 0.83);
    font-size: 0.87rem;
    font-weight: 760;
    padding: 0.5rem 0.54rem;
}

.portal-sidebar-link:hover,
.portal-sidebar-link:focus,
.portal-sidebar-button:hover,
.portal-sidebar-button:focus {
    border-color: rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.portal-sidebar-link.active,
.portal-sidebar-button.active {
    border-color: rgba(245, 158, 11, 0.34);
    background: #ffffff;
    color: #0b3670;
    box-shadow: inset 4px 0 0 var(--nav-rail), 0 10px 24px rgba(0, 0, 0, 0.16);
}

.portal-sidebar-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.10);
    color: currentColor;
}

.portal-sidebar-link.active .portal-sidebar-icon,
.portal-sidebar-button.active .portal-sidebar-icon {
    background: #eef4ff;
    color: #0b3670;
}

.portal-sidebar-trail {
    opacity: 0.78;
}

.portal-submenu {
    gap: 0.12rem;
    margin: 0.2rem 0 0.38rem 1.36rem;
    border-left-color: rgba(255, 255, 255, 0.16);
    padding-left: 0.66rem;
}

.portal-submenu-link {
    min-height: 36px;
    border-radius: 7px;
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.82rem;
}

.portal-submenu-link i {
    width: 18px;
    color: rgba(226, 232, 240, 0.72);
}

.portal-submenu-link:hover,
.portal-submenu-link:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.portal-submenu-link.active {
    background: rgba(245, 158, 11, 0.16);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--nav-rail);
}

.portal-mobile-sidebar {
    width: min(88vw, 292px);
    border-right: 0;
}

.portal-mobile-sidebar .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.portal-mobile-sidebar .offcanvas-body {
    padding: 0.86rem 0.78rem 1rem;
}

body:not(.login-body) main {
    min-height: calc(100vh - var(--portal-topbar-height) - 62px);
}

.portal-footer {
    margin-top: 0;
    padding: 0.82rem 0;
    border-top: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 991.98px) {
    body:not(.login-body) {
        padding-left: 0;
    }

    .portal-topbar {
        padding-right: 0.78rem;
        padding-left: 0.78rem;
    }
}

@media (max-width: 575.98px) {
    :root {
        --portal-topbar-height: 64px;
    }

    .portal-topbar {
        gap: 0.42rem;
        padding-right: 0.62rem;
        padding-left: 0.62rem;
    }

    .gov-emblem {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .portal-title-block strong {
        max-width: 118px;
        font-size: 0.9rem;
    }

    .portal-wallet-chip {
        max-width: 104px;
    }

    .portal-wallet-chip span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
