:root {
    --navy-950: #04182d;
    --navy-900: #062a50;
    --navy-800: #083b6f;
    --navy-700: #0b548d;
    --navy-600: #156da8;
    --green-800: #007a38;
    --green-700: #009644;
    --green-600: #00ad50;
    --green-500: #14c864;
    --teal-600: #07858c;
    --ink-950: #10243a;
    --ink-800: #20364d;
    --ink-700: #385069;
    --ink-500: #687f96;
    --ink-400: #8da0b2;
    --surface: #ffffff;
    --page: #f4f7fb;
    --border: #dce5ee;
    --border-soft: #e9eff5;
    --danger: #bf3242;
    --warning: #b46b16;
    --sidebar-width: 252px;
    --header-height: 74px;
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-xs: 0 1px 2px rgba(6, 42, 80, .04);
    --shadow-sm: 0 8px 24px rgba(6, 42, 80, .06);
    --shadow-md: 0 18px 46px rgba(6, 42, 80, .1);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink-950);
    background: var(--page);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    z-index: 3000;
    top: -60px;
    left: 20px;
    padding: 10px 15px;
    border-radius: 9px;
    background: #fff;
    box-shadow: var(--shadow-md);
    color: var(--navy-900);
    font-weight: 800;
    text-decoration: none;
    transition: top .2s ease;
}

.skip-link:focus {
    top: 14px;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 3px solid rgba(21, 109, 168, .3);
    outline-offset: 3px;
}

/* Secure sign-in */
.login-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: #fff;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(500px, .86fr) minmax(600px, 1.14fr);
}

.login-form-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 54px clamp(44px, 6vw, 100px);
    background: #fff;
}

.login-form-wrap {
    width: min(100%, 440px);
}

.login-logo {
    width: min(100%, 360px);
    margin: 0 0 52px;
}

.login-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.login-heading {
    margin-bottom: 29px;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    color: var(--green-800);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.product-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 0 4px rgba(20, 200, 100, .12);
}

.login-heading h1 {
    margin: 0;
    color: var(--navy-950);
    font-size: clamp(32px, 3.1vw, 43px);
    line-height: 1.12;
    letter-spacing: -.035em;
}

.login-heading p {
    margin: 12px 0 0;
    color: var(--ink-500);
    font-size: 14px;
    line-height: 1.65;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 13px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 650;
}

.alert svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.alert-error {
    border-color: #f1c6cc;
    background: #fff5f6;
    color: #9f2635;
}

.alert-info {
    border-color: #bfddeb;
    background: #f1f8fc;
    color: #07537f;
}

.secure-login-form {
    display: grid;
    gap: 20px;
}

.form-field label {
    display: block;
    margin: 0 0 8px;
    color: var(--ink-800);
    font-size: 12px;
    font-weight: 800;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.secure-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--green-800);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.secure-label svg {
    width: 13px;
    height: 13px;
}

.input-shell {
    min-height: 56px;
    display: flex;
    align-items: center;
    border: 1px solid #cbd7e2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(6, 42, 80, .025);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.input-shell:hover {
    border-color: #afc0d0;
}

.input-shell:focus-within {
    border-color: var(--navy-600);
    box-shadow: 0 0 0 4px rgba(21, 109, 168, .09);
}

.input-icon,
.password-toggle {
    width: 50px;
    display: grid;
    flex: 0 0 50px;
    place-items: center;
    color: var(--ink-400);
}

.input-icon svg,
.password-toggle svg {
    width: 20px;
    height: 20px;
}

.input-shell input {
    min-width: 0;
    height: 54px;
    flex: 1;
    padding: 0 4px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink-950);
    font-size: 14px;
    font-weight: 650;
}

.input-shell input::placeholder {
    color: #9aaaba;
    font-weight: 500;
}

.password-toggle {
    height: 54px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--navy-700);
}

.caps-warning {
    margin: 7px 0 0;
    color: var(--warning);
    font-size: 11px;
    font-weight: 750;
}

.primary-login-btn {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-top: 2px;
    padding: 0 22px;
    border: 1px solid #062a50;
    border-radius: 12px;
    background: var(--navy-900);
    box-shadow: 0 11px 24px rgba(6, 42, 80, .18);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}

.primary-login-btn svg {
    width: 19px;
    height: 19px;
    transition: transform .2s ease;
}

.primary-login-btn:hover {
    background: var(--navy-800);
    box-shadow: 0 15px 30px rgba(6, 42, 80, .24);
    transform: translateY(-1px);
}

.primary-login-btn:hover svg {
    transform: translateX(3px);
}

.primary-login-btn:disabled {
    cursor: wait;
    opacity: .68;
    transform: none;
}

.login-trust-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 25px;
    padding-top: 22px;
    border-top: 1px solid var(--border-soft);
}

.login-trust-row > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.login-trust-row svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    color: var(--green-700);
}

.login-trust-row strong,
.login-trust-row small {
    display: block;
}

.login-trust-row strong {
    color: var(--ink-700);
    font-size: 10px;
}

.login-trust-row small {
    margin-top: 1px;
    color: var(--ink-400);
    font-size: 9px;
}

.login-help {
    margin: 25px 0 0;
    color: var(--ink-400);
    font-size: 10px;
    text-align: center;
}

.login-brand-panel {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 64px clamp(54px, 7vw, 118px);
    background:
        radial-gradient(circle at 87% 12%, rgba(20, 200, 100, .2), transparent 28%),
        radial-gradient(circle at 12% 88%, rgba(17, 107, 173, .34), transparent 33%),
        linear-gradient(145deg, #03172c 0%, #062b52 52%, #06485a 100%);
    color: #fff;
}

.login-brand-panel::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 650px;
    height: 650px;
    right: -360px;
    bottom: -370px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    box-shadow: 0 0 0 80px rgba(255, 255, 255, .018), 0 0 0 160px rgba(255, 255, 255, .012);
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 430px;
    height: 430px;
    left: -265px;
    top: -250px;
    border: 1px solid rgba(118, 220, 174, .11);
    border-radius: 50%;
    box-shadow: 0 0 0 62px rgba(255, 255, 255, .012), 0 0 0 124px rgba(255, 255, 255, .009);
}

