:root {
    color-scheme: dark;
    --background: #080b14;
    --surface: #111625;
    --surface-strong: #171d30;
    --border: #29314a;
    --text: #f5f7ff;
    --muted: #a5aec5;
    --primary: #7c6cff;
    --primary-light: #9a90ff;
    --accent: #39d5b4;
    --radius: 17px;
    --large-radius: 24px;
    --content-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(124, 108, 255, 0.19),
            transparent 32rem
        ),
        radial-gradient(
            circle at 95% 15%,
            rgba(57, 213, 180, 0.10),
            transparent 26rem
        ),
        var(--background);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.site-header {
    width: min(calc(100% - 40px), var(--content-width));
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    margin-right: auto;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: white;
    background: linear-gradient(135deg, var(--primary), #5142cb);
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 0.92rem;
}

.brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.76rem;
}

.main-nav {
    display: flex;
    gap: 6px;
}

.main-nav a {
    padding: 10px 13px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 650;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

.page-shell {
    width: min(calc(100% - 40px), var(--content-width));
    min-height: calc(100vh - 164px);
    margin: 0 auto;
    padding: 68px 0 80px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
    gap: 48px;
    align-items: end;
    padding-bottom: 64px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--primary-light);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 780px;
    margin-bottom: 18px;
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    letter-spacing: -0.04em;
}

h3 {
    margin-bottom: 13px;
    font-size: 1.55rem;
    letter-spacing: -0.035em;
}

.lead {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.small-lead {
    font-size: 0.96rem;
}

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

.status-panel,
.notice {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(17, 22, 37, 0.78);
}

.status-panel p,
.notice span {
    display: block;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.status-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(57, 213, 180, 0.12);
}

.section-heading,
.page-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
}

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

.app-card {
    min-height: 405px;
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--large-radius);
    background:
        linear-gradient(
            145deg,
            rgba(23, 29, 48, 0.95),
            rgba(13, 17, 29, 0.95)
        );
}

.app-card:hover {
    border-color: rgba(124, 108, 255, 0.72);
}

.app-content {
    flex: 1;
}

.app-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 30px;
    border-radius: 17px;
    color: var(--primary-light);
    background: rgba(124, 108, 255, 0.18);
    font-weight: 850;
}

.app-icon.accent {
    color: var(--accent);
    background: rgba(57, 213, 180, 0.14);
}

.app-label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.app-card p {
    color: var(--muted);
    line-height: 1.65;
}

.app-card ul {
    padding: 0;
    margin: 22px 0 28px;
    list-style: none;
    color: #d5dbec;
}

.app-card li {
    position: relative;
    padding: 7px 0 7px 21px;
}

.app-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
}

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 750;
}

.button.primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), #5b4be0);
}

.button.secondary {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.button.small {
    min-height: 39px;
    font-size: 0.86rem;
}

.button.full {
    width: 100%;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.status-chip,
.environment-badge {
    padding: 7px 10px;
    border: 1px solid rgba(124, 108, 255, 0.35);
    border-radius: 999px;
    color: var(--primary-light);
    background: rgba(124, 108, 255, 0.10);
    font-size: 0.72rem;
    font-weight: 750;
}

.placeholder-grid,
.metric-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

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

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

.placeholder-card,
.metric-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(17, 22, 37, 0.82);
}

.placeholder-card > span {
    display: block;
    margin-bottom: 36px;
    color: var(--primary-light);
    font-size: 0.75rem;
    font-weight: 800;
}

.placeholder-card h2 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.placeholder-card p,
.metric-card span,
.metric-card small {
    color: var(--muted);
}

.metric-card span,
.metric-card small {
    display: block;
}

.metric-card strong {
    display: block;
    margin: 18px 0 10px;
    font-size: 2rem;
}

.auth-page .site-header {
    justify-content: center;
    border-bottom: 0;
}

.auth-page .brand {
    margin-right: 0;
}

.auth-page .page-shell {
    display: grid;
    place-items: center;
    padding-top: 30px;
}

.auth-shell {
    width: 100%;
    max-width: 460px;
}

.auth-card {
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--large-radius);
    background: rgba(17, 22, 37, 0.94);
}

.auth-card h1 {
    margin-bottom: 14px;
    font-size: 2.5rem;
}

.auth-form {
    display: grid;
    gap: 10px;
    margin: 28px 0 22px;
}

.auth-form label {
    margin-top: 8px;
    color: #dce1f1;
    font-size: 0.86rem;
    font-weight: 700;
}

.auth-form input {
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: #0c101c;
}

.text-link {
    color: var(--primary-light);
    font-weight: 700;
    text-decoration: none;
}

.site-footer {
    width: min(calc(100% - 40px), var(--content-width));
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.8rem;
}

@media (max-width: 860px) {
    .main-nav {
        display: none;
    }

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

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

@media (max-width: 560px) {
    .site-header,
    .page-shell,
    .site-footer {
        width: min(calc(100% - 24px), var(--content-width));
    }

    .site-header > .button {
        display: none;
    }

    .section-heading,
    .page-intro,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .placeholder-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .app-card,
    .auth-card {
        padding: 22px;
    }
}
