:root {
    --boss-bg: #0d1117;
    --boss-bg-soft: #111722;
    --boss-panel: rgba(18, 24, 36, 0.88);
    --boss-panel-strong: rgba(20, 27, 41, 0.96);
    --boss-card: rgba(19, 25, 38, 0.94);

    --boss-text: #f3f6fb;
    --boss-muted: rgba(243, 246, 251, 0.64);
    --boss-subtle: rgba(243, 246, 251, 0.44);

    --boss-border: rgba(255, 255, 255, 0.08);
    --boss-border-strong: rgba(255, 255, 255, 0.14);

    --boss-primary: #7c9bff;
    --boss-primary-soft: rgba(124, 155, 255, 0.14);
    --boss-success: #65d3a5;
    --boss-success-soft: rgba(101, 211, 165, 0.14);
    --boss-danger: #ff8b8b;
    --boss-danger-soft: rgba(255, 139, 139, 0.12);

    --boss-shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.45);
    --boss-shadow-md: 0 20px 50px rgba(0, 0, 0, 0.30);
    --boss-shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.20);

    --boss-radius-xl: 26px;
    --boss-radius-lg: 20px;
    --boss-radius-md: 16px;
    --boss-radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--boss-text);
    background: var(--app-bg,
        radial-gradient(900px 400px at 10% -10%, rgba(124, 155, 255, 0.12), transparent 60%),
        radial-gradient(700px 420px at 100% 0%, rgba(124, 155, 255, 0.07), transparent 55%),
        linear-gradient(180deg, #0c1017 0%, #0d1117 100%));
    line-height: 1.45;
    letter-spacing: -0.01em;
}

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

button,
input {
    font: inherit;
}

.boss-bg-glow {
    position: fixed;
    border-radius: 999px;
    filter: blur(60px);
    pointer-events: none;
    opacity: 0.45;
    z-index: 0;
}

.boss-bg-glow--a {
    width: 260px;
    height: 260px;
    top: 90px;
    left: -70px;
    background: rgba(124, 155, 255, 0.12);
}

.boss-bg-glow--b {
    width: 320px;
    height: 320px;
    right: -100px;
    top: 380px;
    background: rgba(124, 155, 255, 0.08);
}

.boss-shell {
    position: relative;
    z-index: 1;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 24px;
}

.boss-shell--with-nav {
    max-width: 1500px;
}

.boss-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.boss-main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 22px;
}

.boss-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
        var(--boss-card);
    border: 1px solid var(--boss-border);
    border-radius: var(--boss-radius-xl);
    box-shadow: var(--boss-shadow-md);
    backdrop-filter: blur(16px);
}

/* SIDEBAR */

.boss-nav {
    width: 278px;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
        var(--boss-panel);
    border: 1px solid var(--boss-border);
    border-radius: 24px;
    box-shadow: var(--boss-shadow-lg);
    position: sticky;
    top: 24px;
}

.boss-nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 4px 18px;
    border-bottom: 1px solid var(--boss-border);
    margin-bottom: 18px;
}

.boss-nav-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(124,155,255,0.95), rgba(124,155,255,0.55));
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.04em;
    box-shadow: 0 10px 24px rgba(124, 155, 255, 0.22);
}

.boss-nav-eyebrow {
    color: var(--boss-primary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    margin-bottom: 4px;
}

.boss-nav-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--boss-text);
    letter-spacing: -0.03em;
}

.boss-nav-menu {
    display: grid;
    gap: 6px;
}

.boss-nav-footer {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--boss-border);
}

.boss-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--boss-muted);
    text-decoration: none;
    font-weight: 600;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
    border: 1px solid transparent;
}

.boss-nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--boss-text);
    transform: translateY(-1px);
}