.login-brand-grid {
    position: absolute;
    z-index: -2;
    inset: 0;
    opacity: .105;
    background-image:
        linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 82%);
}

.login-brand-content {
    position: relative;
    z-index: 2;
    width: min(100%, 760px);
}

.brand-ambient {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(3px);
}

.brand-ambient-one {
    width: 240px;
    height: 240px;
    right: 9%;
    top: 24%;
    background: rgba(20, 200, 100, .055);
    box-shadow: 0 0 110px rgba(20, 200, 100, .13);
}

.brand-ambient-two {
    width: 290px;
    height: 290px;
    left: 3%;
    bottom: 14%;
    background: rgba(45, 145, 211, .045);
    box-shadow: 0 0 130px rgba(45, 145, 211, .12);
}

.brand-overline {
    color: #8deeb2;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.login-brand-content h2 {
    margin: 15px 0 0;
    font-size: clamp(39px, 4.2vw, 66px);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.login-brand-content h2 em {
    color: #8deeb2;
    font-style: normal;
}

.login-brand-content > p {
    max-width: 660px;
    margin: 20px 0 0;
    color: rgba(225, 239, 248, .74);
    font-size: 15px;
    line-height: 1.75;
}

.gateway-visual {
    position: relative;
    height: 335px;
    margin-top: 25px;
    overflow: hidden;
    border: 1px solid rgba(169, 223, 237, .14);
    border-radius: 21px;
    background:
        radial-gradient(circle at center, rgba(14, 111, 134, .21), transparent 48%),
        linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
    box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 30px 70px rgba(0, 0, 0, .2);
    backdrop-filter: blur(10px);
}

.gateway-visual::before {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(255, 255, 255, .045);
    border-radius: 16px;
    pointer-events: none;
}

.gateway-network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.gateway-network path {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.network-orbit {
    stroke: rgba(128, 213, 226, .18);
    stroke-width: 1;
    stroke-dasharray: 6 9;
    animation: networkFlow 18s linear infinite;
}

.orbit-inner {
    stroke: rgba(79, 228, 139, .22);
    stroke-dasharray: 4 8;
    animation-direction: reverse;
    animation-duration: 14s;
}

.network-link {
    stroke: rgba(100, 209, 225, .2);
    stroke-width: 1;
    stroke-dasharray: 3 7;
}

.network-link.secondary {
    stroke: rgba(92, 232, 146, .18);
}

@keyframes networkFlow {
    to { stroke-dashoffset: -120; }
}

.gateway-core {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: min(48%, 340px);
    padding: 19px 18px 16px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 16px;
    background: rgba(3, 24, 45, .73);
    box-shadow:
        0 24px 55px rgba(0, 0, 0, .35),
        0 0 0 10px rgba(52, 216, 122, .03),
        0 0 80px rgba(23, 180, 105, .12);
    text-align: center;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(14px);
}

.gateway-core::before,
.gateway-core::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(81, 225, 142, .13);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.gateway-core::before {
    z-index: -1;
    width: 145%;
    height: 190%;
}

.gateway-core::after {
    z-index: -2;
    width: 182%;
    height: 245%;
    border-color: rgba(90, 194, 221, .09);
}

.core-eyebrow {
    display: block;
    margin-bottom: 11px;
    color: rgba(170, 232, 207, .7);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.core-symbol {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    margin: 0 auto 10px;
    border: 1px solid rgba(142, 239, 182, .3);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(27, 190, 99, .28), rgba(22, 117, 155, .25));
    box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 12px 30px rgba(0, 0, 0, .2), 0 0 32px rgba(43, 213, 118, .1);
    color: #9cf1bd;
}

.core-symbol svg {
    width: 37px;
    height: 37px;
    stroke-width: 1.6;
}

.core-title,
.core-copy {
    display: block;
}

.core-title {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.core-copy {
    margin-top: 3px;
    color: rgba(213, 233, 241, .56);
    font-size: 8px;
    font-weight: 650;
    letter-spacing: .06em;
}

.core-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: rgba(226, 244, 238, .72);
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.core-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #49dd83;
    box-shadow: 0 0 0 4px rgba(73, 221, 131, .09), 0 0 13px rgba(73, 221, 131, .65);
    animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
    50% { opacity: .52; transform: scale(.78); }
}

.gateway-node {
    position: absolute;
    z-index: 2;
    width: 47px;
    height: 47px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(154, 221, 233, .2);
    border-radius: 14px;
    background: rgba(5, 42, 72, .82);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .06);
    color: #77e9a3;
    backdrop-filter: blur(10px);
}

.gateway-node svg {
    width: 22px;
    height: 22px;
}

.node-northwest { left: 11%; top: 16%; }
.node-northeast { right: 11%; top: 16%; color: #7bd1e9; }
.node-southwest { left: 11%; bottom: 16%; color: #7bd1e9; }
.node-southeast { right: 11%; bottom: 16%; }

.gateway-node.node-west,
.gateway-node.node-east {
    width: 18px;
    height: 18px;
    top: 50%;
    border-radius: 50%;
    transform: translateY(-50%);
}

.gateway-node.node-west { left: 4.2%; }
.gateway-node.node-east { right: 4.2%; }

.gateway-node.node-west i,
.gateway-node.node-east i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #54da88;
    box-shadow: 0 0 13px rgba(84, 218, 136, .75);
}

.signal-dot {
    position: absolute;
    z-index: 4;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #99f0ba;
    box-shadow: 0 0 12px rgba(153, 240, 186, .9);
    animation: signalPulse 3.2s ease-in-out infinite;
}

.signal-one { left: 27%; top: 31%; }
.signal-two { right: 26%; top: 64%; animation-delay: 1.1s; }
.signal-three { left: 20%; bottom: 21%; animation-delay: 2.1s; }

@keyframes signalPulse {
    0%, 100% { opacity: .18; transform: scale(.55); }
    50% { opacity: 1; transform: scale(1.25); }
}

.brand-assurance {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 22px;
}

.brand-assurance span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(230, 243, 249, .76);
    font-size: 11px;
    font-weight: 700;
}

.brand-assurance i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 0 4px rgba(20, 200, 100, .1);
}

