body.login-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(
            circle at top right,
            rgba(22, 63, 111, 0.7),
            transparent 36%
        ),
        linear-gradient(
            135deg,
            #001229 0%,
            #082b57 100%
        );
    color: #001229;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
}

.login-card {
    width: min(100%, 500px);
    background: #ffffff;
    border-radius: 22px;
    padding: 38px 40px;
    box-shadow:
        0 24px 70px rgba(0, 18, 41, 0.32);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
}

.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 0;
    background:
        url('/assets/brand/business-os-symbol.png')
        center / contain no-repeat;
    font-size: 0;
    overflow: hidden;
    flex: 0 0 52px;
}

.brand strong {
    display: block;
    color: #001a3f;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.025em;
}

.brand small {
    display: block;
    color: #64748b;
    margin-top: 2px;
}

.login-heading .eyebrow {
    display: block;
    color: #fdbb00;
    font-weight: 800;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.login-heading h1 {
    margin: 0 0 14px;
    color: #001a3f;
    font-size: clamp(2rem, 5vw, 2.65rem);
    line-height: 1.08;
}

.login-heading p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 30px;
}

.login-card label {
    display: block;
    margin-top: 18px;
    color: #001a3f;
    font-weight: 700;
}

.login-card input,
.login-card select {
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    margin-top: 8px;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    color: #001229;
    font: inherit;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.login-card input:focus,
.login-card select:focus {
    border-color: #163f6f;
    box-shadow: 0 0 0 3px rgba(22, 63, 111, 0.13);
}

.login-card button[type="submit"] {
    width: 100%;
    min-height: 52px;
    margin-top: 22px;
    padding: 12px 18px;
    background: #fdbb00;
    color: #001229;
    border: 0;
    border-radius: 9px;
    font-weight: 800;
    font-size: 1rem;
}

.login-card button[type="submit"]:hover {
    background: #ffc928;
}

.security-note {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 26px;
}

.alert {
    padding: 13px 15px;
    border-radius: 9px;
    background: #fdebec;
    color: #b4232c;
    margin: 18px 0;
}

@media (max-width: 600px) {
    .login-card {
        padding: 30px 24px;
    }
}

/* Business OS corporate authentication lockup */
.login-card .brand {
    gap: 18px;
    align-items: center;
    margin-bottom: 36px;
}

.login-card .brand-mark {
    width: 68px !important;
    height: 68px !important;
    flex: 0 0 68px !important;
    background:
        url('/assets/brand/business-os-symbol.png')
        center / contain no-repeat !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.login-card .brand strong {
    color: #001a3f;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: .035em;
}

.login-card .brand small {
    color: #64748b;
    font-size: .88rem;
}

/* Keep browser autofill consistent with Business OS */
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: #001229;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 9999s ease-in-out 0s;
}

/* =========================================================
   MFA METHOD SELECTOR
   Do not apply normal text-input dimensions to radio fields.
   ========================================================= */

.login-card input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    min-height: 0 !important;
    margin: 0 14px 0 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    accent-color: #fdbb00;
    vertical-align: middle;
}

