:root {
    color-scheme: light;
    --navy-950: #07111f;
    --navy-900: #0b1729;
    --navy-800: #13243b;
    --slate-950: #172033;
    --slate-800: #344054;
    --slate-700: #475467;
    --slate-600: #667085;
    --slate-500: #7f8b9e;
    --slate-400: #98a2b3;
    --slate-300: #cbd2dc;
    --slate-200: #e4e7ec;
    --slate-100: #f2f4f7;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --indigo-700: #4338ca;
    --indigo-600: #4f46e5;
    --indigo-500: #6366f1;
    --indigo-100: #e0e7ff;
    --indigo-50: #eef2ff;
    --blue-600: #2563eb;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --green-700: #047857;
    --green-600: #059669;
    --green-100: #d1fae5;
    --green-50: #ecfdf5;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-100: #fef3c7;
    --amber-50: #fffbeb;
    --red-700: #b42318;
    --red-600: #dc2626;
    --red-100: #fee4e2;
    --red-50: #fff5f4;
    --purple-700: #7e22ce;
    --purple-100: #f3e8ff;
    --sidebar-width: 264px;
    --content-width: 1320px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-xs: 0 1px 2px rgb(16 24 40 / 5%);
    --shadow-sm: 0 2px 8px rgb(16 24 40 / 6%);
    --shadow-md: 0 12px 30px rgb(16 24 40 / 10%);
    --focus-ring: 0 0 0 3px rgb(99 102 241 / 20%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    color: var(--slate-950);
    background: #f5f7fb;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--indigo-600);
    text-decoration: none;
}

a:hover {
    color: var(--indigo-700);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 2px solid var(--indigo-500);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    color: #d9e2ef;
    background:
        radial-gradient(circle at 5% 0%, rgb(79 70 229 / 24%), transparent 32%),
        linear-gradient(180deg, var(--navy-950), var(--navy-900));
    border-right: 1px solid rgb(255 255 255 / 7%);
}

.brand {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    color: var(--white);
}

.brand:hover {
    color: var(--white);
}

.brand-mark {
    position: relative;
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(145deg, #818cf8, #4338ca);
    border: 1px solid rgb(255 255 255 / 20%);
    border-radius: 11px;
    box-shadow: 0 8px 18px rgb(79 70 229 / 28%);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark::after {
    position: absolute;
    right: -8px;
    bottom: -10px;
    width: 24px;
    height: 24px;
    content: "";
    background: rgb(255 255 255 / 16%);
    border-radius: 50%;
}

.brand-copy {
    min-width: 0;
}

.brand-name,
.brand-product {
    display: block;
}

.brand-name {
    font-size: 15px;
    font-weight: 720;
    letter-spacing: -0.01em;
}

.brand-product {
    margin-top: -1px;
    color: #8fa2bb;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 12px 20px;
    overflow-y: auto;
}

.nav-section + .nav-section {
    margin-top: 26px;
}

.nav-label {
    margin: 0 10px 8px;
    color: #7589a3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    padding: 9px 11px;
    color: #b9c6d8;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 550;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nav-link:hover {
    color: var(--white);
    background: rgb(255 255 255 / 6%);
}

.nav-link.is-active {
    color: var(--white);
    background: linear-gradient(100deg, rgb(99 102 241 / 28%), rgb(99 102 241 / 12%));
    box-shadow: inset 2px 0 0 #818cf8;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid rgb(255 255 255 / 7%);
}

.account-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    color: #e5e7ff;
    background: rgb(129 140 248 / 18%);
    border: 1px solid rgb(129 140 248 / 24%);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

.account-copy {
    min-width: 0;
    flex: 1;
}

.account-organization,
.account-email {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-organization {
    color: #edf2f9;
    font-size: 13px;
    font-weight: 650;
}

.account-email {
    color: #8194ad;
    font-size: 11px;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 6px;
    padding: 9px 10px;
    color: #8fa2bb;
    border-radius: 9px;
    font-size: 13px;
}

.logout-link:hover {
    color: #f3f6fa;
    background: rgb(255 255 255 / 5%);
}

.app-content {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.mobile-bar {
    display: none;
}

.main-content {
    width: 100%;
    max-width: calc(var(--content-width) + 64px);
    margin: 0 auto;
    padding: 38px 32px 72px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-kicker,
.eyebrow {
    margin: 0 0 5px;
    color: var(--indigo-600);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-header h1,
.page-title {
    margin: 0;
    color: var(--slate-950);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 730;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.page-description {
    max-width: 700px;
    margin: 8px 0 0;
    color: var(--slate-600);
    font-size: 15px;
}

.page-actions,
.action-row,
.inline-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 9px;
    color: var(--slate-500);
    font-size: 13px;
}

.breadcrumbs a {
    color: var(--slate-600);
}

.breadcrumbs a:hover {
    color: var(--indigo-600);
}

.button,
button.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    color: var(--white);
    background: var(--indigo-600);
    border: 1px solid var(--indigo-600);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    transition: transform 120ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.button:hover,
button.button:hover {
    color: var(--white);
    background: var(--indigo-700);
    border-color: var(--indigo-700);
    box-shadow: 0 4px 10px rgb(79 70 229 / 18%);
}

.button:active,
button.button:active {
    transform: translateY(1px);
}

.button svg {
    width: 16px;
    height: 16px;
}

.button-secondary,
button.button-secondary {
    color: var(--slate-800);
    background: var(--white);
    border-color: var(--slate-300);
}

.button-secondary:hover,
button.button-secondary:hover {
    color: var(--slate-950);
    background: var(--slate-50);
    border-color: var(--slate-400);
    box-shadow: var(--shadow-sm);
}

.button-quiet,
button.button-quiet {
    color: var(--slate-700);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.button-quiet:hover,
button.button-quiet:hover {
    color: var(--indigo-700);
    background: var(--indigo-50);
    border-color: transparent;
    box-shadow: none;
}

.button-danger,
button.button-danger {
    color: var(--red-700);
    background: var(--white);
    border-color: var(--red-100);
}

.button-danger:hover,
button.button-danger:hover {
    color: var(--white);
    background: var(--red-600);
    border-color: var(--red-600);
}

.button-sm,
button.button-sm {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.button-lg,
button.button-lg {
    min-height: 46px;
    padding: 11px 18px;
    font-size: 14px;
}

.icon-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: var(--slate-700);
    background: var(--white);
    border: 1px solid var(--slate-300);
    border-radius: 9px;
    cursor: pointer;
}

.icon-button svg {
    width: 20px;
    height: 20px;
}

.card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 21px 24px;
    border-bottom: 1px solid var(--slate-200);
}

.card-header h2,
.card-header h3 {
    margin: 0;
    color: var(--slate-950);
    font-size: 17px;
    font-weight: 690;
    letter-spacing: -0.015em;
}

.card-header p {
    margin: 4px 0 0;
    color: var(--slate-600);
    font-size: 13px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    padding: 16px 24px;
    background: var(--slate-50);
    border-top: 1px solid var(--slate-200);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.section-stack {
    display: grid;
    gap: 24px;
}

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

.content-grid-wide {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    min-height: 124px;
    padding: 20px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
}

.stat-card::after {
    position: absolute;
    right: -16px;
    bottom: -26px;
    width: 80px;
    height: 80px;
    content: "";
    background: var(--stat-color, var(--indigo-100));
    border-radius: 50%;
    opacity: 0.55;
}

.stat-label {
    display: block;
    color: var(--slate-600);
    font-size: 13px;
    font-weight: 600;
}

.stat-value {
    display: block;
    margin-top: 9px;
    color: var(--slate-950);
    font-size: 30px;
    font-weight: 740;
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat-meta {
    display: block;
    margin-top: 8px;
    color: var(--slate-500);
    font-size: 11px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--slate-200);
}

.data-table th {
    color: var(--slate-600);
    background: var(--slate-50);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background 120ms ease;
}

.data-table tbody tr:hover {
    background: #fafbff;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.table-primary {
    color: var(--slate-950);
    font-weight: 650;
}

.table-secondary {
    display: block;
    max-width: 260px;
    margin-top: 2px;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-action {
    text-align: right !important;
}

.status-badge,
.config-badge {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    color: var(--slate-700);
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.status-badge::before,
.config-badge::before {
    width: 6px;
    height: 6px;
    content: "";
    background: currentColor;
    border-radius: 50%;
}

.status-badge[data-status="SPEC_GENERATING"],
.status-badge[data-status="PROVISIONING"] {
    color: var(--blue-600);
    background: var(--blue-50);
    border-color: var(--blue-100);
}

.status-badge[data-status="SPEC_REVIEW"] {
    color: var(--amber-700);
    background: var(--amber-50);
    border-color: var(--amber-100);
}

.status-badge[data-status="SPEC_APPROVED"],
.status-badge[data-status="APPROVED"],
.status-badge[data-status="DEPLOYED"],
.config-badge.is-configured {
    color: var(--green-700);
    background: var(--green-50);
    border-color: var(--green-100);
}

.status-badge[data-status="FAILED"],
.config-badge.is-missing {
    color: var(--red-700);
    background: var(--red-50);
    border-color: var(--red-100);
}

.status-badge[data-status="DRAFT"] {
    color: var(--purple-700);
    background: #faf5ff;
    border-color: var(--purple-100);
}

.status-badge[data-status="ARCHIVED"] {
    color: var(--slate-600);
}

.milestone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--slate-400);
    white-space: nowrap;
}

.milestone.is-complete {
    color: var(--green-700);
}

.milestone.is-active {
    color: var(--blue-600);
}

.milestone-icon {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    color: currentColor;
    background: currentColor;
    border-radius: 50%;
}

.milestone-icon::after {
    width: 5px;
    height: 5px;
    content: "";
    background: var(--white);
    border-radius: 50%;
}

.empty-state {
    display: grid;
    min-height: 260px;
    place-items: center;
    padding: 50px 24px;
    text-align: center;
}

.empty-state.compact {
    min-height: 180px;
    padding: 34px 20px;
}

.empty-state-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    place-items: center;
    color: var(--indigo-600);
    background: var(--indigo-50);
    border: 1px solid var(--indigo-100);
    border-radius: 14px;
}

.empty-state-icon svg {
    width: 23px;
    height: 23px;
}

.empty-state h3 {
    margin: 0;
    font-size: 16px;
}

.empty-state p {
    max-width: 430px;
    margin: 7px auto 18px;
    color: var(--slate-600);
    font-size: 13px;
}

.message-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    color: var(--slate-800);
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-left: 3px solid var(--blue-600);
    border-radius: 8px;
    box-shadow: var(--shadow-xs);
    font-size: 13px;
}

.message.success {
    color: #065f46;
    background: var(--green-50);
    border-color: var(--green-100);
    border-left-color: var(--green-600);
}

.message.error {
    color: var(--red-700);
    background: var(--red-50);
    border-color: var(--red-100);
    border-left-color: var(--red-600);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    color: var(--red-700);
    background: var(--red-50);
    border: 1px solid var(--red-100);
    border-radius: var(--radius-md);
}

.alert svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-top: 1px;
}

.alert strong {
    display: block;
    margin-bottom: 2px;
}

.alert p {
    margin: 0;
    font-size: 13px;
}

.form-stack {
    display: grid;
    gap: 18px;
}

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

.form-field {
    min-width: 0;
}

.form-field > label,
.field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--slate-800);
    font-size: 13px;
    font-weight: 650;
}

.required-indicator {
    color: var(--red-600);
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea,
.input-control {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    color: var(--slate-950);
    background: var(--white);
    border: 1px solid var(--slate-300);
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgb(16 24 40 / 3%);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field textarea {
    min-height: 104px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.input-control:focus {
    border-color: var(--indigo-500);
    box-shadow: var(--focus-ring);
}

.form-field input[readonly] {
    color: var(--slate-600);
    background: var(--slate-50);
}

.form-field input[type="file"] {
    padding: 7px;
}

.form-field input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 6px 10px;
    color: var(--slate-700);
    background: var(--slate-100);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
}

.form-help {
    margin: 6px 0 0;
    color: var(--slate-500);
    font-size: 12px;
}

.form-error,
.errorlist {
    margin: 6px 0 0;
    padding: 0;
    color: var(--red-700);
    font-size: 12px;
    list-style: none;
}

.field-group {
    padding: 0;
    border: 0;
}

.field-group + .field-group {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--slate-200);
}

.field-group legend {
    width: 100%;
    margin-bottom: 16px;
    padding: 0;
    color: var(--slate-950);
    font-size: 14px;
    font-weight: 700;
}

.field-group-description {
    margin: -11px 0 18px;
    color: var(--slate-500);
    font-size: 12px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
}

.checkbox-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin: 2px 0 0;
    accent-color: var(--indigo-600);
}

.checkbox-row label {
    margin: 0;
    cursor: pointer;
}

.copy-field {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.copy-field input {
    min-width: 0;
    flex: 1;
}

.project-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 4px;
    margin: -8px 0 24px;
    padding: 7px;
    overflow-x: auto;
    background: rgb(255 255 255 / 90%);
    border: 1px solid var(--slate-200);
    border-radius: 11px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    scrollbar-width: none;
}

.project-nav::-webkit-scrollbar {
    display: none;
}

.project-nav a {
    flex: 0 0 auto;
    padding: 7px 11px;
    color: var(--slate-600);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 650;
}

.project-nav a:hover,
.project-nav a.is-current {
    color: var(--indigo-700);
    background: var(--indigo-50);
}

.project-section {
    scroll-margin-top: 80px;
}

.asset-list {
    display: grid;
    gap: 2px;
    margin: -8px 0;
    padding: 0;
    list-style: none;
}

.asset-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--slate-200);
}

.asset-item:last-child {
    border-bottom: 0;
}

.asset-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    color: var(--indigo-600);
    background: var(--indigo-50);
    border-radius: 9px;
}

