/* AWS Console-inspired product skin: dense, operational, and deliberately flat. */
:root {
    --navy-950: #161e2d;
    --navy-900: #232f3e;
    --navy-800: #31465f;
    --slate-950: #16191f;
    --slate-800: #232f3e;
    --slate-700: #414d5c;
    --slate-600: #5f6b7a;
    --slate-500: #687078;
    --slate-400: #879196;
    --slate-300: #aab7b8;
    --slate-200: #d5dbdb;
    --slate-100: #eaeded;
    --slate-50: #f7f8f8;
    --white: #ffffff;
    --indigo-700: #005276;
    --indigo-600: #0073bb;
    --indigo-500: #00a1c9;
    --indigo-100: #aab7b8;
    --indigo-50: #f1faff;
    --blue-600: #0073bb;
    --blue-100: #a6d8ed;
    --blue-50: #f1faff;
    --green-700: #1d8102;
    --green-600: #1d8102;
    --green-100: #b7df9f;
    --green-50: #f2f8f0;
    --amber-700: #8a4b00;
    --amber-600: #ec7211;
    --amber-100: #f8d6ad;
    --amber-50: #fff7e8;
    --red-700: #d13212;
    --red-600: #d13212;
    --red-100: #f7b2a4;
    --red-50: #fff7f5;
    --purple-700: #5f3f9e;
    --purple-100: #d7c8ef;
    --aws-orange: #ff9900;
    --aws-orange-dark: #ec7211;
    --aws-blue: #0073bb;
    --aws-header: #161e2d;
    --aws-header-secondary: #232f3e;
    --sidebar-width: 232px;
    --content-width: 1600px;
    --radius-sm: 2px;
    --radius-md: 2px;
    --radius-lg: 2px;
    --shadow-xs: none;
    --shadow-sm: 0 1px 2px rgb(22 25 31 / 12%);
    --shadow-md: 0 2px 5px rgb(22 25 31 / 16%);
    --focus-ring: 0 0 0 2px rgb(0 115 187 / 28%);
}

body {
    color: var(--slate-950);
    background: var(--white);
    font-family: "Amazon Ember", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

a {
    color: var(--aws-blue);
}

a:hover {
    color: #005276;
    text-decoration: underline;
}

:focus-visible {
    outline-color: var(--aws-blue);
}

.global-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    display: flex;
    height: 44px;
    align-items: stretch;
    color: var(--white);
    background: var(--aws-header);
    box-shadow: 0 1px 0 rgb(0 0 0 / 35%);
}

.global-brand,
.global-service,
.global-header-link,
.global-context,
.global-account {
    color: #f2f3f3;
    border-right: 1px solid #39485a;
}

.global-brand {
    display: flex;
    min-width: var(--sidebar-width);
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 700;
}

.global-brand:hover,
.global-service:hover,
.global-header-link:hover {
    color: var(--white);
    background: var(--aws-header-secondary);
    text-decoration: none;
}

.global-brand-mark {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: var(--aws-header);
    background: var(--aws-orange);
    border-radius: 2px;
    font-size: 13px;
    font-weight: 800;
}

.global-service {
    display: flex;
    min-width: 110px;
    align-items: center;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
}

.global-header-spacer {
    min-width: 20px;
    flex: 1;
    background-image: linear-gradient(90deg, transparent, rgb(255 255 255 / 2%));
}

.global-context,
.global-account {
    display: flex;
    min-width: 112px;
    flex-direction: column;
    justify-content: center;
    padding: 0 16px;
    border-right: 0;
    border-left: 1px solid #39485a;
    font-size: 11px;
    line-height: 1.15;
}

.global-context span,
.global-account span {
    color: #aab7b8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.global-account {
    max-width: 245px;
}

