:root {
    --navy-950: #071421;
    --navy-900: #0b1f33;
    --navy-800: #12304b;
    --navy-700: #1c4668;

    --gold-500: #c9a64b;
    --gold-400: #d9ba68;
    --gold-100: #f7eed5;

    --slate-900: #18212b;
    --slate-700: #465564;
    --slate-500: #71808f;
    --slate-300: #cbd3da;
    --slate-200: #e2e7eb;
    --slate-100: #f3f5f7;

    --white: #ffffff;
    --success: #16825d;
    --warning: #b7791f;
    --danger: #b83a3a;

    --shadow-sm:
        0 4px 14px rgba(7, 20, 33, 0.08);

    --shadow-md:
        0 16px 40px rgba(7, 20, 33, 0.12);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --content-width: 1440px;
}


* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
    background: var(--slate-100);
}


body {
    min-height: 100vh;
    margin: 0;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--slate-900);
    background:
        linear-gradient(
            180deg,
            #eef2f5 0%,
            var(--slate-100) 100%
        );
}


button,
input,
select,
textarea {
    font: inherit;
}


a {
    color: inherit;
    text-decoration: none;
}


.application-shell {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}


.top-header {
    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    min-height: 88px;
    padding: 16px 36px;

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--navy-950),
            var(--navy-800)
        );

    border-bottom:
        3px solid var(--gold-500);

    box-shadow:
        0 10px 30px rgba(7, 20, 33, 0.18);
}


.brand-area {
    display: flex;
    align-items: center;
    gap: 14px;
}


.brand-mark {
    width: 50px;
    height: 50px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    color: var(--navy-950);
    background:
        linear-gradient(
            145deg,
            var(--gold-400),
            var(--gold-500)
        );

    font-size: 25px;
    font-weight: 800;

    box-shadow:
        0 10px 24px rgba(201, 166, 75, 0.22);
}


.brand-area h1 {
    margin: 0;

    font-size: 21px;
    font-weight: 750;
    letter-spacing: 0.02em;
}


.brand-area p {
    margin: 4px 0 0;

    color: rgba(255, 255, 255, 0.72);

    font-size: 12px;
    letter-spacing: 0.035em;
}


.system-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 9px 13px;

    border:
        1px solid rgba(255, 255, 255, 0.15);

    border-radius: 999px;

    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.07);

    font-size: 12px;
    font-weight: 650;
}


.status-indicator {
    width: 9px;
    height: 9px;

    border-radius: 50%;
    background: #49d49d;

    box-shadow:
        0 0 0 4px rgba(73, 212, 157, 0.14);
}


.page-content {
    width: min(
        calc(100% - 48px),
        var(--content-width)
    );

    flex: 1;

    margin: 0 auto;
    padding: 38px 0 48px;
}


.application-footer {
    padding: 18px 32px;

    color: var(--slate-500);
    background: var(--white);

    border-top:
        1px solid var(--slate-200);

    text-align: center;
    font-size: 12px;
}


.application-footer p {
    margin: 0;
}


.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;

    margin-bottom: 28px;
}


.page-heading h2 {
    margin: 0;

    color: var(--navy-900);

    font-size: 30px;
    line-height: 1.15;
}


.page-heading p {
    max-width: 720px;
    margin: 8px 0 0;

    color: var(--slate-500);

    font-size: 14px;
    line-height: 1.6;
}


.panel {
    background: var(--white);

    border:
        1px solid var(--slate-200);

    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);
}


.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 20px 22px;

    border-bottom:
        1px solid var(--slate-200);
}


.panel-header h3 {
    margin: 0;

    color: var(--navy-900);

    font-size: 16px;
}


.panel-body {
    padding: 22px;
}


.primary-button,
.secondary-button,
.danger-button {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 10px 17px;

    border: 0;
    border-radius: var(--radius-sm);

    cursor: pointer;

    font-size: 13px;
    font-weight: 700;

    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}


.primary-button {
    color: var(--navy-950);

    background:
        linear-gradient(
            145deg,
            var(--gold-400),
            var(--gold-500)
        );

    box-shadow:
        0 8px 18px rgba(201, 166, 75, 0.2);
}


.secondary-button {
    color: var(--navy-900);
    background: var(--slate-100);

    border:
        1px solid var(--slate-300);
}


.danger-button {
    color: var(--white);
    background: var(--danger);
}


.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
    transform: translateY(-1px);
}


.primary-button:focus-visible,
.secondary-button:focus-visible,
.danger-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline:
        3px solid rgba(201, 166, 75, 0.24);

    outline-offset: 2px;
}


.form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


.form-group.full-width {
    grid-column: 1 / -1;
}


.form-group label {
    color: var(--slate-700);

    font-size: 12px;
    font-weight: 700;
}


.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    padding: 11px 12px;

    color: var(--slate-900);
    background: var(--white);

    border:
        1px solid var(--slate-300);

    border-radius: var(--radius-sm);

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}


.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--slate-500);
}


.form-group textarea {
    min-height: 110px;
    resize: vertical;
}


.form-help {
    color: var(--slate-500);
    font-size: 11px;
    line-height: 1.5;
}


.badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 750;
}


.badge-success {
    color: #0d6448;
    background: #dff5ec;
}


.badge-warning {
    color: #815514;
    background: #fff1d6;
}


.badge-danger {
    color: #8d2929;
    background: #fde2e2;
}


.badge-neutral {
    color: var(--slate-700);
    background: var(--slate-100);
}


.table-container {
    width: 100%;
    overflow-x: auto;
}


.data-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 13px;
}


.data-table th {
    padding: 12px 14px;

    color: var(--slate-500);
    background: var(--slate-100);

    border-bottom:
        1px solid var(--slate-200);

    text-align: left;
    font-size: 11px;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}


