:root {
    --bg: #f4f7fb;
    --bg-accent: radial-gradient(circle at top left, rgba(10, 132, 255, 0.16), transparent 30%), radial-gradient(circle at bottom right, rgba(17, 178, 126, 0.14), transparent 24%), linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --line: rgba(14, 30, 58, 0.08);
    --text: #0f172a;
    --muted: #5f6f86;
    --primary: #0a84ff;
    --primary-dark: #0667c8;
    --success: #0f9f6e;
    --warning: #b7791f;
    --danger: #cc3d5b;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --content-max: 1240px;
    --font-sans: "Manrope", "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font-sans);
    background: var(--bg-accent);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, 0.34) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.34) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.38;
    content: "";
}

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

button,
input {
    font: inherit;
}

.glass-card {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.eyebrow {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
}

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

.notice {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
    line-height: 1.45;
}

.success-notice {
    color: #0b6446;
    background: rgba(15, 159, 110, 0.14);
}

.error-notice {
    color: #8f213b;
    background: rgba(204, 61, 91, 0.12);
}

.warning-notice {
    color: #8a5a13;
    background: rgba(183, 121, 31, 0.14);
}

.auth-body {
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 470px);
    gap: 1.6rem;
    width: min(100%, 1220px);
    align-items: stretch;
}

.auth-showcase,
.auth-panel {
    position: relative;
    overflow: hidden;
}

.auth-showcase {
    padding: 3.4rem;
    border-radius: 36px;
    background: linear-gradient(145deg, rgba(10, 132, 255, 0.9), rgba(8, 100, 194, 0.84));
    color: #eff7ff;
    box-shadow: 0 36px 90px rgba(10, 132, 255, 0.24);
}

.auth-showcase::after {
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    content: "";
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 1.4rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.45rem;
    font-weight: 800;
}

.brand-mark.small {
    width: 52px;
    height: 52px;
    margin-bottom: 0;
    border-radius: 16px;
    font-size: 1.05rem;
}

.auth-showcase h1,
.topbar h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.auth-showcase .lead {
    max-width: 560px;
    margin: 1.2rem 0 2rem;
    font-size: 1.02rem;
    line-height: 1.75;
    color: rgba(239, 247, 255, 0.86);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.showcase-card {
    padding: 1.3rem;
}

.showcase-card span:first-child {
    display: inline-block;
    margin-bottom: 0.9rem;
    color: rgba(239, 247, 255, 0.72);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.showcase-card h2,
.panel-card h3,
.hero-card h2 {
    margin: 0 0 0.55rem;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}

.showcase-card p,
.panel-card p,
.hero-card p {
    margin: 0;
    line-height: 1.65;
}

.auth-panel {
    padding: 2rem;
    align-self: center;
}

.panel-header h2 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -0.04em;
}

.panel-header .muted {
    margin: 0.75rem 0 0;
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.field {
    display: grid;
    gap: 0.5rem;
}

.field span {
    font-size: 0.92rem;
    font-weight: 700;
}

.field input {
    width: 100%;
    padding: 0.98rem 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus {
    border-color: rgba(10, 132, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.1);
    transform: translateY(-1px);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 5.8rem;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 0.65rem;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    background: rgba(10, 132, 255, 0.08);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
}

.primary-button,
.ghost-button,
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    min-height: 54px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 16px 32px rgba(10, 132, 255, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.menu-toggle:hover {
    transform: translateY(-1px);
}

.trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.3rem;
}

.trust-bar span,
.search-chip,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    background: rgba(10, 132, 255, 0.08);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.app-body {
    padding: 1.4rem;
}

.app-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 1.2rem;
    max-width: 1540px;
    margin: 0 auto;
}

.sidebar {
    position: sticky;
    top: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    min-height: calc(100vh - 2.8rem);
    padding: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.sidebar-brand,
.profile-chip,
.operator-card,
.topbar-left,
.topbar-right,
.panel-heading {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.sidebar-brand strong,
.profile-chip strong,
.operator-card strong {
    display: block;
}

.sidebar-brand span,
.profile-chip span,
.operator-card p {
    color: var(--muted);
}

.sidebar-nav {
    display: grid;
    gap: 0.45rem;
}

.sidebar-nav a {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    font-weight: 700;
    color: #1f2d3d;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: rgba(10, 132, 255, 0.1);
    color: var(--primary);
}

.sidebar-foot {
    margin-top: auto;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(10, 132, 255, 0.06);
}

.app-main {
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
}

.topbar h1 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.topbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.profile-chip,
.hero-card,
.panel-card,
.stat-card {
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.profile-chip {
    padding: 0.55rem 0.7rem 0.55rem 0.55rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8);
}

.avatar {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #46c6ff);
    color: #fff;
    font-weight: 800;
}

.avatar.large {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 1.2rem;
}

.ghost-button,
.menu-toggle {
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    font-size: 1.2rem;
}

.content-wrap {
    width: min(100%, var(--content-max));
    margin: 1.2rem auto 0;
}

.hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    padding: 1.6rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.88), rgba(243, 248, 255, 0.8));
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    min-width: 270px;
}

.hero-metrics div,
.stat-card,
.panel-card {
    padding: 1.25rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
}

.hero-metrics strong,
.stat-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.65rem;
    letter-spacing: -0.05em;
}

