:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --sidebar: #17212b;
    --sidebar-soft: #22303c;
    --text: #17212b;
    --muted: #6b7785;
    --border: #e3e8ee;
    --primary: #2563eb;
    --primary-soft: #eff6ff;
    --success: #15803d;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

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

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

.sidebar {
    min-height: 100vh;
    background: var(--sidebar);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
}

.product {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 6px 24px;
}

.product-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #ffffff;
    color: var(--sidebar);
    font-weight: 800;
}

.product-mark.large {
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
    font-size: 20px;
}

.product-name {
    font-size: 15px;
    font-weight: 700;
}

.product-subtitle {
    margin-top: 2px;
    font-size: 11px;
    color: #9aa8b5;
}

.navigation {
    display: grid;
    gap: 5px;
}

.nav-item {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c9d3dc;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.nav-item:hover,
.nav-item.active {
    background: var(--sidebar-soft);
    color: #ffffff;
}

.nav-icon {
    width: 18px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 7px 3px;
    color: #9aa8b5;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

.workspace {
    min-width: 0;
}

.topbar {
    height: 64px;
    padding: 0 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-context {
    font-size: 14px;
    font-weight: 650;
}

.environment-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

.content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 34px 70px;
}

.hero {
    margin-bottom: 28px;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.hero h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: -0.025em;
}

.hero p {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

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

.status-card,
.foundation-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.status-card {
    padding: 20px;
}

.status-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.status-value {
    margin-top: 9px;
    font-size: 19px;
    font-weight: 750;
}

.status-ready {
    color: var(--success);
}

.status-note {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.foundation-card {
    margin-top: 18px;
    overflow: hidden;
}

.foundation-header {
    padding: 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.foundation-header h2 {
    margin: 0;
    font-size: 18px;
}

.foundation-state {
    padding: 5px 9px;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--success);
    font-size: 10px;
    font-weight: 750;
}

.foundation-list {
    padding: 4px 22px;
}

.foundation-row {
    min-height: 48px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 12px;
}

.foundation-row:last-child {
    border-bottom: 0;
}

.foundation-row span {
    color: var(--muted);
}

.foundation-row strong {
    font-size: 11px;
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.error-card {
    width: min(460px, 100%);
    padding: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.error-card h1 {
    margin: 0 0 12px;
}

.error-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

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

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

    .sidebar {
        min-height: auto;
    }

    .sidebar-footer {
        display: none;
    }

    .content {
        padding: 28px 18px 50px;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }
}