.login-copyright {
    position: absolute;
    left: clamp(54px, 7vw, 118px);
    bottom: 25px;
    margin: 0;
    color: rgba(225, 239, 248, .42);
    font-size: 10px;
}

/* Authenticated application shell */
.app-page {
    min-height: 100vh;
    background: var(--page);
}

.app-sidebar {
    position: fixed;
    z-index: 1100;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, .06);
    background: linear-gradient(180deg, #041a31 0%, #062a50 58%, #06364d 100%);
    color: #fff;
}

.sidebar-brand {
    height: var(--header-height);
    display: grid;
    place-items: center;
    padding: 13px 19px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #fff;
}

.sidebar-brand img {
    display: block;
    width: 100%;
    max-height: 48px;
    object-fit: contain;
}

.sidebar-workspace-label {
    display: grid;
    gap: 2px;
    margin: 20px 15px 13px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 11px;
    background: rgba(255, 255, 255, .045);
}

.sidebar-workspace-label span {
    color: rgba(216, 234, 244, .5);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.sidebar-workspace-label strong {
    color: #eff8fb;
    font-size: 12px;
}

.sidebar-navigation {
    padding: 0 12px;
}

.sidebar-navigation > p {
    margin: 12px 11px 8px;
    color: rgba(211, 231, 242, .38);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.sidebar-navigation a {
    position: relative;
    display: grid;
    grid-template-columns: 21px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 45px;
    margin: 3px 0;
    padding: 0 12px;
    border-radius: 10px;
    color: rgba(222, 238, 246, .67);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.sidebar-navigation a svg {
    width: 20px;
    height: 20px;
}

.sidebar-navigation a small {
    min-width: 22px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(227, 240, 247, .72);
    font-size: 8px;
    text-align: center;
}

.sidebar-navigation a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.sidebar-navigation a.active {
    background: rgba(20, 200, 100, .12);
    color: #fff;
}

.sidebar-navigation a.active::before {
    content: "";
    position: absolute;
    left: 0;
    width: 3px;
    height: 23px;
    border-radius: 0 4px 4px 0;
    background: var(--green-500);
}

.sidebar-security {
    position: relative;
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr) 7px;
    align-items: center;
    gap: 9px;
    margin: auto 14px 17px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 11px;
    background: rgba(255, 255, 255, .045);
}

.sidebar-security-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(20, 200, 100, .13);
    color: #81ecaa;
}

.sidebar-security-icon svg {
    width: 19px;
    height: 19px;
}

.sidebar-security strong,
.sidebar-security small {
    display: block;
}

.sidebar-security strong {
    color: #eef8fb;
    font-size: 10px;
}

.sidebar-security small {
    margin-top: 2px;
    color: rgba(216, 234, 244, .48);
    font-size: 8px;
}

.sidebar-security > i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 0 4px rgba(20, 200, 100, .08);
}

.sidebar-backdrop {
    display: none;
}

.app-header {
    position: fixed;
    z-index: 1000;
    inset: 0 0 auto var(--sidebar-width);
    height: var(--header-height);
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-xs);
    backdrop-filter: blur(16px);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 19px;
    padding: 0 24px;
}

.mobile-nav-toggle {
    display: none;
    width: 41px;
    height: 41px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.mobile-nav-toggle span {
    display: block;
    height: 2px;
    margin: 4px 0;
    border-radius: 3px;
    background: var(--navy-900);
}

.header-title {
    min-width: 135px;
    display: grid;
}

.header-title span {
    color: var(--ink-400);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.header-title strong {
    margin-top: 1px;
    color: var(--ink-950);
    font-size: 13px;
}

.global-search {
    width: min(34vw, 420px);
    height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: 8px;
    padding: 0 10px 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f7f9fb;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.global-search:focus-within {
    border-color: var(--navy-600);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21, 109, 168, .08);
}

.global-search svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--ink-400);
}

.global-search input {
    min-width: 0;
    height: 39px;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink-800);
    font-size: 11px;
}

.global-search kbd {
    min-width: 22px;
    padding: 2px 6px;
    border: 1px solid #d9e2e9;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    color: var(--ink-400);
    font-family: inherit;
    font-size: 9px;
    text-align: center;
}

.header-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--green-800);
    font-size: 9px;
}

.connection-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 0 4px rgba(20, 200, 100, .11);
}

.header-clock {
    display: grid;
    min-width: 74px;
    padding-left: 13px;
    border-left: 1px solid var(--border-soft);
}

.header-clock strong {
    color: var(--ink-800);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.header-clock span {
    color: var(--ink-400);
    font-size: 8px;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 9px 5px 5px;
    border: 1px solid var(--border-soft);
    border-radius: 11px;
    background: #f9fbfc;
}

.avatar {
    width: 35px;
    height: 35px;
    display: grid;
    flex: 0 0 35px;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--navy-800), var(--green-600));
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .03em;
}

.profile-copy strong,
.profile-copy small {
    display: block;
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-copy strong {
    color: var(--ink-800);
    font-size: 10px;
}

.profile-copy small {
    margin-top: 1px;
    color: var(--ink-400);
    font-size: 8px;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    height: 41px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--ink-500);
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

.logout-btn:hover {
    border-color: #edc6cb;
    background: #fff6f7;
    color: var(--danger);
}

.app-frame {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
}

.dashboard-main {
    width: 100%;
    max-width: 1680px;
    flex: 1;
    margin: 0 auto;
    padding: 22px 24px 12px;
}

#portals,
#birthdays,
#recentActivity {
    scroll-margin-top: calc(var(--header-height) + 18px);
}

.workspace-welcome {
    position: relative;
    isolation: isolate;
    min-height: 168px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    overflow: hidden;
    padding: 30px 34px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 84% 20%, rgba(20, 200, 100, .22), transparent 27%),
        linear-gradient(120deg, #041c36 0%, #073964 66%, #075b61 100%);
    box-shadow: 0 14px 34px rgba(6, 42, 80, .13);
    color: #fff;
}

