:root {
    --sb-yellow: #fbd414;
    --sb-yellow-soft: #fff7c7;
    --sb-green: #049f64;
    --sb-green-light: #64bc49;
    --sb-blue: #1068b8;
    --sb-blue-light: #438ccb;
    --sb-cyan: #0a6a90;
    --sb-navy: #072f74;
    --sb-primary: #00507d;
    --sb-ink: #0f172a;
    --sb-muted: #475569;
    --sb-border: #e2e8f0;
    --sb-surface: #ffffff;
    --sb-background: #f5f8fb;
    --sb-danger: #b42318;
    --sidebar-width: 276px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    color: var(--sb-ink);
    background: var(--sb-background);
    font-family: "Bahnschrift", "Aptos", "Trebuchet MS", sans-serif;
}

body {
    min-height: 100vh;
}

a {
    color: var(--sb-blue);
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.login-layout {
    min-height: 100vh;
}

.login-page {
    display: grid;
    grid-template-columns: minmax(440px, 1.05fr) minmax(420px, 0.95fr);
    min-height: 100vh;
    background: var(--sb-surface);
}

.login-story {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: 54px clamp(40px, 6vw, 92px);
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(7, 47, 116, 0.98), rgba(0, 80, 125, 0.94)),
        var(--sb-navy);
}

