:root {
    color-scheme: light;
    font-family:
        Inter, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #17212b;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f4f6f8;
}

a {
    color: inherit;
}

.site-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 28px;
    border-bottom: 1px solid #d9e0e6;
    background: #ffffff;
}

.brand {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-nav a,
.nav-button {
    border: 0;
    background: transparent;
    color: #334455;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.inline-form {
    display: inline;
    margin: 0;
}

.page-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.status-card,
.auth-card,
.dashboard-header {
    width: min(620px, 100%);
    margin: 0 auto;
    padding: 48px;
    border: 1px solid #d9e0e6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(30, 45, 60, 0.08);
}

.dashboard-header {
    width: 100%;
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

h1 {
    margin: 0 0 20px;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.15;
}

h2 {
    margin-top: 0;
}

p {
    line-height: 1.7;
}

.status {
    margin: 28px 0;
    font-weight: 700;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.field label {
    font-weight: 700;
}

.field input {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid #aebbc6;
    border-radius: 9px;
    background: #ffffff;
    color: #17212b;
    font: inherit;
}

.field input:focus {
    outline: 3px solid rgba(23, 80, 128, 0.2);
    border-color: #175080;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid #175080;
    border-radius: 9px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    background: #175080;
    color: #ffffff;
}

.secondary-button {
    background: #ffffff;
    color: #175080;
}

.full-width {
    width: 100%;
}

.form-note,
.metadata,
.scope-label {
    color: #596775;
    font-size: 14px;
}

.alert {
    width: min(620px, 100%);
    margin: 0 auto 20px;
    padding: 12px 14px;
    border-radius: 8px;
}

.alert-error,
.field-error {
    color: #8a1c1c;
    background: #fff0f0;
}

.alert-success {
    color: #165a34;
    background: #edf9f2;
}

.field-error {
    padding: 10px;
    border-radius: 8px;
}

.card-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.access-card {
    padding: 28px;
    border: 1px solid #d9e0e6;
    border-radius: 14px;
    background: #ffffff;
    text-decoration: none;
    transition:
        transform 120ms ease,
        box-shadow 120ms ease;
}

.access-card:hover,
.access-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(30, 45, 60, 0.1);
}

@media (max-width: 640px) {
    .site-header {
        padding: 0 18px;
    }

    .page-shell {
        padding: 32px 0;
    }

    .status-card,
    .auth-card,
    .dashboard-header {
        padding: 28px;
    }
}

.form-card,
.table-card {
    width: 100%;
    padding: 36px;
    border: 1px solid #d9e0e6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(30, 45, 60, 0.08);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid #e4e9ed;
    text-align: left;
    vertical-align: top;
}

th {
    font-size: 13px;
    letter-spacing: 0.04em;
}

fieldset {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid #d9e0e6;
    border-radius: 10px;
}

legend {
    padding: 0 8px;
    font-weight: 700;
}

.checkbox-list {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.checkbox-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 20px 0;
}

.sensitive-confirmation {
    margin-top: 30px;
    padding: 18px;
    border: 1px solid #e6c46d;
    border-radius: 10px;
    background: #fffaf0;
}

.status-enabled {
    color: #17623a;
    font-weight: 700;
}

.status-disabled {
    color: #8a1c1c;
    font-weight: 700;
}

.tag {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fff2cc;
    font-size: 12px;
}

.action-cell {
    min-width: 190px;
}

.small-button {
    min-height: 36px;
    padding: 6px 11px;
    font-size: 13px;
}

.compact-form {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.compact-form input {
    width: 100%;
    padding: 8px;
}

details {
    margin-top: 10px;
}

summary {
    cursor: pointer;
    font-weight: 700;
}

.secret-display {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    padding: 18px;
    border: 1px solid #aebbc6;
    border-radius: 10px;
    background: #f4f6f8;
    font-size: 16px;
    user-select: all;
}

/* BEGIN COMPANY ACCOUNT V1 STYLES */
.wide-form-card {
    max-width: 1100px;
}

.form-section {
    margin: 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(127, 127, 127, 0.25);
}

.form-section:first-of-type {
    border-top: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(230px, 1fr)
    );
    gap: 1rem;
}

code {
    overflow-wrap: anywhere;
}
/* END COMPANY ACCOUNT V1 STYLES */

/* BEGIN PLATFORM ADMIN V2 STYLES */
.filter-card,
.summary-card,
.action-panel,
.danger-card {
    margin: 1rem 0;
    padding: 1.25rem;
    border: 1px solid rgba(127, 127, 127, 0.25);
    border-radius: 12px;
    background: var(--surface, #ffffff);
}

.filter-grid,
.summary-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(230px, 1fr)
    );
    gap: 1rem;
}

.filter-actions {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.detail-list {
    display: grid;
    grid-template-columns: minmax(110px, 0.45fr) 1fr;
    gap: 0.65rem 1rem;
    margin: 0;
}

.detail-list dt {
    font-weight: 700;
}

.detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.compact-header {
    margin-top: 2rem;
}

.danger-card {
    border-color: rgba(180, 35, 35, 0.5);
}

.danger-button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    background: #a51d1d;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
}

.danger-summary {
    color: #a51d1d;
    font-weight: 700;
}

small {
    line-height: 1.5;
}
/* END PLATFORM ADMIN V2 STYLES */

/* BEGIN SECURITY AUDIT V1 STYLES */
.audit-summary-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(150px, 1fr)
    );
    gap: 1rem;
    margin: 1.25rem 0;
}

.summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 96px;
    padding: 1rem;
    border: 1px solid rgba(127, 127, 127, 0.25);
    border-radius: 12px;
    background: var(--surface, #fff);
}

.summary-card strong {
    font-size: 1.75rem;
}

.audit-summary-warning {
    border-inline-start: 4px solid #b7791f;
}

.audit-summary-danger {
    border-inline-start: 4px solid #c53030;
}

.audit-filter-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(190px, 1fr)
    );
    gap: 1rem;
    align-items: end;
}

.audit-filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.audit-table-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.risk-badge,
.audit-outcome {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.risk-low {
    background: rgba(56, 161, 105, 0.14);
    color: #276749;
}

.risk-medium {
    background: rgba(214, 158, 46, 0.16);
    color: #975a16;
}

.risk-high {
    background: rgba(229, 62, 62, 0.14);
    color: #9b2c2c;
}

.audit-outcome-success {
    background: rgba(56, 161, 105, 0.14);
    color: #276749;
}

.audit-outcome-denied,
.audit-outcome-failed,
.audit-outcome-error {
    background: rgba(229, 62, 62, 0.14);
    color: #9b2c2c;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.nowrap {
    white-space: nowrap;
}

.break-all {
    overflow-wrap: anywhere;
    word-break: break-all;
}

.audit-json {
    overflow: auto;
    max-height: 620px;
    padding: 1rem;
    border-radius: 10px;
    background: #111827;
    color: #f3f4f6;
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(260px, 1fr)
    );
    gap: 1rem;
    margin: 1rem 0;
}

.detail-card {
    padding: 1rem;
    border: 1px solid rgba(127, 127, 127, 0.25);
    border-radius: 12px;
    background: var(--surface, #fff);
}

.detail-card dl {
    margin: 0;
}

.detail-card dt {
    margin-top: 0.75rem;
    font-weight: 700;
}

.detail-card dd {
    margin: 0.2rem 0 0;
}
/* END SECURITY AUDIT V1 STYLES */

/* SCM_ACCESS_MANAGEMENT_STYLE */
.scm-access-actions {
    min-width: 360px;
}

.scm-inline-access-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.scm-inline-access-form input[type="password"] {
    width: 180px;
    min-width: 150px;
}

.danger-button {
    display: inline-block;
    border: 1px solid #b42318;
    border-radius: 6px;
    background: #b42318;
    color: #ffffff;
    padding: 9px 14px;
    cursor: pointer;
    text-decoration: none;
}

.danger-button:hover {
    background: #912018;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
/* SCM_ACCESS_MANAGEMENT_STYLE_END */

/* ORGANIZATION_MODULE_AUTHORIZATION_STYLE */
.authorization-module-grid {
    display: grid;
    gap: 20px;
    margin: 24px 0;
}

.authorization-module-card {
    padding: 24px;
    border: 1px solid #d9dee7;
    border-radius: 12px;
    background: #ffffff;
}

.authorization-module-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.authorization-module-heading h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.authorization-current-summary {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(180px, 1fr)
        );
    gap: 12px;
    margin-bottom: 22px;
}

.authorization-current-summary > div {
    padding: 14px;
    border-radius: 8px;
    background: #f6f8fb;
}

.authorization-current-summary span {
    display: block;
    margin-bottom: 5px;
    color: #667085;
    font-size: 0.86rem;
}

.authorization-current-summary strong {
    display: block;
}

.authorization-module-form {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.authorization-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.authorization-status-active {
    background: #dcfae6;
    color: #067647;
}

.authorization-status-scheduled,
.status-warning {
    background: #fef0c7;
    color: #93370d;
}

.authorization-status-expired,
.authorization-status-disabled,
.authorization-status-not_configured {
    background: #fee4e2;
    color: #b42318;
}

.organization-authorization-summary {
    margin-top: 24px;
}

.organization-authorization-summary .card-header,
.table-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
}

@media (max-width: 760px) {
    .authorization-module-heading {
        display: block;
    }

    .authorization-status {
        margin-top: 12px;
    }
}
/* ORGANIZATION_MODULE_AUTHORIZATION_STYLE_END */

/* COMPANY_USER_MANAGEMENT_STYLE */
.action-cell {
    min-width: 210px;
}

.action-cell > .small-button {
    margin-right: 6px;
    margin-bottom: 6px;
}

.authorization-module-grid {
    display: grid;
    gap: 20px;
    margin: 24px 0;
}

.authorization-module-card {
    padding: 24px;
    border: 1px solid #d9dee7;
    border-radius: 12px;
    background: #ffffff;
}

.authorization-module-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.authorization-module-heading h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.authorization-current-summary {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(180px, 1fr)
        );
    gap: 12px;
    margin: 18px 0 22px;
}