.global-account strong {
    margin-top: 2px;
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-header-link {
    display: grid;
    width: 44px;
    place-items: center;
    border-left: 1px solid #39485a;
}

.global-header-link svg,
.global-menu-button svg {
    width: 17px;
    height: 17px;
}

.global-menu-button {
    display: none;
}

.app-shell {
    min-height: 100vh;
    padding-top: 44px;
}

.sidebar {
    top: 44px;
    width: var(--sidebar-width);
    color: var(--slate-800);
    background: #f2f3f3;
    border-right: 1px solid #d5dbdb;
}

.sidebar-service-heading {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--white);
    border-bottom: 1px solid #d5dbdb;
}

.sidebar-service-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    color: var(--white);
    background: #527fff;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 800;
}

.sidebar-service-heading strong,
.sidebar-service-heading small {
    display: block;
}

.sidebar-service-heading strong {
    color: var(--slate-950);
    font-size: 16px;
}

.sidebar-service-heading small {
    margin-top: 1px;
    color: var(--slate-500);
    font-size: 11px;
}

.sidebar-nav {
    padding: 14px 0 20px;
}

.nav-section + .nav-section {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #d5dbdb;
}

.nav-label {
    margin: 0 16px 7px;
    color: var(--slate-600);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.055em;
}

.nav-link {
    min-height: 34px;
    gap: 9px;
    margin: 0;
    padding: 7px 14px;
    color: var(--slate-800);
    border-left: 3px solid transparent;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--slate-950);
    background: #eaeded;
    text-decoration: none;
}

.nav-link.is-active {
    color: var(--slate-950);
    background: var(--white);
    border-left-color: var(--aws-orange);
    box-shadow: none;
    font-weight: 700;
}

.nav-icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
    color: var(--slate-600);
}

.nav-link.is-active .nav-icon {
    color: var(--aws-orange-dark);
}

.sidebar-footer {
    padding: 10px 12px 12px;
    background: #eaeded;
    border-top: 1px solid #d5dbdb;
}

.account-card {
    gap: 8px;
    padding: 5px 4px;
}

.avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    color: var(--slate-800);
    background: var(--white);
    border: 1px solid #aab7b8;
    border-radius: 2px;
    font-size: 11px;
}

.account-organization {
    color: var(--slate-800);
    font-size: 12px;
}

.account-email {
    color: var(--slate-500);
    font-size: 10px;
}

.logout-link {
    margin-top: 4px;
    padding: 6px 4px;
    color: var(--slate-600);
    border-radius: 0;
    font-size: 11px;
}

.logout-link:hover {
    color: var(--aws-blue);
    background: transparent;
}

.app-content {
    min-height: calc(100vh - 44px);
    margin-left: var(--sidebar-width);
    background: var(--white);
}

.main-content {
    max-width: var(--content-width);
    margin: 0;
    padding: 24px 28px 56px;
}

.page-header {
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eaeded;
}

.page-kicker,
.eyebrow {
    margin-bottom: 4px;
    color: var(--slate-600);
    font-size: 10px;
    letter-spacing: 0.045em;
}

.page-header h1,
.page-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.page-description {
    margin-top: 5px;
    color: var(--slate-600);
    font-size: 13px;
}

.breadcrumbs {
    gap: 6px;
    margin-bottom: 7px;
    font-size: 12px;
}

.breadcrumbs a {
    color: var(--aws-blue);
}

.button,
button.button {
    min-height: 34px;
    padding: 7px 14px;
    color: #16191f;
    background: var(--aws-orange);
    border: 1px solid var(--aws-orange-dark);
    border-radius: 2px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 28%);
    font-size: 12px;
    font-weight: 700;
}

.button:hover,
button.button:hover {
    color: #16191f;
    background: #ec8b00;
    border-color: #d76d00;
    box-shadow: none;
    text-decoration: none;
}

.button-secondary,
button.button-secondary {
    color: var(--slate-800);
    background: var(--white);
    border-color: #879196;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 50%);
}

.button-secondary:hover,
button.button-secondary:hover {
    color: var(--slate-950);
    background: #eaeded;
    border-color: #687078;
}

.button-quiet,
button.button-quiet {
    color: var(--aws-blue);
    background: transparent;
    border-color: transparent;
}

