:root {
    --blue-950: #0b1f4d;
    --blue-900: #0f2f6f;
    --blue-800: #16428f;
    --blue-600: #2563eb;
    --blue-100: #dbeafe;
    --slate-950: #0f172a;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --shadow: 0 18px 45px rgba(15, 23, 42, .10);
    --radius-lg: 24px;
    --radius-md: 14px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    min-height: 100vh;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
    color: var(--slate-950);
}

a { color: inherit; }

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    background: var(--blue-600);
    color: var(--white);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}

button:hover { filter: brightness(.96); }

label {
    display: block;
    margin: 12px 0 6px;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: var(--white);
    color: var(--slate-950);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.login-page { overflow: hidden; }

.login-shell,
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 360px 1fr;
}

.brand-panel {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    padding: 34px;
    color: var(--white);
    background:
        radial-gradient(circle at 18% 18%, rgba(96, 165, 250, .55), transparent 28%),
        radial-gradient(circle at 85% 78%, rgba(37, 99, 235, .40), transparent 26%),
        linear-gradient(160deg, var(--blue-950), var(--blue-800));
}

.brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -80px -90px auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    border: 36px solid rgba(255, 255, 255, .08);
}

.brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: calc(100vh - 68px);
    flex-direction: column;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .24);
    font-size: 30px;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

.brand-name,
.brand-system {
    display: block;
    line-height: .95;
}

.brand-name {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -1.2px;
}

.brand-system {
    margin-top: 5px;
    color: #bfdbfe;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.brand-text {
    max-width: 270px;
    margin: 28px 0 0;
    color: #dbeafe;
    font-size: 15px;
    line-height: 1.65;
}

.brand-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.brand-badges span {
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    color: #eff6ff;
    font-size: 12px;
    font-weight: 700;
}

.login-main {
    display: grid;
    place-items: center;
    padding: 48px;
}

.login-card {
    width: min(430px, 100%);
    padding: 38px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, .9);
}

.login-card h1 {
    margin: 6px 0 8px;
    font-size: 38px;
    letter-spacing: -1px;
}

.login-form button {
    width: 100%;
    margin-top: 18px;
}


.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
}

.app-brand-panel {
    position: sticky;
    top: 0;
    align-self: start;
}

.app-main {
    min-width: 0;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 92px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, .9);
}

.topbar-title { min-width: 0; }

.topbar h1 {
    margin: 2px 0 0;
    font-size: 26px;
    letter-spacing: -.5px;
}

.eyebrow {
    color: var(--blue-600);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 30px;
    background: rgba(255, 255, 255, .76);
    border-bottom: 1px solid rgba(226, 232, 240, .9);
}

.topnav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--slate-700);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.topnav a:hover {
    background: var(--slate-100);
    color: var(--blue-600);
}

.topnav .nav-logout {
    margin-left: auto;
    color: #b91c1c;
    background: #fff1f2;
}

.user-pill {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 118px;
    padding: 9px 13px;
    border-radius: 16px;
    background: var(--slate-100);
    color: var(--slate-500);
    font-size: 12px;
}

.user-pill strong {
    color: var(--slate-950);
    font-size: 13px;
}

.content {
    min-width: 0;
    padding: 28px 30px;
}

@media (max-width: 1100px) {
    .login-shell,
    .app-layout {
        grid-template-columns: 280px minmax(0, 1fr);
    }

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

    .user-pill {
        width: 100%;
    }

    .topnav .nav-logout {
        margin-left: 0;
    }

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

@media (max-width: 760px) {
    .login-shell,
    .app-layout {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: auto;
        padding: 24px;
    }

    .app-brand-panel {
        position: relative;
    }

    .brand-content {
        min-height: auto;
    }

    .brand-badges { margin-top: 22px; }

    .login-main,
    .content {
        padding: 20px;
    }

    .login-card {
        padding: 26px;
    }

    .topbar,
    .topnav {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.checkbox-row {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-top: 10px;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}

.checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.checkbox-row-wrapper {
    justify-content: flex-end;
}

.checkbox-row {
    display: flex;
    gap: 24px;
    align-items: center;
    min-height: 42px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.compact-table td,
.compact-table th {
    padding-top: 8px;
    padding-bottom: 8px;
}