.authorization-current-summary > div {
    padding: 14px;
    border-radius: 8px;
    background: #f6f8fb;
}

.authorization-current-summary span {
    display: block;
    margin-bottom: 5px;
    color: #667085;
    font-size: 0.86rem;
}

.authorization-current-summary strong {
    display: block;
    overflow-wrap: anywhere;
}

.authorization-module-form {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.authorization-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.authorization-status-active {
    background: #dcfae6;
    color: #067647;
}

.authorization-status-scheduled {
    background: #fef0c7;
    color: #93370d;
}

.authorization-status-expired,
.authorization-status-company_expired,
.authorization-status-company_disabled,
.authorization-status-company_not_configured,
.authorization-status-not_configured,
.authorization-status-disabled {
    background: #fee4e2;
    color: #b42318;
}

.table-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
}

@media (max-width: 760px) {
    .authorization-module-heading {
        display: block;
    }

    .authorization-status {
        margin-top: 12px;
    }
}
/* COMPANY_USER_MANAGEMENT_STYLE_END */

/* FORCE_COMPANY_USER_ACTION_BUTTONS */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.company-user-action-column {
    min-width: 160px;
}

.company-user-action-cell {
    min-width: 160px;
    white-space: nowrap;
}

.company-user-action-cell .small-button {
    display: inline-block;
    margin-right: 6px;
    margin-bottom: 4px;
}
/* FORCE_COMPANY_USER_ACTION_BUTTONS_END */

/* AUTHORIZED_MODULE_NAVIGATION_STYLE */
.module-navigation-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 14px;
    margin-left: 8px;
    border: 1px solid #155eef;
    border-radius: 8px;
    background: #155eef;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.module-navigation-button:hover,
.module-navigation-button:focus {
    background: #004eeb;
    border-color: #004eeb;
    color: #ffffff;
    text-decoration: none;
}

@media (max-width: 760px) {
    .module-navigation-button {
        margin: 6px 0;
        width: 100%;
    }
}
/* AUTHORIZED_MODULE_NAVIGATION_STYLE_END */

/* ORGANIZATION_STATUS_MANAGEMENT_STYLE */
.organization-status-layout {
    display: grid;
    grid-template-columns:
        minmax(320px, 0.8fr)
        minmax(520px, 1.5fr);
    gap: 24px;
    align-items: start;
}

.organization-status-current {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 20px;
}

.organization-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
}

.organization-status-provisioning {
    background: #fef0c7;
    color: #93370d;
}

.organization-status-active {
    background: #dcfae6;
    color: #067647;
}

.alert-success {
    padding: 12px 14px;
    border: 1px solid #abefc6;
    border-radius: 8px;
    background: #ecfdf3;
    color: #067647;
}

@media (max-width: 960px) {
    .organization-status-layout {
        grid-template-columns: 1fr;
    }
}
/* ORGANIZATION_STATUS_MANAGEMENT_STYLE_END */

/* ADVANCED_SCHEDULING_STYLE */
.scheduling-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.scheduling-step-grid {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.scheduling-step-grid .form-card {
    box-shadow: none;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 0 12px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #155eef;
    font-weight: 800;
}

.compact-data-table {
    margin-top: 24px;
}

.compact-data-table form,
.scheduling-detail-header form {
    margin: 0;
}

.scheduling-list-card,
.scheduling-run-card {
    margin-top: 24px;
}

.scheduling-status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 0.84rem;
    font-weight: 700;
}

.scheduling-status-awaiting_engine {
    background: #fef0c7;
    color: #93370d;
}

.scheduling-status-running {
    background: #eaf2ff;
    color: #175cd3;
}

.scheduling-status-completed {
    background: #dcfae6;
    color: #067647;
}

.scheduling-engine-status {
    margin: 24px 0;
}

.field select {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid #aebbc6;
    border-radius: 9px;
    background: #ffffff;
    color: #17212b;
    font: inherit;
}

@media (max-width: 760px) {
    .scheduling-detail-header {
        display: block;
    }

    .scheduling-detail-header .header-actions {
        margin-top: 20px;
    }
}
/* ADVANCED_SCHEDULING_STYLE_END */