.boss-nav-link--active {
    background: var(--boss-primary-soft);
    border-color: rgba(124, 155, 255, 0.18);
    color: var(--boss-text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.boss-nav-link--logout {
    color: var(--boss-muted);
}

.boss-nav-link-label {
    line-height: 1;
}

/* HERO */

.boss-hero {
    padding: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: center;
}

.boss-kicker {
    color: var(--boss-primary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    margin-bottom: 10px;
}

.boss-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.boss-hero-text {
    margin: 16px 0 0;
    max-width: 64ch;
    color: var(--boss-muted);
    font-size: 1.03rem;
    line-height: 1.75;
}

.boss-hero-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.boss-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--boss-border);
    color: var(--boss-muted);
    font-weight: 600;
    font-size: 0.92rem;
}

.boss-status-card {
    height: 100%;
    min-height: 180px;
    border-radius: 20px;
    padding: 22px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(124, 155, 255, 0.18), transparent 55%),
        rgba(255,255,255,0.02);
    border: 1px solid rgba(124, 155, 255, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.boss-status-label {
    color: var(--boss-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.boss-status-value {
    display: block;
    margin-top: 12px;
    font-size: 2rem;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.boss-status-card small {
    margin-top: 8px;
    color: var(--boss-muted);
    font-size: 0.94rem;
}

/* STATS */

.boss-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.boss-stat {
    padding: 22px;
}

.boss-stat-label {
    display: block;
    color: var(--boss-subtle);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.boss-stat-value {
    display: block;
    margin-top: 12px;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.boss-stat-meta {
    display: block;
    margin-top: 10px;
    color: var(--boss-muted);
    font-size: 0.95rem;
}

/* CONTENT GRID */

.boss-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    gap: 22px;
    align-items: start;
}

.boss-column-main,
.boss-column-side {
    display: grid;
    gap: 22px;
}

.boss-panel {
    padding: 24px;
}

.boss-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.boss-section-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--boss-primary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.boss-panel h2 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
    font-weight: 850;
}

.boss-empty {
    margin: 0;
    color: var(--boss-muted);
}

.boss-list-grid,
.boss-table,
.boss-mini-list,
.boss-summary,
.boss-quick-actions {
    display: grid;
    gap: 12px;
}

.boss-row-card,
.boss-table-row,
.boss-mini-item,
.boss-summary-item {
    border: 1px solid var(--boss-border);
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.boss-row-card {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.boss-row-main {
    min-width: 0;
}

.boss-row-title {
    font-size: 1.02rem;
    font-weight: 750;
    color: var(--boss-text);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.boss-row-code {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--boss-border);
    color: var(--boss-muted);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.boss-row-sub {
    margin-top: 8px;
}

.boss-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.boss-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--boss-primary-soft);
    color: var(--boss-text);
    border: 1px solid rgba(124, 155, 255, 0.16);
    font-weight: 700;
    transition: transform 180ms ease, background 180ms ease;
}

.boss-action-link:hover {
    transform: translateY(-1px);
}

.boss-action-link--ghost {
    background: rgba(255,255,255,0.04);
    border-color: var(--boss-border);
    color: var(--boss-muted);
}

.boss-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.boss-badge--ok {
    background: var(--boss-success-soft);
    color: var(--boss-success);
    border: 1px solid rgba(101, 211, 165, 0.18);
}

.boss-badge--off {
    background: var(--boss-danger-soft);
    color: var(--boss-danger);
    border: 1px solid rgba(255, 139, 139, 0.16);
}

.boss-table-row {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.boss-table-user {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.boss-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(124, 155, 255, 0.22), rgba(124, 155, 255, 0.08));
    color: var(--boss-text);
    font-weight: 800;
    border: 1px solid rgba(124, 155, 255, 0.14);
    flex: 0 0 auto;
}

.boss-table-title {
    font-size: 1rem;
    font-weight: 750;
    color: var(--boss-text);
}

.boss-table-sub {
    margin-top: 4px;
    color: var(--boss-muted);
    font-size: 0.92rem;
}

.boss-table-side {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.boss-role {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--boss-border);
    color: var(--boss-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.boss-mini-item {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.boss-mini-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--boss-text);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.boss-summary-item {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.boss-summary-label {
    color: var(--boss-muted);
    font-size: 0.92rem;
}

.boss-summary-item strong {
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

.boss-quick-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 14px;
    background: var(--boss-primary-soft);
    border: 1px solid rgba(124, 155, 255, 0.16);
    color: var(--boss-text);
    font-weight: 700;
    transition: transform 180ms ease, background 180ms ease;
}

.boss-quick-button:hover {
    transform: translateY(-1px);
}

.boss-quick-button--ghost {
    background: rgba(255,255,255,0.03);
    border-color: var(--boss-border);
    color: var(--boss-muted);
}

/* LOGIN */

.boss-login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
    min-height: 100vh;
}

.boss-login-shell {
    width: 100%;
    max-width: 1180px;
    position: relative;
    z-index: 1;
}

.boss-login-wrap {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(420px, 1fr);
    gap: 28px;
    align-items: stretch;
}

.boss-login-brand {
    border-radius: 28px;
    padding: 34px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(124, 155, 255, 0.18), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
        var(--boss-panel-strong, rgba(18, 24, 36, 0.92));
    border: 1px solid var(--boss-border);
    box-shadow: var(--boss-shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 560px;
}

.boss-login-kicker {
    color: var(--boss-primary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    margin-bottom: 14px;
}

.boss-login-title {
    margin: 0;
    font-size: clamp(2.3rem, 4vw, 3.6rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.boss-login-copy {
    margin: 18px 0 0;
    color: var(--boss-muted);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 32ch;
}

.boss-login-points {
    display: grid;
    gap: 12px;
    margin-top: 30px;
}

.boss-login-point {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--boss-text);
    font-weight: 600;
}

.boss-login-point-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--boss-primary);
    box-shadow: 0 0 0 6px rgba(124, 155, 255, 0.12);
    flex: 0 0 auto;
}

.boss-login-brand-footer {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--boss-border);
    color: var(--boss-subtle);
    font-size: 0.92rem;
}

.boss-login-card {
    border-radius: 28px;
    padding: 36px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
        var(--boss-card, rgba(19, 25, 38, 0.94));
    border: 1px solid var(--boss-border);
    box-shadow: var(--boss-shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 560px;
}

.boss-login-card h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.boss-login-card p {
    margin: 14px 0 0;
    color: var(--boss-muted);
    line-height: 1.75;
    max-width: 42ch;
}

.boss-login-form {
    margin-top: 28px;
    display: grid;
    gap: 18px;
}

.boss-login-field {
    display: grid;
    gap: 8px;
}

.boss-login-field label {
    font-size: 0.92rem;
    color: var(--boss-muted);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.boss-login-input {
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--boss-border);
    background: var(--app-input-bg, rgba(255,255,255,0.04));
    color: var(--boss-text);
    font-size: 1rem;
    outline: none;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.boss-login-input::placeholder {
    color: var(--boss-subtle);
}

.boss-login-input:focus {
    border-color: rgba(124, 155, 255, 0.38);
    background: var(--app-input-bg, rgba(255,255,255,0.06));
    box-shadow: 0 0 0 4px rgba(124, 155, 255, 0.10);
}

.boss-login-submit {
    min-height: 56px;
    border: 0;
    border-radius: 16px;
    padding: 0 18px;
    background: linear-gradient(135deg, #7c9bff, #6788f3);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(124, 155, 255, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.boss-login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.boss-login-submit:active {
    transform: translateY(0);
}

.boss-login-alert {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 139, 139, 0.16);
    background: rgba(255, 139, 139, 0.08);
    color: #ffd1d1;
    font-size: 0.95rem;
}

.boss-login-note {
    margin-top: 16px;
    color: var(--boss-subtle);
    font-size: 0.92rem;
}

/* LEGACY UTILITIES */

.boss-header {
    margin-bottom: 16px;
}

.boss-header h1 {
    margin: 0 0 6px 0;
    font-size: 20px;
}

.boss-header p {
    margin: 0;
    color: var(--boss-muted);
}

.boss-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 8px;
}

.boss-link {
    color: var(--boss-primary);
    text-decoration: none;
}

.boss-field {
    display: grid;
    gap: 6px;
    margin: 12px 0;
}

.boss-field label {
    font-size: 13px;
    color: var(--boss-muted);
}

.boss-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--boss-border);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    color: var(--boss-text);
    font-size: 14px;
}

.boss-input::placeholder {
    color: var(--boss-subtle);
}

.boss-button {
    appearance: none;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--boss-primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.boss-alert {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid var(--boss-border);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    color: var(--boss-text);
}

.boss-muted {
    color: var(--boss-muted);
}

.boss-list {
    margin: 10px 0 0 0;
    padding-left: 18px;
}

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

    .boss-content-grid {
        grid-template-columns: 1fr;
    }

    .boss-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .boss-shell {
        padding: 20px 16px;
    }

    .boss-layout {
        flex-direction: column;
    }

    .boss-nav {
        width: 100%;
        position: static;
    }

    .boss-login-body {
        display: block;
    }

    .boss-login-wrap {
        grid-template-columns: 1fr;
    }

    .boss-login-brand,
    .boss-login-card {
        min-height: auto;
    }
}

@media (max-width: 700px) {
    .boss-stats-grid {
        grid-template-columns: 1fr;
    }

    .boss-row-card,
    .boss-table-row,
    .boss-mini-item,
    .boss-summary-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .boss-row-actions,
    .boss-table-side {
        justify-content: flex-start;
    }

    .boss-hero,
    .boss-panel {
        padding: 18px;
    }

    .boss-pill,
    .boss-action-link,
    .boss-quick-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .boss-login-brand,
    .boss-login-card {
        padding: 22px;
        border-radius: 22px;
    }

    .boss-login-submit {
        width: 100%;
    }
}