.asset-icon svg {
    width: 17px;
    height: 17px;
}

.asset-copy {
    min-width: 0;
    flex: 1;
}

.asset-title {
    display: block;
    overflow: hidden;
    color: var(--slate-950);
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-meta {
    margin-top: 2px;
    color: var(--slate-500);
    font-size: 11px;
}

.asset-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.subtle-panel {
    padding: 18px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
}

.subtle-panel h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.subtle-panel > p {
    margin: 0 0 14px;
    color: var(--slate-500);
    font-size: 12px;
}

.markdown-body {
    max-width: 880px;
    color: var(--slate-800);
    font-size: 14px;
    line-height: 1.72;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin: 1.5em 0 0.55em;
    color: var(--slate-950);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
    margin-top: 0;
}

.markdown-body h1 {
    font-size: 24px;
}

.markdown-body h2 {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--slate-200);
    font-size: 19px;
}

.markdown-body h3 {
    font-size: 16px;
}

.markdown-body pre,
.markdown-body code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.markdown-body code {
    padding: 2px 5px;
    color: #4338ca;
    background: var(--indigo-50);
    border-radius: 5px;
    font-size: 0.9em;
}

.markdown-body pre {
    padding: 16px;
    overflow-x: auto;
    color: #e5edf8;
    background: var(--navy-950);
    border-radius: 10px;
}