/* APPLICATION_SHELL_NORMALIZATION */
.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    transform: translateY(-150%);
    padding: 10px 14px;
    border-radius: 8px;
    background: #17212b;
    color: #ffffff;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 64px;
    padding: 0 24px;
}

.header-brand,
.header-context {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-divider {
    width: 1px;
    height: 24px;
    background: #d9e0e6;
}

.current-application {
    color: #596775;
    font-size: 14px;
    font-weight: 700;
}

.header-context {
    margin-left: auto;
}

.organization-context {
    display: grid;
    gap: 2px;
    padding-right: 16px;
    border-right: 1px solid #d9e0e6;
}

.organization-context span,
.unit-switcher label {
    color: #667585;
    font-size: 11px;
}

.organization-context strong {
    max-width: 220px;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.compact-nav-button {
    min-height: 34px;
    padding: 5px 9px;
    border: 1px solid #c8d2dc;
    border-radius: 8px;
    background: #ffffff;
    color: #334455;
    font-size: 12px;
    font-weight: 700;
}

.unit-switcher select {
    max-width: 190px;
    min-height: 36px;
    padding: 6px 30px 6px 10px;
    border: 1px solid #c8d2dc;
    border-radius: 8px;
    background: #ffffff;
    color: #263746;
    font: inherit;
    font-size: 13px;
}

.user-menu {
    position: relative;
}

.user-menu summary {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid #c8d2dc;
    border-radius: 9px;
    color: #263746;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    list-style: none;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid #d9e0e6;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(30, 45, 60, 0.14);
}

.user-menu-panel a,
.user-menu-action,
.user-menu-identity {
    display: block;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #334455;
    font: inherit;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
}

.user-menu-panel a:hover,
.user-menu-action:hover {
    background: #f0f4f8;
}

.user-menu-identity {
    overflow: hidden;
    border-bottom: 1px solid #e4e9ed;
    color: #6b7885;
    text-overflow: ellipsis;
}

.application-layout {
    min-height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
}

.platform-sidebar {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    border-right: 1px solid #d9e0e6;
    background: #17283a;
    color: #ffffff;
}

.sidebar-menu {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
}

.sidebar-group {
    display: grid;
    gap: 3px;
    margin-bottom: 20px;
}

.sidebar-group-title {
    margin: 0 0 5px;
    padding: 4px 12px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.sidebar-link {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.sidebar-link.active {
    background: rgba(72, 162, 230, 0.24);
    box-shadow: inset 3px 0 #65bfff;
    color: #ffffff;
    font-weight: 700;
}

.sidebar-secondary {
    margin-top: auto;
}

.page-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.page-shell {
    width: min(1440px, calc(100% - 48px));
    flex: 1;
    margin: 0 auto;
    padding: 36px 0 48px;
}

.public-page-shell {
    width: min(1040px, calc(100% - 32px));
    padding-top: 64px;
}

.page-article {
    min-width: 0;
}

.site-footer {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    border-top: 1px solid #d9e0e6;
    color: #71808f;
    font-size: 12px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-heading h1 {
    margin-bottom: 8px;
}

.page-introduction {
    margin: 0;
    color: #596775;
}

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

.overview-grid .summary-card {
    margin: 0;
}

.overview-grid .summary-card strong {
    overflow-wrap: anywhere;
    font-size: 18px;
}

.dashboard-module-section,
.dashboard-management-section {
    margin-top: 32px;
}

.section-heading {
    margin-bottom: 16px;
}

.section-heading h2 {
    margin-bottom: 6px;
}

.module-card {
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
}

.module-card-label {
    color: #667585;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.card-link-text {
    margin-top: auto;
    color: #175080;
    font-weight: 700;
}

.compact-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
}

.empty-state-card {
    padding: 32px;
    border: 1px dashed #aebbc6;
    border-radius: 14px;
    background: #ffffff;
    text-align: center;
}

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

    .organization-context {
        display: none;
    }
}

@media (max-width: 820px) {
    .site-header {
        position: static;
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .header-context {
        width: 100%;
        justify-content: space-between;
    }

    .application-layout {
        display: block;
    }

    .platform-sidebar {
        position: static;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .sidebar-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 18px;
    }

    .sidebar-secondary {
        margin-top: 0;
    }

    .page-shell {
        width: min(100% - 28px, 1440px);
        padding: 28px 0 36px;
    }
}

@media (max-width: 560px) {
    .header-context {
        align-items: stretch;
        flex-direction: column;
    }

    .unit-switcher {
        justify-content: space-between;
    }

    .unit-switcher select {
        flex: 1;
        max-width: none;
    }

    .user-menu summary {
        justify-content: space-between;
    }

    .user-menu-panel {
        left: 0;
        right: auto;
        width: 100%;
    }

    .sidebar-menu,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* APPLICATION_SHELL_NORMALIZATION_END */


/* TENANT_DATABASE_INSPECTOR */
.database-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.database-summary-grid .summary-card {
    margin: 0;
}

.database-connection-card,
.database-table-card,
.database-query-card,
.database-result-card {
    margin-top: 24px;
}

.database-query-card textarea {
    width: 100%;
    min-height: 180px;
    padding: 14px;
    border: 1px solid #aebbc6;
    border-radius: 9px;
    background: #111827;
    color: #f3f4f6;
    font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    resize: vertical;
}

.database-query-card textarea:focus {
    outline: 3px solid rgba(23, 80, 128, 0.2);
    border-color: #175080;
}

.database-column-list {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e4e9ed;
}

.database-value {
    max-width: 360px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

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

@media (max-width: 560px) {
    .database-summary-grid {
        grid-template-columns: 1fr;
    }
}
/* TENANT_DATABASE_INSPECTOR_END */

/* ============================================================
   APS visual scheduling workspace
   ============================================================ */
.aps-page-header,
.aps-board-toolbar,
.aps-gantt-card,
.aps-version-diff,
.aps-onboarding-strip,
.aps-guidance-card {
    border: 1px solid #dce5ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(16, 35, 55, 0.07);
}

.aps-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 18px;
    padding: 28px 30px;
    background:
        radial-gradient(circle at 92% 10%, rgba(41, 110, 255, 0.16), transparent 34%),
        linear-gradient(135deg, #fbfdff 0%, #eef5ff 100%);
}

.aps-page-header h1,
.aps-gantt-card h2,
.aps-version-diff h2 {
    margin: 4px 0 8px;
    color: #13233b;
}

.aps-page-header p {
    max-width: 780px;
    margin: 0;
    color: #607087;
}

.aps-header-actions,
.aps-board-links,
.aps-form-footer,
.aps-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.aps-rush-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #f2a221;
    border-radius: 10px;
    background: #fff7e8;
    color: #9a5600;
    font-weight: 750;
    cursor: pointer;
}

.aps-rush-button:hover {
    background: #ffedca;
}

.aps-onboarding-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 18px;
    overflow: hidden;
}

.aps-onboarding-strip > div {
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    gap: 1px 12px;
    padding: 18px 22px;
    border-right: 1px solid #e5ebf2;
}

.aps-onboarding-strip > div:last-child {
    border-right: 0;
}

.aps-onboarding-strip span {
    grid-row: 1 / 3;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: #e8f0ff;
    color: #235fd7;
    font-weight: 800;
}

.aps-onboarding-strip strong {
    color: #20324a;
}

.aps-onboarding-strip small {
    color: #77869a;
}

.aps-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
}

.aps-config-layout {
    align-items: start;
    margin-bottom: 18px;
}

.aps-settings-card {
    padding: 0;
    overflow: hidden;
}

.aps-section-heading,
.aps-gantt-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px 0;
}

.aps-settings-card > .metadata {
    padding: 0 26px;
}

.aps-inheritance-badge,
.aps-count-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: #e7f7ef;
    color: #14734b;
    font-size: 0.78rem;
    font-weight: 800;
}

.aps-field-section {
    margin-top: 22px;
    padding: 22px 26px;
    border-top: 1px solid #e8edf3;
}

.aps-field-section h3 {
    margin: 0 0 16px;
    color: #253650;
    font-size: 1rem;
}

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

.aps-calculated-field output {
    display: flex;
    align-items: center;
    min-height: 43px;
    padding: 0 12px;
    border: 1px dashed #91a9c4;
    border-radius: 8px;
    background: #f5f9fd;
    color: #194778;
    font-weight: 800;
}

.aps-weekday-picker {
    display: grid;
    grid-template-columns: repeat(7, minmax(54px, 1fr));
    gap: 8px;
}

.aps-weekday-picker label {
    cursor: pointer;
}

.aps-weekday-picker input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.aps-weekday-picker span {
    display: grid;
    min-height: 42px;
    place-items: center;
    border: 1px solid #d9e2ec;
    border-radius: 9px;
    background: #f8fafc;
    color: #63748b;
    font-size: 0.86rem;
    font-weight: 700;
}

.aps-weekday-picker input:checked + span {
    border-color: #3676e8;
    background: #eaf2ff;
    color: #1d5bc4;
}

.aps-switch-stack {
    display: grid;
    gap: 10px;
}

.aps-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid #e0e7ef;
    border-radius: 10px;
    background: #fafcff;
}