.button-quiet:hover,
button.button-quiet:hover {
    color: #005276;
    background: #f1faff;
}

.button-danger,
button.button-danger {
    color: #d13212;
    background: var(--white);
    border-color: #d13212;
}

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

.button-sm,
button.button-sm {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 11px;
}

.button-lg,
button.button-lg {
    min-height: 38px;
    padding: 8px 16px;
    font-size: 13px;
}

.icon-button {
    border-radius: 2px;
}

.card {
    background: var(--white);
    border-color: #d5dbdb;
    border-radius: 2px;
    box-shadow: none;
}

.card-header {
    gap: 16px;
    padding: 14px 16px;
    background: #fafafa;
    border-bottom-color: #d5dbdb;
}

.card-header h2,
.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

.card-header p {
    margin-top: 2px;
    color: var(--slate-600);
    font-size: 12px;
}

.card-body {
    padding: 16px;
}

.card-footer {
    padding: 11px 16px;
    background: #f7f8f8;
    border-top-color: #d5dbdb;
    border-radius: 0;
}

.section-stack {
    gap: 18px;
}

.content-grid {
    gap: 18px;
}

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

.stats-grid {
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    min-height: 94px;
    padding: 15px 16px 13px;
    background: var(--white);
    border: 1px solid #d5dbdb;
    border-top: 3px solid var(--aws-orange);
    border-radius: 2px;
    box-shadow: none;
}

.stat-card::after {
    display: none;
}

.stat-label {
    color: var(--slate-700);
    font-size: 12px;
}

.stat-value {
    margin-top: 5px;
    font-size: 25px;
    font-weight: 700;
}

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

.data-table {
    font-size: 12px;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    border-bottom-color: #eaeded;
}

.data-table th {
    color: var(--slate-700);
    background: #f2f3f3;
    border-top: 1px solid #eaeded;
    font-size: 10px;
    letter-spacing: 0.035em;
}

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

.table-primary {
    color: var(--aws-blue);
}

.table-secondary {
    margin-top: 1px;
    color: var(--slate-500);
    font-size: 10px;
}

.status-badge,
.config-badge {
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 700;
}

.status-badge::before,
.config-badge::before {
    width: 5px;
    height: 5px;
}

.milestone {
    font-size: 11px;
}

.milestone-icon {
    width: 14px;
    height: 14px;
}

.empty-state {
    min-height: 210px;
    padding: 36px 20px;
}

.empty-state.compact {
    min-height: 140px;
    padding: 24px 16px;
}

.empty-state-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    color: var(--aws-orange-dark);
    background: #fff7e8;
    border-color: #f8d6ad;
    border-radius: 2px;
}

.empty-state h3 {
    font-size: 14px;
}

.message-stack {
    gap: 6px;
    margin-bottom: 16px;
}

.message {
    padding: 9px 11px;
    border-radius: 2px;
    box-shadow: none;
    font-size: 12px;
}

.alert {
    padding: 11px 13px;
    border-radius: 2px;
}

.form-stack {
    gap: 14px;
}

.form-grid {
    gap: 14px 16px;
}

.form-field > label,
.field-label {
    margin-bottom: 4px;
    font-size: 12px;
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea,
.input-control {
    min-height: 34px;
    padding: 6px 8px;
    border-color: #879196;
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgb(22 25 31 / 8%);
    font-size: 13px;
}

.form-field textarea {
    min-height: 84px;
}

.form-help {
    margin-top: 4px;
    color: var(--slate-500);
    font-size: 10px;
}

.form-error,
.errorlist {
    font-size: 11px;
}

.field-group + .field-group {
    margin-top: 22px;
    padding-top: 22px;
}

.field-group legend {
    margin-bottom: 13px;
    font-size: 13px;
}

.field-group-description {
    margin: -9px 0 14px;
    font-size: 11px;
}

.checkbox-row {
    padding: 8px 9px;
    background: #f7f8f8;
    border-radius: 2px;
}

.subtle-panel {
    padding: 14px;
    background: #f7f8f8;
    border-radius: 2px;
}

.subtle-panel h3 {
    font-size: 13px;
}

.project-nav {
    top: 44px;
    gap: 0;
    margin: -4px 0 18px;
    padding: 0;
    background: var(--white);
    border: 0;
    border-bottom: 1px solid #aab7b8;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.project-nav a {
    padding: 9px 13px 8px;
    color: var(--slate-700);
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-size: 11px;
}

.project-nav a:hover,
.project-nav a.is-current {
    color: var(--slate-950);
    background: #f7f8f8;
    border-bottom-color: var(--aws-orange);
    text-decoration: none;
}

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

.asset-item {
    gap: 9px;
    padding: 9px 0;
}

.asset-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    color: var(--aws-blue);
    background: #f1faff;
    border: 1px solid #a6d8ed;
    border-radius: 2px;
}