.workspace-welcome::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 340px;
    height: 340px;
    right: -130px;
    top: -180px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(255, 255, 255, .018), 0 0 0 110px rgba(255, 255, 255, .012);
}

.welcome-copy {
    position: relative;
    z-index: 2;
}

.welcome-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #90ebb1;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.welcome-kicker span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 0 4px rgba(20, 200, 100, .1);
}

.workspace-welcome h1 {
    margin: 0;
    font-size: clamp(27px, 2.8vw, 40px);
    line-height: 1.15;
    letter-spacing: -.035em;
}

.workspace-welcome p {
    max-width: 650px;
    margin: 9px 0 0;
    color: rgba(227, 240, 248, .73);
    font-size: 12px;
}

.welcome-meta {
    position: relative;
    z-index: 2;
    min-width: 290px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 13px;
}

.welcome-date {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(8px);
}

.welcome-date svg {
    width: 20px;
    height: 20px;
    color: #83e9a9;
}

.welcome-date span,
.welcome-date strong {
    display: block;
}

.welcome-date span {
    color: rgba(226, 240, 248, .55);
    font-size: 8px;
    text-transform: uppercase;
}

.welcome-date strong {
    margin-top: 1px;
    color: #fff;
    font-size: 10px;
}

.primary-action {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
    color: var(--navy-900);
    font-size: 10px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .18s ease;
}

.primary-action:hover {
    transform: translateY(-1px);
}

.primary-action svg {
    width: 16px;
    height: 16px;
}

.welcome-watermark {
    position: absolute;
    z-index: 1;
    right: 17%;
    width: 390px;
    opacity: .035;
    filter: grayscale(1);
    pointer-events: none;
}

.workspace-notice {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin: 14px 0;
    padding: 10px 13px;
    border: 1px solid #d9e7e1;
    border-radius: 12px;
    background: #f8fcfa;
}

.notice-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #e7f7ee;
    color: var(--green-800);
}

.notice-icon svg {
    width: 19px;
    height: 19px;
}

.workspace-notice strong,
.workspace-notice div span {
    display: block;
}

.workspace-notice strong {
    color: var(--ink-800);
    font-size: 10px;
}

.workspace-notice div span {
    margin-top: 1px;
    color: var(--ink-500);
    font-size: 9px;
}

.notice-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #e9f8ef;
    color: var(--green-800);
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
}

.notice-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-500);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.overview-card {
    min-width: 0;
    min-height: 94px;
    display: grid;
    grid-template-columns: 43px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.overview-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 11px;
}

.overview-icon svg {
    width: 22px;
    height: 22px;
}

.overview-icon.green { background: #e9f8ef; color: var(--green-800); }
.overview-icon.blue { background: #eaf3f9; color: var(--navy-600); }
.overview-icon.navy { background: #e9eef5; color: var(--navy-900); }
.overview-icon.teal { background: #e7f7f7; color: var(--teal-600); }

.overview-card > div {
    min-width: 0;
}

.overview-card > div > span,
.overview-card > div > strong {
    display: block;
}

.overview-card > div > span {
    color: var(--ink-500);
    font-size: 9px;
    font-weight: 700;
}

.overview-card > div > strong {
    overflow: hidden;
    margin-top: 3px;
    color: var(--ink-950);
    font-size: 18px;
    font-weight: 850;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-card > div > strong small {
    color: var(--ink-400);
    font-size: 8px;
    font-weight: 650;
    letter-spacing: 0;
}

.overview-card > a {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--ink-400);
    transition: border-color .18s ease, color .18s ease, transform .18s ease;
}

.overview-card > a:hover {
    border-color: #bfd0df;
    color: var(--navy-700);
    transform: translateX(2px);
}

.overview-card > a svg {
    width: 15px;
    height: 15px;
}

.overview-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--green-800);
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
}

.overview-state i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-500);
}

.overview-state.neutral {
    color: var(--ink-400);
}

.workspace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 14px;
}

.applications-panel,
.side-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.applications-panel {
    min-width: 0;
    padding: 19px;
}