.aps-switch-row span {
    display: grid;
    gap: 2px;
}

.aps-switch-row small {
    color: #76859a;
    font-weight: 400;
}

.aps-switch-row input {
    width: 20px;
    height: 20px;
    accent-color: #2869df;
}

.aps-form-footer {
    padding: 20px 26px;
    border-top: 1px solid #e8edf3;
    background: #f7faff;
}

.aps-form-footer p {
    flex: 1;
    margin: 0;
    color: #62738a;
    font-size: 0.88rem;
}

.aps-guidance-card {
    position: sticky;
    top: 18px;
    padding: 24px;
}

.aps-guidance-card h2 {
    margin-top: 4px;
}

.aps-checklist {
    display: grid;
    gap: 17px;
    margin: 22px 0;
    padding: 0;
    list-style: none;
}

.aps-checklist li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
}

.aps-checklist li > span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: #e9f7ef;
    color: #168255;
    font-size: 0.75rem;
    font-weight: 900;
}

.aps-checklist p,
.aps-engine-note p {
    margin: 3px 0 0;
    color: #738298;
    font-size: 0.83rem;
}

.aps-engine-note,
.aps-erp-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 12px;
    background: #f3f6fa;
}

.aps-dot,
.aps-status-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f0aa27;
    box-shadow: 0 0 0 5px rgba(240, 170, 39, 0.14);
}