.markdown-body pre code {
    padding: 0;
    color: inherit;
    background: transparent;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
    padding: 8px 10px;
    text-align: left;
    border: 1px solid var(--slate-200);
}

.markdown-body blockquote {
    margin-left: 0;
    padding-left: 14px;
    color: var(--slate-600);
    border-left: 3px solid var(--indigo-300, #a5b4fc);
}

.disclosure {
    margin-top: 18px;
    border-top: 1px solid var(--slate-200);
}

.disclosure summary {
    padding: 16px 0 0;
    color: var(--indigo-700);
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
}

.workflow-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 22px;
    padding: 14px 16px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 10px;
}

.workflow-summary-item {
    min-width: 150px;
}

.workflow-summary-label {
    display: block;
    color: var(--slate-500);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.workflow-summary-value {
    display: block;
    margin-top: 2px;
    color: var(--slate-950);
    font-size: 13px;
    font-weight: 650;
}

.workflow-steps {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.workflow-step {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    min-height: 64px;
}

.workflow-step:not(:last-child)::before {
    position: absolute;
    top: 28px;
    bottom: -6px;
    left: 16px;
    width: 2px;
    content: "";
    background: var(--slate-200);
}

.workflow-step.is-complete:not(:last-child)::before {
    background: var(--green-100);
}

.workflow-node {
    position: relative;
    z-index: 1;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--slate-400);
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.workflow-step.is-complete .workflow-node {
    color: var(--white);
    background: var(--green-600);
    border-color: var(--green-600);
}

.workflow-step.is-current .workflow-node {
    color: var(--indigo-600);
    background: var(--indigo-50);
    border-color: var(--indigo-500);
    box-shadow: var(--focus-ring);
}

.workflow-copy {
    padding-top: 3px;
}

.workflow-title {
    display: block;
    color: var(--slate-800);
    font-size: 13px;
    font-weight: 650;
}

.workflow-meta {
    display: block;
    margin-top: 2px;
    color: var(--slate-500);
    font-size: 11px;
    word-break: break-word;
}

.timeline {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 22px;
}

.timeline-item:not(:last-child)::after {
    position: absolute;
    top: 13px;
    bottom: -1px;
    left: 5px;
    width: 1px;
    content: "";
    background: var(--slate-200);
}

.timeline-dot {
    position: relative;
    z-index: 1;
    width: 11px;
    height: 11px;
    margin-top: 5px;
    background: var(--white);
    border: 3px solid var(--indigo-500);
    border-radius: 50%;
}

.timeline-message {
    color: var(--slate-800);
    font-size: 13px;
    font-weight: 560;
}

.timeline-meta {
    margin-top: 3px;
    color: var(--slate-500);
    font-size: 11px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.settings-aside {
    position: sticky;
    top: 24px;
}

.settings-aside-nav {
    padding: 8px;
}

.settings-aside-nav a {
    display: block;
    padding: 8px 10px;
    color: var(--slate-600);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}

.settings-aside-nav a:hover {
    color: var(--indigo-700);
    background: var(--indigo-50);
}

.config-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--slate-700);
    font-size: 12px;
}

.auth-body {
    min-height: 100vh;
    background: var(--white);
}

.public-nav {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(24px, calc((100vw - 1180px) / 2));
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
}

.public-brand {
    color: var(--slate-950);
}

.public-brand:hover {
    color: var(--slate-950);
}

.public-brand .brand-mark {
    display: inline-grid;
    margin-right: 10px;
    vertical-align: middle;
}

.public-brand strong {
    font-size: 14px;
}

.public-main {
    min-height: calc(100vh - 72px);
}

.auth-layout {
    display: grid;
    min-height: calc(100vh - 72px);
    grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
}

.auth-story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(48px, 8vw, 110px);
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 20% 15%, rgb(99 102 241 / 40%), transparent 28%),
        radial-gradient(circle at 80% 85%, rgb(37 99 235 / 22%), transparent 32%),
        linear-gradient(150deg, #07111f 0%, #111f36 100%);
}