.panel-heading,
.side-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.section-label {
    display: block;
    margin-bottom: 3px;
    color: var(--green-800);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.section-label.light {
    color: #8be9ad;
}

.panel-heading h2,
.side-card h2 {
    margin: 0;
    color: var(--ink-950);
    font-size: 17px;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.panel-heading p {
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: 9px;
}

.application-count {
    padding: 6px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: #f7f9fb;
    color: var(--ink-500);
    font-size: 8px;
    white-space: nowrap;
}

.application-count strong {
    color: var(--navy-800);
    font-size: 10px;
}

.application-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    margin: 15px -3px 14px;
    padding: 3px;
    scrollbar-width: thin;
}

.filter-chip {
    min-height: 31px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-500);
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.filter-chip:hover {
    border-color: #bdcddc;
    color: var(--navy-700);
}

.filter-chip.active {
    border-color: var(--navy-900);
    background: var(--navy-900);
    color: #fff;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.portal-card {
    --portal: var(--navy-700);
    --portal-soft: #eef4f8;
    position: relative;
    min-width: 0;
    min-height: 215px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-top: 3px solid var(--portal);
    border-radius: 13px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.portal-card::after {
    content: "";
    position: absolute;
    width: 78px;
    height: 78px;
    right: -36px;
    bottom: -38px;
    border: 13px solid var(--portal-soft);
    border-radius: 50%;
    opacity: .7;
    pointer-events: none;
}

.portal-card:not(.portal-disabled):hover {
    z-index: 2;
    border-color: var(--portal);
    box-shadow: 0 13px 28px rgba(6, 42, 80, .11);
    transform: translateY(-3px);
}

.portal-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
}

.portal-group {
    color: var(--ink-400);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.portal-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.portal-status i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.portal-status.online { color: var(--green-800); }
.portal-status.online i { background: var(--green-500); box-shadow: 0 0 0 3px rgba(20, 200, 100, .09); }
.portal-status.restricted { color: var(--warning); }
.portal-status.restricted i { background: #d59643; }

.portal-main {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 13px;
}

.portal-logo,
.portal-symbol {
    width: 57px;
    height: 57px;
    display: grid;
    flex: 0 0 57px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 13px rgba(6, 42, 80, .05);
}

.portal-logo img {
    width: 100%;
    height: 100%;
    padding: 4px;
    object-fit: contain;
}

.portal-symbol {
    border-color: transparent;
    background: var(--portal-soft);
    color: var(--portal);
}

.portal-symbol svg {
    width: 28px;
    height: 28px;
}

.portal-title {
    min-width: 0;
}

.portal-title strong,
.portal-title span {
    display: block;
}

.portal-title strong {
    color: var(--portal);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .04em;
}

.portal-title span {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 2px;
    color: var(--ink-800);
    font-size: 9px;
    font-weight: 750;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.portal-card > p {
    display: -webkit-box;
    overflow: hidden;
    margin: 12px 0 0;
    color: var(--ink-500);
    font-size: 9px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.portal-card-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
    color: var(--portal);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.portal-card-footer svg {
    width: 15px;
    height: 15px;
    transition: transform .18s ease;
}

.portal-card:not(.portal-disabled):hover .portal-card-footer svg {
    transform: translate(2px, -2px);
}

.portal-disabled {
    cursor: not-allowed;
    filter: grayscale(.25);
    opacity: .63;
}

.portal-oms { --portal: #039b44; --portal-soft: #e9f8ef; }
.portal-vms { --portal: #073b79; --portal-soft: #eaf0f7; }
.portal-lms { --portal: #078a9f; --portal-soft: #e7f6f7; }
.portal-ems { --portal: #2775a6; --portal-soft: #e9f3f8; }
.portal-finance { --portal: #6651a4; --portal-soft: #f0edf8; }
.portal-commercial { --portal: #ae641c; --portal-soft: #fbf1e6; }
.portal-sales { --portal: #176cad; --portal-soft: #eaf3fa; }
.portal-it { --portal: #087c77; --portal-soft: #e7f6f4; }

.empty-search {
    display: grid;
    justify-items: center;
    padding: 50px 20px;
    text-align: center;
}

.empty-search > span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    border-radius: 13px;
    background: #edf3f7;
    color: var(--ink-400);
}

.empty-search svg {
    width: 23px;
    height: 23px;
}

.empty-search strong {
    color: var(--ink-800);
    font-size: 12px;
}

.empty-search p {
    margin: 3px 0 0;
    color: var(--ink-400);
    font-size: 9px;
}

.workspace-sidebar {
    display: grid;
    gap: 14px;
}

.side-card {
    padding: 17px;
}

.side-card-heading {
    margin-bottom: 13px;
}

.heading-icon {
    width: 38px;
    height: 38px;
    display: grid;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 10px;
}

.heading-icon svg {
    width: 20px;
    height: 20px;
}

.heading-icon.green { background: #e8f8ef; color: var(--green-800); }
.heading-icon.navy { background: rgba(255, 255, 255, .09); color: #86ebaa; }

.birthday-list {
    display: grid;
    gap: 4px;
}

.birthday-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px;
    border-radius: 10px;
    transition: background .18s ease;
}

.birthday-item:hover,
.birthday-today {
    background: #f0faf5;
}

.birthday-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #dcece4;
    border-radius: 10px;
    background: linear-gradient(135deg, #edf4f9, #e8f8ee);
    color: var(--navy-800);
    font-size: 9px;
    font-weight: 850;
}

.birthday-item strong,
.birthday-item div span {
    display: block;
}

.birthday-item strong {
    overflow: hidden;
    color: var(--ink-800);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.birthday-item div span {
    margin-top: 1px;
    color: var(--ink-400);
    font-size: 8px;
}

.birthday-days {
    padding: 4px 6px;
    border-radius: 999px;
    background: #f0f4f7;
    color: var(--ink-500);
    font-size: 7px;
    font-weight: 850;
    white-space: nowrap;
}

.birthday-today .birthday-days {
    background: var(--green-600);
    color: #fff;
}

.empty-state {
    padding: 23px 10px;
    text-align: center;
}

.empty-state > span {
    display: block;
    margin-bottom: 6px;
    font-size: 27px;
}

.empty-state strong {
    display: block;
    color: var(--ink-800);
    font-size: 11px;
}

.empty-state p,
.recent-empty {
    margin: 4px 0 0;
    color: var(--ink-400);
    font-size: 9px;
}

.text-button {
    padding: 4px 7px;
    border: 0;
    background: transparent;
    color: var(--navy-600);
    font-size: 8px;
    font-weight: 800;
    cursor: pointer;
}

.recent-portals {
    display: grid;
    gap: 6px;
}

.recent-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--ink-700);
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease;
}

.recent-item:hover {
    border-color: #c9d8e4;
    background: #f8fafc;
}

.recent-code {
    width: 34px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #edf3f7;
    color: var(--navy-800);
    font-size: 8px;
    font-weight: 900;
}

.recent-copy {
    min-width: 0;
}

.recent-copy strong,
.recent-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-copy strong {
    color: var(--ink-800);
    font-size: 9px;
}

.recent-copy span {
    margin-top: 1px;
    color: var(--ink-400);
    font-size: 7px;
}

.recent-item > svg {
    width: 14px;
    height: 14px;
    color: var(--ink-400);
}

.account-card {
    overflow: hidden;
    border-color: transparent;
    background: linear-gradient(145deg, #041d37, #07445a);
    color: #fff;
}

.account-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-card h2 {
    color: #fff;
    font-size: 15px;
}

.session-meter {
    height: 4px;
    overflow: hidden;
    margin: 15px 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
}

.session-meter span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green-500), #8aebb0);
}

.account-card ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-card li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(222, 237, 245, .58);
    font-size: 8px;
}

.account-card li strong {
    color: rgba(239, 248, 251, .9);
    font-size: 8px;
}

.app-footer {
    width: calc(100% - 48px);
    max-width: 1632px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 22px;
    margin: 0 auto;
    padding: 18px 0 23px;
    color: var(--ink-400);
    font-size: 8px;
}

.app-footer div {
    display: flex;
    align-items: center;
    gap: 7px;
}

.app-footer strong {
    color: var(--navy-800);
    font-size: 10px;
}

.app-footer p {
    margin: 0;
}

@media (max-width: 1420px) {
    .connection-status { display: none; }
    .global-search { width: min(31vw, 360px); }
    .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
    :root { --sidebar-width: 226px; }
    .profile-copy { display: none; }
    .profile-chip { padding-right: 5px; }
    .logout-btn span { display: none; }
    .logout-btn { width: 41px; justify-content: center; padding: 0; }
    .welcome-meta { min-width: 245px; }
    .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workspace-layout { grid-template-columns: minmax(0, 1fr) 315px; }
}

@media (max-width: 1020px) {
    .login-shell { grid-template-columns: minmax(440px, .9fr) minmax(480px, 1.1fr); }
    .login-form-panel { padding: 44px; }
    .login-brand-panel { padding: 54px; }
    .gateway-visual { height: 310px; }
    .gateway-core { width: min(59%, 360px); }

    :root { --sidebar-width: 0px; }
    .app-sidebar {
        width: 252px;
        box-shadow: 20px 0 55px rgba(4, 24, 45, .25);
        transform: translateX(-102%);
        transition: transform .24s ease;
    }
    .app-sidebar.mobile-open { transform: translateX(0); }
    .sidebar-backdrop {
        position: fixed;
        z-index: 1050;
        inset: 0;
        display: block;
        visibility: hidden;
        padding: 0;
        border: 0;
        background: rgba(4, 24, 45, .46);
        opacity: 0;
        pointer-events: none;
        transition: opacity .24s ease, visibility .24s ease;
    }
    .sidebar-backdrop.visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
    .mobile-nav-toggle { display: block; }
    .global-search { width: min(39vw, 390px); margin-left: 0; }
    .header-title { display: none; }
    .workspace-layout { grid-template-columns: 1fr; }
    .workspace-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-card { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
    .login-shell { display: block; }
    .login-brand-panel { display: none; }
    .login-form-panel { min-height: 100vh; padding: 35px 24px; }
    .login-form-wrap { width: min(100%, 470px); }
    .login-logo { margin-bottom: 42px; }

    .header-inner { padding: 0 14px; gap: 10px; }
    .global-search { flex: 1; width: auto; }
    .global-search kbd { display: none; }
    .header-clock { display: none; }
    .dashboard-main { padding: 15px 14px 10px; }
    .workspace-welcome { min-height: 205px; align-items: flex-start; flex-direction: column; justify-content: center; padding: 27px; }
    .welcome-meta { min-width: 0; justify-content: flex-start; }
    .welcome-watermark { right: -100px; }
    .workspace-sidebar { grid-template-columns: 1fr; }
    .account-card { grid-column: auto; }
    .app-footer { width: calc(100% - 28px); grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 580px) {
    :root { --header-height: 66px; }
    .header-actions { gap: 7px; }
    .profile-chip { display: none; }
    .global-search { height: 40px; }
    .global-search input { height: 38px; }
    .logout-btn { width: 40px; height: 40px; }
    .workspace-welcome { min-height: 240px; padding: 24px 21px; border-radius: 16px; }
    .workspace-welcome h1 { font-size: 28px; }
    .workspace-welcome p { font-size: 11px; }
    .welcome-meta { align-items: stretch; flex-direction: column; gap: 8px; }
    .welcome-date, .primary-action { min-height: 42px; }
    .primary-action { justify-content: center; }
    .workspace-notice { grid-template-columns: 35px minmax(0, 1fr); }
    .notice-status { display: none; }
    .overview-grid { grid-template-columns: 1fr; }
    .applications-panel { padding: 15px; }
    .panel-heading { align-items: flex-start; }
    .panel-heading p { max-width: 230px; }
    .portal-grid { grid-template-columns: 1fr; }
    .portal-card { min-height: 205px; }
    .login-logo { width: 310px; max-width: 100%; margin-bottom: 37px; }
    .login-heading h1 { font-size: 31px; }
    .login-trust-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Enterprise dashboard */
.enterprise-dashboard {
    width: 100%;
    max-width: 1680px;
    flex: 1;
    margin: 0 auto;
    padding: 28px 28px 14px;
}

.enterprise-dashboard #portals,
.enterprise-dashboard #birthdays,
.enterprise-dashboard #recentActivity {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.erp-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 22px;
}

.erp-heading-copy {
    min-width: 0;
}

.erp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--green-800);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.erp-eyebrow i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 0 4px rgba(20, 200, 100, .11);
}

.erp-heading-copy h1 {
    margin: 0;
    color: var(--navy-950);
    font-size: clamp(25px, 2.3vw, 34px);
    line-height: 1.15;
    letter-spacing: -.035em;
}

.erp-heading-copy p {
    margin: 6px 0 0;
    color: var(--ink-500);
    font-size: 12px;
}

.erp-heading-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.erp-system-pill,
.erp-date-card {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.erp-system-pill > span {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: var(--green-500);
    box-shadow: 0 0 0 5px rgba(20, 200, 100, .11);
}

.erp-system-pill.is-limited > span {
    background: #d59643;
    box-shadow: 0 0 0 5px rgba(213, 150, 67, .12);
}

.erp-system-pill small,
.erp-system-pill strong,
.erp-date-card small,
.erp-date-card time {
    display: block;
    white-space: nowrap;
}

.erp-system-pill small,
.erp-date-card small {
    color: var(--ink-400);
    font-size: 8px;
    font-weight: 750;
    text-transform: uppercase;
}

.erp-system-pill strong,
.erp-date-card time {
    margin-top: 1px;
    color: var(--ink-800);
    font-size: 10px;
    font-weight: 800;
}

.erp-date-icon {
    width: 36px;
    height: 36px;
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 9px;
    background: #edf3f8;
    color: var(--navy-700);
}

.erp-date-icon svg {
    width: 19px;
    height: 19px;
}

.erp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.erp-kpi-card {
    min-width: 0;
    min-height: 110px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-xs);
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

a.erp-kpi-card:hover {
    border-color: #c6d6e3;
    box-shadow: 0 9px 22px rgba(6, 42, 80, .07);
    transform: translateY(-2px);
}

.erp-kpi-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.erp-kpi-icon svg {
    width: 23px;
    height: 23px;
}

.erp-kpi-icon.green { background: #e9f8ef; color: var(--green-800); }
.erp-kpi-icon.navy { background: #e9eff6; color: var(--navy-900); }
.erp-kpi-icon.blue { background: #e9f3f9; color: var(--navy-600); }
.erp-kpi-icon.teal { background: #e8f7f6; color: #087c77; }

.erp-kpi-copy {
    min-width: 0;
}

.erp-kpi-copy > small,
.erp-kpi-copy > strong,
.erp-kpi-copy > span {
    display: block;
}

.erp-kpi-copy > small {
    color: var(--ink-500);
    font-size: 9px;
    font-weight: 750;
}

.erp-kpi-copy > strong {
    overflow: hidden;
    margin-top: 2px;
    color: var(--ink-950);
    font-size: 21px;
    font-weight: 880;
    line-height: 1.15;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-kpi-copy > strong em {
    color: var(--ink-400);
    font-size: 9px;
    font-style: normal;
    font-weight: 750;
    letter-spacing: 0;
}

.erp-kpi-copy > span {
    overflow: hidden;
    margin-top: 4px;
    color: var(--ink-400);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-kpi-arrow {
    width: 17px;
    height: 17px;
    color: var(--ink-400);
}

.erp-kpi-badge {
    padding: 5px 7px;
    border-radius: 999px;
    background: #f0f4f7;
    color: var(--ink-500);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.erp-kpi-badge.secure {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e9f8ef;
    color: var(--green-800);
}

.erp-kpi-badge i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green-500);
}

.erp-command-strip {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid #dce9e3;
    border-radius: 12px;
    background: #f8fcfa;
}

.erp-command-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #e7f7ee;
    color: var(--green-800);
}

.erp-command-icon svg {
    width: 19px;
    height: 19px;
}

.erp-command-strip strong,
.erp-command-strip div span {
    display: block;
}

.erp-command-strip strong {
    color: var(--ink-800);
    font-size: 10px;
}

.erp-command-strip div span {
    margin-top: 1px;
    color: var(--ink-500);
    font-size: 9px;
}

.erp-command-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green-800);
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.erp-command-meta i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-500);
}

.erp-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    align-items: start;
    gap: 14px;
}

.erp-panel {
    border: 1px solid var(--border-soft);
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.erp-app-directory {
    min-width: 0;
    padding: 20px;
}

.erp-panel-heading,
.erp-rail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.erp-section-label {
    display: block;
    margin-bottom: 3px;
    color: var(--green-800);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.erp-panel-heading h2,
.erp-rail-heading h2,
.erp-session-heading h2 {
    margin: 0;
    color: var(--ink-950);
    font-size: 17px;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.erp-panel-heading p {
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: 9px;
}

.erp-directory-summary {
    display: flex;
    align-items: center;
    gap: 6px;
}

.erp-directory-summary span {
    padding: 5px 8px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--ink-500);
    font-size: 7px;
    font-weight: 750;
    white-space: nowrap;
}

.erp-directory-summary strong {
    color: var(--navy-800);
    font-size: 9px;
}

.erp-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    margin: 16px -3px 15px;
    padding: 3px;
    scrollbar-width: thin;
}

.erp-filter-button {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-500);
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.erp-filter-button:hover {
    border-color: #bdcddc;
    color: var(--navy-700);
}

.erp-filter-button.active {
    border-color: var(--navy-900);
    background: var(--navy-900);
    color: #fff;
}

.erp-application-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.erp-application-card {
    --portal: var(--navy-700);
    --portal-soft: #eef4f8;
    position: relative;
    min-width: 0;
    min-height: 174px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px;
    border: 1px solid var(--border-soft);
    border-radius: 13px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.erp-application-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--portal);
}

.erp-application-card:not(.is-disabled):hover {
    z-index: 2;
    border-color: color-mix(in srgb, var(--portal) 42%, #dce5ee);
    box-shadow: 0 12px 28px rgba(6, 42, 80, .09);
    transform: translateY(-2px);
}

.erp-app-card-top,
.erp-app-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.erp-app-category {
    color: var(--ink-400);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.erp-app-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.erp-app-status i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.erp-app-status.available { color: var(--green-800); }
.erp-app-status.available i { background: var(--green-500); box-shadow: 0 0 0 3px rgba(20, 200, 100, .09); }
.erp-app-status.unavailable { color: var(--warning); }
.erp-app-status.unavailable i { background: #d59643; }

.erp-app-card-body {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 13px;
}

.erp-app-logo,
.erp-app-symbol {
    width: 58px;
    height: 58px;
    display: grid;
    flex: 0 0 58px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #fff;
}

.erp-app-logo img {
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
}

.erp-app-symbol {
    border-color: transparent;
    background: var(--portal-soft);
    color: var(--portal);
}

.erp-app-symbol svg {
    width: 27px;
    height: 27px;
}

.erp-app-copy {
    min-width: 0;
}

.erp-app-code {
    display: block;
    margin-bottom: 1px;
    color: var(--portal);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .09em;
}

.erp-app-copy h3 {
    overflow: hidden;
    margin: 0;
    color: var(--ink-950);
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-app-copy p {
    display: -webkit-box;
    overflow: hidden;
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: 8px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.erp-app-card-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 11px;
    border-top: 1px solid var(--border-soft);
    color: var(--portal);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.erp-app-card-footer svg {
    width: 15px;
    height: 15px;
    transition: transform .18s ease;
}

.erp-application-card:not(.is-disabled):hover .erp-app-card-footer svg {
    transform: translate(2px, -2px);
}

.erp-application-card.is-disabled {
    cursor: not-allowed;
    filter: grayscale(.2);
    opacity: .62;
}

.erp-empty-search {
    display: grid;
    justify-items: center;
    padding: 55px 20px;
    text-align: center;
}

.erp-empty-search > span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    border-radius: 13px;
    background: #edf3f7;
    color: var(--ink-400);
}

.erp-empty-search svg {
    width: 23px;
    height: 23px;
}

.erp-empty-search strong {
    color: var(--ink-800);
    font-size: 12px;
}

.erp-empty-search p {
    margin: 3px 0 0;
    color: var(--ink-400);
    font-size: 9px;
}

.erp-right-rail {
    display: grid;
    gap: 14px;
}

.erp-rail-card {
    padding: 17px;
}

.erp-rail-heading {
    margin-bottom: 13px;
}

.erp-rail-icon {
    width: 38px;
    height: 38px;
    display: grid;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 10px;
}

.erp-rail-icon.green {
    background: #e8f8ef;
    color: var(--green-800);
}

.erp-rail-icon svg {
    width: 20px;
    height: 20px;
}

.erp-birthday-list {
    display: grid;
    gap: 4px;
}

.erp-birthday-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px;
    border-radius: 10px;
    transition: background .18s ease;
}

.erp-birthday-item:hover,
.erp-birthday-item.is-today {
    background: #f0faf5;
}

.erp-birthday-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #dcece4;
    border-radius: 10px;
    background: linear-gradient(135deg, #edf4f9, #e8f8ee);
    color: var(--navy-800);
    font-size: 9px;
    font-weight: 850;
}

.erp-birthday-item div {
    min-width: 0;
}

.erp-birthday-item strong,
.erp-birthday-item div span {
    display: block;
}

.erp-birthday-item strong {
    overflow: hidden;
    color: var(--ink-800);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erp-birthday-item div span {
    margin-top: 1px;
    color: var(--ink-400);
    font-size: 8px;
}

.erp-birthday-days {
    padding: 4px 6px;
    border-radius: 999px;
    background: #f0f4f7;
    color: var(--ink-500);
    font-size: 7px;
    font-weight: 850;
    white-space: nowrap;
}

.erp-birthday-item.is-today .erp-birthday-days {
    background: var(--green-600);
    color: #fff;
}

.erp-empty-state {
    padding: 24px 10px;
    text-align: center;
}

.erp-empty-state > span {
    display: block;
    margin-bottom: 6px;
    font-size: 27px;
}

.erp-empty-state strong {
    display: block;
    color: var(--ink-800);
    font-size: 11px;
}

.erp-empty-state p,
.erp-recent-portals .recent-empty {
    margin: 4px 0 0;
    color: var(--ink-400);
    font-size: 9px;
}

.erp-text-button {
    padding: 4px 7px;
    border: 0;
    background: transparent;
    color: var(--navy-600);
    font-size: 8px;
    font-weight: 800;
    cursor: pointer;
}

.erp-recent-portals {
    display: grid;
    gap: 6px;
}

.erp-recent-portals .recent-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--ink-700);
    text-decoration: none;
}

.erp-session-card {
    overflow: hidden;
    padding: 18px;
    border-radius: 15px;
    background: linear-gradient(145deg, #041d37, #073f58);
    box-shadow: 0 12px 28px rgba(6, 42, 80, .12);
    color: #fff;
}

.erp-session-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.erp-session-heading > span {
    width: 40px;
    height: 40px;
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, .09);
    color: #89ebb0;
}

.erp-session-heading svg {
    width: 21px;
    height: 21px;
}

.erp-session-heading small {
    display: block;
    margin-bottom: 2px;
    color: #8be9ad;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.erp-session-heading h2 {
    color: #fff;
    font-size: 15px;
}

.erp-session-line {
    height: 4px;
    overflow: hidden;
    margin: 16px 0 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
}

.erp-session-line span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green-500), #8aebb0);
}

.erp-session-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.erp-session-card dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.erp-session-card dt {
    color: rgba(222, 237, 245, .58);
    font-size: 8px;
}

.erp-session-card dd {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    color: rgba(239, 248, 251, .92);
    font-size: 8px;
    font-weight: 750;
}

.erp-session-card dd i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green-500);
}

.erp-session-card dd i.offline {
    background: #d59643;
}

@media (max-width: 1370px) {
    .erp-kpi-card {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        padding: 14px;
    }

    .erp-kpi-icon {
        width: 44px;
        height: 44px;
    }

    .erp-workspace-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

@media (max-width: 1180px) {
    .enterprise-dashboard {
        padding-right: 22px;
        padding-left: 22px;
    }

    .erp-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-page-heading {
        align-items: flex-start;
    }

    .erp-system-pill {
        display: none;
    }
}

@media (max-width: 960px) {
    .erp-workspace-grid {
        grid-template-columns: 1fr;
    }

    .erp-right-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-session-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .enterprise-dashboard {
        padding: 20px 14px 10px;
    }

    .erp-page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .erp-heading-actions {
        width: 100%;
    }

    .erp-date-card {
        width: 100%;
    }

    .erp-command-strip {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .erp-command-meta {
        display: none;
    }

    .erp-panel-heading {
        align-items: flex-start;
    }

    .erp-directory-summary {
        align-items: flex-end;
        flex-direction: column;
    }

    .erp-application-grid,
    .erp-right-rail {
        grid-template-columns: 1fr;
    }

    .erp-session-card {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .erp-heading-copy h1 {
        font-size: 27px;
    }

    .erp-heading-copy p {
        font-size: 11px;
    }

    .erp-kpi-grid {
        grid-template-columns: 1fr;
    }

    .erp-kpi-card {
        min-height: 96px;
    }

    .erp-app-directory,
    .erp-rail-card,
    .erp-session-card {
        padding: 15px;
    }

    .erp-directory-summary span:not(:first-child) {
        display: none;
    }

    .erp-app-card-body {
        align-items: flex-start;
    }
}
