/* Alpline 2.4.1 premium portal layer: fast, local-font, cache-versioned. */
:root {
    --ap-ink: #10251d;
    --ap-forest: #0b3d2d;
    --ap-forest-2: #13543f;
    --ap-emerald: #177a58;
    --ap-gold: #d6ae4a;
    --ap-gold-soft: #f3e4b8;
    --ap-canvas: #f3f6f4;
    --ap-card: #ffffff;
    --ap-line: #dce5df;
    --ap-muted: #66736d;
    --ap-danger: #b9423b;
    --ap-warning: #a36d11;
    --ap-success: #16734e;
    --ap-shadow: 0 16px 44px rgba(19, 51, 38, .09);
}

.portal-body,
.portal-body button,
.portal-body input,
.portal-body select,
.portal-body textarea {
    font-family: Aptos, "Segoe UI Variable", "Segoe UI", Arial, sans-serif !important;
}

.portal-body {
    background: var(--ap-canvas);
    color: var(--ap-ink);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.portal-body h1,
.portal-body h2,
.portal-body h3,
.portal-body h4,
.portal-body em,
.portal-body strong,
.portal-body b {
    font-family: inherit !important;
}

.portal-body h1,
.portal-body h2,
.portal-body h3 {
    font-style: normal;
    letter-spacing: -.025em;
}

.portal-sidebar {
    width: 292px;
    padding: 22px 18px;
    background:
        radial-gradient(circle at 15% 0, rgba(66, 142, 106, .28), transparent 25%),
        linear-gradient(180deg, #071b14 0%, #0d281e 58%, #081711 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 12px 0 38px rgba(13, 35, 27, .16);
}

.portal-brand {
    height: 72px;
    margin: 0 3px 14px;
    padding: 7px 8px;
}

.portal-brand img {
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, .25);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.portal-brand b {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .14em;
}

.portal-brand small {
    margin-top: 2px;
    color: #c8d7d0;
    font-size: 9px;
    letter-spacing: .17em;
}

.live-data-badge {
    margin: 4px 7px 20px;
    padding: 9px 12px;
    border-color: rgba(255, 255, 255, .13);
    background: rgba(255, 255, 255, .055);
    color: #d8eee4;
}

.portal-nav-label {
    margin: 21px 12px 8px;
    color: #91a89d;
    font-size: 10px;
    letter-spacing: .15em;
}

.portal-nav {
    gap: 4px;
}

.portal-nav a,
.portal-nav-group summary {
    min-height: 46px;
    padding: 8px 11px;
    border-radius: 9px;
    color: #e2e9e5;
    font-size: 14px;
    font-weight: 600;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.portal-nav a:hover,
.portal-nav-group summary:hover {
    background: rgba(255, 255, 255, .075);
    transform: translateX(2px);
}

.portal-nav a.active {
    background: linear-gradient(135deg, #f8fbf9, #edf4f0);
    color: #12271f;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .22);
}

.portal-nav a i,
.portal-nav-group summary i {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    color: #e7c96f;
}

.portal-stage {
    margin-left: 292px;
}

.portal-topbar {
    height: 80px;
    padding: 0 34px;
    gap: 15px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--ap-line);
    box-shadow: 0 6px 22px rgba(25, 51, 40, .045);
    backdrop-filter: blur(14px);
}

.topbar-identity {
    display: grid;
    gap: 2px;
    padding-left: 3px;
}

.topbar-identity small {
    color: #7d8a84;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.topbar-identity b {
    color: #17251f;
    font-size: 17px;
    font-weight: 750;
}

.esc-back {
    min-height: 37px;
    border-color: #d1dbd5;
    border-radius: 9px;
    background: #f8faf9;
}

.portal-top-actions {
    gap: 24px;
}

.portal-top-actions > a,
.portal-top-actions summary {
    color: #263b32;
    font-size: 13px;
    font-weight: 700;
}

.portal-content {
    max-width: 1760px;
    margin: 0 auto;
    padding: 32px;
}

.portal-content > main {
    min-height: calc(100vh - 144px);
}

.portal-content .admin-console-head,
.portal-content .dash-head,
.portal-content .network-head,
.update-hero {
    position: relative;
    overflow: hidden;
    min-height: 285px;
    padding: 44px 46px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 22px;
    background:
        radial-gradient(circle at 92% 8%, rgba(235, 203, 105, .24), transparent 28%),
        linear-gradient(128deg, #09281e 0%, #13523d 58%, #1d654d 100%);
    color: #fff;
    box-shadow: 0 22px 55px rgba(13, 55, 41, .18);
}

.portal-content .admin-console-head::after,
.portal-content .dash-head::after,
.portal-content .network-head::after,
.update-hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -150px;
    bottom: -230px;
    border: 1px solid rgba(242, 213, 122, .3);
    border-radius: 50%;
    box-shadow: 0 0 0 45px rgba(255, 255, 255, .025), 0 0 0 92px rgba(255, 255, 255, .018);
    pointer-events: none;
}

.portal-content .admin-console-head > *,
.portal-content .dash-head > *,
.portal-content .network-head > *,
.update-hero > * {
    position: relative;
    z-index: 1;
}

.portal-content .admin-console-head h1,
.portal-content .dash-head h1,
.portal-content .network-head h1,
.update-hero h1 {
    margin: 7px 0 15px;
    color: #fff;
    font-size: clamp(38px, 4.2vw, 58px);
    font-weight: 780;
    line-height: 1.02;
    letter-spacing: -.045em;
}

.portal-content .admin-console-head h1 em,
.portal-content .dash-head h1 em,
.portal-content .network-head h1 em,
.update-hero h1 em {
    color: #f1d47e;
    font-style: normal;
    font-weight: 780;
}

.portal-content .eyebrow {
    margin: 0;
    color: #f0d17b;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .17em;
}

.portal-content .eyebrow.dark {
    color: #94701b;
}

.portal-content .admin-console-head p:not(.eyebrow),
.portal-content .dash-head p:not(.eyebrow),
.portal-content .network-head p:not(.eyebrow),
.update-hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 0;
    color: #d9e8e1;
    font-size: 16px;
    line-height: 1.7;
}

.portal-content .root-id-card,
.portal-content .identity,
.portal-content .network-identity {
    min-width: 315px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    background: rgba(4, 25, 18, .72);
    box-shadow: 0 14px 35px rgba(1, 20, 14, .23);
}

.portal-content .root-id-card strong {
    margin: 11px 0;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
}

.portal-content .root-id-card p {
    color: #c8dad2 !important;
    font-size: 12px !important;
}

.portal-content .root-id-card a {
    color: #f3d47b;
    text-decoration: none;
}

.admin-quick-launch {
    margin: 18px 0;
    padding: 0 !important;
    display: grid;
    grid-template-columns: 1.3fr repeat(4, 1fr);
    gap: 11px;
}

.admin-quick-launch > a {
    min-height: 96px;
    padding: 17px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--ap-line);
    border-radius: 13px;
    background: #fff;
    color: var(--ap-ink);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(22, 55, 41, .055);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-quick-launch > a:hover {
    transform: translateY(-3px);
    border-color: #ceb460;
    box-shadow: var(--ap-shadow);
}

.admin-quick-launch > a.primary {
    border-color: #195a43;
    background: linear-gradient(135deg, #0c3628, #176047);
    color: #fff;
}

.admin-quick-launch i {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f4e7be;
    color: #745816;
    font-style: normal;
    font-size: 18px;
}

.admin-quick-launch span {
    display: grid;
    gap: 4px;
}

.admin-quick-launch b {
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .04em;
}

.admin-quick-launch small {
    color: #6f7b75;
    font-size: 10px;
    line-height: 1.35;
}

.admin-quick-launch .primary small {
    color: #cde3d9;
}

.portal-content .admin-kpis,
.portal-content .metrics,
.portal-content .guardrails,
.portal-content .network-metrics {
    margin-top: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    background: transparent;
}

.portal-content .admin-kpis article,
.portal-content .metrics article,
.portal-content .guardrails article,
.portal-content .network-metrics article {
    min-height: 116px;
    padding: 21px;
    display: grid;
    align-content: center;
    gap: 8px;
    border: 1px solid var(--ap-line);
    border-radius: 13px;
    background: #fff;
    color: var(--ap-ink);
    box-shadow: 0 8px 25px rgba(22, 55, 41, .05);
}

.portal-content .admin-kpis small,
.portal-content .metrics small,
.portal-content .guardrails span,
.portal-content .network-metrics small {
    color: #6e7a74;
    font-size: 11px;
    font-weight: 750;
}

.portal-content .admin-kpis b,
.portal-content .metrics b,
.portal-content .guardrails b,
.portal-content .network-metrics b {
    color: #183128;
    font-size: 30px;
    font-weight: 780;
}

.portal-content .admin-kpis .structure {
    border-color: #d8c47e;
    background: #fffbef;
}

.portal-content .admin-kpis .warning { background: #fff8e6; }
.portal-content .admin-kpis .danger { background: #fff0ef; }
.portal-content .admin-kpis .success { background: #edf9f2; }

.portal-content .launch-readiness {
    margin: 18px 0;
    padding: 27px 30px;
    border-radius: 14px;
}

.portal-content .admin-modules {
    padding: 48px 0;
}

.portal-content h2 {
    color: #163027;
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 770;
    line-height: 1.15;
}

.portal-content .module-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.portal-content .module-grid > a {
    min-height: 205px;
    padding: 24px;
    border: 1px solid var(--ap-line);
    border-radius: 15px;
    background: linear-gradient(145deg, #fff, #f9fbfa);
    box-shadow: 0 10px 30px rgba(21, 52, 40, .055);
}

.portal-content .module-grid h3 {
    margin: 25px 0 9px;
    color: #173128;
    font-size: 20px;
    font-weight: 760;
}

.portal-content .module-grid p {
    color: #68756e;
    font-size: 13px;
    line-height: 1.55;
}

.portal-content .module-grid b {
    color: #126247;
    font-size: 10px;
}

.portal-content .control-card,
.portal-content .tree-section,
.portal-content .team-section,
.portal-content .income-trace,
.portal-content .invite-card,
.portal-content .recent-ids {
    border: 1px solid var(--ap-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(21, 52, 40, .06);
}

.portal-content .recent-ids {
    padding: 30px;
}

.portal-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.portal-content th {
    color: #68766f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
}

.portal-content td {
    color: #263b32;
    font-size: 13px;
}

.portal-content th,
.portal-content td {
    padding: 14px 13px;
    border-bottom: 1px solid #e5ebe7;
}

/* Secure update centre */
.update-centre {
    max-width: 1480px;
    margin: 0 auto;
}

.update-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(230px, .7fr);
    align-items: center;
    min-height: 360px;
}

.update-hero h1 {
    font-size: clamp(42px, 5vw, 66px);
}

.update-badges {
    margin-top: 23px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.update-badges span {
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #eef7f3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.reverse-orbit,
.reverse-control {
    display: grid;
    place-items: center;
}

.orbit-ring,
.reverse-face {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    text-align: center;
    border-radius: 50%;
    position: relative;
}

.orbit-ring {
    width: min(260px, 25vw);
    min-width: 210px;
    background: conic-gradient(from 25deg, #efcf73, #218565, #e7f1ed, #218565, #efcf73);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, .07), 0 25px 55px rgba(0, 20, 14, .45);
}

.orbit-ring::before {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: #0a3327;
    border: 1px solid rgba(255, 255, 255, .16);
}

.orbit-ring > *,
.reverse-face > * {
    position: relative;
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
}

.orbit-ring span {
    transform: translateY(-51px);
    color: #f0cf70;
    font-size: 48px;
}

.orbit-ring b {
    color: #fff;
    font-size: 20px;
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: .1em;
}

.orbit-ring small {
    transform: translateY(54px);
    color: #bcd7cc;
    font-size: 11px;
}

.health-console {
    margin: 20px 0;
    padding: 25px 28px;
    display: grid;
    grid-template-columns: minmax(250px, .65fr) minmax(0, 1.35fr);
    align-items: center;
    gap: 24px;
    border: 1px solid var(--ap-line);
    border-left: 6px solid var(--ap-success);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(18, 55, 41, .06);
}

.health-console.blocked { border-left-color: var(--ap-danger); }
.health-console h2 { margin: 4px 0 0; font-size: 27px; }

.health-pills {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.health-pills span {
    padding: 8px 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #e0e8e3;
    border-radius: 999px;
    background: #f7faf8;
    color: #42564d;
    font-size: 11px;
    font-weight: 750;
}

.health-pills i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #15a66e;
    box-shadow: 0 0 0 4px rgba(21, 166, 110, .12);
}

.health-pills .fail i { background: #d44c42; }

.update-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.update-grid .control-card {
    margin: 0;
    padding: 28px;
}

.update-grid .control-card h2 {
    margin: 9px 0 12px;
    font-size: 29px;
}

.update-grid .control-card p {
    color: var(--ap-muted);
    font-size: 14px;
    line-height: 1.65;
}

.emergency-card {
    border-color: #e2cb88 !important;
    background: linear-gradient(145deg, #fffdf6, #faf4e2) !important;
}

.update-centre form {
    display: grid;
    gap: 13px;
}

.update-centre form label {
    display: grid;
    gap: 7px;
    color: #34483f;
    font-size: 12px;
    font-weight: 750;
}

.update-centre form input[type="file"],
.update-centre form input[type="password"],
.update-centre form input[name="confirmation"] {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #bac9c1;
    border-radius: 10px;
    background: #fff;
    color: #1d342a;
    font-size: 13px;
}

.update-centre .btn {
    min-height: 47px;
    border-radius: 10px;
    font-size: 11px;
}

.signed-preview {
    margin: 20px 0;
    padding: 30px;
    border: 1px solid var(--ap-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--ap-shadow);
}

.preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.release-arrow {
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-radius: 12px;
    background: #eef6f2;
}

.release-arrow b { color: #af821c; font-size: 24px; }
.release-arrow strong { color: #0a6245; }

.change-kpis {
    margin: 22px 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.change-kpis article {
    padding: 17px;
    border: 1px solid var(--ap-line);
    border-radius: 12px;
    background: #f7faf8;
}

.change-kpis small {
    display: block;
    color: #6b7a73;
    font-size: 9px;
    font-weight: 850;
}

.change-kpis b {
    display: block;
    margin-top: 7px;
    color: #163d30;
    font-size: 23px;
}

.file-change-grid,
.install-confirm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.file-change-grid { margin: 20px 0; }

.file-change-grid details {
    padding: 16px;
    border: 1px solid var(--ap-line);
    border-radius: 12px;
}

.file-change-grid summary { cursor: pointer; font-weight: 800; }

.file-change-grid details > div {
    max-height: 240px;
    margin-top: 12px;
    display: grid;
    gap: 5px;
    overflow: auto;
}

.file-change-grid code {
    padding: 6px 8px;
    border-radius: 6px;
    background: #f2f6f4;
    font-size: 11px;
}

.install-confirm {
    padding-top: 22px;
    border-top: 1px solid var(--ap-line);
}

.install-action {
    padding: 22px;
    border-radius: 14px;
    background: #0a3428;
    color: #eaf6f1;
}

.rollback-stage {
    margin: 22px 0;
    padding: 32px;
    display: grid;
    grid-template-columns: 255px 1fr;
    align-items: center;
    gap: 34px;
    border: 1px solid #d2e2da;
    border-radius: 20px;
    background: linear-gradient(145deg, #f9fcfa, #eaf5f0);
}

.reverse-face {
    width: 205px;
    background: conic-gradient(#d3aa3e 0 28%, #137557 28% 82%, #e8f2ee 82%);
    color: #fff;
    box-shadow: inset 0 0 0 14px #eff7f3, 0 18px 42px rgba(12, 79, 57, .22);
}

.reverse-face::before {
    content: "";
    position: absolute;
    inset: 27px;
    border-radius: 50%;
    background: #0a3a2c;
}

.reverse-face span {
    transform: translateY(-45px);
    color: #f0cc69;
    font-size: 42px;
}

.reverse-face b {
    font-size: 15px;
    font-weight: 850;
    line-height: 1.06;
    letter-spacing: .09em;
}

.reverse-face small {
    transform: translateY(46px);
    color: #d1e6dd;
    font-size: 9px;
}

.rollback-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.reverse-btn {
    width: max-content;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px !important;
    background: linear-gradient(100deg, #a37716, #116d50) !important;
    color: #fff !important;
}

@media (max-width: 1180px) {
    .admin-quick-launch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-quick-launch > a.primary { grid-column: span 2; }
    .portal-content .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .portal-sidebar { transform: translateX(-100%); }
    .sidebar-open .portal-sidebar { transform: translateX(0); }
    .portal-stage { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .portal-content .admin-console-head,
    .portal-content .dash-head,
    .portal-content .network-head,
    .update-hero,
    .health-console,
    .rollback-stage { grid-template-columns: 1fr; }
    .reverse-orbit { margin-top: 24px; }
    .health-pills { justify-content: flex-start; }
    .portal-content .admin-kpis,
    .portal-content .metrics,
    .portal-content .guardrails,
    .portal-content .network-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .portal-topbar { height: 72px; padding: 0 15px; }
    .topbar-identity small { display: none; }
    .topbar-identity b { font-size: 14px; }
    .portal-content { padding: 16px; }
    .portal-content .admin-console-head,
    .portal-content .dash-head,
    .portal-content .network-head,
    .update-hero { min-height: 0; padding: 30px 23px; border-radius: 16px; }
    .portal-content .admin-console-head h1,
    .portal-content .dash-head h1,
    .portal-content .network-head h1,
    .update-hero h1 { font-size: 36px; }
    .portal-content .root-id-card,
    .portal-content .identity,
    .portal-content .network-identity { min-width: 0; }
    .admin-quick-launch,
    .portal-content .module-grid,
    .update-grid,
    .change-kpis,
    .file-change-grid,
    .install-confirm,
    .rollback-fields { grid-template-columns: 1fr; }
    .admin-quick-launch > a.primary { grid-column: auto; }
    .change-kpis { grid-template-columns: 1fr 1fr; }
    .rollback-stage { padding: 24px 20px; }
}

@media (max-width: 430px) {
    .portal-content .admin-kpis,
    .portal-content .metrics,
    .portal-content .guardrails,
    .portal-content .network-metrics,
    .change-kpis { grid-template-columns: 1fr; }
    .esc-back kbd { display: none; }
}

/* Alpline 2.5 final operations readiness and print-safe invoice. */
.readiness-page { max-width: 1540px; margin: 0 auto; }
.readiness-hero { min-height: 330px; padding: 48px; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; border-radius: 18px; color: #fff; background: radial-gradient(circle at 84% 15%, rgba(225,190,91,.22), transparent 28%), linear-gradient(125deg,#08281d,#174b38 58%,#263d31); box-shadow: var(--ap-shadow); }
.readiness-hero h1 { margin: 8px 0 18px; font-size: clamp(42px,5vw,72px); line-height: .98; }
.readiness-hero h1 em { color: #f1cf72; font-style: normal; }
.readiness-hero p:not(.eyebrow) { max-width: 760px; color: #d7e4dd; font-size: 16px; line-height: 1.7; }
.readiness-score { min-width: 210px; display: grid; place-items: center; gap: 14px; }
.readiness-score>span { width: 170px; height: 170px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle closest-side,#102d22 77%,transparent 79% 99%), conic-gradient(#e1b84f var(--score),rgba(255,255,255,.16) 0); }
.readiness-score b { font-size: 40px; color: #fff; }
.readiness-score small { color: #dce8e2; font-weight: 800; letter-spacing: .09em; }
.readiness-note { margin: 16px 0; padding: 18px 22px; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; border: 1px solid #cbdcd2; border-radius: 10px; background: #ecf7f1; }
.readiness-note b { color: #126b4b; font-size: 12px; letter-spacing: .08em; }
.readiness-note span { color: #43554c; }
.readiness-note a { color: #0e583f; font-size: 12px; font-weight: 800; text-decoration: none; }
.readiness-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.readiness-grid article { min-height: 245px; padding: 25px; display: flex; flex-direction: column; border: 1px solid var(--ap-line); border-radius: 12px; background: #fff; box-shadow: 0 8px 30px rgba(14,51,37,.05); }
.readiness-grid article.ready { border-top: 4px solid #16805a; }
.readiness-grid article.attention { border-top: 4px solid #c17e16; background: #fffaf0; }
.readiness-grid header { display: flex; align-items: center; justify-content: space-between; }
.readiness-grid header span { color: #9b7b2a; font-size: 12px; font-weight: 900; }
.readiness-grid header b { padding: 5px 8px; border-radius: 999px; color: #116b4b; background: #e5f5ed; font-size: 10px; letter-spacing: .08em; }
.readiness-grid h2 { margin: 25px 0 10px; font-size: 24px; }
.readiness-grid p { flex: 1; margin: 0 0 18px; color: var(--ap-muted); line-height: 1.6; }
.readiness-grid small { color: #8b702a; font-weight: 800; letter-spacing: .07em; }
.readiness-grid a { margin-top: 16px; color: #0d5c42; font-size: 12px; font-weight: 900; text-decoration: none; }
.readiness-boundary { margin-top: 18px; padding: 38px; display: grid; grid-template-columns: .75fr 1.25fr; gap: 45px; border-radius: 14px; background: #f1ead7; }
.readiness-boundary h2 { margin: 8px 0; }
.readiness-boundary p { margin: 0; color: #4c554f; line-height: 1.85; }
.invoice-page .dash-head .btn { width: max-content; margin-top: 18px; }
.level-performance-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.level-performance-grid article { min-height: 145px; padding: 17px; display: grid; align-content: start; gap: 8px; border: 1px solid var(--ap-line); border-radius: 10px; background: #f7f9f7; overflow: hidden; }
.level-performance-grid article.has-business { background: linear-gradient(145deg,#fff,#edf8f2); border-color: #b9daca; }
.level-performance-grid header { display: flex; justify-content: space-between; align-items: center; }
.level-performance-grid header b { color: #b18727; font-size: 18px; }
.level-performance-grid header span,.level-performance-grid small { color: var(--ap-muted); font-size: 11px; }
.level-performance-grid strong { margin-top: 7px; color: #0f5f43; font-size: 20px; }
.level-performance-grid i { height: 5px; margin-top: 5px; position: relative; border-radius: 5px; background: #dce6e0; overflow: hidden; }
.level-performance-grid i:after { content: ''; width: var(--fill); position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg,#14805a,#e0b64c); }
.performance-columns { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; }
.income-total-list { display: grid; gap: 8px; }
.income-total-list span { padding: 14px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--ap-line); }
.income-total-list small { color: var(--ap-muted); }
.income-total-list b { color: #116849; }
.directory-filter { display: grid; grid-template-columns: 1fr 1.5fr .75fr .75fr auto; gap: 12px; align-items: end; }
.directory-filter label { display: grid; gap: 7px; }
.directory-filter input,.directory-filter select { min-height: 44px; }
.privacy-alert { margin-top: 18px; padding: 17px; display: flex; align-items: center; gap: 16px; border-radius: 9px; background: #fff2d5; border-left: 5px solid #d0a139; }
.privacy-alert b { color: #75540c; font-size: 12px; letter-spacing: .06em; }
.privacy-alert span { flex: 1; color: #665b44; }

@media (max-width: 1050px) { .readiness-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 1100px) { .level-performance-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .directory-filter { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .readiness-hero,.readiness-boundary,.performance-columns { grid-template-columns: 1fr; padding: 28px 22px; } .readiness-score { justify-self: center; } .readiness-note,.readiness-grid,.level-performance-grid,.directory-filter { grid-template-columns: 1fr; } .privacy-alert { align-items: flex-start; flex-direction: column; } }

@media print {
    .portal-sidebar,.portal-topbar,.impersonation-banner,.no-print,.assist-button,.assist { display: none !important; }
    .portal-stage { margin: 0 !important; }
    .portal-content { padding: 0 !important; }
    .invoice-page { background: #fff !important; color: #111 !important; }
    .invoice-page .dash-head { min-height: 0 !important; padding: 25px !important; border: 2px solid #183e2f; background: #fff !important; color: #111 !important; break-inside: avoid; }
    .invoice-page .dash-head p,.invoice-page .dash-head .eyebrow { color: #333 !important; }
    .invoice-page .identity { border: 1px solid #999 !important; background: #fff !important; color: #111 !important; }
    .invoice-page .control-card { margin: 15px 0 !important; padding: 22px !important; border: 1px solid #aaa !important; box-shadow: none !important; break-inside: avoid; }
    @page { size: A4; margin: 14mm; }
}

/* V2.5 VIP glass update studio */
.master-action-grid{margin:20px 0;display:grid;gap:15px}.master-action{position:relative;padding:25px 26px 25px 88px;display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.55fr);align-items:center;gap:24px;border:1px solid #d6e4de;border-radius:18px;background:linear-gradient(125deg,rgba(255,255,255,.96),rgba(241,249,245,.9));box-shadow:0 14px 38px rgba(10,62,44,.08);overflow:hidden}.master-action:before{content:"";position:absolute;inset:0 auto 0 0;width:7px;background:#16845e}.master-action.restore-action:before{background:#d6a72d}.master-action.update-action:before{background:#182f27}.action-number{position:absolute;left:24px;top:26px;width:43px;height:43px;display:grid;place-items:center;border-radius:50%;background:#073f30;color:#efd070;font-weight:900}.master-action h2{margin:4px 0 8px;font-size:27px}.master-action p{margin:0;color:#52665d;line-height:1.65}.master-action details{margin-top:13px;padding:10px 13px;border:1px solid #d9e5df;border-radius:10px;background:rgba(255,255,255,.75)}.master-action summary{cursor:pointer;color:#0c6247;font-weight:850}.master-action ul{margin:10px 0 2px;padding-left:20px;color:#455a51;line-height:1.7}.master-action form{display:grid;gap:11px}.master-action form label{display:grid;gap:6px;font-size:12px;font-weight:800}.master-action input{width:100%;min-height:46px;padding:11px;border:1px solid #bacac2;border-radius:9px;background:#fff}.master-action>a.btn{justify-self:stretch;text-align:center}.verified-restore{border:2px solid #2c9d72}.safety-master-hero{background:radial-gradient(circle at 82% 20%,rgba(230,190,78,.2),transparent 25%),linear-gradient(135deg,#063a2b,#116b4e)!important}
.simple-success-card{margin:20px 0;padding:24px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:20px;border:1px solid #94d7bb;border-radius:20px;background:linear-gradient(135deg,rgba(235,253,245,.94),rgba(255,251,237,.92));box-shadow:0 18px 48px rgba(7,79,53,.12)}
.simple-success-card h2{margin:3px 0 7px}.simple-success-card code{display:inline-block;margin-top:7px;padding:8px 10px;border-radius:8px;background:#fff}.simple-success-actions{display:grid;gap:9px}.upload-vip{border-top:5px solid #0c7554!important}
.glass-workflow{margin:22px 0;padding:18px;display:grid;grid-template-columns:repeat(9,auto);align-items:center;justify-content:space-between;gap:8px;border:1px solid rgba(255,255,255,.82);border-radius:20px;background:linear-gradient(120deg,rgba(242,251,247,.82),rgba(255,249,229,.7));box-shadow:inset 0 1px 0 #fff,0 18px 40px rgba(13,75,54,.1);backdrop-filter:blur(18px)}
.glass-workflow>div{min-width:108px;padding:13px;display:grid;place-items:center;gap:3px;border:1px solid rgba(185,213,201,.8);border-radius:15px;background:rgba(255,255,255,.72)}.glass-workflow i{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#dfeae5;color:#37584b;font-style:normal}.glass-workflow b{font-size:12px}.glass-workflow small{font-size:8px;font-weight:900;letter-spacing:.08em;color:#6a7d74}.glass-workflow .done i,.glass-workflow .ready i{background:linear-gradient(135deg,#0c8d62,#e2b640);color:#fff}.glass-workflow>span{color:#bd922a;font-size:22px}
.vip-safety-strip{margin:12px 0 4px;display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.vip-safety-strip span{padding:13px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:2px 8px;border:1px solid #cfe4da;border-radius:12px;background:#f2fbf6}.vip-safety-strip i{grid-row:1/3;width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:#11875f;color:#fff;font-style:normal}.vip-safety-strip b{font-size:12px}.vip-safety-strip small{color:#11875f;font-size:9px;font-weight:900;letter-spacing:.08em}
.simple-check{margin-top:5px;padding:13px;display:grid!important;grid-template-columns:auto 1fr;align-items:start;border:1px solid #d8e5df;border-radius:10px;background:#f8fbf9}.simple-check input{width:18px;height:18px;margin:0;accent-color:#087652}.simple-install .install-action h3{margin:12px 0 3px;color:#fff}.simple-install .install-action p{color:#d6ebe3}
@media(max-width:900px){.master-action{padding:76px 20px 22px;grid-template-columns:1fr}.simple-success-card{grid-template-columns:1fr}.glass-workflow{grid-template-columns:1fr}.glass-workflow>span{transform:rotate(90deg);text-align:center}.vip-safety-strip{grid-template-columns:1fr 1fr}}

/* Complete function guide: plain-language operating book inside Super Admin. */
.function-guide-page{max-width:1540px;margin:0 auto}.guide-group{margin-top:18px}.guide-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.guide-grid article{min-height:285px;padding:24px;display:flex;flex-direction:column;border:1px solid #d4e1db;border-radius:16px;background:linear-gradient(145deg,#fff,#f3f8f5);box-shadow:0 12px 32px rgba(9,63,44,.06)}.guide-grid article:before{content:"";width:42px;height:4px;margin-bottom:19px;border-radius:5px;background:linear-gradient(90deg,#07815b,#ddb03a)}.guide-grid h3{margin:0 0 10px;color:#092e23;font-size:21px}.guide-grid p{flex:1;margin:0 0 16px;color:#53645d;line-height:1.7}.guide-grid details{margin-bottom:17px;padding:11px 13px;border:1px solid #d8e5df;border-radius:10px;background:rgba(255,255,255,.8)}.guide-grid summary{cursor:pointer;color:#8a6a17;font-size:11px;font-weight:900;letter-spacing:.07em}.guide-grid details span{display:block;margin-top:9px;color:#40544b;font-size:13px;line-height:1.55}.guide-grid .btn{margin-top:auto;width:max-content}
@media(max-width:1100px){.guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.guide-grid{grid-template-columns:1fr}.guide-grid article{min-height:0}.vip-safety-strip{grid-template-columns:1fr}}

/* V2.5 Income Plan Master: current-vs-revision and rupee trace. */
.plan-master-page{max-width:1580px;margin:0 auto}.plan-master-hero{background:radial-gradient(circle at 82% 18%,rgba(226,184,67,.22),transparent 27%),linear-gradient(125deg,#062f24,#0d6349 60%,#173e31)!important}.plan-share-actions{margin-top:22px;display:flex;gap:10px;flex-wrap:wrap}.plan-share-actions .outline{color:#fff;border-color:rgba(255,255,255,.5)}.plan-total-pill,.calculation-lock{padding:9px 13px;border:1px solid #cde0d6;border-radius:999px;color:#116547;background:#eef9f3;font-size:10px;font-weight:900;letter-spacing:.08em}.income-map-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.income-map-grid article{min-height:190px;padding:20px;display:flex;flex-direction:column;border:1px solid #d5e2dc;border-radius:14px;background:linear-gradient(145deg,#fff,#f2f8f5)}.income-map-grid article>small{color:#9b7723;font-size:10px;font-weight:900;letter-spacing:.07em}.income-map-grid h3{margin:12px 0 8px}.income-map-grid p{flex:1;color:#53655d}.income-map-grid p b{font-size:27px;color:#08714f}.income-map-grid .status{margin-top:auto;width:max-content}.mini-level-rates{flex:1;display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.mini-level-rates span{padding:6px 7px;border-radius:7px;background:#edf4f0;color:#63736c;font-size:10px}.mini-level-rates b{display:block;color:#0d6749;font-size:12px}.calculator-inputs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:10px;align-items:end}.calculator-inputs label{display:grid;gap:6px;font-size:11px;font-weight:850}.calculator-inputs input{min-height:46px;padding:10px;border:1px solid #b8cbc1;border-radius:9px}.calculation-ledger{margin-top:18px;border:1px solid #cfddd6;border-radius:16px;overflow:hidden;background:rgba(255,255,255,.88)}.calculation-head,.calculation-line{display:grid;grid-template-columns:1.1fr .8fr 1.6fr .55fr;gap:12px;align-items:center}.calculation-head{padding:12px 16px;color:#dcb241;background:#0a392b;font-size:10px;font-weight:900;letter-spacing:.07em}.calculation-line{padding:13px 16px;border-bottom:1px solid #e0e8e4}.calculation-line:last-child{border-bottom:0}.calculation-line>span{display:grid;gap:3px}.calculation-line small{color:#708078;font-size:10px}.calculation-line code{color:#114f3c;font-weight:800}.calculation-line>span:last-child b{color:#0a7652;font-size:17px;text-align:right}.calculation-totals{margin-top:12px;padding:18px;display:grid;grid-template-columns:auto auto 1fr;gap:25px;align-items:center;border-radius:14px;background:linear-gradient(120deg,#eaf8f1,#fff7dc)}.calculation-totals span{display:grid}.calculation-totals small{color:#7d6a38;font-size:9px;font-weight:900}.calculation-totals b{font-size:23px;color:#0a6849}.calculation-totals p{margin:0;color:#56665f;line-height:1.55}.plan-compare-table td>small{display:block;margin-top:4px;color:#76847e}.plan-compare-table input[type=number]{min-width:125px;padding:9px;border:1px solid #b9cac2;border-radius:8px}.switch-control{display:inline-flex}.switch-control input{position:absolute;opacity:0}.switch-control span{width:50px;height:26px;position:relative;border-radius:20px;background:#cad5d0;transition:.2s}.switch-control span:after{content:"";width:20px;height:20px;position:absolute;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 6px #0003;transition:.2s}.switch-control input:checked+span{background:#12805a}.switch-control input:checked+span:after{transform:translateX(24px)}.revision-save-bar{margin:16px 0;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:20px;border:1px solid #cfdfd7;border-radius:14px;background:#eff8f3}.revision-save-bar div{display:grid;gap:5px}.revision-save-bar b{color:#0c5e44}.revision-save-bar span{color:#5f7168;font-size:12px}
@media(max-width:1100px){.income-map-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.calculator-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.calculator-inputs .btn{grid-column:span 2}.calculation-head,.calculation-line{grid-template-columns:1fr 1fr}.calculation-totals{grid-template-columns:1fr 1fr}.calculation-totals p{grid-column:1/-1}}@media(max-width:700px){.income-map-grid,.calculator-inputs,.calculation-head,.calculation-line,.calculation-totals{grid-template-columns:1fr}.calculator-inputs .btn,.calculation-totals p{grid-column:auto}.calculation-head{display:none}.calculation-line>span:last-child b{text-align:left}.revision-save-bar{align-items:stretch;flex-direction:column}}

.payout-reconciliation{margin:16px 0;padding:22px 25px;display:grid;grid-template-columns:1.5fr repeat(5,minmax(105px,.5fr));gap:12px;align-items:center;border:1px solid #bddbcd;border-left:7px solid #13815b;border-radius:16px;background:linear-gradient(120deg,#eaf8f1,#fff)}.payout-reconciliation.attention{border-left-color:#bd3b2b;background:#fff0ed}.payout-reconciliation h2{margin:4px 0}.payout-reconciliation>span{padding:12px;display:grid;border-radius:10px;background:rgba(255,255,255,.8)}.payout-reconciliation small{color:#75857e;font-size:9px;font-weight:900}.payout-reconciliation b{color:#0c6247;font-size:18px}.formula-proof{min-width:260px;padding:9px 11px;border:1px solid #d4e2db;border-radius:9px;background:#f5faf7}.formula-proof summary{cursor:pointer;color:#0b6648;font-size:11px;font-weight:900}.formula-proof code,.formula-proof span,.formula-proof small{display:block;margin-top:7px;white-space:normal}.formula-proof code{color:#765a17;font-weight:800}.formula-proof span{font-size:11px;color:#465950}.formula-proof small{color:#78857f;font-size:9px}
@media(max-width:1100px){.payout-reconciliation{grid-template-columns:repeat(3,1fr)}.payout-reconciliation>div{grid-column:1/-1}}@media(max-width:700px){.payout-reconciliation{grid-template-columns:1fr}.payout-reconciliation>div{grid-column:auto}}