.stats-grid,
.dashboard-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card p,
.stat-card span {
    margin: 0;
}

.stat-card span {
    color: var(--success);
    font-size: 0.88rem;
    font-weight: 700;
}

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

.panel-card.wide {
    grid-column: span 2;
}

.panel-heading {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.badge.positive {
    background: rgba(15, 159, 110, 0.14);
    color: var(--success);
}

.badge.neutral {
    background: rgba(95, 111, 134, 0.12);
    color: #425166;
}

.mini-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: end;
    gap: 0.7rem;
    height: 220px;
    padding-top: 0.4rem;
}

.mini-chart span {
    display: block;
    border-radius: 999px 999px 16px 16px;
    background: linear-gradient(180deg, rgba(70, 198, 255, 0.9), rgba(10, 132, 255, 0.95));
    animation: rise 0.9s ease both;
}

.task-list {
    display: grid;
    gap: 0.8rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.task-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #243245;
}

.task-list span {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #46c6ff);
}

.operator-card {
    align-items: flex-start;
}

@keyframes rise {
    from {
        transform: scaleY(0.35);
        transform-origin: bottom;
        opacity: 0.4;
    }

    to {
        transform: scaleY(1);
        transform-origin: bottom;
        opacity: 1;
    }
}

@media (max-width: 1180px) {
    .auth-shell,
    .app-shell,
    .stats-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .panel-card.wide {
        grid-column: auto;
    }

    .sidebar {
        position: fixed;
        inset: 1rem auto 1rem 1rem;
        z-index: 20;
        width: min(320px, calc(100vw - 2rem));
        transform: translateX(calc(-100% - 1rem));
        transition: transform 0.25s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: inline-flex;
    }

    .topbar,
    .hero-card {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-right {
        justify-content: flex-start;
    }

    .content-wrap {
        width: 100%;
    }
}

@media (max-width: 820px) {
    .auth-body,
    .app-body {
        padding: 1rem;
    }

    .auth-showcase,
    .auth-panel,
    .topbar,
    .hero-card,
    .panel-card,
    .stat-card {
        padding: 1.2rem;
        border-radius: 22px;
    }

    .showcase-grid,
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .topbar-right,
    .sidebar-brand,
    .profile-chip,
    .operator-card {
        align-items: flex-start;
    }
}

@media (max-width: 540px) {
    .auth-showcase {
        padding: 1.5rem;
    }

    .auth-panel {
        padding: 1.2rem;
    }

    .topbar-right {
        gap: 0.7rem;
    }

    .search-chip,
    .profile-chip,
    .ghost-button {
        width: 100%;
        justify-content: flex-start;
    }

    .trust-bar span {
        width: 100%;
        justify-content: center;
    }
}