.aps-dot.is-ready,
.aps-status-dot.is-ok {
    background: #19a36f;
    box-shadow: 0 0 0 5px rgba(25, 163, 111, 0.14);
}

.aps-exception-card {
    overflow: hidden;
}

.aps-inline-form {
    display: grid;
    grid-template-columns: 0.8fr 1fr 1.2fr 0.7fr 1fr 1fr;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e7edf3;
    border-bottom: 1px solid #e7edf3;
    background: #f7faff;
}

.aps-inline-form .aps-field-wide {
    grid-column: span 5;
}

.aps-inline-form > button {
    align-self: end;
}

.aps-empty-cell {
    padding: 30px !important;
    text-align: center;
    color: #7c8a9c;
}

.is-muted {
    opacity: 0.55;
}

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

.aps-kpi-grid article {
    display: grid;
    gap: 3px;
    padding: 18px 20px;
    border: 1px solid #dde6ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(16, 35, 55, 0.05);
}

.aps-kpi-grid span,
.aps-detail-grid span {
    color: #718097;
    font-size: 0.8rem;
    font-weight: 700;
}

.aps-kpi-grid strong {
    color: #172a45;
    font-size: 1.8rem;
    line-height: 1.05;
}

.aps-kpi-grid small {
    color: #8995a5;
}

.aps-kpi-grid article.is-accent {
    border-color: #8eb0f2;
    background: linear-gradient(135deg, #eff5ff, #fff);
}

.aps-resource-table {
    margin-bottom: 18px;
}

.aps-legend,
.aps-gantt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #68778c;
    font-size: 0.78rem;
}

.aps-legend span,
.aps-gantt-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.aps-legend i,
.aps-gantt-legend i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: #8291a6;
}

.aps-legend .is-running,
.legend-production {
    background: #2f6fd5 !important;
}

.aps-legend .is-risk,
.legend-late {
    background: #d94f4f !important;
}

.aps-legend .is-idle {
    background: #8da0b5 !important;
}

.legend-booking {
    background: repeating-linear-gradient(135deg, #d68a18 0 3px, #ffe4b8 3px 6px) !important;
}

.legend-locked {
    background: #46566b !important;
}

.aps-resource-status {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 9px;
    border-radius: 999px;
    background: #edf2f7;
    color: #506176;
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
}

.aps-resource-status.status-running,
.aps-resource-status.fixture-in_use {
    background: #e8f1ff;
    color: #1e5fbf;
}

.aps-resource-status.status-setup,
.aps-resource-status.fixture-reserved {
    background: #fff3d8;
    color: #9a6300;
}

.aps-resource-status.status-maintenance,
.aps-resource-status.fixture-internal_maintenance,
.aps-resource-status.fixture-external_maintenance {
    background: #fdebed;
    color: #b33442;
}

.aps-progress {
    width: 100px;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4eaf1;
}

.aps-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2c71db, #2fb49c);
}

.aps-variance {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 800;
}

.aps-variance.is-late {
    background: #fdecee;
    color: #b63242;
}

.aps-variance.is-early {
    background: #e9f7f0;
    color: #187553;
}

.aps-dialog {
    width: min(650px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(14, 29, 48, 0.3);
}

.aps-dialog-wide {
    width: min(880px, calc(100vw - 32px));
}

.aps-dialog::backdrop {
    background: rgba(13, 28, 48, 0.58);
    backdrop-filter: blur(3px);
}

.aps-dialog > form,
.aps-operation-dialog > div,
.aps-operation-dialog > .aps-detail-grid {
    padding-right: 24px;
    padding-left: 24px;
}

.aps-dialog > form {
    padding-bottom: 24px;
}

.aps-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e6ecf2;
}