.asset-title {
    color: var(--aws-blue);
    font-size: 12px;
}

.asset-meta {
    font-size: 10px;
}

.markdown-body {
    font-size: 13px;
    line-height: 1.6;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    letter-spacing: 0;
}

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

.markdown-body h2 {
    font-size: 17px;
}

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

.markdown-body code {
    color: #5f3f9e;
    background: #f5f1fa;
    border-radius: 2px;
}

.markdown-body pre {
    color: #f2f3f3;
    background: #232f3e;
    border-radius: 2px;
}

.workflow-summary {
    gap: 16px;
    margin-bottom: 18px;
    padding: 10px 12px;
    background: #f2f3f3;
    border-radius: 2px;
}

.workflow-step {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 54px;
}

.workflow-step:not(:last-child)::before {
    top: 24px;
    left: 13px;
}

.workflow-node {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 10px;
}

.workflow-step.is-current .workflow-node {
    color: #16191f;
    background: #fff7e8;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 2px rgb(255 153 0 / 18%);
}

.workflow-title,
.timeline-message {
    font-size: 12px;
}

.workflow-meta,
.timeline-meta {
    font-size: 10px;
}

.timeline-item {
    padding-bottom: 17px;
}

.timeline-dot {
    border-color: var(--aws-orange);
}

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

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

.settings-aside-nav a {
    padding: 7px 9px;
    color: var(--aws-blue);
    border-radius: 1px;
    font-size: 11px;
}

.settings-aside-nav a:hover {
    background: #f1faff;
}

.config-item {
    font-size: 11px;
}

/* Public and authentication surfaces use the same console visual language. */
.public-nav {
    min-height: 48px;
    padding: 0 max(20px, calc((100vw - 1180px) / 2));
    color: var(--white);
    background: var(--aws-header);
    border-bottom: 3px solid var(--aws-orange);
}

.public-brand,
.public-brand:hover {
    color: var(--white);
    text-decoration: none;
}

.public-brand .brand-mark {
    width: 26px;
    height: 26px;
    margin-right: 8px;
    color: var(--aws-header);
    background: var(--aws-orange);
    border: 0;
    border-radius: 2px;
    box-shadow: none;
    font-size: 13px;
}

.public-nav .button-secondary {
    color: var(--white);
    background: transparent;
    border-color: #879196;
}

.public-nav .button-secondary:hover {
    color: var(--white);
    background: #232f3e;
}

.public-main {
    min-height: calc(100vh - 48px);
    background: #f2f3f3;
}

.auth-layout {
    display: grid;
    min-height: calc(100vh - 48px);
    grid-template-columns: 1fr;
}

.auth-story {
    display: none;
}

.auth-form-panel {
    min-height: calc(100vh - 48px);
    padding: 40px 20px;
    background: #f2f3f3;
}

.auth-form-card {
    max-width: 450px;
    padding: 30px 32px;
    background: var(--white);
    border: 1px solid #aab7b8;
    border-top: 4px solid var(--aws-orange);
    box-shadow: 0 1px 3px rgb(22 25 31 / 15%);
}

.auth-form-card h2 {
    font-size: 23px;
    letter-spacing: -0.01em;
}