.data-table td {
    padding: 14px;

    border-bottom:
        1px solid var(--slate-200);

    vertical-align: middle;
}


.data-table tbody tr:hover {
    background: #fafbfc;
}


.empty-state {
    padding: 48px 24px;

    color: var(--slate-500);

    text-align: center;
}


.alert {
    padding: 13px 15px;

    border-radius: var(--radius-sm);

    font-size: 13px;
    line-height: 1.5;
}


.alert-success {
    color: #0d6448;
    background: #dff5ec;

    border:
        1px solid #b5e8d4;
}


.alert-warning {
    color: #815514;
    background: #fff1d6;

    border:
        1px solid #f0d298;
}


.alert-danger {
    color: #8d2929;
    background: #fde2e2;

    border:
        1px solid #f2bcbc;
}


@media (max-width: 800px) {
    .top-header {
        align-items: flex-start;
        flex-direction: column;

        padding: 16px 20px;
    }

    .system-status {
        align-self: stretch;
        justify-content: center;
    }

    .page-content {
        width: min(
            calc(100% - 28px),
            var(--content-width)
        );

        padding-top: 24px;
    }

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

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

    .form-group.full-width {
        grid-column: auto;
    }
}

/* Configurable client-branding foundation */

.brand-logo {
    display: block;
    width: auto;
    max-width: 180px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    min-width: 62px;
    height: 52px;
    padding: 0;
    box-sizing: border-box;
    font-size: 1.2rem;
    line-height: 1;
    letter-spacing: -0.03em;
    text-align: center;
    white-space: nowrap;
}

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

.brand-copy h1,
.brand-copy p {
    overflow-wrap: anywhere;
}

.footer-product-name {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--slate-500);
}



/* UI-POLISH-01A CSS BRAND FOUNDATION */

:root {
    --brand-orange:
        var(--gold-500);

    --brand-orange-soft:
        var(--gold-400);

    --brand-orange-surface:
        var(--gold-100);

    --surface-raised:
        #ffffff;

    --surface-subtle:
        #f7f8f9;

    --focus-ring:
        rgba(232, 119, 22, 0.22);
}


.top-header {
    min-height: 82px;

    padding:
        13px 34px;

    background:
        linear-gradient(
            135deg,
            var(--navy-950) 0%,
            var(--navy-800) 100%
        );

    border-bottom-color:
        var(--brand-orange);

    box-shadow:
        0 8px 26px
        rgba(10, 13, 15, 0.18);
}


.brand-area {
    min-width: 0;
}


.brand-logo {
    width: 54px;
    height: 54px;

    flex: 0 0 54px;

    object-fit: cover;
    object-position: center top;

    border:
        1px solid
        rgba(255, 255, 255, 0.28);

    border-radius: 13px;

    background: #16191b;

    box-shadow:
        0 8px 22px
        rgba(0, 0, 0, 0.22);
}


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


.brand-area h1 {
    font-size: 20px;
    letter-spacing: 0.01em;
}


.brand-area p {
    color:
        rgba(255, 255, 255, 0.68);
}


.system-status {
    background:
        rgba(255, 255, 255, 0.065);

    border-color:
        rgba(255, 255, 255, 0.16);
}


.primary-button {
    border-color:
        var(--brand-orange);

    color:
        var(--navy-950);

    background:
        var(--brand-orange);
}


.primary-button:hover:not(:disabled) {
    background:
        var(--brand-orange-soft);

    border-color:
        var(--brand-orange-soft);
}


button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid
        var(--focus-ring);

    outline-offset: 2px;
}


input:focus,
select:focus,
textarea:focus {
    border-color:
        var(--brand-orange);
}


.panel,
.metric-card {
    border-color:
        rgba(203, 211, 218, 0.86);
}


.data-table tbody tr {
    transition:
        background-color
        120ms ease;
}


.data-table tbody tr:hover {
    background:
        rgba(255, 241, 229, 0.42);
}


.section-label {
    color:
        #7e3900;

    background:
        var(--brand-orange-surface);

    border-color:
        rgba(232, 119, 22, 0.27);
}


.application-footer {
    border-top-color:
        rgba(203, 211, 218, 0.9);
}


@media (max-width: 700px) {
    .top-header {
        padding:
            12px 18px;
    }

    .brand-logo {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .brand-area h1 {
        font-size: 17px;
    }
}


/* UI-POLISH-01A3 PROPORTIONAL LOGO */

.brand-logo {
    /*
     * Never distort or crop the client's
     * official artwork.
     */
    width: auto;
    height: 54px;

    min-width: 0;
    max-width: 54px;

    flex: 0 0 auto;

    object-fit: contain;
    object-position: center;

    padding: 2px;

    background: #16191b;
}


@media (max-width: 700px) {
    .brand-logo {
        width: auto;
        height: 46px;

        max-width: 46px;

        flex-basis: auto;
    }
}


/* UI-POLISH-01A5 HEADER LOGO RESTORE */

/*
 * Header intentionally uses the upper
 * CSS emblem as a compact square mark.
 *
 * This does NOT affect the proportional
 * full CSS logo used on the login page.
 */
.top-header .brand-logo {
    width: 54px !important;
    height: 54px !important;

    min-width: 54px !important;
    max-width: 54px !important;

    min-height: 54px !important;
    max-height: 54px !important;

    flex: 0 0 54px !important;

    padding: 0 !important;

    object-fit: cover !important;
    object-position: center top !important;

    border-radius: 13px;
}


@media (max-width: 700px) {
    .top-header .brand-logo {
        width: 46px !important;
        height: 46px !important;

        min-width: 46px !important;
        max-width: 46px !important;

        min-height: 46px !important;
        max-height: 46px !important;

        flex-basis: 46px !important;
    }
}