.aps-dialog-header h2 {
    margin: 2px 0 0;
}

.aps-dialog-header > button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #eff3f7;
    color: #40536b;
    font-size: 1.4rem;
    cursor: pointer;
}

.aps-dialog .form-grid {
    margin: 22px 0;
}

.aps-dialog-actions {
    padding-top: 18px;
    border-top: 1px solid #e7edf3;
}

.aps-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.aps-detail-grid > div {
    display: grid;
    gap: 5px;
    min-height: 70px;
    padding: 12px;
    border: 1px solid #e2e8ef;
    border-radius: 10px;
    background: #f9fbfd;
}

.aps-operation-dialog > .aps-dialog-actions {
    margin: 0 24px 24px;
}

.aps-board-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding: 12px 16px;
}

.aps-month-nav {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.aps-month-nav a {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    background: #edf3fa;
    color: #2c5c98;
    font-size: 1.25rem;
    text-decoration: none;
}

.aps-version-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aps-version-selector label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #65768b;
    font-size: 0.8rem;
    font-weight: 700;
}

.aps-version-selector select {
    min-height: 34px;
    border: 1px solid #d4deea;
    border-radius: 8px;
    background: #fff;
}

.aps-board-links a {
    color: #2d66b3;
    font-size: 0.83rem;
    font-weight: 700;
    text-decoration: none;
}

.aps-version-diff {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px 28px;
    margin-bottom: 14px;
    padding: 20px 24px;
    border-left: 4px solid #4a78d2;
}

.aps-diff-metrics {
    display: flex;
    gap: 18px;
}

.aps-diff-metrics span {
    display: grid;
    min-width: 72px;
    color: #738197;
    font-size: 0.76rem;
}

.aps-diff-metrics strong {
    color: #253b5d;
    font-size: 1.25rem;
}

.aps-version-diff details {
    grid-column: 1 / -1;
}

.aps-gantt-card {
    margin-bottom: 18px;
    overflow: hidden;
}

.aps-gantt-card-header {
    align-items: center;
    padding: 22px 24px;
    border-bottom: 1px solid #e2e9f0;
}

.aps-gantt-card-header h2 {
    margin: 3px 0;
}

.aps-gantt-shell {
    --machine-column: 178px;
    display: grid;
    grid-template-columns:
        var(--machine-column)
        minmax(calc(var(--days) * 42px), 1fr);
    min-width: calc(var(--machine-column) + var(--days) * 42px);
    overflow: auto;
    background: #fff;
}

.aps-gantt-corner,
.aps-gantt-machine {
    position: sticky;
    left: 0;
    z-index: 5;
    display: grid;
    align-content: center;
    padding: 10px 14px;
    border-right: 1px solid #dce4ed;
    border-bottom: 1px solid #e6ecf2;
    background: #f7f9fc;
}

.aps-gantt-corner {
    z-index: 8;
    min-height: 58px;
    background: #edf3f9;
}

.aps-gantt-corner small,
.aps-gantt-machine small {
    margin-top: 3px;
    color: #8190a3;
    font-size: 0.68rem;
}

.aps-gantt-machine {
    min-height: 82px;
}

.aps-gantt-machine .aps-resource-status {
    width: fit-content;
    min-height: 20px;
    margin-top: 5px;
    padding: 0 6px;
    font-size: 0.62rem;
}

.aps-gantt-days {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(var(--days), 1fr);
    min-height: 58px;
    border-bottom: 1px solid #dce4ed;
    background: #f7f9fc;
}

.aps-gantt-days > div {
    display: grid;
    place-content: center;
    border-right: 1px solid #e1e7ee;
    text-align: center;
}

.aps-gantt-days > div.is-weekend {
    background: #f1f3f6;
    color: #9a6470;
}

.aps-gantt-days span {
    font-size: 0.78rem;
    font-weight: 800;
}

.aps-gantt-days small {
    color: #8290a2;
    font-size: 0.62rem;
}

.aps-gantt-lane {
    position: relative;
    min-height: 82px;
    overflow: hidden;
    border-bottom: 1px solid #e6ecf2;
    background: #fff;
    transition: background 120ms ease, box-shadow 120ms ease;
}

.aps-gantt-lane.is-drop-target {
    background: #edf5ff;
    box-shadow: inset 0 0 0 2px #6f9ae8;
}

.aps-day-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(var(--days), 1fr);
    pointer-events: none;
}

.aps-day-grid i {
    border-right: 1px solid #edf1f5;
}

.aps-day-grid i.is-weekend {
    background: rgba(92, 105, 123, 0.055);
}

.aps-operation-bar,
.aps-booking-bar {
    position: absolute;
    z-index: 2;
    top: 12px;
    min-width: 18px;
    height: 55px;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    text-align: left;
    white-space: nowrap;
}