.login-card label:has(input[type="radio"]) {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
    padding: 14px 16px;
    margin: 10px 0 !important;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

.login-card label:has(input[type="radio"]):hover {
    border-color: #163f6f;
    background: #f7f9fc;
}

.login-card label:has(input[type="radio"]:checked) {
    border-color: #fdbb00;
    box-shadow: 0 0 0 2px rgba(253,187,0,.14);
}


/* =========================================================
   BUSINESS OS CORPORATE LOGO
   Real image replaces legacy BOS text/background placeholder
   ========================================================= */

.brand-mark {
    display: block !important;
    width: 58px !important;
    height: 58px !important;
    max-width: 58px !important;
    flex: 0 0 58px !important;
    object-fit: contain !important;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.login-card .brand-mark {
    width: 68px !important;
    height: 68px !important;
    max-width: 68px !important;
    flex-basis: 68px !important;
}

.sidebar-brand .brand-mark {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    flex-basis: 48px !important;
}

@media (max-width: 600px) {
    .login-card .brand-mark {
        width: 56px !important;
        height: 56px !important;
        max-width: 56px !important;
        flex-basis: 56px !important;
    }
}

/* =========================================================
   BUSINESS OS CORPORATE BRAND - FINAL IMAGE LOGO RULES
   ========================================================= */

img.brand-mark {
    display: block !important;
    object-fit: contain !important;
    object-position: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.login-card img.brand-mark {
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    flex: 0 0 68px !important;
}

.sidebar-brand img.brand-mark {
    display: block !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    flex: 0 0 52px !important;
}

.sidebar-brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
}

.sidebar-brand > div {
    min-width: 0;
}

.sidebar-brand strong {
    display: block;
    line-height: 1.2;
}

.sidebar-brand small {
    display: block;
    margin-top: 3px;
}

/* Responsive control panel */
@media (max-width: 900px) {
    .control-layout {
        grid-template-columns: 1fr !important;
    }

    .sidebar {
        width: 100% !important;
        min-height: auto !important;
        position: relative !important;
    }

    .sidebar nav {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .dashboard {
        padding: 24px 18px !important;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .panel {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 600px) {
    .login-shell {
        padding: 16px !important;
    }

    .login-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 28px 22px !important;
    }

    .login-card img.brand-mark {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
        flex-basis: 56px !important;
    }

    .dashboard {
        padding: 18px 14px !important;
    }

    .cards {
        grid-template-columns: 1fr !important;
    }

    .admin-name {
        width: 100%;
    }
}

/* ==========================================================
   BUSINESS OS CONTROL PANEL - CORPORATE SHELL
   ========================================================== */

:root {
    --bos-navy: #001a3f;
    --bos-navy-deep: #001229;
    --bos-navy-mid: #163f6f;
    --bos-gold: #fdbb00;
    --bos-gold-soft: #ffcf4a;
    --bos-surface: #ffffff;
    --bos-page: #f4f7fb;
    --bos-line: #dce4ee;
    --bos-text: #001a3f;
    --bos-muted: #64748b;
}

/* ----- Main application shell ----- */

.control-layout {
    min-height: 100vh;
    background: var(--bos-page);
}

.dashboard {
    background: var(--bos-page);
    color: var(--bos-text);
}

/* ----- Corporate sidebar ----- */

.sidebar {
    background:
        linear-gradient(
            180deg,
            var(--bos-navy-deep) 0%,
            var(--bos-navy) 100%
        );
}

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

.sidebar-brand .brand-mark,
.sidebar-brand img.brand-mark {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    flex: 0 0 48px !important;
    object-fit: contain !important;
    display: block !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    padding: 4px !important;
}

.sidebar-brand strong {
    color: #ffffff !important;
    font-weight: 800;
    letter-spacing: .035em;
}

.sidebar-brand small {
    color: #dbe7f4 !important;
}

/* ----- Navigation ----- */

.sidebar nav a,
.sidebar .logout {
    border-radius: 9px;
    transition:
        background-color .18s ease,
        color .18s ease,
        transform .18s ease;
}

.sidebar nav a:hover,
.sidebar .logout:hover {
    background: rgba(255,255,255,.08);
}

.sidebar nav a.active {
    background: var(--bos-navy-mid);
    color: #ffffff;
    box-shadow: inset 3px 0 0 var(--bos-gold);
}

/* ----- Page headings ----- */

.dashboard .eyebrow {
    color: #d99d00;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.dashboard h1,
.dashboard h2,
.dashboard h3 {
    color: var(--bos-navy);
}

/* ----- Cards / panels ----- */

.cards article,
.panel,
.dashboard section.panel {
    background: var(--bos-surface);
    border: 1px solid var(--bos-line);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 26, 63, .045);
}

.cards article {
    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.cards article:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 26, 63, .08);
}

/* ----- Forms ----- */

.dashboard input,
.dashboard select,
.dashboard textarea {
    max-width: 100%;
    border: 1px solid #ccd7e5;
    border-radius: 9px;
    background: #ffffff;
    color: var(--bos-text);
}

.dashboard input:focus,
.dashboard select:focus,
.dashboard textarea:focus {
    outline: none;
    border-color: var(--bos-navy-mid);
    box-shadow: 0 0 0 3px rgba(22, 63, 111, .12);
}

/* ----- Buttons ----- */

.dashboard button,
.dashboard .btn {
    border-radius: 9px;
    font-weight: 700;
}

.dashboard button[type="submit"],
.dashboard .btn-primary {
    background: var(--bos-navy);
    color: #ffffff;
    border-color: var(--bos-navy);
}

.dashboard button[type="submit"]:hover,
.dashboard .btn-primary:hover {
    background: var(--bos-navy-mid);
}

/* ----- Admin identity card ----- */

.admin-name {
    background: #ffffff;
    border: 1px solid var(--bos-line);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 26, 63, .04);
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1100px) {

    .dashboard {
        padding: 28px 24px !important;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .dashboard table {
        min-width: 720px;
    }

    .panel {
        overflow-x: auto;
    }
}

/* ==========================================================
   MOBILE / SMALL TABLET
   ========================================================== */

@media (max-width: 760px) {

    .control-layout {
        display: block !important;
    }

    .sidebar {
        width: 100% !important;
        min-height: auto !important;
        position: relative !important;
        padding: 18px 16px !important;
    }

    .sidebar-brand {
        margin-bottom: 16px !important;
    }

    .sidebar-brand .brand-mark,
    .sidebar-brand img.brand-mark {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        flex-basis: 44px !important;
    }

    .sidebar nav {
        margin-top: 12px !important;
        display: flex !important;
        gap: 8px !important;
        overflow-x: auto;
        padding-bottom: 5px;
        scrollbar-width: thin;
    }

    .sidebar nav a {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 14px !important;
    }

    .sidebar nav a.active {
        box-shadow: inset 0 -3px 0 var(--bos-gold);
    }

    .sidebar .logout {
        position: static !important;
        display: inline-block;
        margin-top: 14px;
    }

    .dashboard {
        width: 100% !important;
        padding: 22px 16px !important;
    }

    .dashboard header {
        display: block !important;
    }

    .admin-name {
        width: 100%;
        margin-top: 14px;
    }

    .cards {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .panel {
        padding: 20px 16px !important;
    }

    .dashboard h1 {
        font-size: clamp(2rem, 9vw, 2.65rem);
        line-height: 1.05;
    }

    .dashboard h2 {
        line-height: 1.15;
    }

    .dashboard table {
        min-width: 680px;
    }
}

/* ==========================================================
   SMALL PHONES
   ========================================================== */

@media (max-width: 480px) {

    .dashboard {
        padding: 18px 12px !important;
    }

    .panel,
    .cards article {
        border-radius: 13px;
    }

    .panel {
        padding: 17px 13px !important;
    }

    .sidebar {
        padding: 15px 12px !important;
    }

    .sidebar nav a {
        padding: 9px 11px !important;
        font-size: .92rem;
    }
}