.auth-intro {
    margin: 5px 0 22px;
    font-size: 13px;
}

.auth-switch {
    margin-top: 18px;
    font-size: 12px;
}

.landing-hero {
    display: block;
    min-height: calc(100vh - 48px);
    padding: 64px max(24px, calc((100vw - 1180px) / 2));
    background:
        linear-gradient(90deg, rgb(255 153 0 / 8%) 1px, transparent 1px),
        linear-gradient(rgb(255 153 0 / 8%) 1px, transparent 1px),
        #f2f3f3;
    background-size: 32px 32px;
}

.landing-content {
    max-width: 1180px;
    text-align: left;
}

.landing-label {
    padding: 4px 7px;
    color: #8a4b00;
    background: #fff7e8;
    border-color: #f8d6ad;
    border-radius: 2px;
    font-size: 10px;
}

.landing-content h1 {
    max-width: 760px;
    margin-top: 18px;
    font-size: clamp(38px, 5vw, 54px);
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.landing-content h1 span {
    color: var(--slate-950);
    border-bottom: 5px solid var(--aws-orange);
}

.landing-content > p {
    max-width: 650px;
    margin: 17px 0 22px;
    font-size: 15px;
}

.landing-content .inline-actions {
    justify-content: flex-start !important;
}

.landing-features {
    max-width: 900px;
    gap: 12px;
    margin: 44px 0 0;
}

.landing-feature {
    min-height: 118px;
    padding: 16px;
    background: var(--white);
    border: 1px solid #d5dbdb;
    border-top: 3px solid #879196;
    border-radius: 2px;
    box-shadow: none;
}

.landing-feature strong {
    font-size: 13px;
}

.landing-feature span {
    font-size: 11px;
}

.meta-list {
    gap: 12px;
}

.meta-list dt {
    font-size: 10px;
}

.meta-list dd {
    font-size: 12px;
}

@media (max-width: 860px) {
    .global-menu-button {
        display: grid;
        width: 44px;
        padding: 0;
        place-items: center;
        color: var(--white);
        background: transparent;
        border: 0;
        border-right: 1px solid #39485a;
        cursor: pointer;
    }

    .global-brand {
        min-width: 0;
        padding: 0 12px;
    }

    .global-service {
        min-width: 0;
        padding: 0 12px;
    }

    .global-context,
    .global-header-link {
        display: none;
    }

    .global-account {
        min-width: 0;
        max-width: 180px;
    }

    .sidebar {
        top: 44px;
        width: min(82vw, 260px);
        box-shadow: none;
    }

    .nav-open .sidebar {
        box-shadow: 8px 0 18px rgb(22 25 31 / 22%);
    }

    .mobile-overlay {
        top: 44px;
    }

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

    .main-content {
        padding: 20px 18px 48px;
    }

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

    .project-nav {
        top: 44px;
    }
}

@media (max-width: 640px) {
    .global-brand span:last-child,
    .global-account span,
    .global-account strong {
        display: none;
    }

    .global-brand {
        width: 48px;
        padding: 0 11px;
    }

    .global-service {
        font-size: 12px;
    }

    .global-account {
        width: 0;
        padding: 0;
        border: 0;
    }

    .main-content {
        padding: 16px 12px 40px;
    }

    .page-header {
        gap: 13px;
        margin-bottom: 16px;
        padding-bottom: 13px;
    }

    .page-header h1,
    .page-title {
        font-size: 23px;
    }

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

    .stat-card {
        min-height: 86px;
        padding: 12px;
    }

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

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

    .card-footer {
        padding: 10px 13px;
    }

    .project-nav a {
        padding: 8px 10px 7px;
    }

    .public-nav {
        min-height: 48px;
        padding: 0 12px;
    }

    .auth-form-panel {
        min-height: calc(100vh - 48px);
        padding: 24px 12px;
    }

    .auth-form-card {
        padding: 24px 20px;
    }

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

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

    .landing-features {
        margin-top: 34px;
    }
}