.login-story::before {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    content: "";
    mask-image: linear-gradient(to bottom, transparent, #000 32%, #000);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-lockup > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}

.brand-lockup strong {
    font-size: 1.02rem;
    letter-spacing: 0.015em;
}

.brand-lockup small {
    margin-top: 5px;
    color: inherit;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    opacity: 0.7;
    text-transform: uppercase;
}

.brand-logo {
    display: block;
    width: 180px;
    height: auto;
    object-fit: contain;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 48px;
    height: 48px;
    border-radius: 14px 4px 14px 4px;
    color: var(--sb-navy);
    background: var(--sb-yellow);
    place-items: center;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.brand-lockup-light {
    position: absolute;
    z-index: 2;
    top: 54px;
    left: clamp(40px, 6vw, 92px);
    padding: 12px 15px;
    border-radius: 14px 4px 14px 4px;
    color: var(--sb-navy);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
}

.brand-lockup-light small {
    color: var(--sb-navy);
    opacity: 0.62;
}

.story-copy {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: auto 0;
    padding-bottom: 7vh;
    animation: reveal-up 650ms ease both;
}

.section-label {
    margin: 0 0 10px;
    color: var(--sb-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-label-light {
    color: var(--sb-yellow);
}

.story-copy h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(2.7rem, 4.8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.96;
}

.energy-orbit {
    position: absolute;
    right: -150px;
    bottom: -170px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.orbit-line {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.orbit-line-one {
    inset: 60px;
}

.orbit-line-two {
    inset: 120px;
}

.orbit-sun {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--sb-yellow);
    box-shadow: 0 0 80px rgba(251, 212, 20, 0.35);
    transform: translate(-50%, -50%);
}

.orbit-grid {
    position: absolute;
    top: 92px;
    left: 10px;
    width: 190px;
    height: 120px;
    border: 5px solid var(--sb-green-light);
    background:
        linear-gradient(rgba(255, 255, 255, 0.2) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.2) 2px, transparent 2px),
        var(--sb-blue);
    background-size: 38px 30px;
    transform: skewY(-12deg) rotate(-7deg);
}

.login-panel {
    position: relative;
    display: grid;
    min-height: 100vh;
    padding: 40px clamp(30px, 7vw, 120px) 132px;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(16, 104, 184, 0.035), transparent 46%),
        radial-gradient(circle at 92% 8%, rgba(251, 212, 20, 0.12), transparent 22%),
        #f8fbfe;
}

.login-card {
    width: min(100%, 530px);
    animation: reveal-up 650ms 120ms ease both;
}

.login-access-card {
    position: relative;
    padding: clamp(30px, 4vw, 44px);
    overflow: hidden;
    border: 1px solid #d6e4ef;
    border-top: 4px solid var(--sb-cyan);
    border-radius: 22px 7px 22px 7px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 65px rgba(7, 47, 116, 0.13);
}

.login-access-card::after {
    position: absolute;
    top: -80px;
    right: -70px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 104, 184, 0.09), rgba(16, 104, 184, 0));
    content: "";
    pointer-events: none;
}

.identity-provider {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-bottom: 30px;
    padding: 10px 13px;
    align-items: center;
    gap: 11px;
    border: 1px solid #d8e5f0;
    border-radius: 12px;
    background: #f7fafc;
}

.identity-provider > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.identity-provider small {
    color: #64748b;
    font: 0.64rem "Aptos", "Trebuchet MS", sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.identity-provider strong {
    color: var(--sb-navy);
    font-size: 0.82rem;
}

.microsoft-mark,
.button-microsoft-mark {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.microsoft-mark { width: 22px; height: 22px; }
.button-microsoft-mark { width: 18px; height: 18px; }
.microsoft-mark i, .button-microsoft-mark i { display: block; }
.microsoft-mark i:nth-child(1), .button-microsoft-mark i:nth-child(1) { background: #f25022; }
.microsoft-mark i:nth-child(2), .button-microsoft-mark i:nth-child(2) { background: #7fba00; }
.microsoft-mark i:nth-child(3), .button-microsoft-mark i:nth-child(3) { background: #00a4ef; }
.microsoft-mark i:nth-child(4), .button-microsoft-mark i:nth-child(4) { background: #ffb900; }

.local-login-mark {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px 3px 9px 3px;
    color: #fff;
    background: linear-gradient(135deg, var(--sb-blue), var(--sb-cyan));
    font-size: .78rem;
    font-weight: 800;
}

.mobile-brand {
    display: none;
}

.mobile-brand .brand-logo {
    width: 190px;
}

.login-card h2 {
    margin: 0;
    font-size: clamp(2.3rem, 4vw, 3.3rem);
    font-weight: 650;
    letter-spacing: -0.045em;
}

.login-intro {
    max-width: 410px;
    margin: 12px 0 28px;
    color: var(--sb-muted);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    line-height: 1.55;
}

.login-alert {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid #fecdca;
    border-radius: 10px;
    color: var(--sb-danger);
    background: #fffbfa;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.9rem;
}

.login-success-alert {
    border-color: #abefc6;
    color: #067647;
    background: #ecfdf3;
}

.first-access-note a {
    color: var(--sb-blue);
    font-weight: 700;
}

.registration-card {
    padding-block: 28px;
}

.registration-card .login-access-card {
    padding-block: 30px;
}

.registration-card .input-shell {
    height: 50px;
    margin-bottom: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-form label {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
}

.input-shell {
    display: flex;
    align-items: center;
    height: 56px;
    margin-bottom: 21px;
    border: 1px solid var(--sb-border);
    border-radius: 12px;
    background: #fff;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-shell:focus-within {
    border-color: var(--sb-blue);
    box-shadow: 0 0 0 4px rgba(16, 104, 184, 0.1);
}

.input-shell > span {
    min-width: 52px;
    color: var(--sb-blue);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
}

.input-shell input {
    width: 100%;
    height: 100%;
    padding: 0 18px 0 0;
    border: 0;
    outline: 0;
    color: var(--sb-ink);
    background: transparent;
}

.login-button,
.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 0;
    color: #fff;
    background: var(--sb-blue);
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.admin-badge {
    display: inline-flex;
    padding: 10px 13px;
    align-items: center;
    gap: 9px;
    border: 1px solid #b7e4ce;
    border-radius: 999px;
    color: #067647;
    background: #ecfdf3;
    font-size: 0.72rem;
    font-weight: 800;
}

.admin-badge > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sb-green);
}

.login-button {
    min-height: 58px;
    margin-top: 7px;
    padding: 0 21px;
    border-radius: 12px 4px 12px 4px;
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.login-arrow {
    margin-left: auto;
    font-size: 1.15rem;
}

.login-setup-message {
    margin-top: 12px;
    color: #9a6700;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    line-height: 1.45;
}

.demo-access-card {
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #a6d5f4;
    border-radius: 12px;
    color: #173f5f;
    background: #f1f9ff;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
}

.demo-access-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-access-heading > span {
    display: grid;
    width: 36px;
    height: 28px;
    place-items: center;
    border-radius: 8px 3px 8px 3px;
    color: #fff;
    background: var(--sb-blue);
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .06em;
}

.demo-access-heading strong,
.demo-access-heading small {
    display: block;
}

.demo-access-heading small {
    margin-top: 2px;
    color: var(--sb-muted);
    font-size: .7rem;
}

.demo-credentials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 13px 0 10px;
}

.demo-credentials > div {
    padding: 9px 10px;
    border: 1px solid #d5e8f5;
    border-radius: 8px;
    background: #fff;
}

.demo-credentials dt {
    margin-bottom: 4px;
    color: var(--sb-muted);
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.demo-credentials dd {
    margin: 0;
}

.demo-credentials code {
    color: var(--sb-ink);
    font-size: .82rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.demo-access-card > p {
    margin: 0;
    color: #806000;
    font-size: .69rem;
    line-height: 1.4;
}

@media (max-width: 520px) {
    .demo-credentials {
        grid-template-columns: 1fr;
    }
}

.first-access-note {
    display: flex;
    margin-top: 16px;
    padding: 13px 14px;
    align-items: flex-start;
    gap: 11px;
    border-left: 3px solid var(--sb-yellow);
    border-radius: 8px;
    background: #fffbed;
}

.first-access-note > span {
    display: grid;
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    color: #765a00;
    background: #ffe97a;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 900;
}

.first-access-note p {
    margin: 0;
    color: #665820;
    font: 0.74rem/1.45 "Aptos", "Trebuchet MS", sans-serif;
}

.first-access-note strong {
    display: block;
    margin-bottom: 2px;
    color: #50420f;
}

.login-disclaimer {
    display: flex;
    margin-top: 16px;
    padding: 14px;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid #cddfed;
    border-left: 3px solid var(--sb-blue);
    border-radius: 8px;
    color: #465c72;
    background: #f5f9fc;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
}

.login-disclaimer-icon {
    display: grid;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    background: var(--sb-blue);
    place-items: center;
    font-size: 0.72rem;
    font-weight: 900;
}

.login-disclaimer strong {
    display: block;
    margin-bottom: 4px;
    color: var(--sb-navy);
    font-size: 0.76rem;
}

.login-disclaimer p {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.48;
}

.login-button:hover,
.primary-action:hover {
    color: #fff;
    background: var(--sb-navy);
    box-shadow: 0 12px 24px rgba(7, 47, 116, 0.2);
    transform: translateY(-2px);
}

.security-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    justify-content: center;
    color: #64748b;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.78rem;
}

.demo-accounts {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid #cfe0ef;
    border-radius: 12px 4px 12px 4px;
    background: #f4f9fd;
}

.demo-heading {
    display: flex;
    margin-bottom: 12px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.demo-heading strong {
    color: var(--sb-navy);
    font-size: 0.76rem;
}

.demo-heading span {
    padding: 4px 7px;
    border-radius: 999px;
    color: #8a6800;
    background: var(--sb-yellow-soft);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.demo-account {
    display: grid;
    padding: 9px 0;
    grid-template-columns: 92px 1fr 1.25fr;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #dce8f2;
    font-size: 0.66rem;
}

.demo-account > span {
    color: var(--sb-muted);
    font-weight: 700;
}

.demo-account code {
    overflow: hidden;
    color: var(--sb-primary);
    font-size: 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.security-dot,
.connection-line span,
.status-light,
.environment-badge span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sb-green);
    box-shadow: 0 0 0 4px rgba(4, 159, 100, 0.12);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    z-index: 20;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(7, 47, 116, 0.98), rgba(0, 66, 103, 0.99)),
        var(--sb-navy);
}

.app-main {
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    margin-left: var(--sidebar-width);
}

.app-topbar {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    height: 78px;
    padding: 0 clamp(24px, 4vw, 56px);
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--sb-border);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.environment-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sb-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.user-summary {
    position: fixed;
    z-index: 30;
    top: 12px;
    right: clamp(24px, 4vw, 56px);
    display: flex;
    padding: 7px 9px;
    align-items: center;
    gap: 11px;
    border: 1px solid transparent;
    border-radius: 12px 4px 12px 4px;
    color: var(--sb-ink);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease;
}

.user-summary:hover,
.user-summary:focus-visible {
    border-color: var(--sb-border);
    background: #f4f9fd;
    outline: none;
}

.user-summary > span:last-child {
    display: flex;
    flex-direction: column;
}

.user-summary strong {
    font-size: 0.83rem;
}

.user-summary small {
    margin-top: 3px;
    color: var(--sb-muted);
    font-size: 0.7rem;
}

.user-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    border-radius: 10px 3px 10px 3px;
    color: var(--sb-navy);
    background: var(--sb-yellow);
    place-items: center;
    font-weight: 800;
}

.profile-overlay {
    position: fixed;
    z-index: 200;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(7, 35, 65, 0.58);
    backdrop-filter: blur(6px);
    animation: profile-fade-in 180ms ease both;
}

.profile-dialog {
    width: min(100%, 680px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 22px 6px 22px 6px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(2, 27, 52, 0.3);
    animation: profile-rise-in 220ms ease both;
}

.profile-dialog-header {
    display: flex;
    padding: 24px 26px 20px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--sb-border);
    background:
        radial-gradient(circle at 88% 0%, rgba(251, 212, 20, 0.16), transparent 30%),
        linear-gradient(135deg, #fff, #f4f9fd);
}

.profile-dialog-header h2 {
    margin: 3px 0 0;
    color: var(--sb-navy);
    font-size: 1.45rem;
}

.profile-close {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--sb-border);
    border-radius: 10px 3px 10px 3px;
    color: var(--sb-navy);
    background: #fff;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
}

.profile-close:hover {
    color: #fff;
    border-color: var(--sb-navy);
    background: var(--sb-navy);
}

.profile-dialog form,
.profile-dialog .profile-content {
    padding: 24px 26px 26px;
}

.profile-identity {
    display: flex;
    margin-bottom: 22px;
    padding: 16px;
    align-items: center;
    gap: 14px;
    border: 1px solid #cfe0ef;
    border-radius: 14px 4px 14px 4px;
    background: #f4f9fd;
}

.profile-large-avatar {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    place-items: center;
    border-radius: 14px 4px 14px 4px;
    color: var(--sb-navy);
    background: var(--sb-yellow);
    font-size: 1.1rem;
    font-weight: 800;
}

.profile-identity > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-identity strong {
    color: var(--sb-navy);
}

.profile-identity small {
    color: var(--sb-muted);
    font-size: 0.7rem;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.profile-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.profile-field > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--sb-navy);
    font-size: 0.7rem;
    font-weight: 800;
}

.profile-field b,
.profile-field i {
    padding: 3px 6px;
    border-radius: 999px;
    font-size: 0.52rem;
    font-style: normal;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-field b {
    color: #067647;
    background: #ecfdf3;
}

.profile-field i {
    color: #64748b;
    background: #eef2f6;
}

.profile-field input {
    width: 100%;
    height: 47px;
    padding: 0 13px;
    border: 1px solid #cad7e1;
    border-radius: 10px 3px 10px 3px;
    outline: none;
    color: var(--sb-ink);
    background: #fff;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.8rem;
}

.profile-field input:focus {
    border-color: var(--sb-blue);
    box-shadow: 0 0 0 3px rgba(16, 104, 184, 0.12);
}

.profile-field input[readonly] {
    color: #64748b;
    border-color: #e2e8f0;
    background: #f8fafc;
    cursor: not-allowed;
}

.profile-message {
    margin: 18px 0 0;
    padding: 11px 13px;
    border-left: 4px solid;
    font-size: 0.73rem;
    font-weight: 700;
}

.profile-message.success {
    color: #067647;
    border-color: var(--sb-green);
    background: #ecfdf3;
}

.profile-message.error {
    color: var(--sb-danger);
    border-color: var(--sb-danger);
    background: #fff1f0;
}

.profile-actions {
    display: flex;
    margin-top: 24px;
    padding-top: 18px;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    border-top: 1px solid var(--sb-border);
}

.profile-cancel {
    min-height: 46px;
    padding: 0 17px;
    border: 1px solid var(--sb-border);
    border-radius: 10px 3px 10px 3px;
    color: var(--sb-navy);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
}

.profile-actions .primary-action:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.app-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 48px clamp(24px, 4vw, 58px) 70px;
    animation: content-fade-in 480ms ease both;
}

.system-footer {
    display: flex;
    max-width: 1500px;
    margin: 0 clamp(24px, 4vw, 58px) 28px;
    padding: 15px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border: 1px solid var(--sb-border);
    border-radius: 14px 4px 14px 4px;
    color: var(--sb-muted);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
}

.footer-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
}

.footer-brand img {
    width: 94px;
    height: 45px;
    padding: 3px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.footer-brand > span,
.footer-system {
    display: flex;
    flex-direction: column;
}

.footer-brand strong {
    color: var(--sb-navy);
    font-size: 0.72rem;
}

.footer-brand small,
.footer-system > small {
    margin-top: 3px;
    color: #718096;
    font-size: 0.61rem;
}

.footer-system {
    align-items: flex-end;
    text-align: right;
}

.footer-version {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.footer-version > span {
    padding: 5px 8px;
    border: 1px solid #dce6ed;
    border-radius: 999px;
    color: var(--sb-navy);
    background: #f7fafc;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.footer-version .github-pending {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #7a5b00;
    border-color: #f4df80;
    background: var(--sb-yellow-soft);
}

.github-pending i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d6a900;
}

.system-footer-login {
    position: absolute;
    right: clamp(24px, 4vw, 60px);
    bottom: 20px;
    left: clamp(24px, 4vw, 60px);
    margin: 0;
    padding: 11px 13px;
}

.system-footer-login .footer-brand img {
    width: 76px;
    height: 38px;
}

.system-footer-login .footer-brand > span {
    display: none;
}

.system-footer-sidebar {
    margin: 14px 4px 0;
    padding: 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

.system-footer-sidebar .footer-brand {
    width: 100%;
}

.system-footer-sidebar .footer-brand img {
    width: 92px;
    height: 42px;
    padding: 3px;
}

.system-footer-sidebar .footer-brand > span {
    display: none;
}

.system-footer-sidebar .footer-system {
    width: 100%;
    align-items: flex-start;
    text-align: left;
}

.system-footer-sidebar .footer-version {
    justify-content: flex-start;
    gap: 5px;
}

.system-footer-sidebar .footer-version > span {
    padding: 4px 6px;
    color: rgba(255, 255, 255, 0.82);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.5rem;
}

.system-footer-sidebar .footer-version .github-connected {
    color: #7de7b7;
    border-color: rgba(125, 231, 183, 0.24);
    background: rgba(16, 185, 129, 0.1);
}
.github-connected i { width: 6px; height: 6px; border-radius: 50%; background: #35d28d; box-shadow: 0 0 0 3px rgba(53,210,141,.12); }

.system-footer-sidebar .footer-system > small {
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.52rem;
    line-height: 1.4;
}

.sidebar-brand {
    height: 106px;
    padding: 28px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand .brand-logo {
    width: 154px;
    padding: 8px 10px;
    border-radius: 10px 3px 10px 3px;
    background: #fff;
}

.sidebar-brand small {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.nav-toggle {
    display: none;
}

.nav-body {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    padding: 28px 18px 22px;
}

.module-intro {
    display: flex;
    margin-bottom: 24px;
    padding: 28px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--sb-border);
    border-radius: 18px;
    background: linear-gradient(135deg, #fff 0%, #f1f7fa 100%);
}

.module-intro h1 {
    margin: 4px 0 8px;
}

.module-intro p:last-child {
    max-width: 720px;
    margin: 0;
    color: var(--sb-muted);
}

.module-state {
    display: inline-flex;
    padding: 9px 13px;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    color: #26733b;
    background: #e7f3e9;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.module-state span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38a457;
}

.module-canvas {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 24px;
}

.module-visual,
.module-copy {
    min-height: 320px;
    padding: 28px;
    border: 1px solid var(--sb-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(13, 65, 96, 0.07);
}

.module-visual {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #f7fafc 0%, #e7f2f7 100%);
}

.visual-axis {
    position: absolute;
    background: #b9cad3;
}

.visual-axis-one {
    bottom: 44px;
    left: 44px;
    width: calc(100% - 88px);
    height: 1px;
}

.visual-axis-two {
    top: 44px;
    bottom: 44px;
    left: 44px;
    width: 1px;
}

.visual-bar {
    position: absolute;
    bottom: 45px;
    width: 15%;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, var(--sb-cyan), var(--sb-blue));
}

.visual-bar-one { left: 18%; height: 35%; }
.visual-bar-two { left: 42%; height: 58%; }
.visual-bar-three { left: 66%; height: 78%; }

.module-copy h2 {
    margin: 7px 0 12px;
}

.module-copy > p:not(.section-label) {
    color: var(--sb-muted);
}

.capability-list {
    display: grid;
    margin-top: 22px;
    gap: 11px;
}

.capability-list span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sb-navy);
    font-weight: 700;
}

.capability-list i {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #26733b;
    background: #e7f3e9;
    font-style: normal;
    font-size: 0.72rem;
}

@media (max-width: 800px) {
    .module-canvas {
        grid-template-columns: 1fr;
    }

    .module-intro {
        align-items: flex-start;
        flex-direction: column;
    }
}

.nav-section-title {
    margin: 0 12px 13px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav-body nav {
    display: grid;
    gap: 7px;
}

.nav-body .nav-link {
    display: flex;
    min-height: 49px;
    padding: 8px 12px;
    align-items: center;
    gap: 12px;
    border-radius: 10px 3px 10px 3px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease;
}

.nav-body .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-body .nav-link.active {
    color: var(--sb-navy);
    background: var(--sb-yellow);
    font-weight: 800;
}

.nav-symbol {
    display: grid;
    width: 29px;
    height: 29px;
    border: 1px solid currentColor;
    border-radius: 8px 2px 8px 2px;
    place-items: center;
    font-size: 0.55rem;
    font-weight: 800;
}
.nav-symbol svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.nav-spacer {
    flex: 1;
}

.sidebar-status {
    display: flex;
    margin: 20px 4px;
    padding: 15px;
    align-items: center;
    gap: 13px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
}

.sidebar-status > span:last-child {
    display: flex;
    flex-direction: column;
}

.sidebar-status strong {
    font-size: 0.72rem;
}

.sidebar-status small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.64rem;
}

.page-heading {
    display: flex;
    margin-bottom: 34px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.7rem);
    font-weight: 650;
    letter-spacing: -0.05em;
    line-height: 1.03;
}

.page-subtitle {
    margin: 12px 0 0;
    color: var(--sb-muted);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
}

.primary-action {
    min-height: 46px;
    padding: 0 17px;
    border-radius: 10px 3px 10px 3px;
    white-space: nowrap;
    cursor: pointer;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.metric-card {
    position: relative;
    display: flex;
    min-height: 132px;
    padding: 24px;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    border: 1px solid var(--sb-border);
    border-radius: 16px 5px 16px 5px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
    color: var(--sb-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.metric-card:hover,
.metric-card:focus-visible {
    border-color: #b8d3e6;
    outline: none;
    box-shadow: 0 16px 36px rgba(7, 47, 116, 0.12);
    transform: translateY(-3px);
}

.metric-card::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    content: "";
}

.metric-card-blue::after { background: var(--sb-blue); }
.metric-card-green::after { background: var(--sb-green); }
.metric-card-yellow::after { background: var(--sb-yellow); }
.metric-card-navy::after { background: var(--sb-navy); }

.metric-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px 4px 12px 4px;
    color: var(--sb-blue);
    background: #eaf3fb;
    place-items: center;
    font-size: 0.62rem;
    font-weight: 800;
}

.metric-card-green .metric-icon { color: var(--sb-green); background: #e6f6ef; }
.metric-card-yellow .metric-icon { color: #725e00; background: var(--sb-yellow-soft); }
.metric-card-navy .metric-icon { color: var(--sb-navy); background: #ebeff7; }

.metric-card > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-card strong {
    color: var(--sb-navy);
    font-size: 2.75rem;
    letter-spacing: -0.04em;
    line-height: 1;
}

.metric-card div span {
    margin-top: 9px;
    color: var(--sb-muted);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.79rem;
}

.metric-modal-overlay {
    position: fixed;
    z-index: 210;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(7, 35, 65, 0.58);
    backdrop-filter: blur(6px);
    animation: profile-fade-in 180ms ease both;
}

.metric-dialog {
    width: min(100%, 780px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 22px 6px 22px 6px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(2, 27, 52, 0.3);
    animation: profile-rise-in 220ms ease both;
}

.metric-dialog-header {
    display: flex;
    padding: 24px 26px 20px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--sb-border);
    background:
        radial-gradient(circle at 88% 0%, rgba(251, 212, 20, 0.16), transparent 30%),
        linear-gradient(135deg, #fff, #f4f9fd);
}

.metric-dialog-header h2 {
    margin: 3px 0 5px;
    color: var(--sb-navy);
    font-size: 1.45rem;
}

.metric-dialog-header p:last-child {
    margin: 0;
    color: var(--sb-muted);
    font-size: 0.73rem;
}

.metric-dialog-summary {
    display: flex;
    margin: 20px 26px 12px;
    padding: 15px 17px;
    align-items: center;
    gap: 14px;
    border: 1px solid #cfe0ef;
    border-radius: 14px 4px 14px 4px;
    background: #f4f9fd;
}

.metric-dialog-summary > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.metric-dialog-summary > div strong {
    color: var(--sb-navy);
    font-size: 1.35rem;
    line-height: 1;
}

.metric-dialog-summary small {
    color: var(--sb-muted);
    font-size: 0.66rem;
}

.metric-detail-list {
    padding: 0 26px;
}

.metric-detail-item {
    display: grid;
    min-height: 78px;
    padding: 13px 0;
    grid-template-columns: 42px minmax(220px, 1fr) 125px 90px;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #edf1f5;
}

.metric-detail-item:last-child {
    border-bottom: 0;
}

.metric-item-number {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px 3px 10px 3px;
    color: var(--sb-navy);
    background: var(--sb-yellow-soft);
    font-size: 0.66rem;
    font-weight: 800;
}

.metric-item-name,
.metric-item-reference {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.metric-item-name strong {
    overflow: hidden;
    color: var(--sb-navy);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-item-name small,
.metric-item-reference small {
    overflow: hidden;
    color: var(--sb-muted);
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-item-reference strong {
    color: var(--sb-blue);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
}

.metric-dialog-footer {
    display: flex;
    margin-top: 10px;
    padding: 18px 26px 22px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--sb-border);
}

.metric-dialog-footer > span {
    color: var(--sb-muted);
    font-size: 0.68rem;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.55fr);
    gap: 22px;
}

.panel,
.table-panel {
    border: 1px solid var(--sb-border);
    border-radius: 17px 5px 17px 5px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.panel-heading {
    display: flex;
    padding: 25px 26px 20px;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--sb-border);
}

.panel-heading h2,
.focus-panel h2 {
    margin: 0;
    font-size: 1.25rem;
}

.panel-heading a {
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.record-row {
    display: grid;
    min-height: 76px;
    padding: 13px 26px;
    grid-template-columns: 112px minmax(180px, 1fr) 90px 95px;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #edf1f5;
}

.record-row:last-child {
    border-bottom: 0;
}

.record-code {
    color: var(--sb-blue);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.record-name {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.record-name strong {
    overflow: hidden;
    font-size: 0.83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-name span,
.record-row time {
    margin-top: 4px;
    color: var(--sb-muted);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.71rem;
}

.status-pill {
    display: inline-flex;
    width: fit-content;
    min-width: 70px;
    padding: 6px 9px;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
}

.status-active { color: #067647; background: #ecfdf3; }
.status-review { color: #8a6800; background: var(--sb-yellow-soft); }
.status-approved { color: #175cd3; background: #eff8ff; }

.focus-panel {
    padding: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 10%, rgba(251, 212, 20, 0.22), transparent 28%),
        linear-gradient(150deg, var(--sb-navy), var(--sb-primary));
}

.focus-panel h2 {
    font-size: 1.65rem;
}

.focus-panel > p:not(.section-label) {
    margin: 14px 0 30px;
    color: rgba(255, 255, 255, 0.68);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.86rem;
    line-height: 1.55;
}

.connection-line {
    display: flex;
    padding: 14px 0;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.77rem;
    font-weight: 700;
}

.focus-panel a {
    display: inline-block;
    margin-top: 24px;
    color: var(--sb-yellow);
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
}

.repository-toolbar {
    display: flex;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.search-box {
    display: flex;
    width: min(100%, 460px);
    height: 48px;
    padding: 0 15px;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--sb-border);
    border-radius: 11px 3px 11px 3px;
    background: #fff;
}

.search-box span {
    color: var(--sb-blue);
    font-size: 1.3rem;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
}

.result-count {
    color: var(--sb-muted);
    font-size: 0.76rem;
}

.table-panel {
    overflow: hidden;
}

.table-row {
    display: grid;
    min-height: 70px;
    padding: 14px 22px;
    grid-template-columns: 125px minmax(220px, 1.5fr) minmax(110px, 0.7fr) 100px 105px;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #edf1f5;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.79rem;
}

.table-row:last-child {
    border-bottom: 0;
}

.table-header {
    min-height: 48px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-title {
    color: var(--sb-ink);
    font-weight: 700;
}

.filter-panel {
    margin-bottom: 18px;
    padding: 26px;
    border: 1px solid var(--sb-border);
    border-radius: 17px 5px 17px 5px;
    background:
        linear-gradient(135deg, rgba(234, 243, 251, 0.55), transparent 45%),
        #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.filter-panel-heading,
.filter-actions,
.ddq-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.filter-panel-heading {
    margin-bottom: 22px;
}

.filter-panel-heading h2,
.ddq-table-heading h2 {
    margin: 2px 0 0;
    font-size: 1.25rem;
}

.filter-reset {
    padding: 8px 12px;
    border: 1px solid var(--sb-border);
    border-radius: 9px 3px 9px 3px;
    color: var(--sb-blue);
    background: #fff;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
}

.filter-field {
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0;
    flex-direction: column;
    gap: 8px;
    border: 0;
}

.filter-field > span,
.filter-field legend {
    padding: 0;
    color: var(--sb-navy);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.filter-field input,
.filter-field select {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #cad7e1;
    border-radius: 10px 3px 10px 3px;
    outline: none;
    color: var(--sb-ink);
    background: #fff;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.79rem;
}

.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--sb-blue);
    box-shadow: 0 0 0 3px rgba(16, 104, 184, 0.12);
}

.filter-field small {
    color: var(--sb-muted);
    font-size: 0.65rem;
}

.filter-date-range,
.filter-timestamp {
    grid-column: span 2;
}

.date-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.date-pair label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.date-pair label > span {
    color: var(--sb-muted);
    font-size: 0.62rem;
    font-weight: 700;
}

.filter-actions {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--sb-border);
}

.filter-actions > span {
    color: var(--sb-muted);
    font-size: 0.72rem;
}

.filter-error {
    margin: 17px 0 0;
    padding: 11px 13px;
    border-left: 4px solid var(--sb-danger);
    color: var(--sb-danger);
    background: #fff1f0;
    font-size: 0.76rem;
    font-weight: 700;
}

.filter-summary {
    display: flex;
    margin-bottom: 18px;
    padding: 18px 22px;
    align-items: center;
    gap: 16px;
    border: 1px solid #cfe0ef;
    border-radius: 14px 4px 14px 4px;
    background: #f4f9fd;
}

.summary-mark {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 12px 4px 12px 4px;
    color: #fff;
    background: var(--sb-blue);
    font-size: 0.65rem;
    font-weight: 800;
}

.filter-summary strong {
    color: var(--sb-navy);
    font-size: 0.77rem;
}

.filter-summary p {
    margin: 5px 0 0;
    color: var(--sb-muted);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.75rem;
    line-height: 1.5;
}

.dataset-panel {
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--sb-border);
    border-radius: 17px 5px 17px 5px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.dataset-heading {
    display: flex;
    padding: 22px 24px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--sb-border);
}

.dataset-heading h2 {
    margin: 2px 0 5px;
    font-size: 1.25rem;
}

.dataset-heading p:last-child,
.ddq-table-heading p:last-child {
    margin: 0;
    color: var(--sb-muted);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.72rem;
}

.dataset-list {
    display: grid;
}

.dataset-item {
    display: grid;
    width: 100%;
    min-height: 82px;
    padding: 15px 22px;
    grid-template-columns: 170px minmax(230px, 1fr) 150px 105px;
    align-items: center;
    gap: 18px;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    color: var(--sb-ink);
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease;
}

.dataset-item:last-child {
    border-bottom: 0;
}

.dataset-item:hover,
.dataset-item.selected {
    background: #f4f9fd;
    box-shadow: inset 4px 0 0 var(--sb-blue);
}

.dataset-code {
    color: var(--sb-blue);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.dataset-name,
.dataset-meta {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.dataset-name strong,
.dataset-meta strong {
    color: var(--sb-navy);
    font-size: 0.79rem;
}

.dataset-name small,
.dataset-meta small {
    overflow: hidden;
    color: var(--sb-muted);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dataset-open {
    color: var(--sb-blue);
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.dataset-open b {
    margin-left: 5px;
}

.ddq-table-panel {
    overflow-x: auto;
}

.ddq-table-heading {
    min-width: 1180px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--sb-border);
}

.ddq-table {
    min-width: 1180px;
}

.ddq-table-row {
    display: grid;
    min-height: 66px;
    padding: 13px 22px;
    grid-template-columns: 155px 120px 105px 100px minmax(135px, 1fr) 90px 100px 100px;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #edf1f5;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.75rem;
}

.ddq-table-row:last-child {
    border-bottom: 0;
}

.ddq-table-row time,
.ddq-table-row strong {
    color: var(--sb-navy);
    font-weight: 800;
}

.ddq-table-header {
    min-height: 46px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-successful {
    color: #067647;
    background: #ecfdf3;
}

.status-failed {
    color: var(--sb-danger);
    background: #fff1f0;
}

.view-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.graph-action,
.secondary-action {
    display: inline-flex;
    min-height: 42px;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 10px 3px 10px 3px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
}

.graph-action {
    border: 0;
    color: #fff;
    background: var(--sb-blue);
}

.graph-action:hover {
    background: var(--sb-navy);
}

.secondary-action {
    border: 1px solid var(--sb-border);
    color: var(--sb-navy);
    background: #fff;
}

.graph-panel {
    overflow: hidden;
    border: 1px solid var(--sb-border);
    border-radius: 17px 5px 17px 5px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.graph-heading {
    display: flex;
    padding: 22px 24px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--sb-border);
}

.graph-heading h2 {
    margin: 2px 0 5px;
    font-size: 1.25rem;
}

.graph-heading p:last-child {
    margin: 0;
    color: var(--sb-muted);
    font-size: 0.72rem;
}

.graph-summary-grid {
    display: grid;
    padding: 20px 24px 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.graph-summary-grid > div {
    display: flex;
    padding: 14px 16px;
    flex-direction: column;
    gap: 5px;
    border: 1px solid #d8e5ed;
    border-radius: 12px 4px 12px 4px;
    background: #f7fafc;
}

.graph-summary-grid small {
    color: var(--sb-muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.graph-summary-grid strong {
    color: var(--sb-navy);
    font-size: 1.05rem;
}

.ddq-chart-wrap {
    position: relative;
    padding: 18px 26px 22px 48px;
}

.ddq-chart {
    display: block;
    width: 100%;
    min-width: 680px;
    height: auto;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(244, 249, 253, 0.75), rgba(255, 255, 255, 0.2));
}

.chart-grid-line {
    stroke: #dfe8ee;
    stroke-width: 1;
}

.chart-axis-line {
    stroke: #9db1bf;
    stroke-width: 1.5;
}

.chart-area {
    fill: url("#ddqAreaFill");
}

.chart-line {
    fill: none;
    stroke: var(--sb-blue);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.chart-label {
    fill: #64748b;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 16px;
}

.chart-label-end {
    text-anchor: end;
}

.x-axis-title {
    color: var(--sb-navy);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
}

.y-axis-title {
    position: absolute;
    top: 50%;
    left: 13px;
    color: var(--sb-navy);
    font-size: 0.66rem;
    font-weight: 800;
    transform: translateY(-50%) rotate(-90deg);
    white-space: nowrap;
}

.graph-modal-overlay {
    position: fixed;
    z-index: 210;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(7, 35, 65, 0.58);
    backdrop-filter: blur(6px);
    animation: profile-fade-in 180ms ease both;
}

.graph-dialog {
    width: min(100%, 560px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 22px 6px 22px 6px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(2, 27, 52, 0.3);
    animation: profile-rise-in 220ms ease both;
}

.graph-dialog-header {
    display: flex;
    padding: 24px 26px 20px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--sb-border);
    background:
        radial-gradient(circle at 88% 0%, rgba(251, 212, 20, 0.16), transparent 30%),
        linear-gradient(135deg, #fff, #f4f9fd);
}

.graph-dialog-header h2 {
    margin: 3px 0 0;
    color: var(--sb-navy);
    font-size: 1.4rem;
}

.graph-dialog-body {
    padding: 24px 26px 26px;
}

.graph-dialog-body > p {
    margin: 0 0 18px;
    color: var(--sb-muted);
    font-size: 0.78rem;
}

.axis-preview {
    display: grid;
    margin-bottom: 20px;
    padding: 18px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    border-radius: 14px 4px 14px 4px;
    color: var(--sb-navy);
    background: #f4f9fd;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
}

.axis-preview span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.axis-preview b {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 8px 3px 8px 3px;
    color: #fff;
    background: var(--sb-blue);
}

.axis-preview i {
    color: var(--sb-muted);
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 600;
}

.graph-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ddq-page {
    --ddq-accent: #1068b8;
    --ddq-deep: #074b88;
    --ddq-soft: #eaf4fb;
}

.ddq-page .admin-badge {
    color: var(--ddq-deep);
    border-color: #b7d8ef;
    background: var(--ddq-soft);
}

.ddq-page .admin-badge > span {
    background: var(--ddq-accent);
}

.ddq-page .filter-panel {
    border-top: 4px solid var(--ddq-accent);
    background:
        radial-gradient(circle at 95% 0%, rgba(251, 212, 20, 0.12), transparent 25%),
        linear-gradient(135deg, rgba(234, 244, 251, 0.9), transparent 48%),
        #fff;
}

.ddq-page .filter-field input:focus,
.ddq-page .filter-field select:focus {
    border-color: var(--ddq-accent);
    box-shadow: 0 0 0 3px rgba(16, 104, 184, 0.12);
}

.ddq-page .filter-reset:hover {
    color: #fff;
    border-color: var(--ddq-accent);
    background: var(--ddq-accent);
}

.ddq-page .filter-summary {
    border-color: #bfdced;
    background: var(--ddq-soft);
}

.ddq-page .dataset-panel,
.ddq-page .ddq-table-panel,
.ddq-page .graph-panel {
    border-top: 4px solid var(--ddq-accent);
}

.ddq-page .dataset-item:hover,
.ddq-page .dataset-item.selected {
    background: #f1f8fc;
    box-shadow: inset 4px 0 0 var(--ddq-accent);
}

.ddq-page .dataset-code,
.ddq-page .dataset-open {
    color: var(--ddq-deep);
}

.ddq-page .ddq-table-header {
    background: #f2f8fc;
}

.ddq-page .graph-dialog-header {
    border-top: 5px solid var(--ddq-accent);
    background:
        radial-gradient(circle at 88% 0%, rgba(251, 212, 20, 0.16), transparent 30%),
        linear-gradient(135deg, #fff, var(--ddq-soft));
}

.ddq-page .axis-preview {
    background: var(--ddq-soft);
}

.ddq-page .axis-preview b {
    background: var(--ddq-deep);
}

.mmf-page {
    --mmf-accent: #049f64;
    --mmf-deep: #006b4a;
    --mmf-soft: #e8f7ef;
}

.mmf-page .section-label {
    color: var(--mmf-accent);
}

.mmf-badge {
    display: inline-flex;
    padding: 10px 13px;
    align-items: center;
    gap: 9px;
    border: 1px solid #acd8c2;
    border-radius: 999px;
    color: var(--mmf-deep);
    background: var(--mmf-soft);
    font-size: 0.72rem;
    font-weight: 800;
}

.mmf-badge span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mmf-accent);
    box-shadow: 0 0 0 4px rgba(4, 159, 100, 0.12);
}

.mmf-filter-panel {
    border-top: 4px solid var(--mmf-accent);
    background:
        radial-gradient(circle at 95% 0%, rgba(251, 212, 20, 0.15), transparent 25%),
        linear-gradient(135deg, rgba(232, 247, 239, 0.72), transparent 48%),
        #fff;
}

.mmf-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.mmf-page .filter-field input:focus,
.mmf-page .filter-field select:focus {
    border-color: var(--mmf-accent);
    box-shadow: 0 0 0 3px rgba(4, 159, 100, 0.12);
}

.mmf-primary-action,
.mmf-page .graph-action {
    background: var(--mmf-deep);
}

.mmf-primary-action:hover,
.mmf-page .graph-action:hover {
    background: #004c36;
}

.mmf-summary {
    border-color: #b7e1ca;
    background: var(--mmf-soft);
}

.mmf-summary .summary-mark {
    background: var(--mmf-deep);
}

.mmf-dataset-panel {
    border-top: 4px solid var(--mmf-accent);
}

.mmf-page .dataset-item:hover,
.mmf-page .dataset-item.selected {
    background: #f0faf5;
    box-shadow: inset 4px 0 0 var(--mmf-accent);
}

.mmf-page .dataset-code,
.mmf-page .dataset-open {
    color: var(--mmf-deep);
}

.mmf-table-panel {
    overflow-x: auto;
    border-top: 4px solid var(--mmf-accent);
}

.mmf-table {
    min-width: 1180px;
}

.mmf-table-row {
    display: grid;
    min-height: 66px;
    padding: 13px 22px;
    grid-template-columns: 155px 100px 95px 100px 85px 105px 105px 90px 90px;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #edf1f5;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.75rem;
}

.mmf-table-row:last-child {
    border-bottom: 0;
}

.mmf-table-row time,
.mmf-table-row strong {
    color: var(--mmf-deep);
}

.mmf-table-header {
    min-height: 46px;
    color: #64748b;
    background: #f3faf6;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.variance-value {
    color: var(--mmf-deep);
    font-weight: 800;
}

.variance-value.outside {
    color: #a15c00;
}

.status-within {
    color: #067647;
    background: #ecfdf3;
}

.status-alert {
    color: #9a6700;
    background: var(--sb-yellow-soft);
}

.mmf-graph-panel {
    border-top: 4px solid var(--mmf-accent);
}

.mmf-chart .chart-area {
    fill: url("#mmfAreaFill");
}

.mmf-chart .chart-line {
    stroke: var(--mmf-accent);
}

.mmf-graph-modal .graph-dialog-header {
    border-top: 5px solid var(--mmf-accent);
    background:
        radial-gradient(circle at 88% 0%, rgba(251, 212, 20, 0.18), transparent 30%),
        linear-gradient(135deg, #fff, #eef9f3);
}

.mmf-graph-modal .axis-preview {
    background: var(--mmf-soft);
}

.mmf-graph-modal .axis-preview b {
    background: var(--mmf-deep);
}

.on-demand-page {
    --od-accent: #d6a900;
    --od-teal: #087c78;
    --od-soft: #fff9da;
}

.on-demand-page .section-label {
    color: #987700;
}

.generate-action {
    background: var(--od-teal);
}

.generate-action:hover {
    background: #055b58;
}

.generate-plus {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px 2px 7px 2px;
    color: var(--od-teal);
    background: #fff;
    font-size: 1rem;
    line-height: 1;
}

.generation-summary {
    display: grid;
    margin-bottom: 18px;
    padding: 18px 22px;
    grid-template-columns: repeat(3, 150px) minmax(260px, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid #eadf9d;
    border-radius: 16px 5px 16px 5px;
    background:
        radial-gradient(circle at 100% 0%, rgba(8, 124, 120, 0.1), transparent 30%),
        var(--od-soft);
}

.generation-summary > div,
.generation-summary > .summary-stat {
    display: flex;
    min-height: 57px;
    padding-right: 18px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-right: 1px solid #e8d982;
}

.generation-summary small {
    color: #76631a;
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.generation-summary strong {
    color: var(--sb-navy);
    font-size: 1.55rem;
    line-height: 1;
}

.generation-summary > p {
    margin: 0;
    color: var(--sb-muted);
    font-size: 0.73rem;
    text-align: right;
}

.on-demand-panel {
    overflow: hidden;
    border-top: 4px solid var(--od-accent);
}

.on-demand-heading {
    display: flex;
    min-width: 0;
    padding: 22px 24px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--sb-border);
}

.on-demand-heading h2 {
    margin: 2px 0 0;
    font-size: 1.25rem;
}

.on-demand-table {
    width: 100%;
    min-width: 0;
}

.on-demand-row {
    display: grid;
    min-height: 78px;
    padding: 13px 16px;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.15fr) minmax(0, 2.15fr) minmax(74px, .68fr) minmax(60px, .54fr) minmax(86px, .78fr) minmax(103px, .9fr) minmax(64px, .58fr);
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #edf1f5;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.74rem;
}

.on-demand-row > * {
    min-width: 0;
}

.on-demand-row .table-action {
    width: 100%;
    padding-inline: 10px;
    white-space: nowrap;
}

.on-demand-header > span {
    line-height: 1.35;
}

.on-demand-row:last-child {
    border-bottom: 0;
}

.on-demand-header {
    min-height: 46px;
    color: #64748b;
    background: #fffcf0;
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.analysis-name {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.analysis-name strong {
    overflow: hidden;
    color: var(--sb-navy);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analysis-type {
    display: grid;
    min-width: 40px;
    height: 28px;
    padding: 0 7px;
    place-items: center;
    border-radius: 8px 3px 8px 3px;
    font-size: 0.58rem;
    font-weight: 900;
}

.analysis-type-ddq {
    color: #075a9f;
    background: #eaf4fb;
}

.analysis-type-mmf {
    color: #067647;
    background: #e8f7ef;
}

.on-demand-row time {
    color: var(--sb-muted);
    font-size: 0.69rem;
}

.analysis-description {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
    color: var(--sb-muted);
    line-height: 1.45;
}
.analysis-description strong { overflow:hidden; color:#183f51; text-overflow:ellipsis; white-space:nowrap; }
.analysis-description small { color:#718694; font-size:.62rem; }

.table-action {
    display: inline-flex;
    min-height: 34px;
    padding: 0 10px;
    align-items: center;
    justify-content: center;
    border-radius: 8px 3px 8px 3px;
    cursor: pointer;
    font-size: 0.64rem;
    font-weight: 800;
    text-decoration: none;
}

.view-action {
    border: 1px solid #b9d4e7;
    color: var(--sb-blue);
    background: #f4f9fd;
}

.export-action {
    border: 1px solid #b7ddca;
    color: #067647;
    background: #eefaf4;
}

.table-action:hover {
    color: #fff;
    border-color: var(--od-teal);
    background: var(--od-teal);
}

.on-demand-overlay {
    position: fixed;
    z-index: 210;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(7, 35, 65, 0.58);
    backdrop-filter: blur(6px);
    animation: profile-fade-in 180ms ease both;
}

.on-demand-dialog {
    width: min(100%, 760px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-top: 5px solid var(--od-accent);
    border-radius: 22px 6px 22px 6px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(2, 27, 52, 0.3);
    animation: profile-rise-in 220ms ease both;
}

.on-demand-dialog-header {
    display: flex;
    padding: 24px 26px 20px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--sb-border);
    background:
        radial-gradient(circle at 88% 0%, rgba(8, 124, 120, 0.1), transparent 30%),
        linear-gradient(135deg, #fff, var(--od-soft));
}

.on-demand-dialog-header h2 {
    margin: 3px 0 0;
    color: var(--sb-navy);
    font-size: 1.4rem;
}

.on-demand-dialog form,
.result-dialog-body {
    padding: 24px 26px 26px;
}

.on-demand-dialog form > p {
    margin: 0 0 18px;
    color: var(--sb-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.generation-choice {
    display: grid;
    margin-bottom: 19px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.analysis-choice {
    position: relative;
    display: flex;
    min-height: 105px;
    padding: 17px;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--sb-border);
    border-radius: 14px 4px 14px 4px;
    background: #fff;
    cursor: pointer;
}

.analysis-choice.selected {
    border-color: var(--od-teal);
    background: #effaf9;
    box-shadow: inset 0 0 0 1px var(--od-teal);
}

.analysis-choice input {
    position: absolute;
    top: 15px;
    right: 15px;
    accent-color: var(--od-teal);
}

.analysis-choice > span {
    color: var(--sb-navy);
    font-size: 1rem;
    font-weight: 900;
}

.analysis-choice small {
    max-width: 175px;
    color: var(--sb-muted);
    font-size: 0.68rem;
    line-height: 1.4;
}

.submission-field {
    max-width: 280px;
}

.on-demand-request-grid { display:grid; margin-top:4px; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.on-demand-request-grid .filter-field { max-width:none; }
.on-demand-request-grid .filter-field small { color:#718694; font-size:.61rem; line-height:1.4; }
.on-demand-ddq-submission-selector { grid-column:span 2; }
.on-demand-ddq-submission-selector > input[type="search"] { width:100%; min-height:52px; border-color:#abd1e8; background:#fff; }
.on-demand-selected-submission { display:flex; width:100%; min-height:58px; padding:10px 12px; align-items:center; justify-content:space-between; gap:12px; border:1px solid #93c7e8; border-radius:10px; color:#0a3d78; background:#eef7ff; text-align:left; cursor:pointer; }
.on-demand-selected-submission > span { display:grid; gap:3px; }
.on-demand-selected-submission strong { font-size:.76rem; }
.on-demand-selected-submission small { color:#637c92; font-size:.62rem; }
.on-demand-selected-submission b { display:grid; width:28px; height:28px; place-items:center; flex:0 0 auto; border-radius:50%; background:#fff; color:#c23c3c; font-size:1rem; }
.on-demand-mmf-scope { margin:18px 0 0; padding:14px 16px 16px; border:1px solid #c4dce3; border-radius:12px; background:#f7fbfc; }
.on-demand-mmf-scope legend { padding:0 7px; color:#0a3d78; font-size:.7rem; font-weight:850; }
.mmf-scope-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.mmf-scope-option { display:flex; min-height:66px; padding:10px 11px; align-items:flex-start; gap:9px; border:1px solid #d2e1e6; border-radius:9px; background:#fff; cursor:pointer; }
.mmf-scope-option.selected { border-color:#159987; background:#eefaf7; box-shadow:0 0 0 2px rgb(21 153 135 / 8%); }
.mmf-scope-option input { margin-top:3px; accent-color:#0d8f82; }
.mmf-scope-option > span { display:grid; gap:3px; }
.mmf-scope-option strong { color:#0a3d78; font-size:.68rem; }
.mmf-scope-option small { color:#6d8293; font-size:.58rem; line-height:1.35; }
.on-demand-mmf-range { margin:18px 0 0; padding:0 18px 18px; border:1px solid #b9dce1; border-radius:14px 4px 14px 4px; background:linear-gradient(135deg,#f5fcfc 0%,#fff 62%,#fffbea 100%); }
.on-demand-mmf-range legend { display:flex; padding:0 10px 0 0; align-items:center; gap:10px; color:var(--sb-navy); }
.on-demand-mmf-range legend > span:last-child { display:flex; flex-direction:column; gap:2px; }
.on-demand-mmf-range legend strong { font-size:.74rem; }
.on-demand-mmf-range legend small { color:#687e91; font-size:.59rem; font-weight:600; }
.range-step { display:grid; width:38px; height:38px; place-items:center; border-radius:10px 3px 10px 3px; color:#fff; background:linear-gradient(135deg,#078f8a,#07677b); font-size:.58rem; font-weight:900; letter-spacing:.04em; box-shadow:0 6px 13px rgb(7 103 123 / 18%); }
.on-demand-range-grid { display:grid; margin-top:13px; grid-template-columns:minmax(0,1fr) 36px minmax(0,1fr); align-items:center; gap:10px; }
.on-demand-range-grid .filter-field { max-width:none; }
.on-demand-range-grid .filter-field input { background:#fff; }
.on-demand-range-grid .filter-field small { color:#718694; font-size:.6rem; }
.on-demand-date-pair { display:grid; margin-top:13px; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.on-demand-date-pair .date-time-control { padding:12px; border:1px solid #d5e5dc; border-radius:12px 4px 12px 4px; background:#fff; }
.on-demand-date-pair .date-time-control > span { color:#08765f; font-size:.68rem; }
.on-demand-date-pair .date-time-control > div { grid-template-columns:1fr; gap:9px; }
.on-demand-date-pair .sblss-picker { min-height:46px; }
.range-flow { display:grid; width:32px; height:32px; place-items:center; border:1px solid #c9dfe6; border-radius:50%; color:#08758d; background:#fff; font-size:.92rem; font-weight:900; }
.on-demand-all-plants { display:flex; margin:17px 0 4px; padding:14px 16px; align-items:center; gap:12px; border:1px solid #b9ddd5; border-radius:12px 4px 12px 4px; background:#effaf7; }
.on-demand-all-plants > span { display:grid; width:30px; height:30px; flex:0 0 auto; place-items:center; border-radius:50%; color:#fff; background:#11a178; font-weight:900; }
.on-demand-all-plants div { display:flex; flex-direction:column; gap:3px; }
.on-demand-all-plants strong { color:#0a554d; font-size:.7rem; }
.on-demand-all-plants small { color:#5d7b77; font-size:.61rem; }
.export-action:disabled,.generate-action:disabled { opacity:.48; cursor:not-allowed; }

.result-status-banner {
    display: flex;
    padding: 16px;
    align-items: center;
    gap: 13px;
    border: 1px solid;
    border-radius: 14px 4px 14px 4px;
}

.status-banner-successful {
    border-color: #b7ddca;
    background: #eefaf4;
}

.status-banner-failed {
    border-color: #f6c8c4;
    background: #fff4f3;
}

.result-status-banner > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.result-status-banner strong {
    color: var(--sb-navy);
}

.result-status-banner small {
    color: var(--sb-muted);
    font-size: 0.65rem;
}

.result-details {
    display: grid;
    margin: 20px 0 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--sb-border);
    border-radius: 12px 4px 12px 4px;
    background: var(--sb-border);
}

.result-details > div {
    padding: 14px;
    background: #fff;
}

.result-description-row {
    grid-column: 1 / -1;
}

.result-details dt {
    color: var(--sb-muted);
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.result-details dd {
    margin: 6px 0 0;
    color: var(--sb-navy);
    font-size: 0.75rem;
    line-height: 1.45;
}

.dashboard-overview-summary { display:grid; margin-bottom:18px; grid-template-columns:minmax(220px,.62fr) minmax(540px,1.8fr); align-items:stretch; gap:16px; }
.dashboard-overview-summary > .metric-card { min-height:100%; padding:18px; justify-content:center; text-align:center; }
.dashboard-overview-summary > .metric-card > div { width:100%; align-items:center; justify-content:center; }
.dashboard-overview-summary > .metric-card strong { font-size:4rem; }
.dashboard-overview-summary > .metric-card div span { margin-top:12px; font-size:1rem; font-weight:700; }
.dashboard-ddq-compact { overflow:hidden; border:1px solid var(--sb-border); border-radius:16px 5px 16px 5px; background:#fff; box-shadow:0 10px 30px rgba(15,23,42,.045); }
.dashboard-ddq-compact > header { display:flex; min-height:44px; padding:6px 14px; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #e7eef4; }
.dashboard-ddq-compact header h2 { margin:1px 0 0; color:var(--sb-navy); font-size:.93rem; }
.dashboard-ddq-compact header .section-label { margin:0; font-size:.54rem; }
.dashboard-ddq-compact header a { color:var(--sb-blue); font-size:.63rem; font-weight:800; text-decoration:none; }
.dashboard-ddq-compact-list { display:grid; grid-template-columns:1fr; }
.dashboard-ddq-compact-row { display:grid; min-height:46px; padding:5px 12px; grid-template-columns:minmax(150px,1fr) minmax(135px,.9fr) 92px 78px; align-items:center; gap:10px; border-bottom:1px solid #e7eef4; }
.dashboard-ddq-compact-row:last-child { border-bottom:0; }
.dashboard-ddq-type { display:flex; align-items:center; gap:11px; color:var(--sb-navy); }
.dashboard-ddq-type i { width:7px; height:7px; flex:0 0 auto; border-radius:50%; background:#1684c5; box-shadow:0 0 0 4px #e4f3fb; }
.dashboard-ddq-type strong { overflow:hidden; font-size:.69rem; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-ddq-compact-row time { display:flex; flex-direction:column; gap:1px; color:#62778b; font-size:.57rem; white-space:nowrap; }
.dashboard-ddq-compact-row time small { color:#7f91a2; font-size:.44rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.dashboard-ddq-count { display:flex; min-height:31px; padding:3px 7px; align-items:center; justify-content:space-between; gap:5px; border-radius:8px 3px 8px 3px; cursor:pointer; font:inherit; }
.dashboard-ddq-count span { font-size:.47rem; font-weight:800; }
.dashboard-ddq-count strong { font-size:.82rem; }
.dashboard-ddq-count.success { border:1px solid #aedad0; color:#067647; background:#effaf5; }
.dashboard-ddq-count.failed { border:1px solid #efc2bf; color:#b42318; background:#fff5f4; }
.dashboard-ddq-count:hover:not(:disabled) { color:#fff; border-color:var(--od-teal); background:var(--od-teal); }
.dashboard-ddq-count:disabled { cursor:not-allowed; opacity:.65; }

.delete-analysis-action {
    border: 1px solid #efb7b7;
    color: #a4262c;
    background: #fff5f5;
}

.delete-analysis-action:hover {
    border-color: #b4232d;
    background: #b4232d;
}

.result-preview-dialog {
    width: min(1500px, calc(100vw - 48px));
    overflow: hidden;
}

.result-preview-dialog .on-demand-dialog-header { position: relative; }

.result-preview-dialog .result-dialog-body {
    overflow-y: auto;
    max-height: calc(100vh - 145px);
}

.result-preview-header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.result-preview-header-actions .table-action,
.result-preview-header-actions .primary-action {
    min-height: 40px;
    padding: 9px 14px;
    white-space: nowrap;
}

.anomaly-preview-toggle { border: 1px solid #9ec2d5; color: #075985; background: #f0f9ff; }
.anomaly-preview-toggle:hover { color: #fff; border-color: #075985; background: #075985; }

.result-preview-summary {
    display: flex;
    margin-bottom: 16px;
    padding: 12px 14px;
    align-items: center;
    gap: 14px;
    border: 1px solid #cfe0e9;
    border-radius: 12px 4px 12px 4px;
    background: #f5f9fc;
}

.result-preview-summary > span:not(.analysis-type) {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.result-preview-summary > span:nth-last-child(-n + 2) { margin-left: auto; }
.result-preview-summary > span:last-child { margin-left: 0; }
.result-preview-summary small { color: var(--sb-muted); font-size: .58rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.result-preview-summary strong { overflow: hidden; color: var(--sb-navy); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }

.result-preview-state {
    display: grid;
    min-height: 320px;
    padding: 30px;
    place-items: center;
    align-content: center;
    gap: 9px;
    border: 1px solid #ccdde6;
    border-radius: 12px;
    color: var(--sb-navy);
    background: #fbfdff;
    text-align: center;
}

.result-preview-state small { color: var(--sb-muted); }
.result-preview-error { border-color: #efc3bf; color: #9f2f27; background: #fff7f6; }
.result-preview-spinner { width: 34px; height: 34px; border: 4px solid #d7e8ef; border-top-color: var(--od-teal); border-radius: 50%; animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }

.result-sheet-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0 2px 8px;
    gap: 6px;
}

.result-sheet-tabs button {
    min-height: 34px;
    padding: 7px 13px;
    flex: 0 0 auto;
    border: 1px solid #c7d8df;
    border-radius: 8px 3px 8px 3px;
    color: #3f596c;
    background: #fff;
    cursor: pointer;
    font-size: .66rem;
    font-weight: 800;
}

.result-sheet-tabs button.active { color: #fff; border-color: #19734d; background: #19734d; }

.result-workbook-preview {
    overflow: hidden;
    border: 1px solid #b7c9b6;
    border-radius: 10px 3px 10px 3px;
    background: #fff;
    box-shadow: 0 10px 28px rgb(24 66 47 / 8%);
}

.result-workbook-title {
    padding: 11px 16px;
    color: #fff;
    background: #1f6f43;
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .025em;
}

.result-workbook-meta {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #cdd8ce;
    background: #f4f8f2;
}

.result-workbook-meta span {
    display: flex;
    min-width: 175px;
    padding: 9px 13px;
    flex: 1 0 auto;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid #d3ddd3;
}

.result-workbook-meta small { color: #5d6d60; font-size: .58rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.result-workbook-meta strong { color: #203b2b; font-size: .69rem; }
.result-workbook-scroll { overflow: auto; max-height: min(52vh, 610px); }
.result-workbook-scroll table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; color: #1f2937; font-family: Calibri, "Segoe UI", sans-serif; font-size: .72rem; font-variant-numeric: tabular-nums; }
.result-workbook-scroll th,
.result-workbook-scroll td { min-width: 94px; height: 36px; padding: 7px 9px; border-right: 1px solid #cdd7cc; border-bottom: 1px solid #cdd7cc; text-align: right; white-space: nowrap; }
.result-workbook-scroll th { position: sticky; z-index: 3; top: 0; color: #183522; background: #d9ead3; font-weight: 800; text-align: center; }
.result-workbook-scroll tbody tr:nth-child(even) td { background: #f6faf5; }
.result-workbook-scroll tbody tr:hover td { background: #fff6cc; }
.result-workbook-scroll td.empty-cell { color: #9a5b00; background: #fff9e8; }
.anomaly-workbook-preview { border-color: #dfc36c; }
.anomaly-workbook-preview .result-workbook-title { background: #806000; }
.anomaly-workbook-preview .result-workbook-meta { background: #fff9e5; }
.anomaly-workbook-preview .result-workbook-scroll table { min-width: 1900px; }
.anomaly-workbook-preview .result-workbook-scroll th { color: #523c00; background: #f7e7aa; }
.anomaly-workbook-preview .result-workbook-scroll td { min-width: 120px; max-width: 260px; text-align: left; white-space: normal; }
.anomaly-workbook-preview .result-workbook-scroll th:nth-child(11),
.anomaly-workbook-preview .result-workbook-scroll td:nth-child(11) { min-width: 260px; }
.anomaly-preview-empty { border-color: #eadca4; background: #fffdf4; }
.result-preview-actions { position: sticky; z-index: 5; bottom: -26px; margin-top: 16px; padding: 14px 0 0; background: linear-gradient(transparent, #fff 16%); }

@media (max-width: 760px) {
    .result-preview-dialog { width: min(100%, calc(100vw - 20px)); }
    .result-preview-dialog .on-demand-dialog-header { flex-direction: column; }
    .result-preview-header-actions { width: 100%; flex-wrap: wrap; }
    .result-preview-header-actions .profile-close { position: absolute; top: 14px; right: 14px; }
    .result-preview-header-actions .table-action,
    .result-preview-header-actions .primary-action { flex: 1 1 calc(50% - 6px); }
    .result-preview-summary { align-items: stretch; flex-wrap: wrap; }
    .result-preview-summary > span:nth-last-child(-n + 2) { margin-left: 0; }
    .result-preview-summary > span:not(.analysis-type) { min-width: calc(50% - 10px); }
    .result-preview-actions { flex-wrap: wrap; }
    .result-preview-actions > button { width: 100%; }
}

#blazor-error-ui {
    position: fixed;
    z-index: 1000;
    right: 16px;
    bottom: 16px;
    display: none;
    padding: 14px 18px;
    border-radius: 10px;
    color: #fff;
    background: var(--sb-danger);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.2);
}

#blazor-error-ui a {
    margin-left: 12px;
    color: #fff;
}

@keyframes reveal-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* Keep the application content free of transforms so fixed dialogs use the
   browser viewport instead of being clipped to the content container. */
@keyframes content-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes profile-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes profile-rise-in {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1100px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .focus-panel {
        min-height: 260px;
    }

    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mmf-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .generation-summary {
        grid-template-columns: repeat(3, 1fr);
    }

    .generation-summary > p {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-story {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
    }

    .mobile-brand {
        display: flex;
        margin-bottom: 60px;
        align-items: center;
        gap: 12px;
        color: var(--sb-navy);
    }

    .app-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
    }

    .app-shell {
        display: block;
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    .system-footer {
        margin-right: 20px;
        margin-left: 20px;
    }

    .system-footer-sidebar {
        margin: 14px 4px 0;
    }

    .sidebar-brand {
        height: 78px;
        padding: 15px 20px;
    }

    .sidebar-brand .brand-logo {
        width: 150px;
    }

    .nav-toggle {
        position: absolute;
        z-index: 2;
        top: 23px;
        right: 23px;
        display: block;
        width: 28px;
        height: 28px;
        appearance: none;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 7px;
        background: linear-gradient(#fff, #fff) center 8px / 14px 1px no-repeat,
                    linear-gradient(#fff, #fff) center 13px / 14px 1px no-repeat,
                    linear-gradient(#fff, #fff) center 18px / 14px 1px no-repeat;
    }

    .nav-body {
        display: none;
    }

    .nav-toggle:checked ~ .nav-body {
        display: flex;
        min-height: 320px;
    }

    .app-topbar {
        height: 68px;
        padding: 0 20px;
    }

    .environment-badge {
        display: none;
    }

    .user-summary {
        top: 7px;
        right: 20px;
    }

    .table-panel {
        overflow-x: auto;
    }

    .repository-table {
        min-width: 820px;
    }
}

@media (max-width: 640px) {
    .login-panel {
        padding: 28px 22px 122px;
        place-items: start center;
    }

    .login-card {
        padding-top: 18px;
    }

    .mobile-brand {
        margin-bottom: 32px;
    }

    .login-access-card {
        padding: 26px 22px;
        border-radius: 18px 6px 18px 6px;
    }

    .identity-provider {
        margin-bottom: 24px;
    }

    .security-note {
        align-items: flex-start;
        text-align: left;
    }

    .demo-account {
        grid-template-columns: 80px 1fr;
    }

    .demo-account code:last-child {
        grid-column: 2;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .system-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-system {
        align-items: flex-start;
        text-align: left;
    }

    .footer-version {
        justify-content: flex-start;
    }

    .system-footer-login {
        right: 22px;
        bottom: 14px;
        left: 22px;
        padding: 9px 11px;
    }

    .system-footer-login .footer-brand {
        display: none;
    }

    .record-row {
        padding: 17px 20px;
        grid-template-columns: 1fr auto;
    }

    .record-name {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .record-row time {
        display: none;
    }

    .repository-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-panel {
        padding: 21px 18px;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .mmf-filter-grid {
        grid-template-columns: 1fr;
    }

    .generation-summary {
        grid-template-columns: repeat(3, 1fr);
        padding: 15px;
    }

    .generation-summary > div {
        padding-right: 8px;
    }

    .on-demand-overlay {
        padding: 12px;
    }

    .on-demand-dialog {
        max-height: calc(100vh - 24px);
    }

    .on-demand-dialog-header,
    .on-demand-dialog form,
    .result-dialog-body {
        padding-right: 19px;
        padding-left: 19px;
    }

    .generation-choice,
    .on-demand-request-grid,
    .mmf-scope-options,
    .result-details {
        grid-template-columns: 1fr;
    }

    .on-demand-ddq-submission-selector { grid-column:auto; }

    .on-demand-range-grid,
    .on-demand-date-pair { grid-template-columns:1fr; }
    .range-flow { width:100%; height:24px; border:0; background:transparent; transform:rotate(90deg); }

    .result-description-row {
        grid-column: auto;
    }

    .filter-date-range,
    .filter-timestamp {
        grid-column: span 1;
    }

    .date-pair {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-actions .primary-action {
        justify-content: center;
    }

    .filter-summary {
        align-items: flex-start;
    }

    .metric-modal-overlay {
        padding: 12px;
    }

    .metric-dialog {
        max-height: calc(100vh - 24px);
    }

    .metric-dialog-header,
    .metric-dialog-footer {
        padding-right: 19px;
        padding-left: 19px;
    }

    .metric-dialog-summary {
        margin-right: 19px;
        margin-left: 19px;
    }

    .metric-detail-list {
        padding: 0 19px;
    }

    .metric-detail-item {
        grid-template-columns: 40px minmax(0, 1fr) auto;
    }

    .metric-item-reference {
        display: none;
    }

    .metric-dialog-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .metric-dialog-footer .primary-action {
        justify-content: center;
    }

    .ddq-table-heading,
    .graph-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .view-actions {
        width: 100%;
        justify-content: space-between;
    }

    .graph-summary-grid,
    .graph-form-grid {
        grid-template-columns: 1fr;
    }

    .ddq-chart-wrap {
        overflow-x: auto;
    }

    .graph-modal-overlay {
        padding: 12px;
    }

    .graph-dialog-header,
    .graph-dialog-body {
        padding-right: 19px;
        padding-left: 19px;
    }

    .profile-overlay {
        padding: 12px;
    }

    .profile-dialog {
        max-height: calc(100vh - 24px);
    }

    .profile-dialog-header,
    .profile-dialog form,
    .profile-dialog .profile-content {
        padding-right: 19px;
        padding-left: 19px;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .profile-actions button {
        justify-content: center;
    }

    .dataset-heading {
        align-items: flex-start;
    }

    .dataset-item {
        padding: 17px 18px;
        grid-template-columns: 1fr auto;
        gap: 8px 14px;
    }

    .dataset-code,
    .dataset-name {
        grid-column: 1;
    }

    .dataset-meta {
        grid-column: 2;
        grid-row: 1 / span 2;
        text-align: right;
    }

    .dataset-open {
        grid-column: 1 / -1;
        margin-top: 5px;
    }

    .app-content {
        padding-top: 34px;
    }
}

@media (max-width: 1100px) {
    .dashboard-overview-summary { grid-template-columns:1fr; }
}

@media (max-width: 760px) {
    .dashboard-ddq-compact-row { grid-template-columns:minmax(130px,1fr) minmax(118px,.85fr) 82px 68px; }
}

@media (max-width: 520px) {
    .dashboard-ddq-compact-row { grid-template-columns:minmax(0,1fr) auto auto; }
    .dashboard-ddq-compact-row time { grid-column:1 / -1; grid-row:2; }
}

/* Administrator report scheduling, distribution and delivery monitoring. */
.report-automation-page { --auto-blue: #185b7a; --auto-sea: #168c91; --auto-gold: #d89d16; --auto-soft: #edf8f7; }
.automation-summary { display: grid; margin-bottom: 18px; padding: 17px 20px; grid-template-columns: repeat(4,minmax(130px,1fr)); gap: 13px; border: 1px solid #bddbd9; border-radius: 17px 5px 17px 5px; background: radial-gradient(circle at 100% 0%,rgba(22,140,145,.14),transparent 32%),#f3fbfa; }
.automation-summary > div { display: flex; min-height: 57px; padding-left: 15px; flex-direction: column; justify-content: center; gap: 4px; border-left: 3px solid var(--auto-sea); }
.automation-summary > div:nth-child(2) { border-left-color: #159c67; }
.automation-summary > div:nth-child(3) { border-left-color: var(--auto-blue); }
.automation-summary > div:nth-child(4) { border-left-color: #cf5136; }
.automation-summary small { color: #607d7d; font-size: .58rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.automation-summary strong { color: #153f50; font-size: 1.5rem; line-height: 1; }
.report-section-tabs { display: inline-flex; margin-bottom: 18px; padding: 4px; gap: 4px; border: 1px solid #c6d9df; border-radius: 10px; background: #eef5f7; }
.report-section-tabs button { display: inline-flex; min-height: 38px; padding: 0 13px; align-items: center; gap: 9px; border: 0; border-radius: 7px; color: #526c78; background: transparent; cursor: pointer; font-size: .66rem; font-weight: 800; }
.report-section-tabs button small { display: grid; min-width: 21px; height: 21px; padding: 0 5px; place-items: center; border-radius: 999px; color: #47616d; background: #fff; font-size: .56rem; }
.report-section-tabs button.active { color: #fff; background: var(--admin-dark); box-shadow: 0 5px 13px rgba(6,59,85,.18); }
.report-section-tabs button.active small { color: var(--admin-dark); }
.report-simple-panel { overflow-x: auto; }
.report-simple-table { min-width: 1250px; }
.report-simple-row { display: grid; min-height: 76px; padding: 14px 22px; grid-template-columns: minmax(240px,1.3fr) minmax(155px,.85fr) minmax(210px,1.1fr) 155px minmax(190px,1fr) 90px 76px; align-items: center; gap: 18px; border-bottom: 1px solid #e6eef0; color: #263f4d; font-size: .72rem; transition: background 140ms ease; }
.report-simple-row:not(.admin-table-header):hover { background: #f4f9fc; }
.report-simple-row.admin-table-header { min-height: 58px; color: #587185; background: #edf6f9; font-size: .65rem; letter-spacing: .045em; }
.report-simple-row > span { min-width: 0; }
.report-simple-row > span strong { display: block; overflow: hidden; color: #183c59; text-overflow: ellipsis; white-space: nowrap; }
.report-simple-row > span small { display: block; margin-top: 5px; color: #6b8190; font-size: .61rem; line-height: 1.35; }
.report-simple-row .status-pill { justify-self: start; }
.report-simple-row .admin-edit-action { min-width: 72px; }
.automation-tabs { display: grid; margin-bottom: 18px; padding: 5px; grid-template-columns: repeat(3,1fr); gap: 5px; border: 1px solid #c8dadd; border-radius: 14px 4px 14px 4px; background: #edf3f4; }
.automation-tabs button { display: flex; min-height: 47px; padding: 8px 14px; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 10px 3px 10px 3px; color: #5b7279; background: transparent; cursor: pointer; font-size: .7rem; font-weight: 800; }
.automation-tabs button span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px 2px 7px 2px; color: var(--auto-sea); background: #fff; font-size: .53rem; }
.automation-tabs button.active { color: #fff; background: linear-gradient(135deg,var(--auto-blue),var(--auto-sea)); box-shadow: 0 7px 18px rgba(24,91,122,.18); }
.automation-tabs button.active span { color: var(--auto-blue); }
.automation-panel { overflow-x: auto; border-top: 4px solid var(--auto-sea); }
.automation-heading { display: flex; min-width: 1180px; padding: 21px 23px 17px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--sb-border); }
.automation-heading h2 { margin: 2px 0 0; font-size: 1.25rem; }
.automation-heading > span { color: var(--sb-muted); font-size: .64rem; }
.report-schedule-table { min-width: 1420px; }
.report-schedule-row { display: grid; min-height: 80px; padding: 13px 20px; grid-template-columns: 205px 65px 180px 145px 120px 110px 155px 75px 130px; align-items: center; gap: 14px; border-bottom: 1px solid #e6eeee; font: .68rem "Aptos","Trebuchet MS",sans-serif; }
.automation-table-header { min-height: 45px; color: #597275; background: #f1f9f8; font-size: .57rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.automation-name { display: flex; min-width: 0; align-items: center; gap: 10px; }
.automation-name > span { display: grid; min-width: 39px; height: 37px; padding: 0 6px; place-items: center; border-radius: 10px 3px 10px 3px; color: var(--auto-sea); background: var(--auto-soft); font-size: .56rem; font-weight: 900; }
.automation-name div,
.report-schedule-row > div:nth-child(6) { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.automation-name strong { overflow: hidden; color: #163f50; text-overflow: ellipsis; white-space: nowrap; }
.automation-name small,
.report-schedule-row small { display: block; margin-top: 3px; color: var(--sb-muted); font-size: .58rem; }
.automation-api { display: inline-flex; width: fit-content; min-width: 48px; padding: 6px 9px; justify-content: center; border-radius: 999px; font-size: .57rem; font-weight: 900; }
.automation-api-ddq { color: #075a9f; background: #e8f3fb; }
.automation-api-mmf { color: #067647; background: #e9f9f0; }
.automation-actions { display: flex; gap: 5px; }
.automation-actions button { min-height: 31px; padding: 0 8px; border: 1px solid #b7d2d3; border-radius: 7px 2px 7px 2px; color: #176e73; background: #f3fbfa; cursor: pointer; font-size: .56rem; font-weight: 800; }
.automation-actions button:hover { color: #fff; background: var(--auto-sea); }
.distribution-table { min-width: 1160px; }
.distribution-row { display: grid; min-height: 80px; padding: 13px 20px; grid-template-columns: 220px 75px minmax(280px,1fr) 105px 75px 130px; align-items: center; gap: 15px; border-bottom: 1px solid #e6eeee; font: .68rem "Aptos","Trebuchet MS",sans-serif; }
.email-preview { overflow: hidden; color: #526b73; text-overflow: ellipsis; white-space: nowrap; }
.delivery-table { min-width: 1430px; }
.delivery-row { display: grid; min-height: 82px; padding: 13px 19px; grid-template-columns: 225px 120px 75px 105px 90px 110px 95px 80px 60px; align-items: center; gap: 13px; border-bottom: 1px solid #e6eeee; font: .67rem "Aptos","Trebuchet MS",sans-serif; }
.delivery-table:has(.delivery-modern-row) { min-width: 1280px; }
.delivery-row.delivery-modern-row { grid-template-columns: minmax(210px,1.35fr) minmax(145px,.9fr) minmax(155px,1fr) 110px minmax(170px,1.1fr) 88px 88px 85px 62px; }
.delivery-modern-row > span:not(.status-pill):not(.delivery-state) { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.delivery-modern-row > span strong { overflow: hidden; color: #173f50; text-overflow: ellipsis; white-space: nowrap; }
.delivery-modern-row > span small { overflow: hidden; color: #718695; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.delivery-row time { display: flex; flex-direction: column; gap: 3px; color: #53687a; }
.delivery-row time small { color: #8291a0; font-size: .58rem; }
.anomaly-count { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px 3px 9px 3px; color: #60757a; background: #edf2f3; font-weight: 900; }
.anomaly-count.found { color: #9b471d; background: #fff0df; }
.delivery-state { display: inline-flex; width: fit-content; padding: 6px 8px; border-radius: 8px 3px 8px 3px; font-size: .56rem; font-weight: 800; }
.state-generated,.state-sent { color: #067647; background: #ecfdf3; }
.state-failed,.state-notsent,.state-notgenerated { color: #b42318; background: #fff1f0; }
.state-notrequired { color: #66747c; background: #edf2f3; }
.state-queued { color: #8a6800; background: #fff8d8; }
.delivery-overall-delivered { color: #067647; background: #ecfdf3; }
.delivery-overall-warning { color: #8a6800; background: #fff8d8; }
.delivery-overall-failed { color: #b42318; background: #fff1f0; }
.automation-view { border: 1px solid #a9d2d3; color: #176e73; background: #f2fbfa; }
.automation-view:hover { color: #fff; background: var(--auto-sea); }
.automation-dialog { width: min(100%,760px); }
.report-schedule-dialog { width: min(100%,900px); }
.report-choice-fieldset { margin: 20px 0 0; padding: 15px; border: 1px solid #c7dadd; border-radius: 12px 4px 12px 4px; }
.report-choice-fieldset legend { float: none; width: auto; margin: 0 0 4px; padding: 0 5px; color: #16485b; font-size: .62rem; font-weight: 800; }
.report-choice-fieldset > p,.plant-picker > p { margin: 0 0 12px; color: var(--sb-muted); font-size: .59rem; line-height: 1.45; }
.report-choice-fieldset > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.report-choice-fieldset label { display: flex; min-height: 38px; padding: 8px 10px; align-items: center; gap: 8px; border: 1px solid #d9e6e7; border-radius: 8px; color: #315763; background: #f9fcfc; font-size: .63rem; font-weight: 700; }
.report-choice-fieldset input { accent-color: var(--auto-sea); }
.report-delivery-grid { margin-top: 20px; padding-top: 20px; border-top: 1px solid #dbe7e8; }
.report-all-plants-note { display: flex; margin-top: 18px; padding: 13px 15px; align-items: center; gap: 11px; border: 1px solid #b9ddca; border-radius: 10px; color: #205b42; background: #f0faf5; }
.report-all-plants-note > span { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 50%; color: #fff; background: #159c67; font-size: .72rem; font-weight: 900; }
.report-all-plants-note > div { display: flex; flex-direction: column; gap: 3px; }
.report-all-plants-note strong { font-size: .69rem; }
.report-all-plants-note small { color: #58756a; font-size: .61rem; line-height: 1.4; }
.report-recipient-field { position: relative; display: flex; flex-direction: column; gap: 6px; }
.report-recipient-picker { display: flex; min-height: 52px; padding: 7px 8px; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px solid #bed1dc; border-radius: 9px; background: #fff; cursor: text; transition: border-color 150ms ease, box-shadow 150ms ease; }
.report-recipient-picker:focus-within { border-color: var(--auto-sea); box-shadow: 0 0 0 3px rgba(22,140,145,.12); }
.report-recipient-picker > input { min-width: 190px; min-height: 34px; padding: 5px 7px; flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: .69rem; }
.recipient-chip { display: inline-flex; max-width: 100%; min-height: 38px; padding: 4px 6px 4px 4px; align-items: center; gap: 7px; border: 1px solid #bdd7e3; border-radius: 8px; color: #183f59; background: #edf7fb; }
.recipient-chip > i,.report-recipient-suggestions button > i { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; color: #fff; background: #1677a8; font-size: .62rem; font-style: normal; font-weight: 900; }
.recipient-chip > span { display: flex; min-width: 0; flex-direction: column; }
.recipient-chip strong { overflow: hidden; max-width: 190px; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.recipient-chip small { overflow: hidden; max-width: 190px; color: #627a89; font-size: .54rem; text-overflow: ellipsis; white-space: nowrap; }
.recipient-chip > button { display: grid; width: 23px; height: 23px; padding: 0; place-items: center; border: 0; border-radius: 50%; color: #587383; background: transparent; cursor: pointer; font-size: .9rem; }
.recipient-chip > button:hover { color: #b42318; background: #fff; }
.recipient-add-button { min-height: 32px; padding: 0 11px; border: 0; border-radius: 7px; color: #fff; background: var(--auto-sea); cursor: pointer; font-size: .61rem; font-weight: 800; }
.recipient-help { color: var(--sb-muted); font-size: .58rem; }
.report-recipient-suggestions { position: absolute; z-index: 12; top: calc(100% - 18px); right: 0; left: 0; max-height: 240px; overflow-y: auto; padding: 6px; border: 1px solid #c5d8e3; border-radius: 10px; background: #fff; box-shadow: 0 18px 42px rgba(17,54,76,.2); }
.report-recipient-suggestions button { display: flex; width: 100%; padding: 9px 10px; align-items: center; gap: 10px; border: 0; border-radius: 7px; color: #183f59; background: transparent; text-align: left; cursor: pointer; }
.report-recipient-suggestions button:hover { background: #edf6fa; }
.report-recipient-suggestions button > span { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.report-recipient-suggestions strong { font-size: .67rem; }
.report-recipient-suggestions small { color: #667e8d; font-size: .59rem; }
.report-recipient-suggestions p { margin: 0; padding: 12px; color: #647b89; font-size: .63rem; }
.plant-picker { margin: 20px 0 0; padding: 15px; border: 1px solid #c7dadd; border-radius: 12px 4px 12px 4px; }
.plant-picker legend { float: none; width: auto; margin: 0 0 9px; padding: 0 5px; color: #16485b; font-size: .62rem; font-weight: 800; }
.plant-picker > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.plant-picker label { display: flex; padding: 9px 11px; align-items: center; gap: 8px; border-radius: 8px 3px 8px 3px; color: #45636d; background: #f3f8f9; font-size: .66rem; cursor: pointer; }
.plant-picker input { accent-color: var(--auto-sea); }
.admin-form-grid textarea { width: 100%; padding: 11px 12px; resize: vertical; border: 1px solid #c6d7dc; border-radius: 9px 3px 9px 3px; outline: 0; color: var(--sb-navy); font: .73rem "Aptos","Trebuchet MS",sans-serif; }
.admin-form-grid textarea:focus { border-color: var(--admin-accent); box-shadow: 0 0 0 3px rgba(12,108,136,.11); }
.admin-form-grid label > small { color: var(--sb-muted); font-size: .58rem; }
.delivery-dialog { width: min(100%,720px); }
.delivery-dialog-body { padding: 23px 26px 26px; }
.delivery-detail-head { display: flex; padding: 15px 16px; align-items: center; gap: 12px; border: 1px solid #bcd9d9; border-radius: 14px 4px 14px 4px; background: #f1faf9; }
.delivery-detail-head > span:first-child { display: grid; min-width: 45px; height: 36px; place-items: center; border-radius: 9px 3px 9px 3px; color: #fff; background: var(--auto-sea); font-size: .57rem; font-weight: 900; }
.delivery-detail-head div { display: flex; flex-direction: column; gap: 3px; }
.delivery-detail-head div strong { color: #153f50; }
.delivery-detail-head div small { color: var(--sb-muted); font-size: .6rem; }
.delivery-detail-head > span:last-child { margin-left: auto; }
.delivery-detail-grid { display: grid; margin: 0; padding: 20px 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px 23px; }
.delivery-detail-grid div { display: flex; flex-direction: column; gap: 4px; }
.delivery-detail-grid .wide { grid-column: 1 / -1; }
.delivery-detail-grid dt { color: #60787e; font-size: .57rem; font-weight: 800; text-transform: uppercase; }
.delivery-detail-grid dd { margin: 0; color: #173f50; font-size: .7rem; font-weight: 700; line-height: 1.45; }
.delivery-file-list { display: grid; gap: 8px; }
.delivery-file-list article { display: flex; padding: 13px; align-items: center; gap: 11px; border: 1px solid #d4e2e3; border-radius: 10px 3px 10px 3px; }
.delivery-file-list article > span { display: grid; width: 38px; height: 34px; place-items: center; border-radius: 8px 2px 8px 2px; color: #176e73; background: var(--auto-soft); font-size: .53rem; font-weight: 900; }
.delivery-file-list article div { display: flex; flex-direction: column; gap: 3px; }
.delivery-file-list strong { color: #173f50; font-size: .7rem; }
.delivery-file-list small { color: var(--sb-muted); font-size: .61rem; }
.delivery-message { margin-top: 16px; padding: 14px; border-left: 3px solid var(--auto-gold); color: #66572f; background: #fff9e8; }
.delivery-message strong { font-size: .68rem; }
.delivery-message p { margin: 5px 0 0; font-size: .65rem; line-height: 1.45; }

@media (max-width: 640px) {
    .automation-summary { grid-template-columns: repeat(2,1fr); }
    .automation-tabs { grid-template-columns: 1fr; }
    .report-section-tabs { display: grid; width: 100%; grid-template-columns: 1fr; }
    .report-section-tabs button { justify-content: space-between; }
    .report-choice-fieldset > div { grid-template-columns: 1fr; }
    .plant-picker > div { grid-template-columns: 1fr; }
    .delivery-dialog-body { padding-right: 18px; padding-left: 18px; }
    .delivery-detail-grid { grid-template-columns: 1fr; }
    .delivery-detail-grid .wide { grid-column: auto; }
}

/* Administrator-only configuration workspace. */
.admin-navigation { margin-top: 25px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
.nav-body .admin-nav-link { min-height: 45px; font-size: .77rem; }
.nav-body .admin-nav-link .nav-symbol { color: var(--sb-yellow); }
.nav-body .admin-nav-link.active .nav-symbol { color: var(--sb-navy); }

.admin-page { --admin-accent: #0c6c88; --admin-dark: #063b55; --admin-soft: #edf8fa; }
.admin-page .section-label { color: var(--admin-accent); }
.admin-primary { border: 0; color: #fff; background: linear-gradient(135deg, var(--admin-accent), var(--admin-dark)); box-shadow: 0 10px 24px rgba(6,59,85,.2); }
.admin-primary:hover { background: linear-gradient(135deg, #09536a, #042c40); }
.success-overlay { padding: 24px; align-items: center; }
.configuration-success-dialog { position: relative; width: min(100%, 460px); padding: 34px 36px 30px; border: 1px solid #a9dcc4; border-top: 5px solid #07945f; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(3,33,48,.38); text-align: center; animation: profile-rise-in 220ms ease both; }
.configuration-success-dialog .profile-close { position: absolute; top: 16px; right: 16px; }
.configuration-success-icon { display: grid; width: 66px; height: 66px; margin: 2px auto 18px; place-items: center; border-radius: 50%; color: #fff; background: #07945f; box-shadow: 0 0 0 9px #e7f8ef; font-size: 1.55rem; font-weight: 900; }
.configuration-success-dialog .section-label { margin: 0 0 5px; color: #07945f; }
.configuration-success-dialog h2 { margin: 0; color: var(--admin-dark); font-size: 1.45rem; }
.configuration-success-dialog > p:not(.section-label) { margin: 12px auto 23px; color: #58716a; font-size: .72rem; line-height: 1.55; }
.configuration-success-dialog .success-done { min-width: 130px; min-height: 44px; }
.plant-form-actions { display: grid; grid-template-columns: auto 1fr auto auto; }
.delete-plant-action,.confirm-delete-action { min-height: 42px; padding: 0 15px; border: 1px solid #e0a6a1; border-radius: 9px; color: #b42318; background: #fff3f2; cursor: pointer; font-weight: 800; }
.delete-plant-action:hover,.confirm-delete-action:hover { color: #fff; background: #b42318; }
.delete-plant-confirmation { margin-top: 20px; padding: 16px; border: 1px solid #efb8b3; border-radius: 10px; color: #7a271f; background: #fff5f4; }
.delete-plant-confirmation > strong { font-size: .76rem; }
.delete-plant-confirmation p { margin: 6px 0 14px; font-size: .65rem; line-height: 1.5; }
.delete-plant-confirmation > div { display: flex; justify-content: flex-end; gap: 9px; }
.admin-summary { display: grid; margin-bottom: 18px; padding: 18px 22px; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 14px; border: 1px solid #bdd8df; border-radius: 17px 5px 17px 5px; background: radial-gradient(circle at 100% 0%, rgba(12,108,136,.12), transparent 30%), var(--admin-soft); }
.plant-summary { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
.admin-summary > div { display: flex; min-height: 58px; padding-left: 16px; flex-direction: column; justify-content: center; gap: 4px; border-left: 3px solid var(--admin-accent); }
.admin-summary small { color: #587580; font-size: .59rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.admin-summary strong { color: var(--admin-dark); font-size: 1.45rem; line-height: 1; }
.admin-toolbar { display: flex; margin-bottom: 18px; align-items: center; justify-content: space-between; gap: 16px; }
.admin-search { display: flex; width: min(100%, 520px); height: 49px; padding: 0 16px; align-items: center; gap: 10px; border: 1px solid #bdd3da; border-radius: 12px 4px 12px 4px; background: #fff; box-shadow: 0 7px 20px rgba(6,59,85,.05); }
.admin-search > span { color: var(--admin-accent); font-size: 1.2rem; }
.admin-search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: .75rem; }
.admin-panel { overflow-x: auto; border-top: 4px solid var(--admin-accent); }
.api-registry-panel { overflow: hidden; margin: 0; border: 1px solid #c9dde2; border-top: 4px solid var(--admin-accent); border-radius: 14px; box-shadow: 0 8px 24px rgba(6,59,85,.06); }
.api-registry-panel .admin-table-heading { min-width: 1080px; padding: 18px; background: #fff; }
.api-registry-panel .plant-admin-row > strong { color: #153d4d; font-size: .67rem; }
.api-registry-panel .status-pill { justify-content: center; }
.api-registry-empty { padding: 28px 22px; color: var(--sb-muted); background: #fbfdfd; font-size: .7rem; text-align: center; }
.api-type-switch { display: inline-flex; margin-bottom: 16px; padding: 5px; gap: 5px; border: 1px solid #bdd3da; border-radius: 13px; background: #eaf4f7; }
.api-type-switch button { display: inline-flex; min-width: 132px; min-height: 42px; padding: 0 14px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; color: #57717c; background: transparent; cursor: pointer; font: 800 .68rem "Aptos", "Trebuchet MS", sans-serif; }
.api-type-switch button:hover { color: var(--admin-dark); background: rgba(255,255,255,.65); }
.api-type-switch button.active { color: #fff; background: linear-gradient(135deg, var(--admin-accent), var(--admin-dark)); box-shadow: 0 7px 16px rgba(6,59,85,.2); }
.api-type-switch small { display: grid; min-width: 21px; height: 21px; padding: 0 5px; place-items: center; border-radius: 11px; color: var(--admin-dark); background: #fff; font-size: .56rem; }
.api-switch-dot { width: 8px; height: 8px; border-radius: 50%; background: #1677bd; }
.api-switch-mmf { background: #16a66b; }
.admin-table-heading { display: flex; min-width: 1100px; padding: 21px 23px 17px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--sb-border); }
.admin-table-heading h2 { margin: 2px 0 0; font-size: 1.25rem; }
.admin-table-heading > span { color: var(--sb-muted); font-size: .65rem; }
.plant-admin-table { min-width: 1080px; background: #fff; }
.plant-admin-row { display: grid; min-height: 68px; padding: 11px 18px; grid-template-columns: 180px 90px 55px 115px minmax(260px,1fr) 98px 80px 58px; align-items: center; gap: 12px; border-bottom: 1px solid #dfeaec; font: .69rem "Aptos", "Trebuchet MS", sans-serif; }
.plant-admin-row:not(.admin-table-header):nth-child(odd) { background: #fbfdfd; }
.plant-admin-row:not(.admin-table-header):hover { background: #f2f9fa; }
.plant-admin-row:last-child,
.schedule-admin-row:last-child,
.user-admin-row:last-child { border-bottom: 0; }
.admin-table-header { min-height: 46px; color: #48636d; background: #eaf4f6; font-size: .57rem; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.admin-entity { display: flex; min-width: 0; align-items: center; gap: 11px; }
.admin-entity > span { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 11px 3px 11px 3px; color: var(--admin-accent); background: var(--admin-soft); font-size: .59rem; font-weight: 900; }
.admin-entity div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.admin-entity strong { overflow: hidden; color: var(--admin-dark); text-overflow: ellipsis; white-space: nowrap; }
.admin-entity small { color: var(--sb-muted); font-size: .6rem; }
.plant-admin-row code { display: block; overflow: hidden; padding: 9px 11px; border: 1px solid #d9e8ec; border-radius: 8px; color: #17617b; background: #f4f9fa; font-size: .59rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.plant-registry-table { min-width: 1050px; background: #fff; }
.plant-registry-header,
.plant-registry-group { display: grid; grid-template-columns: 220px minmax(430px,1fr) 110px 84px 66px; align-items: center; gap: 18px; }
.plant-registry-header { min-height: 48px; padding: 0 20px; color: #48636d; background: #eaf4f6; font: 900 .57rem "Aptos", "Trebuchet MS", sans-serif; letter-spacing: .055em; text-transform: uppercase; }
.plant-registry-group { min-height: 86px; padding: 14px 20px; border-bottom: 1px solid #dfeaec; font: .69rem "Aptos", "Trebuchet MS", sans-serif; transition: background 140ms ease; }
.plant-registry-group:nth-of-type(odd) { background: #fbfdfd; }
.plant-registry-group:hover { background: #f2f9fa; }
.plant-registry-group:last-child { border-bottom: 0; }
.plant-registry-identity { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.plant-registry-state { padding-left: 50px; color: #607682; font-size: .61rem; }
.plant-endpoint-list { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.plant-endpoint-item { display: grid; min-width: 0; grid-template-columns: 48px 116px minmax(210px,1fr); align-items: center; gap: 10px; }
.plant-endpoint-item strong { color: #153d4d; font-size: .65rem; }
.plant-endpoint-item code { display: block; overflow: hidden; padding: 8px 10px; border: 1px solid #d9e8ec; border-radius: 8px; color: #17617b; background: #f4f9fa; font-size: .59rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.plant-registry-group > .status-pill { justify-self: start; }
.plant-registry-group > .admin-edit-action { width: 62px; }
.plant-registry-scroll { overflow-x: auto; }
.plant-registry-data { width: 100%; min-width: 1160px; border-collapse: separate; border-spacing: 0; color: #263f4d; background: #fff; font: .69rem "Aptos", "Trebuchet MS", sans-serif; table-layout: fixed; }
.plant-registry-data .plant-column { width: 190px; }
.plant-registry-data .state-column { width: 120px; }
.plant-registry-data .type-column { width: 82px; }
.plant-registry-data .data-column { width: 140px; }
.plant-registry-data .registered-column { width: 122px; }
.plant-registry-data .status-column { width: 92px; }
.plant-registry-data .action-column { width: 78px; }
.plant-registry-data thead th { height: 50px; padding: 0 14px; border-right: 1px solid #d6e5e9; border-bottom: 1px solid #c4dae0; color: #3d5e6c; background: #eaf4f6; font-size: .58rem; font-weight: 900; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.plant-registry-data thead th:last-child { border-right: 0; }
.plant-registry-data tbody th,
.plant-registry-data tbody td { height: 58px; padding: 10px 14px; border-right: 1px solid #edf3f5; border-bottom: 1px solid #dfeaec; vertical-align: middle; text-align: left; }
.plant-registry-data tbody tr > *:last-child { border-right: 0; }
.plant-registry-data tbody th { font-weight: inherit; }
.plant-registry-data tbody tr.plant-first-endpoint > * { border-top: 3px solid #d5e7eb; }
.plant-registry-data tbody tr.plant-first-endpoint:first-child > * { border-top: 0; }
.plant-registry-data tbody tr.plant-next-endpoint td { background: #fbfdfd; }
.plant-registry-data tbody tr:hover td,
.plant-registry-data tbody tr:hover th { background: #f2f9fa; }
.plant-registry-data code { display: block; width: 100%; overflow: hidden; padding: 9px 11px; border: 1px solid #d3e5e9; border-radius: 8px; color: #0b6684; background: #f3f9fa; font-family: Consolas, monospace; font-size: .58rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.plant-table-identity,
.plant-table-state { border-right-color: #dbe9ec !important; background: #f7fbfc; }
.plant-table-identity { padding-left: 18px !important; border-left: 4px solid #15809b; background: #f7fbfc; }
.plant-table-state { color: #405d69; font-weight: 700; }
.plant-table-data-type strong { color: #153d4d; font-size: .66rem; }
.plant-registry-data .status-pill { display: inline-flex; justify-content: center; }
.plant-registry-data .admin-edit-action { width: 58px; padding: 0 8px; }
.plant-registry-data .api-registry-empty { height: auto; padding: 28px 22px; text-align: center; }
.plant-registered-time { display: flex; flex-direction: column; gap: 3px; color: #153d4d; font-style: normal; white-space: nowrap; }
.plant-registered-time strong { font-size: .64rem; }
.plant-registered-time small { color: var(--sb-muted); font-size: .57rem; }
.api-type-badge { display: inline-flex; width: 46px; padding: 6px 5px; justify-content: center; border-radius: 8px; font-size: .57rem; font-weight: 900; letter-spacing: .03em; }
.api-type-ddq { color: #075a9f; background: #eaf4fb; }
.api-type-mmf { color: #067647; background: #eaf9f1; }
.admin-edit-action { min-height: 34px; padding: 0 11px; border: 1px solid #91bec9; border-radius: 8px; color: var(--admin-accent); background: #f2fafb; cursor: pointer; font-size: .6rem; font-weight: 800; }
.admin-edit-action:hover { color: #fff; background: var(--admin-accent); }
.admin-header-actions { display: flex; align-items: center; gap: 10px; }
.test-api-action { display: inline-flex; min-height: 45px; padding: 0 17px; align-items: center; justify-content: center; border: 1px solid #88bcc9; border-radius: 11px 3px 11px 3px; color: var(--admin-accent); background: #eff9fb; cursor: pointer; font-size: .69rem; font-weight: 800; }
.test-api-action::before { width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; content: ""; background: #0bb77a; box-shadow: 0 0 0 4px rgba(11,183,122,.1); }
.test-api-action:hover { color: #fff; border-color: var(--admin-accent); background: var(--admin-accent); }
.api-test-state { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 4px; }
.api-test-state small { color: var(--sb-muted); font-size: .54rem; white-space: nowrap; }
.api-test-pill { display: inline-flex; padding: 5px 8px; border-radius: 7px 2px 7px 2px; font-size: .56rem; font-weight: 900; }
.api-connected { color: #067647; background: #ecfdf3; }
.api-failed { color: #b42318; background: #fff1f0; }
.api-nottested { color: #66747c; background: #edf2f3; }
.api-test-dialog { width: min(100%,670px); }
.api-test-form { padding: 23px 26px 26px; }
.api-test-form > p { margin: 0 0 18px; color: var(--sb-muted); font-size: .7rem; line-height: 1.5; }
.api-test-result { display: grid; margin-top: 18px; padding: 15px; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 12px; border: 1px solid; border-radius: 12px 4px 12px 4px; }
.api-test-result > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px 3px 11px 3px; color: #fff; font-size: .65rem; font-weight: 900; }
.api-test-result > div { display: flex; flex-direction: column; gap: 3px; }
.api-test-result strong { color: var(--admin-dark); font-size: .74rem; }
.api-test-result p { margin: 0; color: #5d747d; font-size: .64rem; line-height: 1.4; }
.api-test-result small { color: #7b8c92; font-size: .56rem; }
.api-test-result.connected { border-color: #a9dcc4; background: #f0fbf5; }
.api-test-result.connected > span { background: #07945f; }
.api-test-result.failed { border-color: #efb8b3; background: #fff3f2; }
.api-test-result.failed > span { background: #c6382d; }
.api-test-form .profile-actions { margin-top: 21px; }

.schedule-admin-table { min-width: 1320px; }
.schedule-admin-row { display: grid; min-height: 78px; padding: 13px 21px; grid-template-columns: 220px 170px 70px 95px 70px 85px 90px 100px 72px; align-items: center; gap: 14px; border-bottom: 1px solid #e6eef0; font: .69rem "Aptos", "Trebuchet MS", sans-serif; }
.status-processing { color: #075a9f; background: #eaf4fb; }
.admin-toggle { min-height: 33px; padding: 0 9px; border: 1px solid #a9cbd4; border-radius: 8px 3px 8px 3px; color: var(--admin-accent); background: #f2fafb; cursor: pointer; font-size: .6rem; font-weight: 800; }
.admin-toggle:hover { color: #fff; background: var(--admin-accent); }

.database-source-badge { display: inline-flex; padding: 9px 13px; align-items: center; gap: 8px; border: 1px solid #acd9c6; border-radius: 10px 3px 10px 3px; color: #067647; background: #effbf5; font-size: .63rem; font-weight: 800; }
.database-source-badge i { width: 8px; height: 8px; border-radius: 50%; background: #0bb77a; box-shadow: 0 0 0 4px rgba(11,183,122,.1); }
.user-access-summary { grid-template-columns: repeat(4,minmax(130px,1fr)); }
.user-admin-table { min-width: 1180px; }
.user-admin-row { display: grid; min-height: 82px; padding: 13px 21px; grid-template-columns: 245px 175px 145px 105px 90px minmax(270px,1fr); align-items: center; gap: 14px; border-bottom: 1px solid #e6eef0; font: .69rem "Aptos", "Trebuchet MS", sans-serif; }
.user-admin-row code { color: var(--admin-accent); font-size: .65rem; font-weight: 700; }
.pending-user-row { background: linear-gradient(90deg,#fffdf1,#fff); box-shadow: inset 4px 0 #d7a900; }
.identity-source { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.identity-source strong { color: var(--admin-dark); font-size: .66rem; }
.identity-source small { overflow: hidden; color: var(--sb-muted); font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.access-role-note { color: #5d747d; font-size: .66rem; }
.access-role-note strong { color: var(--admin-dark); }
.access-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.access-actions button { min-height: 32px; padding: 0 9px; border-radius: 8px 3px 8px 3px; cursor: pointer; font-size: .57rem; font-weight: 800; }
.access-approve { color: #067647; border: 1px solid #91d4b5; background: #effbf5; }
.access-approve:hover { color: #fff; background: #07945f; }
.access-reject { color: #b42318; border: 1px solid #efb8b3; background: #fff3f2; }
.access-reject:hover { color: #fff; background: #b42318; }
.admin-role { display: inline-flex; width: fit-content; padding: 6px 9px; border-radius: 8px 3px 8px 3px; font-size: .59rem; font-weight: 800; }
.role-administrator { color: #8a6800; background: #fff7d4; }
.role-reviewer { color: #075a9f; background: #eaf4fb; }
.role-staff { color: #075a9f; background: #eaf4fb; }
.role-superadmin { color: #6d28a8; background: #f4ebff; }
.role-none { color: #66747c; background: #edf2f3; }
.access-confirm-overlay { align-items: center; }
.access-confirm-dialog { width: min(100%,480px); }
.access-confirm-icon { display: grid; width: 62px; height: 62px; margin: 0 auto 18px; place-items: center; border-radius: 50%; color: #fff; font-size: 1.45rem; font-weight: 900; }
.access-confirm-icon.approve { background: #07945f; box-shadow: 0 0 0 9px #e7f8ef; }
.access-confirm-icon.deny { background: #c6382d; box-shadow: 0 0 0 9px #fff0ee; }
.access-confirm-actions { display: flex; justify-content: center; gap: 10px; }
.access-confirm-actions button { min-width: 125px; min-height: 43px; }
.access-danger { border: 0; color: #fff; background: #b42318; }
.access-danger:hover { background: #8d1b13; }
.status-warning { color: #8a6800; background: #fff7d4; }

.admin-overlay { position: fixed; z-index: 1000; inset: 0; display: flex; overflow-y: auto; padding: 12px 24px 24px; align-items: flex-start; justify-content: center; background: rgba(3,33,48,.68); backdrop-filter: blur(6px); animation: profile-fade-in 180ms ease both; }
.admin-overlay > .admin-dialog { flex: 0 0 auto; margin: 0 auto; }
.admin-dialog { width: min(100%, 700px); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid rgba(255,255,255,.5); border-top: 5px solid var(--admin-accent); border-radius: 22px 6px 22px 6px; background: #fff; box-shadow: 0 30px 85px rgba(3,33,48,.38); animation: profile-rise-in 220ms ease both; }
.admin-dialog-header { display: flex; padding: 23px 26px 19px; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid #d6e4e8; background: radial-gradient(circle at 90% 0%, rgba(12,108,136,.14), transparent 32%), #f7fcfd; }
.admin-dialog-header h2 { margin: 3px 0 0; color: var(--admin-dark); font-size: 1.4rem; }
.admin-dialog form { padding: 23px 26px 26px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.admin-form-grid label { display: flex; flex-direction: column; gap: 6px; }
.admin-form-grid label > span { color: var(--admin-dark); font-size: .61rem; font-weight: 800; }
.admin-form-grid input,
.admin-form-grid select { width: 100%; height: 45px; padding: 0 12px; border: 1px solid #c6d7dc; border-radius: 9px 3px 9px 3px; outline: 0; color: var(--sb-navy); background: #fff; font: .73rem "Aptos", "Trebuchet MS", sans-serif; }
.admin-form-grid input:focus,
.admin-form-grid select:focus { border-color: var(--admin-accent); box-shadow: 0 0 0 3px rgba(12,108,136,.11); }
.admin-form-grid .wide { grid-column: 1 / -1; }
.admin-dialog .profile-actions { margin-top: 22px; }
.api-link-list { display: grid; margin-top: 18px; gap: 11px; }
.api-config-heading { display: flex; margin-top: 20px; padding-top: 17px; border-top: 1px solid #dce7ea; }
.api-config-heading > div { display: flex; flex-direction: column; gap: 4px; }
.api-config-heading strong { color: var(--admin-dark); font-size: .76rem; }
.api-config-heading small { color: var(--sb-muted); font-size: .62rem; }
.api-config-heading-mmf { margin-top: 24px; }
.required-indicator { display: inline-flex; margin-left: 7px; padding: 2px 7px; align-items: center; border-radius: 999px; color: #9a3412; background: #ffedd5; font-size: .54rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.api-link-entry { display: grid; grid-template-columns: 190px minmax(0,1fr) 38px; align-items: end; gap: 10px; }
.mmf-api-link-entry { grid-template-columns: 190px minmax(0,1fr); }
.api-link-entry label { display: flex; flex-direction: column; gap: 6px; }
.api-link-entry label span { color: var(--admin-dark); font-size: .61rem; font-weight: 800; }
.api-link-entry input,.api-link-entry select { width: 100%; height: 45px; padding: 0 12px; border: 1px solid #c6d7dc; border-radius: 8px; }
.api-endpoint-field input { transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease; }
.api-endpoint-field.verified input { border-color: #16a36a; box-shadow: 0 0 0 3px rgba(22,163,106,.11); background: #f2fff8; }
.api-endpoint-field.failed input { border-color: #dc4c43; box-shadow: 0 0 0 3px rgba(220,76,67,.11); background: #fff7f6; }
.api-endpoint-field.checking input { border-color: #0c789d; box-shadow: 0 0 0 3px rgba(12,120,157,.1); background: #f5fcff; }
.endpoint-verification { display: flex; margin-top: 2px; align-items: flex-start; gap: 6px; line-height: 1.35; }
.api-endpoint-field.verified .endpoint-verification { color: #087a4d; }
.api-endpoint-field.failed .endpoint-verification { color: #b42318; }
.api-endpoint-field.checking .endpoint-verification { color: #0c6c88; }
.endpoint-verification b { display: inline-grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; border-radius: 50%; color: #fff; font-size: .68rem; }
.api-endpoint-field.verified .endpoint-verification b { background: #087a4d; }
.api-endpoint-field.failed .endpoint-verification b { background: #b42318; }
.api-endpoint-field.checking .endpoint-verification b { background: #0c6c88; }
.api-link-entry > button { height: 45px; border: 1px solid #d5e1e5; border-radius: 8px; color: #b42318; background: #fff; cursor: pointer; }
.add-api-link { width: fit-content; padding: 9px 13px; border: 1px solid #88bcc9; border-radius: 8px; color: var(--admin-accent); background: #eff9fb; cursor: pointer; font-weight: 800; }
.password-policy { margin: 13px 0 0; color: var(--sb-muted); font-size: .63rem; }
.admin-alert { margin-bottom: 16px; padding: 11px 13px; border: 1px solid; border-radius: 10px 3px 10px 3px; font-size: .68rem; }
.admin-alert.success { color: #067647; border-color: #acd9c6; background: #effbf5; }
.admin-alert.error { color: #b42318; border-color: #efb8b3; background: #fff3f2; }
.admin-alert.warning { color: #735c00; border-color: #ead285; background: #fffae8; }

@media (max-width: 640px) {
    .admin-summary { grid-template-columns: 1fr; }
    .admin-toolbar { align-items: flex-start; flex-direction: column; }
    .admin-overlay { padding: 12px; }
    .admin-dialog { max-height: calc(100vh - 24px); }
    .admin-dialog-header,
    .admin-dialog form { padding-right: 18px; padding-left: 18px; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .admin-form-grid .wide { grid-column: auto; }
    .api-link-entry { grid-template-columns: 1fr 38px; }
    .api-link-entry label:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
    .admin-header-actions { width: 100%; }
    .admin-header-actions > button { flex: 1; }
    .api-test-form { padding-right: 18px; padding-left: 18px; }
}

/* Collection job monitor: graphite and cyan operational theme. */
.job-monitor-page {
    --monitor-graphite: #17303b;
    --monitor-cyan: #008da8;
    --monitor-cyan-soft: #e9f8fb;
    --monitor-slate: #496773;
}

.job-monitor-page .section-label { color: var(--monitor-cyan); }
.monitor-live-badge { display: flex; padding: 10px 14px; align-items: center; gap: 11px; border: 1px solid #b7dce3; border-radius: 12px 3px 12px 3px; color: var(--monitor-graphite); background: var(--monitor-cyan-soft); }
.monitor-live-badge > i { width: 9px; height: 9px; border-radius: 50%; background: #0ab57b; box-shadow: 0 0 0 5px rgba(10,181,123,.12); animation: status-pulse 2s ease-in-out infinite; }
.monitor-live-badge > span { display: flex; flex-direction: column; gap: 2px; }
.monitor-live-badge strong { font-size: .68rem; }
.monitor-live-badge small { color: #63808a; font-size: .58rem; }

.job-summary { display: grid; margin-bottom: 18px; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; }
.job-summary-card { position: relative; display: flex; min-height: 94px; padding: 16px 18px; flex-direction: column; justify-content: center; gap: 4px; overflow: hidden; border: 1px solid #c9dce1; border-radius: 15px 4px 15px 4px; text-align: left; background: #fff; cursor: pointer; box-shadow: 0 8px 22px rgba(23,48,59,.05); transition: transform 160ms ease, border-color 160ms ease; }
.job-summary-card::after { position: absolute; top: 0; right: 0; bottom: 0; width: 5px; content: ""; background: var(--monitor-cyan); }
.job-summary-card:nth-child(2)::after { background: #1574a6; }
.job-summary-card:nth-child(3)::after { background: #e4a514; }
.job-summary-card:nth-child(4)::after { background: #cf4034; }
.job-summary-card:hover,
.job-summary-card:focus-visible { border-color: var(--monitor-cyan); outline: 0; transform: translateY(-3px); }
.job-summary-card small { color: #69818a; font-size: .59rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.job-summary-card strong { color: var(--monitor-graphite); font-size: 1.65rem; line-height: 1; }
.job-summary-card span { position: absolute; right: 16px; bottom: 14px; color: var(--monitor-cyan); font-size: .58rem; font-weight: 800; }

.monitor-toolbar { display: grid; margin-bottom: 18px; grid-template-columns: minmax(260px, 1fr) 155px 155px 155px; align-items: end; gap: 12px; }
.monitor-search { display: flex; height: 49px; padding: 0 16px; align-items: center; gap: 10px; border: 1px solid #bfd5da; border-radius: 12px 4px 12px 4px; background: #fff; box-shadow: 0 7px 20px rgba(23,48,59,.05); }
.monitor-search > span { color: var(--monitor-cyan); font-size: 1.2rem; }
.monitor-search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: .75rem; }
.monitor-filter { display: flex; flex-direction: column; gap: 5px; }
.monitor-filter > span { color: #607781; font-size: .58rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.monitor-filter select { height: 49px; padding: 0 12px; border: 1px solid #bfd5da; border-radius: 10px 3px 10px 3px; outline: 0; color: var(--monitor-graphite); background: #fff; font: inherit; font-size: .7rem; }
.monitor-filter select:focus { border-color: var(--monitor-cyan); box-shadow: 0 0 0 3px rgba(0,141,168,.12); }

.monitor-panel { overflow-x: auto; border-top: 4px solid var(--monitor-graphite); }
.monitor-table-heading { display: flex; min-width: 1120px; padding: 21px 23px 17px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--sb-border); }
.monitor-table-heading h2 { margin: 2px 0 0; font-size: 1.25rem; }
.monitor-table-heading > span { color: var(--sb-muted); font-size: .65rem; }
.monitor-table { min-width: 1120px; }
.monitor-row { display: grid; min-height: 82px; padding: 13px 21px; grid-template-columns: minmax(245px, 1fr) 62px 82px 125px 145px 90px 62px; align-items: center; gap: 14px; border-bottom: 1px solid #e6eef0; font-family: "Aptos", "Trebuchet MS", sans-serif; font-size: .71rem; }
.monitor-row:last-child { border-bottom: 0; }
.monitor-header { min-height: 46px; color: #5a717a; background: #f1f8fa; font-size: .59rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.monitor-job-name { display: flex; min-width: 0; align-items: center; gap: 11px; }
.monitor-job-name > span { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 11px 3px 11px 3px; color: var(--monitor-cyan); background: var(--monitor-cyan-soft); font-size: .61rem; font-weight: 900; }
.monitor-job-name div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.monitor-job-name strong { overflow: hidden; color: var(--monitor-graphite); text-overflow: ellipsis; white-space: nowrap; }
.monitor-job-name small { color: var(--sb-muted); font-size: .61rem; }
.monitor-source { display: inline-flex; min-width: 39px; padding: 6px 7px; justify-content: center; border-radius: 8px 3px 8px 3px; font-size: .58rem; font-weight: 900; }
.source-ddq { color: #075a9f; background: #eaf4fb; }
.source-mmf { color: #067647; background: #e8f7ef; }
.monitor-mode { display: inline-flex; padding: 6px 8px; border-radius: 8px 3px 8px 3px; font-size: .57rem; font-weight: 800; }
.mode-scheduled { color: #405d68; background: #edf3f5; }
.mode-retry { color: #9a411f; background: #fff0e8; }
.monitor-row time { display: flex; color: #53687a; flex-direction: column; gap: 3px; font-size: .67rem; }
.monitor-row time small { color: #8291a0; font-size: .59rem; }
.job-progress { display: flex; align-items: center; gap: 8px; }
.job-progress > div { width: 100%; height: 7px; overflow: hidden; border-radius: 999px; background: #dfeaec; }
.job-progress > div span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--monitor-cyan), #21b8c9); }
.job-progress small { width: 28px; color: #607781; font-size: .59rem; text-align: right; }
.monitor-status-completed { color: #067647; background: #ecfdf3; }
.monitor-status-running { color: #075a9f; background: #eaf4fb; }
.monitor-status-warning { color: #8a6800; background: #fff8d8; }
.monitor-status-failed { color: #b42318; background: #fff1f0; }
.monitor-view { border: 1px solid #aad2da; color: #08758a; background: #f1fbfc; }
.monitor-view:hover { color: #fff; border-color: var(--monitor-cyan); background: var(--monitor-cyan); }
.monitor-empty { display: flex; min-height: 190px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; color: var(--sb-muted); }
.monitor-empty strong { color: var(--monitor-graphite); }

.monitor-overlay { position: fixed; z-index: 235; inset: 0; display: grid; padding: 24px; place-items: center; background: rgba(12,35,44,.68); backdrop-filter: blur(6px); animation: profile-fade-in 180ms ease both; }
.monitor-dialog { width: min(100%, 720px); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid rgba(255,255,255,.5); border-top: 5px solid var(--monitor-cyan); border-radius: 22px 6px 22px 6px; background: #fff; box-shadow: 0 30px 85px rgba(8,28,36,.38); animation: profile-rise-in 220ms ease both; }
.monitor-dialog-header { display: flex; padding: 23px 26px 19px; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid #d5e4e7; background: radial-gradient(circle at 90% 0%, rgba(0,141,168,.14), transparent 32%), #f7fcfd; }
.monitor-dialog-header h2 { margin: 3px 0 0; color: var(--monitor-graphite); font-size: 1.4rem; }
.monitor-dialog-body { padding: 23px 26px 26px; }
.job-detail-banner { display: flex; padding: 15px 16px; align-items: center; gap: 12px; border: 1px solid #bed9de; border-radius: 14px 4px 14px 4px; background: #f2fafb; }
.job-detail-banner > div { display: flex; flex-direction: column; gap: 3px; }
.job-detail-banner > div strong { color: var(--monitor-graphite); }
.job-detail-banner > div small { color: #67808a; font-size: .62rem; }
.job-detail-banner > strong:last-child { margin-left: auto; color: var(--monitor-cyan); font-size: 1.2rem; }
.job-detail-banner.status-banner-warning { border-color: #ead285; background: #fffae8; }
.job-detail-banner.status-banner-failed { border-color: #efb8b3; background: #fff3f2; }
.job-detail-grid { display: grid; margin: 0; padding: 21px 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; }
.job-detail-grid div { display: flex; flex-direction: column; gap: 4px; }
.job-detail-grid dt { color: #66808a; font-size: .57rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.job-detail-grid dd { margin: 0; color: var(--monitor-graphite); font-size: .72rem; font-weight: 700; }
.job-message { display: grid; padding: 16px; grid-template-columns: 70px minmax(0,1fr); gap: 14px; border: 1px solid #bcdce2; border-radius: 14px 4px 14px 4px; background: #f3fbfc; }
.job-message > span { display: grid; min-height: 45px; place-items: center; border-radius: 10px 3px 10px 3px; color: #fff; background: var(--monitor-cyan); font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.job-message div { display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.job-message strong { color: var(--monitor-graphite); font-size: .76rem; }
.job-message p { margin: 0; color: #5e7580; font-size: .67rem; line-height: 1.45; }
.message-warning { border-color: #ead285; background: #fffae8; }
.message-warning > span { background: #b48708; }
.message-failed { border-color: #efb8b3; background: #fff3f2; }
.message-failed > span { background: #c6382d; }
.message-completed { border-color: #aedeC5; background: #f1fbf6; }
.message-completed > span { background: #07945f; }
.job-audit-trail { padding: 21px 0 4px; }
.job-audit-trail h3 { margin: 0 0 15px; color: var(--monitor-graphite); font-size: .82rem; }
.audit-step { position: relative; display: grid; min-height: 52px; padding-left: 25px; grid-template-columns: minmax(0, 1fr) auto; gap: 15px; }
.audit-step::before { position: absolute; top: 10px; bottom: -10px; left: 5px; width: 1px; content: ""; background: #cbdde1; }
.audit-step:last-child::before { display: none; }
.audit-step > i { position: absolute; top: 3px; left: 0; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: #8eb3bb; box-shadow: 0 0 0 1px #8eb3bb; }
.audit-step.current > i { background: var(--monitor-cyan); box-shadow: 0 0 0 1px var(--monitor-cyan), 0 0 0 5px rgba(0,141,168,.1); }
.audit-step div { display: flex; flex-direction: column; gap: 3px; }
.audit-step strong { color: var(--monitor-graphite); font-size: .7rem; }
.audit-step small,
.audit-step time { color: var(--sb-muted); font-size: .61rem; }

@media (max-width: 900px) {
    .monitor-toolbar { grid-template-columns: repeat(3, 1fr); }
    .monitor-search { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .job-summary { grid-template-columns: repeat(2, 1fr); }
    .monitor-toolbar { grid-template-columns: 1fr; }
    .monitor-search { grid-column: auto; }
    .monitor-overlay { padding: 12px; }
    .monitor-dialog { max-height: calc(100vh - 24px); }
    .monitor-dialog-header,
    .monitor-dialog-body { padding-right: 18px; padding-left: 18px; }
    .job-detail-grid { grid-template-columns: repeat(2, 1fr); }
    .job-message { grid-template-columns: 1fr; }
    .job-message > span { min-height: 34px; }
}

/* Report history uses a warm operational palette distinct from analytics. */
.reports-page {
    --report-rust: #b94724;
    --report-orange: #e27331;
    --report-amber: #f2b632;
    --report-cream: #fff7eb;
    --report-ink: #552919;
}

.reports-page .section-label { color: var(--report-rust); }

.report-access-badge {
    display: inline-flex;
    padding: 10px 14px;
    align-items: center;
    gap: 8px;
    border: 1px solid #efc5a8;
    border-radius: 12px 3px 12px 3px;
    color: #854021;
    background: var(--report-cream);
    font-size: 0.67rem;
    font-weight: 800;
}

.report-access-badge i { width: 8px; height: 8px; border-radius: 50%; background: #18a66a; box-shadow: 0 0 0 5px rgba(24, 166, 106, 0.1); }

.report-summary {
    display: grid;
    margin-bottom: 18px;
    padding: 18px 22px;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 14px;
    border: 1px solid #efc8a9;
    border-radius: 17px 5px 17px 5px;
    background: radial-gradient(circle at 100% 0%, rgba(226, 115, 49, 0.14), transparent 30%), var(--report-cream);
}

.report-summary > div { display: flex; min-height: 58px; padding-left: 17px; flex-direction: column; justify-content: center; gap: 4px; border-left: 3px solid var(--report-orange); }
.report-summary > div:nth-child(2) { border-left-color: #159c67; }
.report-summary > div:nth-child(3) { border-left-color: var(--report-amber); }
.report-summary > div:nth-child(4) { border-left-color: #c8372d; }
.report-summary small { color: #85614e; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.report-summary strong { color: var(--report-ink); font-size: 1.55rem; line-height: 1; }

.report-toolbar { display: grid; margin-bottom: 18px; grid-template-columns: minmax(260px, 1fr) 170px 175px auto; align-items: end; gap: 12px; }

.report-search {
    display: flex;
    height: 49px;
    padding: 0 16px;
    align-items: center;
    gap: 10px;
    border: 1px solid #e4c7b3;
    border-radius: 12px 4px 12px 4px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(94, 49, 24, 0.05);
}

.report-search > span { color: var(--report-rust); font-size: 1.2rem; }
.report-search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 0.75rem; }
.report-filter { display: flex; flex-direction: column; gap: 5px; }
.report-filter > span { color: #6b5549; font-size: 0.59rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.report-filter select { height: 49px; padding: 0 12px; border: 1px solid #e4c7b3; border-radius: 10px 3px 10px 3px; outline: 0; color: var(--sb-navy); background: #fff; font: inherit; font-size: 0.72rem; }
.report-filter select:focus { border-color: var(--report-orange); box-shadow: 0 0 0 3px rgba(226, 115, 49, 0.12); }
.report-toolbar .result-count { align-self: center; text-align: right; }

.report-panel { overflow-x: auto; border-top: 4px solid var(--report-orange); }
.report-table-heading { display: flex; min-width: 1160px; padding: 21px 23px 17px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--sb-border); }
.report-table-heading h2 { margin: 2px 0 0; font-size: 1.25rem; }
.report-table-heading > span { color: var(--sb-muted); font-size: 0.67rem; }
.report-table { min-width: 1160px; }

.report-row {
    display: grid;
    min-height: 82px;
    padding: 13px 21px;
    grid-template-columns: minmax(270px, 1fr) 105px 125px 90px 65px 88px 112px;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #f0e8e2;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.71rem;
}

.report-row:last-child { border-bottom: 0; }
.report-header { min-height: 46px; color: #715c50; background: #fff8f1; font-size: 0.59rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.report-name { display: flex; min-width: 0; align-items: center; gap: 11px; }
.report-name > span,
.report-detail-banner > span:first-child { display: grid; min-width: 44px; height: 34px; padding: 0 7px; place-items: center; border-radius: 10px 3px 10px 3px; color: #fff; background: linear-gradient(135deg, var(--report-orange), var(--report-rust)); font-size: 0.56rem; font-weight: 900; }
.report-name div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.report-name strong { overflow: hidden; color: var(--sb-navy); text-overflow: ellipsis; white-space: nowrap; }
.report-name small { color: var(--sb-muted); font-size: 0.61rem; }
.report-row time { display: flex; color: #53687a; flex-direction: column; gap: 3px; font-size: 0.68rem; }
.report-row time small { color: #8291a0; font-size: 0.6rem; }

.report-type { display: inline-flex; padding: 6px 8px; border-radius: 8px 3px 8px 3px; font-size: 0.58rem; font-weight: 800; }
.type-ondemand { color: #9b3c1e; background: #fff0e5; }
.type-scheduled { color: #7a5a00; background: #fff7d7; }
.report-status-completed { color: #067647; background: #ecfdf3; }
.report-status-processing { color: #8a6800; background: #fff8d8; }
.report-status-failed { color: #b42318; background: #fff1f0; }
.report-view-action { border: 1px solid #e3b394; color: var(--report-rust); background: #fff7f1; }
.main-download { border: 1px solid #dda583; color: #923d21; background: #fff3ea; }
.anomaly-download { border: 1px solid #e5c56c; color: #7a5900; background: #fff9df; }
.report-view-action:hover,
.main-download:hover { color: #fff; border-color: var(--report-rust); background: var(--report-rust); }
.anomaly-download:hover { color: #fff; border-color: #9a7100; background: #9a7100; }
.report-unavailable { color: #98a2ad; font-size: 0.62rem; text-align: center; }
.report-empty { display: flex; min-height: 190px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; color: var(--sb-muted); }
.report-empty strong { color: var(--sb-navy); }

.report-overlay { position: fixed; z-index: 230; inset: 0; display: grid; padding: 24px; place-items: center; background: rgba(53, 27, 15, 0.65); backdrop-filter: blur(6px); animation: profile-fade-in 180ms ease both; }
.report-dialog { width: min(100%, 720px); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid rgba(255,255,255,.55); border-top: 5px solid var(--report-orange); border-radius: 22px 6px 22px 6px; background: #fff; box-shadow: 0 30px 85px rgba(53, 27, 15, .35); animation: profile-rise-in 220ms ease both; }
.report-dialog-header { display: flex; padding: 23px 26px 19px; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid #eadbd1; background: radial-gradient(circle at 90% 0%, rgba(226,115,49,.15), transparent 32%), #fffaf5; }
.report-dialog-header h2 { margin: 3px 0 0; color: var(--report-ink); font-size: 1.4rem; }
.report-dialog-body { padding: 23px 26px 26px; }
.report-detail-banner { display: flex; padding: 15px 16px; align-items: center; gap: 12px; border: 1px solid #edc5a9; border-radius: 14px 4px 14px 4px; background: var(--report-cream); }
.report-detail-banner div { display: flex; flex-direction: column; gap: 3px; }
.report-detail-banner div strong { color: var(--report-ink); }
.report-detail-banner div small { color: #896b59; font-size: .62rem; }
.report-detail-banner .report-type { margin-left: auto; }
.report-detail-grid { display: grid; margin: 0; padding: 21px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 25px; border-bottom: 1px solid #eadbd1; }
.report-detail-grid div { display: flex; flex-direction: column; gap: 4px; }
.report-detail-grid dt { color: #806757; font-size: .59rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.report-detail-grid dd { margin: 0; color: var(--sb-navy); font-size: .73rem; font-weight: 700; line-height: 1.45; }
.report-detail-grid .report-description { grid-column: 1 / -1; }
.report-timeline { padding: 20px 0 6px; }
.report-timeline h3 { margin: 0 0 15px; color: var(--report-ink); font-size: .83rem; }
.timeline-item { position: relative; display: grid; min-height: 52px; padding-left: 25px; grid-template-columns: minmax(0, 1fr) auto; gap: 15px; }
.timeline-item::before { position: absolute; top: 10px; bottom: -10px; left: 5px; width: 1px; content: ""; background: #e8cfc0; }
.timeline-item:last-child::before { display: none; }
.timeline-item > i { position: absolute; top: 3px; left: 0; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: #d9a685; box-shadow: 0 0 0 1px #d9a685; }
.timeline-item.current > i { background: var(--report-rust); box-shadow: 0 0 0 1px var(--report-rust), 0 0 0 5px rgba(185,71,36,.1); }
.timeline-item div { display: flex; flex-direction: column; gap: 3px; }
.timeline-item strong { color: var(--sb-navy); font-size: .7rem; }
.timeline-item small,
.timeline-item time { color: var(--sb-muted); font-size: .61rem; }
.report-dialog-actions { display: flex; padding-top: 14px; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid #eadbd1; }

@media (max-width: 900px) {
    .report-toolbar { grid-template-columns: 1fr 1fr; }
    .report-search { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .report-summary { grid-template-columns: repeat(2, 1fr); }
    .report-toolbar { grid-template-columns: 1fr; }
    .report-search { grid-column: auto; }
    .report-toolbar .result-count { text-align: left; }
    .report-overlay { padding: 12px; }
    .report-dialog { max-height: calc(100vh - 24px); }
    .report-dialog-header,
    .report-dialog-body { padding-right: 18px; padding-left: 18px; }
    .report-detail-grid { grid-template-columns: 1fr; }
    .report-detail-grid .report-description { grid-column: auto; }
    .report-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
    .report-dialog-actions .table-action,
    .report-dialog-actions button { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* DDQ collection operations */
.collection-page {
    --collection-blue: #0874bd;
    --collection-navy: #07386b;
    --collection-cyan: #eaf7ff;
}

.collection-page .section-label { color: var(--collection-blue); }

.collection-run-action,
.collection-close-action {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--collection-blue), var(--collection-navy));
    box-shadow: 0 10px 24px rgba(8, 83, 142, 0.2);
}

.collection-run-action:hover,
.collection-close-action:hover { background: linear-gradient(135deg, #075d99, #052b53); }

.collection-run-icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px 2px 7px 2px;
    color: var(--collection-blue);
    background: #fff;
    font-size: 0.55rem;
}

.collection-summary {
    display: grid;
    margin-bottom: 18px;
    padding: 18px 22px;
    grid-template-columns: repeat(3, 150px) minmax(250px, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid #bddced;
    border-radius: 17px 5px 17px 5px;
    background: radial-gradient(circle at 100% 0%, rgba(7, 116, 189, 0.12), transparent 32%), #f5fbff;
}

.collection-load-error {
    display: flex;
    margin-bottom: 18px;
    padding: 15px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #f3b7b2;
    border-left: 4px solid #d92d20;
    border-radius: 12px 4px 12px 4px;
    color: #7a271a;
    background: #fff4f2;
}
.collection-load-error div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.collection-load-error strong { font-size: .78rem; }
.collection-load-error span { overflow-wrap: anywhere; font-size: .68rem; line-height: 1.45; }
.collection-load-error button { padding: 8px 14px; border: 1px solid #e36b63; border-radius: 8px 3px 8px 3px; color: #9f2018; background: #fff; font-size: .68rem; font-weight: 800; cursor: pointer; }

.collection-summary > div,
.collection-summary > .summary-stat {
    display: flex;
    min-height: 57px;
    padding-right: 18px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-right: 1px solid #cce3f0;
}

.collection-summary small {
    color: #527089;
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.collection-summary strong { color: var(--sb-navy); font-size: 1.55rem; line-height: 1; }
.collection-summary p { margin: 0; color: #42627b; font-size: 0.72rem; text-align: right; }

.live-dot,
.connection-ready i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #0bb77a;
    box-shadow: 0 0 0 5px rgba(11, 183, 122, 0.1);
}

.collection-toolbar {
    display: flex;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.collection-search {
    display: flex;
    width: min(100%, 520px);
    height: 49px;
    padding: 0 16px;
    align-items: center;
    gap: 10px;
    border: 1px solid #bcd7e8;
    border-radius: 12px 4px 12px 4px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(9, 55, 91, 0.05);
}

.collection-search > span { color: var(--collection-blue); font-size: 1.25rem; }
.collection-search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 0.77rem; }

.collection-panel { overflow-x: auto; border-top: 4px solid var(--collection-blue); }

.collection-table-heading {
    display: flex;
    min-width: 1240px;
    padding: 21px 23px 17px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--sb-border);
}

.collection-table-heading h2 { margin: 2px 0 0; font-size: 1.25rem; }
.collection-table-heading > span { color: var(--sb-muted); font-size: 0.68rem; }
.collection-table { min-width: 1240px; }

.collection-row {
    display: grid;
    min-height: 80px;
    padding: 13px 22px;
    grid-template-columns: 210px 145px 170px minmax(270px, 1fr) 165px 95px;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #e8eff4;
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    font-size: 0.73rem;
}

.collection-row:last-child { border-bottom: 0; }

.collection-header {
    min-height: 46px;
    color: #587086;
    background: #f2f9fd;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.collection-plant { display: flex; align-items: center; gap: 11px; }
.collection-plant > span,
.plant-connection-title > span:first-child {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 11px 3px 11px 3px;
    color: var(--collection-blue);
    background: var(--collection-cyan);
    font-size: 0.62rem;
    font-weight: 900;
}

.collection-plant div,
.collection-reference,
.plant-connection-title div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.collection-plant strong,
.collection-reference strong { color: var(--sb-navy); }
.collection-plant small,
.collection-reference small { overflow: hidden; color: var(--sb-muted); font-size: 0.63rem; text-overflow: ellipsis; white-space: nowrap; }
.collection-row time { color: #53687a; font-size: 0.68rem; }

.collection-data-type,
.collection-schedule { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 5px; }
.collection-data-type strong,
.collection-schedule strong { overflow: hidden; max-width: 100%; color: var(--sb-navy); font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.collection-schedule small { color: var(--sb-muted); font-size: 0.62rem; }

.collection-status-button {
    padding: 3px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}
.collection-status-button:hover { box-shadow: 0 0 0 3px rgba(0, 113, 158, 0.12); }
.collection-status-button:focus-visible { outline: 2px solid var(--collection-blue); outline-offset: 2px; }

.collection-job-dialog { width: min(100%, 760px); }
.job-detail-lead { display: flex; margin-bottom: 18px; align-items: center; justify-content: space-between; gap: 16px; }
.job-detail-grid { display: grid; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #dce8f0; border-radius: 14px 4px 14px 4px; overflow: hidden; }
.job-detail-grid > div { min-width: 0; padding: 13px 15px; border-right: 1px solid #e5edf3; border-bottom: 1px solid #e5edf3; background: #f9fcfe; }
.job-detail-grid > div:nth-child(even) { border-right: 0; }
.job-detail-grid dt { margin-bottom: 4px; color: var(--sb-muted); font-size: 0.59rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.job-detail-grid dd { margin: 0; overflow-wrap: anywhere; color: var(--sb-navy); font-size: .76rem; font-weight: 700; }
.job-message { margin-top: 18px; padding: 16px 18px; border-left: 4px solid #1ca678; border-radius: 10px 3px 10px 3px; color: #24556d; background: #eefbf7; }
.job-message-failed { border-left-color: #d92d20; color: #7a271a; background: #fff4f2; }
.job-message strong { display: block; margin-bottom: 7px; color: inherit; font-size: .76rem; }
.job-message p { margin: 0; overflow-wrap: anywhere; font-size: .73rem; line-height: 1.55; }
.job-message small { display: block; margin-top: 8px; overflow-wrap: anywhere; color: inherit; opacity: .78; font-size: .64rem; line-height: 1.45; }

.collection-mode { display: inline-flex; padding: 6px 9px; border-radius: 8px 3px 8px 3px; font-size: 0.61rem; font-weight: 800; }
.mode-auto { color: #075a9f; background: #eaf4fb; }
.mode-manual { color: #765d00; background: #fff8d8; }
.status-successful { color: #067647; background: #ecfdf3; }
.status-failed { color: #b42318; background: #fff1f0; }

.collection-empty { display: flex; min-height: 180px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; color: var(--sb-muted); }
.collection-empty strong { color: var(--sb-navy); }

.collection-overlay {
    position: fixed;
    z-index: 220;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(4, 30, 57, 0.62);
    backdrop-filter: blur(6px);
    animation: profile-fade-in 180ms ease both;
}

.collection-dialog {
    width: min(100%, 680px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-top: 5px solid var(--collection-blue);
    border-radius: 22px 6px 22px 6px;
    background: #fff;
    box-shadow: 0 30px 85px rgba(2, 27, 52, 0.34);
    animation: profile-rise-in 220ms ease both;
}

.collection-dialog-header {
    display: flex;
    padding: 23px 26px 19px;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--sb-border);
    background: radial-gradient(circle at 90% 0%, rgba(8, 116, 189, 0.12), transparent 32%), #f8fcff;
}

.collection-dialog-header h2 { margin: 3px 0 0; color: var(--sb-navy); font-size: 1.42rem; }
.collection-dialog-body { padding: 24px 26px 26px; }
.collection-dialog-intro { margin: 0 0 18px; color: var(--sb-muted); font-size: 0.76rem; line-height: 1.5; }
.manual-batch-dialog { width: min(100%, 880px); }
.manual-batch-data-select { display: flex; margin-bottom: 16px; flex-direction: column; gap: 6px; }
.manual-batch-data-select > span { color: #123d59; font-size: .62rem; font-weight: 850; }
.manual-batch-data-select select { width: 100%; height: 45px; padding: 0 12px; border: 1px solid #bdd3da; border-radius: 9px; color: #123d59; background: #fff; font: 700 .72rem "Aptos", "Trebuchet MS", sans-serif; }
.manual-batch-data-select small { color: #6a7f8a; font-size: .59rem; }
.manual-batch-summary { display: grid; margin-bottom: 16px; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.manual-batch-summary > div { display: flex; min-height: 62px; padding: 11px 14px; flex-direction: column; justify-content: center; gap: 4px; border: 1px solid #d3e3e7; border-radius: 10px; background: #f7fbfc; }
.manual-batch-summary small { color: #607985; font-size: .56rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.manual-batch-summary strong { color: #123d59; font-size: 1.25rem; line-height: 1; }
.manual-batch-summary .batch-success-count { border-color: #b7dfcd; background: #f1fbf6; }
.manual-batch-summary .batch-success-count strong { color: #08794f; }
.manual-batch-summary .batch-failed-count { border-color: #efc0bb; background: #fff5f4; }
.manual-batch-summary .batch-failed-count strong { color: #b42318; }
.manual-batch-list { max-height: min(52vh,520px); overflow-y: auto; border: 1px solid #cfdee3; border-radius: 12px; background: #f8fbfc; }
.manual-batch-item { display: grid; min-height: 72px; padding: 11px 13px; grid-template-columns: 42px minmax(165px,1fr) 52px minmax(190px,1.25fr) 108px; align-items: center; gap: 11px; border-bottom: 1px solid #dce8eb; background: #fff; transition: background .18s ease,border-color .18s ease; }
.manual-batch-item:last-child { border-bottom: 0; }
.manual-batch-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px 3px 10px 3px; color: #0b6986; background: #eaf6f8; font-size: .57rem; font-weight: 900; }
.manual-batch-plant,
.manual-batch-type { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.manual-batch-plant strong,
.manual-batch-type strong { overflow: hidden; color: #123d59; font-size: .69rem; text-overflow: ellipsis; white-space: nowrap; }
.manual-batch-plant small,
.manual-batch-type small { overflow: hidden; color: #6a7f8a; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.manual-batch-status { display: inline-flex; min-height: 30px; padding: 0 9px; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; color: #596d76; background: #edf2f3; font-size: .58rem; font-weight: 850; }
.manual-batch-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.manual-batch-item.batch-processing { background: #f3f9ff; }
.manual-batch-item.batch-processing .manual-batch-status { color: #075a9f; background: #e4f2fc; }
.manual-batch-item.batch-processing .manual-batch-status i { animation: batch-pulse 900ms ease-in-out infinite alternate; }
.manual-batch-item.batch-successful { background: #f2fbf6; }
.manual-batch-item.batch-successful .manual-batch-icon { color: #067647; background: #dff6e9; }
.manual-batch-item.batch-successful .manual-batch-status { color: #067647; background: #dff6e9; }
.manual-batch-item.batch-failed { background: #fff5f4; }
.manual-batch-item.batch-failed .manual-batch-icon { color: #b42318; background: #fee7e5; }
.manual-batch-item.batch-failed .manual-batch-status { color: #b42318; background: #fee7e5; }
.manual-batch-actions { margin-top: 18px; }
.manual-batch-actions button { min-width: 150px; }
@keyframes batch-pulse { from { opacity: .35; transform: scale(.8); } to { opacity: 1; transform: scale(1.15); } }
@media (max-width:700px) {
    .manual-batch-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .manual-batch-item { grid-template-columns: 38px minmax(0,1fr) 52px; }
    .manual-batch-type { grid-column: 2 / -1; }
    .manual-batch-status { grid-column: 2 / -1; justify-self: start; }
}
.collection-plant-select { max-width: 340px; margin-bottom: 18px; }

.plant-connection-card { overflow: hidden; margin-bottom: 22px; border: 1px solid #bcd9ea; border-radius: 16px 5px 16px 5px; background: #fff; }
.plant-connection-title { display: flex; padding: 17px 18px; align-items: center; gap: 12px; border-bottom: 1px solid #dbeaf2; background: #f4faff; }
.plant-connection-title strong { color: var(--sb-navy); font-size: 0.85rem; }
.plant-connection-title small { color: var(--sb-muted); font-size: 0.65rem; }
.connection-ready { display: inline-flex; margin-left: auto; align-items: center; color: #067647; font-size: 0.64rem; font-weight: 800; }
.connection-ready i { width: 7px; height: 7px; }

.plant-information,
.collection-result dl { display: grid; margin: 0; padding: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 25px; }
.plant-information div,
.collection-result dl div { display: flex; flex-direction: column; gap: 4px; }
.plant-information dt,
.collection-result dt { color: #6a7d8e; font-size: 0.59rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.plant-information dd,
.collection-result dd { margin: 0; color: var(--sb-navy); font-size: 0.73rem; font-weight: 700; }

.api-endpoint { padding: 16px 18px 18px; border-top: 1px solid #dbeaf2; background: #f8fbfd; }
.api-endpoint > div { display: flex; margin-bottom: 9px; align-items: center; justify-content: space-between; gap: 10px; }
.api-endpoint span { color: var(--sb-navy); font-size: 0.66rem; font-weight: 800; }
.api-endpoint small { color: #8a6800; font-size: 0.58rem; }
.api-endpoint code { display: block; overflow-x: auto; padding: 11px 12px; border: 1px solid #cddce5; border-radius: 8px; color: #0b5f96; background: #fff; font-size: 0.66rem; white-space: nowrap; }

.collection-result { padding: 27px 23px 12px; border: 1px solid; border-radius: 16px 5px 16px 5px; text-align: center; }
.result-successful { border-color: #a9dfc7; background: linear-gradient(180deg, #effbf5, #fff); }
.result-failed { border-color: #f3bab5; background: linear-gradient(180deg, #fff2f1, #fff); }
.collection-result-icon { display: grid; width: 52px; height: 52px; margin: 0 auto 14px; place-items: center; border-radius: 16px 5px 16px 5px; color: #fff; background: #07945f; font-size: 0.76rem; font-weight: 900; }
.result-failed .collection-result-icon { background: #c43227; }
.collection-result h3 { margin: 3px 0 9px; color: var(--sb-navy); font-size: 1.65rem; }
.collection-result > p:not(.section-label) { margin: 0 auto 12px; max-width: 500px; color: var(--sb-muted); font-size: 0.75rem; line-height: 1.5; }
.collection-result dl { margin-top: 18px; border-top: 1px solid rgba(80, 120, 105, 0.18); text-align: left; }
.collection-close-action { justify-content: center; }

.summary-stat {
    position: relative;
    margin: 0;
    border: 0;
    border-right: 1px solid #cce3f0;
    font: inherit;
    text-align: left;
    background: transparent;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
}

.generation-summary .summary-stat { border-right-color: #e8d982; }

.summary-stat:hover,
.summary-stat:focus-visible {
    padding-left: 10px;
    border-radius: 10px 3px 10px 3px;
    outline: 0;
    background: rgba(255, 255, 255, 0.72);
    transform: translateY(-2px);
}

.summary-stat > span {
    position: absolute;
    right: 18px;
    bottom: 2px;
    color: var(--collection-blue, var(--od-teal));
    font-size: 0.55rem;
    font-weight: 800;
    opacity: 0;
    transition: opacity 160ms ease;
}

.summary-stat:hover > span,
.summary-stat:focus-visible > span { opacity: 1; }

.summary-list-overlay {
    position: fixed;
    z-index: 225;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(4, 30, 57, 0.62);
    backdrop-filter: blur(6px);
    animation: profile-fade-in 180ms ease both;
}

.summary-list-dialog {
    width: min(100%, 790px);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-top: 5px solid var(--od-teal, var(--collection-blue));
    border-radius: 22px 6px 22px 6px;
    background: #fff;
    box-shadow: 0 30px 85px rgba(2, 27, 52, 0.34);
    animation: profile-rise-in 220ms ease both;
}

.collection-summary-dialog { border-top-color: var(--collection-blue); }

.summary-list-header {
    display: flex;
    padding: 23px 26px 19px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--sb-border);
    background: linear-gradient(135deg, #fff, #f3faff);
}

.on-demand-page .summary-list-header { background: linear-gradient(135deg, #fff, var(--od-soft)); }
.summary-list-header h2 { margin: 3px 0 0; color: var(--sb-navy); font-size: 1.4rem; }

.summary-list-body {
    max-height: min(58vh, 520px);
    overflow-y: auto;
    padding: 0 26px;
}

.summary-list-count {
    margin: 0 -26px;
    padding: 11px 26px;
    color: var(--sb-muted);
    border-bottom: 1px solid #e8eff4;
    background: #f8fafc;
    font-size: 0.64rem;
    font-weight: 700;
}

.summary-list-item {
    display: grid;
    min-height: 96px;
    padding: 17px 0;
    grid-template-columns: 46px minmax(0, 1fr) 90px;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e8eff4;
}

.summary-list-item:last-child { border-bottom: 0; }
.summary-item-copy { min-width: 0; }
.summary-item-copy strong { display: block; margin-bottom: 5px; color: var(--sb-navy); font-size: 0.8rem; }
.summary-item-copy p { margin: 0 0 6px; color: var(--sb-muted); font-size: 0.7rem; line-height: 1.45; }
.summary-item-copy small { color: #688095; font-size: 0.61rem; }

.summary-plant-code {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px 3px 12px 3px;
    color: var(--collection-blue);
    background: var(--collection-cyan);
    font-size: 0.62rem;
    font-weight: 900;
}

.summary-list-footer {
    display: flex;
    padding: 16px 26px;
    justify-content: flex-end;
    border-top: 1px solid var(--sb-border);
    background: #fbfcfd;
}

@media (max-width: 640px) {
    .collection-summary { grid-template-columns: repeat(3, 1fr); padding: 15px; }
    .collection-summary > div,
    .collection-summary > .summary-stat { padding-right: 7px; }
    .collection-summary p { grid-column: 1 / -1; text-align: left; }
    .collection-toolbar { align-items: flex-start; flex-direction: column; }
    .collection-overlay { padding: 12px; }
    .collection-dialog { max-height: calc(100vh - 24px); }
    .collection-dialog-header,
    .collection-dialog-body { padding-right: 18px; padding-left: 18px; }
    .plant-information,
    .collection-result dl,
    .job-detail-grid { grid-template-columns: 1fr; }
    .job-detail-grid > div { border-right: 0; }
    .api-endpoint > div { align-items: flex-start; flex-direction: column; }
    .summary-list-overlay { padding: 12px; }
    .summary-list-dialog { max-height: calc(100vh - 24px); }
    .summary-list-header,
    .summary-list-body,
    .summary-list-footer { padding-right: 18px; padding-left: 18px; }
    .summary-list-count { margin-right: -18px; margin-left: -18px; padding-right: 18px; padding-left: 18px; }
    .summary-list-item { grid-template-columns: 42px minmax(0, 1fr); }
    .summary-list-item > .status-pill { grid-column: 2; }
}