.auth-story::before,
.auth-story::after {
    position: absolute;
    content: "";
    border: 1px solid rgb(255 255 255 / 7%);
    border-radius: 50%;
}

.auth-story::before {
    right: -150px;
    bottom: -150px;
    width: 430px;
    height: 430px;
}

.auth-story::after {
    right: -82px;
    bottom: -82px;
    width: 290px;
    height: 290px;
}

.auth-story-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.auth-story h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 720;
    letter-spacing: -0.05em;
    line-height: 1.06;
}

.auth-story p {
    margin: 20px 0 0;
    color: #aebdd0;
    font-size: 16px;
    line-height: 1.65;
}

.auth-features {
    display: grid;
    gap: 12px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dbe4f0;
    font-size: 13px;
}

.auth-feature-check {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: #a5b4fc;
    background: rgb(99 102 241 / 18%);
    border-radius: 6px;
}

.auth-form-panel {
    display: grid;
    place-items: center;
    padding: 48px 28px;
    background: #fbfcfe;
}

.auth-form-card {
    width: 100%;
    max-width: 430px;
}

.auth-form-card h2 {
    margin: 0;
    color: var(--slate-950);
    font-size: 28px;
    font-weight: 720;
    letter-spacing: -0.035em;
}

.auth-intro {
    margin: 8px 0 28px;
    color: var(--slate-600);
}

