:root {
    color-scheme: light;
    --bg: #edf3fb;
    --bg-deep: #dfe8f8;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --surface-soft: rgba(236, 242, 252, 0.9);
    --text: #0d1528;
    --muted: #5a6475;
    --primary: #1657d6;
    --primary-strong: #0f3f9d;
    --accent: #0bb4d8;
    --line: rgba(18, 53, 120, 0.14);
    --line-strong: rgba(18, 53, 120, 0.22);
    --glow: rgba(21, 101, 216, 0.22);
    --radius: 1.2rem;
    --radius-xl: 1.8rem;
    --shadow: 0 24px 60px rgba(16, 35, 74, 0.14);
    --max: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 2rem;
    overflow-x: hidden;
    font-family: "Sora", "Segoe UI", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background:
        radial-gradient(circle at 10% 8%, rgba(11, 180, 216, 0.11), transparent 24%),
        radial-gradient(circle at 90% 0%, rgba(22, 87, 214, 0.12), transparent 28%),
        radial-gradient(circle at 50% 110%, rgba(15, 63, 157, 0.12), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: "Space Grotesk", "Sora", sans-serif;
    line-height: 1.04;
    letter-spacing: -0.03em;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

::selection {
    background: rgba(22, 87, 214, 0.18);
}

.page-shell {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 4rem);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
    padding: 0.85rem 1rem;
    border-radius: 1.1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(21, 49, 92, 0.08);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.brand img {
    height: 26px;
    width: auto;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.85rem;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(22, 87, 214, 0.14), rgba(11, 180, 216, 0.12));
    color: var(--primary-strong);
    font-weight: 700;
}

.brand-copy {
    display: grid;
    gap: 0.15rem;
}

.brand-copy strong {
    font-size: 0.96rem;
}

.brand-copy span {
    font-size: 0.74rem;
    color: var(--muted);
}

.header-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.pill,
.tag,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: var(--primary-strong);
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.eyebrow {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.glass-card,
.panel,
.metric-card,
.login-card,
.dashboard-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(240, 246, 255, 0.84) 100%);
    box-shadow: var(--shadow);
}

.workspace-grid {
    display: grid;
    gap: 1rem;
    min-height: calc(100vh - 7rem);
}

.surface-flat {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 3rem;
    padding: 0 1rem;
    border-radius: 0.95rem;
    font-size: 0.92rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    color: #ffffff;
    box-shadow: 0 16px 28px rgba(21, 101, 216, 0.27);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
    border-color: var(--line);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.92);
}

.button-icon {
    flex: 0 0 auto;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field label {
    font-size: 0.86rem;
    font-weight: 600;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: rgba(22, 87, 214, 0.42);
    box-shadow: 0 0 0 4px rgba(22, 87, 214, 0.12);
    background: #ffffff;
}

.animate-in {
    animation: rise 640ms ease both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 780px) {
    body {
        padding: 1rem;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.85rem;
    }

    .page-shell {
        min-height: calc(100vh - 2rem);
    }

    .workspace-grid {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}