.aps-operation-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    gap: 0 6px;
    padding: 6px 9px 8px;
    border-left: 4px solid color-mix(in srgb, var(--bar-color) 68%, #000);
    background: color-mix(in srgb, var(--bar-color) 88%, #fff);
    color: #fff;
    box-shadow: 0 5px 12px rgba(20, 43, 72, 0.16);
    cursor: grab;
}

.aps-operation-bar:hover {
    z-index: 6;
    filter: brightness(1.04);
    box-shadow: 0 8px 20px rgba(20, 43, 72, 0.24);
}

.aps-operation-bar:active {
    cursor: grabbing;
}

.aps-operation-bar.is-dragging {
    opacity: 0.5;
}

.aps-operation-bar.is-locked {
    cursor: not-allowed;
    filter: saturate(0.55);
}

.aps-operation-bar.is-locked::after {
    content: "🔒";
    position: absolute;
    right: 4px;
    top: 3px;
    font-size: 0.65rem;
}

.aps-operation-bar.status-late {
    outline: 2px solid #cc3549;
}

.aps-operation-bar span,
.aps-operation-bar small {
    font-size: 0.61rem;
    opacity: 0.92;
}

.aps-operation-bar strong {
    overflow: hidden;
    font-size: 0.7rem;
    text-overflow: ellipsis;
}

.aps-operation-bar small {
    text-align: right;
}

.aps-operation-bar b {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.85);
}

.aps-booking-bar {
    top: 5px;
    z-index: 3;
    height: 22px;
    padding: 2px 7px;
    border: 1px solid #e4a23a;
    background: repeating-linear-gradient(
        135deg,
        #fff0cf 0 5px,
        #f8d48f 5px 10px
    );
    color: #8b5704;
    font-size: 0.62rem;
    font-weight: 800;
    cursor: default;
}

.aps-board-empty-state,
.aps-gantt-empty {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #f8fafd;
}

.aps-board-empty-state > span {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: #e6efff;
    color: #2864c7;
    font-weight: 900;
}

.aps-board-empty-state > div {
    flex: 1;
}

.aps-board-empty-state h3,
.aps-board-empty-state p {
    margin: 0;
}

.aps-board-empty-state p {
    margin-top: 4px;
    color: #758499;
}

.aps-board-bottom-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 18px;
}

.aps-change-list {
    display: grid;
    max-height: 340px;
    overflow: auto;
}

.aps-change-list > div {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    border-top: 1px solid #e8edf3;
}

.aps-change-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    background: #edf3ff;
    color: #2f68c5;
    font-weight: 900;
}

.aps-change-list small {
    display: block;
    margin-top: 2px;
    color: #7d8b9e;
}

.aps-erp-status {
    margin: 20px;
}

.aps-safety-note,
.aps-rush-capacity {
    margin: 0 20px 20px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #edf7f2;
    color: #27664e;
    font-size: 0.82rem;
}

.aps-rush-capacity {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 16px;
    margin: 18px 0 0;
    background: #fff6e5;
    color: #7e5310;
}

.aps-rush-capacity small {
    grid-column: 1 / -1;
}

.aps-toast {
    position: fixed;
    z-index: 9999;
    right: 22px;
    bottom: 22px;
    max-width: min(430px, calc(100vw - 44px));
    padding: 14px 18px;
    border-radius: 12px;
    background: #17375d;
    color: #fff;
    box-shadow: 0 15px 40px rgba(11, 27, 49, 0.28);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: 180ms ease;
}

.aps-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.aps-toast.is-error {
    background: #a52f41;
}

@media (max-width: 1100px) {
    .aps-two-column,
    .aps-board-bottom-grid {
        grid-template-columns: 1fr;
    }

    .aps-guidance-card {
        position: static;
    }

    .aps-inline-form {
        grid-template-columns: repeat(3, 1fr);
    }

    .aps-inline-form .aps-field-wide {
        grid-column: span 2;
    }

    .aps-board-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    .aps-page-header,
    .aps-gantt-card-header,
    .aps-version-diff {
        display: grid;
        grid-template-columns: 1fr;
    }

    .aps-onboarding-strip,
    .aps-kpi-grid,
    .aps-form-grid-3,
    .aps-detail-grid {
        grid-template-columns: 1fr;
    }

    .aps-onboarding-strip > div {
        border-right: 0;
        border-bottom: 1px solid #e5ebf2;
    }

    .aps-weekday-picker {
        grid-template-columns: repeat(4, 1fr);
    }

    .aps-inline-form {
        grid-template-columns: 1fr;
    }

    .aps-inline-form .aps-field-wide {
        grid-column: auto;
    }

    .aps-version-selector,
    .aps-diff-metrics {
        align-items: stretch;
        flex-direction: column;
    }

    .aps-capacity-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