.auth-switch {
    margin: 22px 0 0;
    color: var(--slate-600);
    font-size: 13px;
    text-align: center;
}

.auth-switch a {
    font-weight: 650;
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
}

.landing-hero {
    display: grid;
    min-height: calc(100vh - 72px);
    place-items: center;
    padding: 80px 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgb(99 102 241 / 13%), transparent 35%),
        linear-gradient(180deg, #fbfcff, var(--white));
}

.landing-content {
    max-width: 820px;
    text-align: center;
}

.landing-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: var(--indigo-700);
    background: var(--indigo-50);
    border: 1px solid var(--indigo-100);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.landing-content h1 {
    margin: 22px 0 0;
    font-size: clamp(42px, 7vw, 70px);
    font-weight: 740;
    letter-spacing: -0.06em;
    line-height: 1.02;
}

.landing-content h1 span {
    color: var(--indigo-600);
}

.landing-content > p {
    max-width: 650px;
    margin: 22px auto 28px;
    color: var(--slate-600);
    font-size: 17px;
}

.landing-features {
    display: grid;
    max-width: 860px;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 54px auto 0;
    text-align: left;
}

.landing-feature {
    padding: 18px;
    background: rgb(255 255 255 / 80%);
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    box-shadow: var(--shadow-xs);
}

.landing-feature strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.landing-feature span {
    color: var(--slate-600);
    font-size: 12px;
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.meta-list div {
    min-width: 0;
}

.meta-list dt {
    color: var(--slate-500);
    font-size: 11px;
    font-weight: 650;
}

.meta-list dd {
    margin: 3px 0 0;
    color: var(--slate-950);
    font-size: 13px;
    font-weight: 600;
    word-break: break-word;
}

.mobile-overlay {
    display: none;
}

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

    .settings-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .sidebar {
        width: min(86vw, 292px);
        transform: translateX(-102%);
        transition: transform 180ms ease;
    }

    .nav-open .sidebar {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgb(7 17 31 / 25%);
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: block;
        visibility: hidden;
        background: rgb(7 17 31 / 48%);
        border: 0;
        opacity: 0;
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .nav-open .mobile-overlay {
        visibility: visible;
        opacity: 1;
    }

    .app-content {
        margin-left: 0;
    }

    .mobile-bar {
        position: sticky;
        top: 0;
        z-index: 25;
        display: flex;
        height: 64px;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        background: rgb(255 255 255 / 92%);
        border-bottom: 1px solid var(--slate-200);
        backdrop-filter: blur(12px);
    }

    .mobile-brand {
        color: var(--slate-950);
        font-size: 14px;
        font-weight: 700;
    }

    .main-content {
        padding: 28px 20px 56px;
    }

    .content-grid,
    .content-grid-wide,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-aside {
        position: static;
    }

    .settings-aside-nav {
        display: flex;
        overflow-x: auto;
    }

    .settings-aside-nav a {
        flex: 0 0 auto;
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-story {
        display: none;
    }

    .auth-form-panel {
        min-height: calc(100vh - 72px);
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 24px 14px 48px;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 22px;
    }

    .page-actions .button {
        flex: 1;
    }

    .stats-grid,
    .form-grid,
    .meta-list,
    .landing-features {
        grid-template-columns: 1fr;
    }

    .projects-table {
        table-layout: fixed;
    }

    .projects-table th:nth-child(2),
    .projects-table th:nth-child(3),
    .projects-table th:nth-child(4),
    .projects-table th:nth-child(6),
    .projects-table td:nth-child(2),
    .projects-table td:nth-child(3),
    .projects-table td:nth-child(4),
    .projects-table td:nth-child(6) {
        display: none;
    }

    .projects-table th:nth-child(5),
    .projects-table td:nth-child(5) {
        width: 112px;
    }

    .projects-table th:last-child,
    .projects-table td:last-child {
        width: 70px;
    }

    .projects-table th,
    .projects-table td {
        padding-right: 10px;
        padding-left: 10px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        min-height: 100px;
        padding: 16px;
    }

    .stat-value {
        font-size: 26px;
    }

    .card-header,
    .card-body {
        padding: 18px;
    }

    .card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .card-footer {
        padding: 14px 18px;
    }

    .card-footer .button {
        flex: 1;
    }

    .copy-field {
        flex-direction: column;
    }

    .public-nav {
        min-height: 64px;
        padding: 0 16px;
    }

    .public-nav .button {
        min-height: 36px;
        padding: 7px 11px;
    }

    .public-main,
    .auth-layout {
        min-height: calc(100vh - 64px);
    }

    .auth-form-panel {
        padding: 36px 20px;
    }

    .landing-hero {
        padding: 54px 18px;
    }

    .landing-content h1 {
        font-size: 42px;
    }

    .landing-content > p {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
