:root {
    --bg: #f3f6f8;
    --panel: #ffffff;
    --line: #d8e1e8;
    --line-soft: #edf2f5;
    --text: #1f2933;
    --muted: #607080;
    --brand: #126c84;
    --brand-dark: #0e5264;
    --brand-soft: #e7f4f7;
    --danger: #b42318;
    --shadow: 0 8px 24px rgba(31, 41, 51, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

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

a:hover {
    color: var(--brand-dark);
}

h1 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: 0;
}

h2 {
    margin: 0 0 14px;
    font-size: 17px;
    letter-spacing: 0;
}

h3 {
    margin: 0 0 4px;
    font-size: 18px;
    letter-spacing: 0;
}

button,
.button {
    border: 0;
    border-radius: 7px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 700;
    padding: 10px 14px;
}

button:hover,
.button:hover {
    background: var(--brand-dark);
    color: #fff;
}

.button-secondary {
    background: #eef4f7;
    color: var(--brand-dark);
}

.button-secondary:hover {
    background: #dcebf0;
    color: var(--brand-dark);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px 11px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
    outline: 0;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #f8fbfc;
}

th {
    background: #f8fafb;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.topbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    min-height: 68px;
    padding: 0 32px;
}

.brand-lockup {
    align-items: center;
    display: flex;
    gap: 11px;
}

.brand-mark {
    align-items: center;
    background: var(--brand);
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    width: 32px;
}

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

.sidebar {
    background: #ffffff;
    border-right: 1px solid var(--line);
    padding: 22px 18px;
}

.sidebar a {
    border-radius: 7px;
    color: var(--text);
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    padding: 11px 12px;
}

.sidebar a.active,
.sidebar a:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.nav-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    margin: 18px 12px 7px;
    text-transform: uppercase;
}

.content {
    padding: 30px 36px 40px;
}

.breadcrumbs {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 18px;
}

.dashboard-hero {
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #edf7f9 100%);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 24px;
}

.dashboard-hero h1 {
    margin-bottom: 6px;
}

.eyebrow {
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.page-head {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.grid {
    display: grid;
    gap: 16px;
}

.stats {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    margin: 20px 0;
}

.dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stats div,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.panel {
    margin-bottom: 18px;
}

.stats div {
    border-left: 4px solid var(--brand);
}

.stats .metric-card {
    border-left: 0;
    min-height: 124px;
    position: relative;
}

.stats .metric-card::before {
    background: var(--brand);
    border-radius: 999px;
    content: "";
    height: 4px;
    left: 18px;
    position: absolute;
    right: 18px;
    top: 0;
}

.stats span {
    display: block;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 7px;
}

.stats .metric-card small {
    display: block;
    font-weight: 800;
    margin-bottom: 14px;
}

.stats .metric-card em {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-style: normal;
    margin-top: 6px;
}

.stats small,
.muted {
    color: var(--muted);
}

.dashboard-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    margin-bottom: 18px;
}

.section-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-head h2 {
    margin: 0;
}

.feature-panel {
    margin-bottom: 0;
}

.action-panel {
    margin-bottom: 0;
}

.deployment-card {
    align-items: flex-start;
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr);
}

.deployment-avatar {
    align-items: center;
    background: var(--brand);
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    font-size: 24px;
    font-weight: 800;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.meta-row {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 10px;
    margin-top: 12px;
}

.meta-row span {
    background: #f4f8fa;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 6px 9px;
}

.note-box {
    background: #f8fbfc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    margin-top: 18px;
    padding: 14px;
}

.note-box p {
    color: var(--muted);
    margin: 6px 0 0;
}

.quick-link-list {
    display: grid;
    gap: 10px;
}

.quick-link-list a {
    background: #f8fbfc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--text);
    display: grid;
    gap: 3px;
    padding: 13px;
}

.quick-link-list a:hover {
    border-color: var(--brand);
    color: var(--brand-dark);
}

.quick-link-list span {
    color: var(--muted);
    font-size: 13px;
}

.status-list {
    display: grid;
    gap: 10px;
}

.status-list div {
    align-items: center;
    background: #f8fbfc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    padding: 12px;
}

.status-list strong {
    font-size: 18px;
}

.family-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.family-grid div {
    background: #f8fbfc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    padding: 12px;
}

.family-grid span {
    color: var(--muted);
}

.activity-table td:first-child {
    color: var(--muted);
    white-space: nowrap;
}

.client-hero {
    margin-bottom: 16px;
}

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

.client-dashboard-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    margin-bottom: 18px;
}

.client-main-panel,
.client-side-panel {
    margin-bottom: 0;
}

.deployment-list {
    display: grid;
    gap: 10px;
}

.deployment-list article {
    align-items: center;
    background: #f8fbfc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px;
}

.deployment-list strong {
    display: block;
    margin-bottom: 4px;
}

.deployment-list span {
    color: var(--muted);
    display: block;
    font-size: 13px;
}

.settings-summary {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.settings-summary h2 {
    margin-bottom: 6px;
}

.badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 8px;
    text-transform: uppercase;
}

.status-active,
.status-resolved,
.status-approved {
    background: #e7f6ec;
    color: #16723a;
}

.status-open,
.status-pending,
.status-onboarding,
.status-provisioning,
.status-lead,
.status-quoted,
.status-draft {
    background: #fff7df;
    color: #8a5a00;
}

.status-paused,
.status-archived,
.status-cancelled,
.status-closed,
.status-disabled {
    background: #eef2f5;
    color: #4c5965;
}

.status-failed,
.status-urgent {
    background: #fff0ef;
    color: var(--danger);
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.form {
    display: grid;
    gap: 15px;
}

.wide {
    max-width: 980px;
}

.form-grid,
.detail-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.actions,
.action-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

code {
    background: #eef2f5;
    border-radius: 5px;
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 2px 5px;
}

.alert {
    background: #fff0ef;
    border: 1px solid #f1a39d;
    border-radius: 7px;
    color: var(--danger);
    margin: 12px 0;
    padding: 11px 12px;
}

.auth-page {
    align-items: center;
    background: #eef4f7;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.auth-box {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 430px;
    padding: 30px;
    width: calc(100% - 32px);
}

@media (max-width: 760px) {
    .topbar {
        padding: 0 16px;
    }

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

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 12px;
    }

    .nav-label {
        display: none;
    }

    .sidebar a {
        margin-bottom: 0;
        white-space: nowrap;
    }

    .content {
        padding: 18px;
    }

    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-actions {
        justify-content: flex-start;
    }

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

    .client-stats,
    .client-dashboard-grid {
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 26px;
    }

    .topbar {
        gap: 12px;
        min-height: 64px;
    }

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

    .brand-lockup strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-mark {
        flex: 0 0 32px;
    }

    .topbar button {
        padding: 9px 11px;
    }

    .content {
        padding: 14px;
    }

    .dashboard-hero {
        border-radius: 8px;
        padding: 18px;
    }

    .hero-actions,
    .hero-actions .button,
    .settings-summary .button {
        width: 100%;
    }

    .hero-actions .button,
    .settings-summary .button {
        text-align: center;
    }

    .stats .metric-card {
        min-height: auto;
    }

    .panel {
        padding: 14px;
    }

    .section-head,
    .settings-summary,
    .deployment-list article {
        align-items: flex-start;
        flex-direction: column;
    }

    .deployment-list article {
        gap: 10px;
    }

    table.responsive-table {
        border: 0;
        display: table;
        overflow: visible;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 8px;
        margin-bottom: 10px;
        overflow: hidden;
    }

    .responsive-table td {
        align-items: flex-start;
        border-bottom: 1px solid var(--line-soft);
        display: flex;
        gap: 12px;
        justify-content: space-between;
        padding: 11px 12px;
    }

    .responsive-table td:last-child {
        border-bottom: 0;
    }

    .responsive-table td::before {
        color: var(--muted);
        content: attr(data-label);
        flex: 0 0 86px;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .responsive-table td[colspan] {
        display: block;
    }

    .responsive-table td[colspan]::before {
        content: "";
        display: none;
    }
}

@media (max-width: 360px) {
    .topbar {
        padding: 0 10px;
    }

    .brand-lockup {
        gap: 8px;
    }

    .brand-lockup strong {
        max-width: 175px;
    }

    .sidebar {
        padding: 10px;
    }

    .sidebar a {
        padding: 9px 10px;
    }

    .content {
        padding: 12px;
    }

    h1 {
        font-size: 24px;
    }
}


/* SaaSv3 UI Polish Hotfix - 2026-05-18
   Scope: global premium polish + deployment detail usability. */
:root {
    --bg: #eef3f7;
    --panel: #ffffff;
    --panel-soft: #f8fbfd;
    --line: #d7e2ea;
    --line-soft: #edf3f7;
    --text: #172331;
    --muted: #667789;
    --brand: #126c84;
    --brand-dark: #0b4f62;
    --brand-soft: #e8f5f8;
    --brand-ink: #073543;
    --success: #16803f;
    --warning: #9a6400;
    --danger: #b42318;
    --shadow: 0 10px 28px rgba(15, 35, 48, 0.07);
    --shadow-soft: 0 4px 14px rgba(15, 35, 48, 0.05);
}

body {
    background:
        radial-gradient(circle at top left, rgba(18,108,132,0.10), transparent 28rem),
        linear-gradient(180deg, #f7fafc 0%, var(--bg) 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

.topbar {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(215,226,234,0.8);
    min-height: 72px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand-mark {
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(18, 108, 132, 0.20);
}

.shell {
    grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(10px);
    padding: 24px 18px;
}

.sidebar a {
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 5px;
    padding: 11px 13px;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.sidebar a.active,
.sidebar a:hover {
    background: linear-gradient(135deg, var(--brand-soft), #f7fcfd);
    border-color: #cce5ec;
    color: var(--brand-dark);
}

.sidebar a:hover {
    transform: translateX(2px);
}

.nav-label {
    font-size: 10px;
    letter-spacing: 0.06em;
}

.content {
    max-width: 1480px;
    padding: 34px 42px 52px;
    width: 100%;
}

.breadcrumbs {
    font-size: 12px;
    letter-spacing: 0.01em;
}

h1 {
    color: #172331;
    font-size: 30px;
    line-height: 1.15;
}

h2 {
    color: #1f2e3d;
    font-size: 18px;
}

.panel,
.stats div,
.auth-box {
    border: 1px solid rgba(215,226,234,0.95);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.panel {
    margin-bottom: 20px;
    padding: 20px;
}

table {
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

th {
    background: #f5f8fb;
    color: #586a7b;
    font-size: 11px;
    letter-spacing: 0.04em;
}

td {
    font-size: 14px;
}

button,
.button {
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(18,108,132,0.12);
    transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

button:hover,
.button:hover {
    box-shadow: 0 10px 18px rgba(18,108,132,0.18);
    transform: translateY(-1px);
}

input,
select,
textarea {
    border-radius: 10px;
}

.badge {
    border: 1px solid transparent;
    letter-spacing: 0.04em;
    padding: 7px 9px;
}

.status-active,
.status-resolved,
.status-approved {
    background: #e8f8ef;
    border-color: #bee8ce;
    color: var(--success);
}

.status-open,
.status-pending,
.status-onboarding,
.status-provisioning,
.status-lead,
.status-quoted,
.status-draft {
    background: #fff7e6;
    border-color: #ffe1a3;
    color: var(--warning);
}

.status-failed,
.status-urgent {
    background: #fff0ef;
    border-color: #f4c7c2;
}

.detail-grid p {
    background: var(--panel-soft);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    margin: 0;
    padding: 13px 14px;
}

.detail-grid strong {
    color: var(--muted);
    display: block;
    font-size: 11px;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

/* Deployment detail polish */
.deployment-hero {
    align-items: flex-start;
    background: linear-gradient(135deg, #ffffff 0%, #eef8fb 100%);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 24px;
}

.deployment-title-block {
    min-width: 0;
}

.deployment-kicker {
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.deployment-subtitle {
    color: var(--muted);
    margin: 8px 0 0;
}

.deployment-hero-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 170px;
}

.deployment-tabs {
    background: rgba(255,255,255,0.78);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
    overflow-x: auto;
    padding: 8px;
    position: sticky;
    top: 84px;
    z-index: 10;
}

.deployment-tabs a {
    border-radius: 10px;
    color: var(--text);
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
    padding: 9px 12px;
}

.deployment-tabs a:hover {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.section-anchor {
    scroll-margin-top: 150px;
}

.route-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.route-chip {
    background: var(--panel-soft);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    padding: 7px 10px;
}

.route-chip strong {
    color: var(--text);
}

.route-target {
    color: #33495b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    max-width: 560px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-editor-list {
    display: grid;
    gap: 10px;
}

.route-editor-item {
    background: var(--panel-soft);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    overflow: hidden;
}

.route-editor-item summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(220px, 1fr) 120px minmax(220px, 1.4fr) 70px;
    list-style: none;
    padding: 13px 14px;
}

.route-editor-item summary::-webkit-details-marker {
    display: none;
}

.route-editor-item summary::after {
    color: var(--brand);
    content: "Edit";
    font-size: 12px;
    font-weight: 800;
    justify-self: end;
    text-transform: uppercase;
}

.route-editor-item[open] summary {
    border-bottom: 1px solid var(--line-soft);
}

.route-editor-form {
    padding: 14px;
}

.route-editor-form .form-grid {
    grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .75fr) minmax(220px, 1.4fr) minmax(90px, .4fr) minmax(90px, .35fr);
}

.route-editor-form button {
    width: 100%;
}

.table-wrap {
    overflow-x: auto;
}

@media (max-width: 900px) {
    .deployment-hero {
        flex-direction: column;
    }

    .deployment-hero-actions {
        align-items: flex-start;
        min-width: 0;
    }

    .route-editor-item summary {
        grid-template-columns: 1fr;
    }

    .route-editor-item summary::after {
        justify-self: start;
    }

    .route-target {
        max-width: 100%;
        white-space: normal;
    }
}

@media (max-width: 760px) {
    .topbar {
        position: static;
    }

    .deployment-tabs {
        position: static;
    }

    .content {
        padding: 18px;
    }
}

/* Demo Library Sales Upgrade - 2026-05-18 */
.demo-hero {
    background:
        radial-gradient(circle at top right, rgba(18,108,132,0.16), transparent 18rem),
        linear-gradient(135deg, #ffffff 0%, #eef8fb 100%);
}

.demo-stats .metric-card span {
    color: var(--brand-dark);
}

.demo-playbook-panel {
    border-left: 4px solid var(--brand);
}

.demo-flow {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.demo-flow div,
.demo-card,
.demo-pricing-grid div,
.demo-instruction-list article,
.addon-fit-grid article {
    background: #f8fbfc;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 14px;
}

.demo-flow strong,
.demo-flow span,
.demo-card-meta strong,
.demo-card-meta span,
.demo-pricing-grid strong,
.demo-pricing-grid span {
    display: block;
}

.demo-flow span,
.demo-card-meta span,
.demo-instruction-list p,
.addon-fit-grid p,
.addon-fit-grid small {
    color: var(--muted);
}

.demo-category-section h2 {
    margin: 0;
}

.demo-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
}

.demo-card h3 {
    margin: 0;
}

.demo-card p {
    color: var(--muted);
    margin: 0;
}

.demo-card-top {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.demo-card-meta {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    margin-top: auto;
}

.demo-card-meta span {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    padding: 10px;
}

.demo-card-meta strong {
    color: var(--text);
    font-size: 11px;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.demo-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.demo-chip-row span {
    background: #fff;
    border: 1px solid #cfe4eb;
    border-radius: 999px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 9px;
}

.demo-detail-head {
    align-items: flex-start;
}

.demo-overview-panel {
    border-left: 4px solid var(--brand);
}

.demo-pricing-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.demo-pricing-grid span {
    color: var(--brand-dark);
    font-size: 20px;
    font-weight: 800;
    margin-top: 6px;
}

.demo-instruction-list {
    display: grid;
    gap: 12px;
}

.demo-instruction-list strong {
    display: block;
    font-size: 15px;
    margin-bottom: 6px;
}

.demo-instruction-list p {
    margin: 0;
}

.addon-fit-grid {
    margin: 12px 0 18px;
}

.addon-fit-grid article h3 {
    margin: 10px 0 7px;
}


/* Phoenix Medical Dashboard Demo v1 */
.medical-hero {
    background: linear-gradient(135deg, rgba(18,108,132,.12), rgba(43,166,137,.10));
    border: 1px solid rgba(18,108,132,.16);
}
.small-hero { margin-bottom: 18px; }
.medical-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.medical-dashboard-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .9fr);
    margin-bottom: 18px;
}
.medical-main-panel, .medical-side-panel { min-width: 0; }
.runtime-card {
    border: 1px solid rgba(18,108,132,.14);
    border-radius: 16px;
    padding: 14px;
    background: rgba(255,255,255,.74);
    display: grid;
    gap: 8px;
}
.medical-feed {
    display: grid;
    gap: 12px;
}
.medical-feed article {
    border: 1px solid rgba(18,108,132,.12);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}
.medical-feed article div,
.medical-feed footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.medical-feed p { margin: 8px 0; }
.medical-feed span, .medical-feed small { color: #64748b; font-size: 12px; }
.medical-boundary-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.medical-boundary-grid div {
    border: 1px solid rgba(18,108,132,.12);
    background: rgba(18,108,132,.045);
    border-radius: 14px;
    padding: 14px;
}
.medical-boundary-grid p { margin: 7px 0 0; color: #64748b; }
.inline-status-form {
    display: flex;
    gap: 6px;
    align-items: center;
}
.inline-status-form select {
    min-width: 116px;
    padding: 7px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
}
.inline-status-form button {
    padding: 7px 10px;
    border-radius: 10px;
}
.status-urgent, .status-confidential, .status-protected {
    background: #fff7ed;
    color: #9a3412;
}
.status-online, .status-active, .status-sent, .status-resolved, .status-draft-created {
    background: #ecfdf5;
    color: #047857;
}
.status-new, .status-queued, .status-pending, .status-in-progress {
    background: #eff6ff;
    color: #1d4ed8;
}
.status-failed, .status-offline {
    background: #fef2f2;
    color: #b91c1c;
}
@media (max-width: 980px) {
    .medical-dashboard-grid { grid-template-columns: 1fr; }
    .inline-status-form { align-items: stretch; flex-direction: column; }
}


/* Phoenix Healthcare AI Front Desk Operations Dashboard v2 */
.phoenix-hero{background:linear-gradient(135deg,#eef8ff 0%,#f5f0ff 45%,#fff7ed 100%);border:1px solid #dbeafe;box-shadow:0 18px 50px rgba(15,23,42,.08)}
.phoenix-status-strip{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;background:#0f172a;color:#fff;border-radius:18px;padding:.85rem 1rem;margin:1rem 0;box-shadow:0 12px 35px rgba(15,23,42,.16)}
.phoenix-status-strip .badge{background:#dcfce7;color:#166534;border-color:#86efac}.phoenix-status-strip span{opacity:.95}.phoenix-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin:1rem 0 1.25rem}.phoenix-metric{display:block;text-decoration:none;color:#0f172a;border-radius:20px;padding:1rem;border:1px solid rgba(15,23,42,.08);box-shadow:0 14px 34px rgba(15,23,42,.08);transition:.18s transform,.18s box-shadow}.phoenix-metric:hover{transform:translateY(-2px);box-shadow:0 20px 44px rgba(15,23,42,.13)}.phoenix-metric small{display:block;text-transform:uppercase;letter-spacing:.06em;font-size:.72rem;font-weight:800;opacity:.8}.phoenix-metric strong{display:block;font-size:2rem;line-height:1.1;margin:.35rem 0}.phoenix-metric span{font-size:.85rem;opacity:.82}.metric-blue{background:linear-gradient(135deg,#dbeafe,#eff6ff)}.metric-green{background:linear-gradient(135deg,#dcfce7,#f0fdf4)}.metric-purple{background:linear-gradient(135deg,#ede9fe,#faf5ff)}.metric-orange{background:linear-gradient(135deg,#ffedd5,#fff7ed)}.metric-teal{background:linear-gradient(135deg,#ccfbf1,#f0fdfa)}.metric-slate{background:linear-gradient(135deg,#e2e8f0,#f8fafc)}.metric-rose{background:linear-gradient(135deg,#ffe4e6,#fff1f2)}.metric-yellow{background:linear-gradient(135deg,#fef9c3,#fefce8)}.phoenix-dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.2rem;margin-bottom:1.2rem}.phoenix-table td small{color:#64748b}.file-card-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.file-card,.phoenix-file{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:1rem;box-shadow:0 10px 28px rgba(15,23,42,.06)}.file-card>div,.file-top{display:flex;justify-content:space-between;gap:.75rem;align-items:center}.file-card h3,.phoenix-file h2{margin:.5rem 0 .25rem}.file-card p,.phoenix-file p{color:#475569}.phoenix-file-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.phoenix-file dl{display:grid;grid-template-columns:120px 1fr;gap:.35rem .75rem;margin:1rem 0 0}.phoenix-file dt{font-weight:800;color:#475569}.phoenix-file dd{margin:0;color:#0f172a}.phoenix-disclaimer{margin:1rem 0;padding:.9rem 1rem;border:1px solid #fed7aa;background:#fff7ed;color:#9a3412;border-radius:16px;font-weight:650}.status-confidential,.status-urgent{background:#ffe4e6!important;color:#9f1239!important;border-color:#fecdd3!important}.status-sent,.status-paid,.status-confirmed,.status-online,.status-active{background:#dcfce7!important;color:#166534!important;border-color:#86efac!important}.status-new,.status-open,.status-waiting{background:#dbeafe!important;color:#1d4ed8!important;border-color:#bfdbfe!important}.status-draft,.status-queued,.status-in-progress{background:#fef9c3!important;color:#854d0e!important;border-color:#fde68a!important}.status-failed,.status-expired{background:#fee2e2!important;color:#991b1b!important;border-color:#fecaca!important}.page-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-end;margin-bottom:1rem}.page-head h1{margin:.1rem 0}.page-head .muted{max-width:760px}
@media (max-width:1100px){.phoenix-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.phoenix-dashboard-grid{grid-template-columns:1fr}.phoenix-file-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:700px){.phoenix-metrics,.phoenix-file-grid,.file-card-list{grid-template-columns:1fr}.page-head{align-items:flex-start;flex-direction:column}}

/* Phoenix dashboard v3 viewport + table overflow fix */
html, body { max-width: 100%; overflow-x: hidden; }
.shell { grid-template-columns: 260px minmax(0, 1fr); max-width: 100%; overflow-x: hidden; }
.content { min-width: 0; width: 100%; max-width: 100%; overflow-x: hidden; }
.panel, .dashboard-hero, .phoenix-hero, .phoenix-dashboard-grid, .phoenix-metrics, .section-head, .page-head { min-width: 0; max-width: 100%; }
.panel { overflow-x: auto; }
.phoenix-table, .responsive-table, table { max-width: 100%; table-layout: fixed; }
.phoenix-table th, .phoenix-table td, .responsive-table th, .responsive-table td, table th, table td {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.phoenix-table td small, table td small { overflow-wrap: anywhere; word-break: break-word; }
.file-card, .phoenix-file, .phoenix-metric { min-width: 0; overflow-wrap: anywhere; }
.sidebar { overflow-y: auto; }
.sidebar a { overflow-wrap: anywhere; }
@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; padding: 14px 16px; }
    .sidebar .nav-label { grid-column: 1 / -1; margin-top: 10px; }
    .content { padding: 20px 16px 32px; }
    .topbar { padding: 0 16px; }
}
@media (max-width: 640px) {
    .sidebar { grid-template-columns: 1fr; }
    .phoenix-table, .responsive-table, table { min-width: 640px; }
    .panel { padding: 12px; }
}

/* Phoenix client-friendly polish v8 */
.table-wrap{width:100%;overflow-x:auto;border-radius:16px}.friendly-table{table-layout:auto;width:100%}.friendly-table th,.friendly-table td{word-break:normal!important;overflow-wrap:normal!important;vertical-align:top;line-height:1.45}.friendly-table th{white-space:nowrap}.friendly-table .summary-col{min-width:260px;max-width:420px;white-space:normal!important;overflow-wrap:break-word!important}.badge{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:999px;padding:.28rem .65rem;font-size:.72rem;font-weight:800;letter-spacing:.01em;text-transform:none}.friendly-hero{align-items:center}.friendly-status{font-size:.95rem}.friendly-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.2rem;margin-bottom:1.2rem}.friendly-panel{box-shadow:0 18px 45px rgba(15,23,42,.08)}.ops-list{display:grid;gap:.75rem}.ops-item{display:flex;gap:.85rem;align-items:flex-start;border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:.85rem}.ops-avatar{width:42px;height:42px;min-width:42px;border-radius:14px;background:#e0f2fe;color:#075985;display:flex;align-items:center;justify-content:center;font-weight:900}.ops-main{min-width:0;flex:1}.ops-title{display:flex;justify-content:space-between;gap:.75rem;align-items:flex-start}.ops-main p{margin:.25rem 0;color:#334155}.ops-main small{color:#64748b}.compact-list .ops-item{padding:.75rem}.friendly-files .file-card p,.phoenix-file p{min-height:2.4em}.settings-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.setting-card{border:1px solid #e2e8f0;background:#f8fafc;border-radius:16px;padding:1rem}.setting-card span{display:block;color:#64748b;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;font-weight:800}.setting-card strong{display:block;margin:.25rem 0;font-size:1.05rem}.setting-card small{color:#64748b}.friendly-checklist{margin:0;padding-left:1.2rem;color:#334155}.friendly-checklist li{margin:.55rem 0}.route-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem}.route-card{border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:1rem}.route-card strong{display:block}.route-card span{display:block;color:#64748b;font-size:.85rem;margin:.15rem 0}.route-card p{margin:.45rem 0;color:#0f172a;overflow-wrap:anywhere}.friendly-note{font-size:.95rem}.phoenix-dashboard-grid{display:none!important}.friendly-metrics .phoenix-metric{min-height:126px}.status-in-progress,.status-in_progress{background:#fef9c3!important;color:#854d0e!important;border-color:#fde68a!important}.status-completed,.status-confirmed,.status-paid,.status-sent,.status-online,.status-active{background:#dcfce7!important;color:#166534!important;border-color:#86efac!important}.status-new,.status-open,.status-waiting{background:#dbeafe!important;color:#1d4ed8!important;border-color:#bfdbfe!important}.status-urgent,.status-confidential{background:#ffe4e6!important;color:#9f1239!important;border-color:#fecdd3!important}.status-draft,.status-queued,.status-viewed{background:#fef3c7!important;color:#92400e!important;border-color:#fde68a!important}.status-failed,.status-expired{background:#fee2e2!important;color:#991b1b!important;border-color:#fecaca!important}
@media (max-width:1350px){.friendly-grid{grid-template-columns:1fr}.route-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-card-grid{grid-template-columns:1fr}.friendly-table{font-size:.94rem}}
@media (max-width:760px){.friendly-hero,.page-head{flex-direction:column;align-items:flex-start}.route-card-grid,.phoenix-file-grid,.file-card-list{grid-template-columns:1fr!important}.ops-title{flex-direction:column}.friendly-table th,.friendly-table td{min-width:130px}.friendly-table .summary-col{min-width:240px}}

/* CLIENT FRIENDLY LOGIN V9 */
.client-auth-page {
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(18,108,132,0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(122,210,190,0.18), transparent 28%),
        linear-gradient(135deg, #edf5f8 0%, #f7fbfc 58%, #eef6f8 100%);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 18px;
}

.client-auth-shell {
    align-items: stretch;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 0.85fr);
    max-width: 1040px;
    width: 100%;
}

.client-auth-info,
.client-login-card {
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(205,222,231,0.95);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(20, 45, 60, 0.12);
    padding: 34px;
}

.client-auth-info {
    background:
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(234,247,250,0.94)),
        linear-gradient(135deg, rgba(18,108,132,0.08), transparent);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 500px;
}

.client-auth-brand {
    align-items: center;
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}

.client-auth-mark {
    align-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(18,108,132,0.20);
    color: #fff;
    display: inline-flex;
    font-size: 20px;
    font-weight: 900;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.client-auth-kicker {
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.client-auth-brand h1 {
    color: #172331;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.05;
    margin: 0;
}

.client-auth-lead {
    color: #445b70;
    font-size: 20px;
    line-height: 1.55;
    margin: 0 0 28px;
    max-width: 620px;
}

.client-auth-highlights {
    display: grid;
    gap: 12px;
    margin: 22px 0;
}

.client-auth-highlights div {
    background: #ffffff;
    border: 1px solid rgba(215,226,234,0.9);
    border-radius: 16px;
    padding: 16px 18px;
}

.client-auth-highlights strong {
    color: #172331;
    display: block;
    font-size: 16px;
    margin-bottom: 3px;
}

.client-auth-highlights span {
    color: #607080;
    display: block;
    font-size: 14px;
}

.client-auth-note {
    background: #fff7eb;
    border: 1px solid #ffdca8;
    border-radius: 16px;
    color: #8a4d12;
    font-weight: 700;
    margin: 24px 0 0;
    padding: 14px 16px;
}

.client-login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.client-login-header h2 {
    color: #172331;
    font-size: 34px;
    line-height: 1.1;
    margin: 0 0 8px;
}

.client-login-header p {
    color: #607080;
    font-size: 17px;
    margin: 0 0 22px;
}

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

.client-login-form label {
    color: #172331;
    font-size: 15px;
    gap: 8px;
}

.client-login-form input {
    border-radius: 14px;
    min-height: 54px;
    padding: 13px 15px;
}

.client-login-form button {
    border-radius: 14px;
    font-size: 16px;
    min-height: 56px;
    margin-top: 4px;
}

.client-login-help {
    background: #f5f9fb;
    border: 1px solid rgba(215,226,234,0.9);
    border-radius: 16px;
    color: #607080;
    display: grid;
    gap: 3px;
    margin-top: 22px;
    padding: 14px 16px;
}

.client-login-help strong {
    color: #172331;
}

@media (max-width: 860px) {
    .client-auth-shell {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .client-auth-info {
        min-height: auto;
    }
}

@media (max-width: 520px) {
    .client-auth-page {
        padding: 16px 12px;
    }

    .client-auth-info,
    .client-login-card {
        border-radius: 18px;
        padding: 24px;
    }

    .client-auth-brand {
        align-items: flex-start;
    }

    .client-auth-mark {
        border-radius: 13px;
        height: 48px;
        min-width: 48px;
        width: 48px;
    }

    .client-auth-lead {
        font-size: 17px;
    }

    .client-login-header h2 {
        font-size: 28px;
    }
}

/* CLIENT SETTINGS FRIENDLY V12 */
.settings-friendly-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setting-friendly-card,
.route-friendly-card {
    background: #f8fbfd;
    border: 1px solid #dce8ef;
    border-radius: 16px;
    padding: 18px;
}

.setting-friendly-card h3,
.route-friendly-card h3 {
    color: #172331;
    font-size: 17px;
    line-height: 1.25;
    margin: 0 0 7px;
}

.setting-friendly-card p:last-child,
.route-friendly-card p {
    color: #5b6f84;
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
}

.friendly-boundary-list {
    color: #33465a;
    display: grid;
    gap: 9px;
    line-height: 1.5;
    margin: 12px 0 0;
    padding-left: 20px;
}

.settings-route-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.route-friendly-card {
    align-items: flex-start;
    display: grid;
    gap: 8px;
}

.route-friendly-card .status-pill {
    justify-self: start;
    margin-top: 4px;
    white-space: nowrap;
}

.friendly-note {
    background: #fff7eb;
    border: 1px solid #ffd9a0;
    border-radius: 16px;
    color: #8a3b16;
    font-weight: 800;
    line-height: 1.45;
    margin-top: 26px;
    padding: 18px 20px;
}

@media (max-width: 820px) {
    .settings-friendly-grid,
    .settings-route-grid {
        grid-template-columns: 1fr;
    }
}

/* Deployment readiness panel */
.readiness-panel { position: relative; overflow: hidden; }
.readiness-phase { display: grid; gap: .2rem; justify-items: end; text-align: right; }
.readiness-phase strong { font-size: 1.05rem; color: #0f172a; }
.readiness-score-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin: 1rem 0 1.2rem; }
.readiness-score-card { border: 1px solid #e2e8f0; border-radius: 18px; background: #fff; padding: 1rem; box-shadow: 0 12px 30px rgba(15,23,42,.06); }
.readiness-score-card strong { display: block; font-size: 1.8rem; line-height: 1; color: #0f172a; }
.readiness-score-card span { display: block; margin-top: .35rem; color: #64748b; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.readiness-score-card.ok { background: #f0fdf4; border-color: #bbf7d0; }
.readiness-score-card.warning { background: #fffbeb; border-color: #fde68a; }
.readiness-score-card.missing { background: #fef2f2; border-color: #fecaca; }
.readiness-score-card.total { background: #eff6ff; border-color: #bfdbfe; }
.readiness-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.readiness-check { display: flex; gap: .75rem; align-items: flex-start; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; padding: .9rem; }
.readiness-check strong { display: block; color: #0f172a; }
.readiness-check p { margin: .25rem 0 0; color: #475569; }
.readiness-dot { width: 12px; height: 12px; min-width: 12px; margin-top: .3rem; border-radius: 999px; background: #94a3b8; }
.readiness-ok { border-color: #bbf7d0; background: #f8fff9; }
.readiness-ok .readiness-dot { background: #16a34a; }
.readiness-warning { border-color: #fde68a; background: #fffdf3; }
.readiness-warning .readiness-dot { background: #d97706; }
.readiness-missing { border-color: #fecaca; background: #fff7f7; }
.readiness-missing .readiness-dot { background: #dc2626; }
.readiness-module-row { margin-top: 1.1rem; border-top: 1px solid #e2e8f0; padding-top: 1rem; }
.readiness-module-row > strong { display: block; margin-bottom: .65rem; color: #0f172a; }
.readiness-note { margin-top: 1.1rem; }
@media (max-width: 860px) { .readiness-score-row, .readiness-check-grid { grid-template-columns: 1fr; } .readiness-phase { justify-items: start; text-align: left; } }

/* Phase 2B: deployment onboarding and go-live gate */
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 800; color: #0f6d80; margin: 0 0 .35rem; }
.deployments-table td { vertical-align: top; }
.runtime-code { white-space: normal; overflow-wrap: anywhere; display: inline-block; max-width: 12rem; }
.readiness-list-summary { display: grid; gap: .2rem; min-width: 13rem; }
.readiness-list-summary strong { font-size: .88rem; }
.readiness-list-summary span { font-size: .78rem; color: #5f6f82; }
.readiness-list-summary small { display: block; color: #8a4b0f; font-size: .73rem; line-height: 1.25; max-width: 18rem; }
.readiness-list-summary.ready small { color: #047857; }
.go-live-gate { margin-top: 1rem; padding: 1rem; border-radius: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 1.35fr); gap: 1rem; align-items: start; border: 1px solid #dce7ef; }
.go-live-gate strong { display: block; font-size: 1rem; margin-bottom: .25rem; }
.go-live-gate p { margin: 0; color: #5f6f82; }
.go-live-gate ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.gate-ready { background: #effdf5; border-color: #bbf7d0; }
.gate-ready strong { color: #047857; }
.gate-blocked { background: #fff7ed; border-color: #fed7aa; }
.gate-blocked strong { color: #9a3412; }
.readiness-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.readiness-actions .button { padding: .55rem .8rem; font-size: .82rem; }
.readiness-timeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; margin-top: 1rem; }
.timeline-step { background: #f8fafc; border: 1px solid #dce7ef; border-radius: 14px; padding: .75rem; display: grid; gap: .25rem; position: relative; min-height: 5.1rem; }
.timeline-step span { width: .65rem; height: .65rem; border-radius: 99px; background: #94a3b8; display: block; }
.timeline-step strong { font-size: .78rem; }
.timeline-step small { color: #64748b; overflow-wrap: anywhere; }
.timeline-done span { background: #16a34a; }
.timeline-working span { background: #f59e0b; }
.timeline-pending span { background: #ef4444; }
@media (max-width: 1100px) {
  .go-live-gate { grid-template-columns: 1fr; }
  .readiness-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Phase 2C: deployments list polish */
.deployments-control-panel { padding: 0; overflow: hidden; }
.deployment-index-list { display: grid; gap: 1rem; padding: 1rem; }
.deployment-index-card {
  display: grid;
  grid-template-columns: minmax(190px, 1.05fr) minmax(220px, 1.25fr) minmax(170px, .8fr) minmax(210px, 1.15fr) auto;
  gap: 1rem;
  align-items: stretch;
  padding: 1rem;
  border: 1px solid #dce7ef;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}
.deployment-index-card:hover { border-color: #b7d9e4; box-shadow: 0 16px 38px rgba(15, 23, 42, .075); }
.deployment-index-section { display: grid; align-content: start; gap: .3rem; min-width: 0; }
.deployment-index-label { font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.deployment-index-title { color: #0f172a; font-size: 1rem; font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
.deployment-index-sub { color: #64748b; font-size: .84rem; line-height: 1.35; overflow-wrap: anywhere; }
.deployment-index-product strong { display: block; color: #0f172a; line-height: 1.25; overflow-wrap: anywhere; }
.deployment-index-product small { display: block; margin-top: .2rem; color: #64748b; line-height: 1.3; overflow-wrap: anywhere; }
.deployment-index-meta { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: .2rem; }
.runtime-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .35rem .55rem;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.deployment-readiness-card {
  border: 1px solid #dce7ef;
  border-radius: 16px;
  background: #f8fafc;
  padding: .85rem;
  display: grid;
  gap: .35rem;
  min-width: 0;
}
.deployment-readiness-card.ready { border-color: #bbf7d0; background: #f0fdf4; }
.deployment-readiness-card.blocked { border-color: #fed7aa; background: #fff7ed; }
.deployment-readiness-card strong { color: #0f172a; line-height: 1.25; overflow-wrap: anywhere; }
.deployment-readiness-card span { color: #64748b; font-size: .82rem; line-height: 1.3; }
.deployment-readiness-card small { color: #9a3412; font-size: .78rem; line-height: 1.35; overflow-wrap: anywhere; }
.deployment-index-actions { display: grid; align-content: center; justify-items: end; gap: .5rem; }
.deployment-index-actions .button { white-space: nowrap; padding: .65rem .95rem; }
.deployment-index-date { color: #64748b; font-size: .8rem; text-align: right; line-height: 1.3; }
.deployment-empty-state { padding: 2rem; color: #64748b; }
@media (max-width: 1180px) {
  .deployment-index-card { grid-template-columns: 1fr 1fr; }
  .deployment-index-actions { justify-items: start; }
  .deployment-index-date { text-align: left; }
}
@media (max-width: 760px) {
  .deployment-index-list { padding: .75rem; }
  .deployment-index-card { grid-template-columns: 1fr; border-radius: 16px; }
}

/* Phase 2C hotfix: keep deployment actions inside the card on laptop widths */
.deployment-index-card {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}
.deployment-index-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  justify-items: initial;
  gap: 1rem;
  padding-top: .85rem;
  border-top: 1px solid #e2e8f0;
}
.deployment-index-actions .button {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}
.deployment-index-date {
  text-align: right;
}
@media (max-width: 1180px) {
  .deployment-index-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deployment-index-actions { align-items: flex-start; }
}
@media (max-width: 760px) {
  .deployment-index-card { grid-template-columns: 1fr; }
  .deployment-index-actions { flex-direction: column; align-items: stretch; }
  .deployment-index-date { text-align: left; }
}


/* Phase 3A build spec onboarding upgrade */
.onboarding-summary-panel { border-color: rgba(14, 116, 144, 0.18); }
.spec-score-row { margin-bottom: 14px; }
.spec-check-grid { margin-top: 10px; }
.medical-boundary-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 14px;
    line-height: 1.45;
}
.medical-safe-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.spec-runtime-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}
@media (max-width: 900px) {
    .medical-safe-grid { grid-template-columns: 1fr; }
}

/* Phase 3B build spec usability polish */
.spec-nav-panel {
    position: sticky;
    top: 12px;
    z-index: 8;
    border-color: rgba(14, 116, 144, .18);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
}
.spec-nav-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.spec-nav-head h2 { margin-bottom: .25rem; }
.spec-nav-actions,
.spec-top-save-actions,
.section-head-actions {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
    align-items: center;
}
.spec-section-nav {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: .55rem;
}
.spec-section-link {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .45rem;
    padding: .65rem .7rem;
    border: 1px solid #dce7ef;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    text-decoration: none;
    min-width: 0;
}
.spec-section-link:hover { border-color: #0f6d80; background: #f0fbff; }
.spec-section-link span {
    display: inline-grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: .75rem;
    font-weight: 900;
}
.spec-section-link strong {
    overflow-wrap: anywhere;
    line-height: 1.15;
    font-size: .82rem;
}
.spec-section-ready { border-color: #bbf7d0; background: #f8fff9; }
.spec-section-ready span { background: #bbf7d0; color: #166534; }
.spec-section-missing { border-color: #fed7aa; background: #fff7ed; }
.spec-section-missing span { background: #fed7aa; color: #9a3412; }
.spec-top-savebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}
.spec-top-savebar > span {
    color: #64748b;
    font-weight: 800;
}
.required-pill {
    display: inline-flex;
    margin-left: .35rem;
    padding: .18rem .45rem;
    border-radius: 999px;
    background: #eef6ff;
    color: #0f6d80;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .04em;
    vertical-align: middle;
}
.spec-section-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 900;
    white-space: nowrap;
}
.spec-state-ready { background: #dcfce7; color: #166534; }
.spec-state-missing { background: #ffedd5; color: #9a3412; }
.spec-collapse-toggle {
    border: 1px solid #dce7ef;
    background: #ffffff;
    color: #0f6d80;
    border-radius: 999px;
    padding: .38rem .65rem;
    font-size: .75rem;
    font-weight: 900;
    cursor: pointer;
}
.spec-collapse-toggle:hover { background: #eff6ff; }
.spec-section-body { margin-top: .85rem; }
.spec-collapsible.is-collapsed .spec-section-body { display: none; }
.spec-collapsible.is-collapsed { padding-bottom: 1rem; }
.spec-form .section-head {
    position: relative;
    gap: .75rem;
}
.spec-form .section-head > .spec-collapse-toggle { margin-left: auto; }
@media (max-width: 1180px) {
    .spec-section-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .spec-nav-panel { position: static; }
}
@media (max-width: 760px) {
    .spec-section-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spec-nav-head,
    .spec-top-savebar { flex-direction: column; align-items: stretch; }
    .spec-top-save-actions .button,
    .spec-top-save-actions button,
    .spec-nav-actions .button { width: 100%; }
}


/* Phase 4C worker runtime hardening */
.runtime-live-card {
    margin: 1rem 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.runtime-live-card strong {
    display: block;
    font-size: 1.05rem;
    margin-top: .25rem;
}

.runtime-live-card p {
    margin: .35rem 0 0;
    color: #64748b;
}

.runtime-live-card.runtime-ok {
    border-color: rgba(22, 163, 74, 0.35);
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.92), #ffffff);
}

.runtime-live-card.runtime-warning {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.92), #ffffff);
}

.runtime-live-card.runtime-missing {
    border-color: rgba(239, 68, 68, 0.25);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.92), #ffffff);
}

.runtime-live-meta {
    min-width: 230px;
    display: grid;
    grid-template-columns: 1fr;
    gap: .35rem;
    font-size: .85rem;
    color: #334155;
}

.runtime-live-meta span {
    background: rgba(15, 23, 42, 0.05);
    border-radius: 999px;
    padding: .35rem .65rem;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .runtime-live-card {
        flex-direction: column;
    }

    .runtime-live-meta {
        min-width: 0;
    }
}

/* Phase 4D: UI polish and source hygiene */
body {
    letter-spacing: -0.005em;
}

.polished-page-head {
    align-items: flex-start;
    margin-bottom: 22px;
}

.polished-page-head h1 {
    font-size: clamp(2rem, 2.8vw, 2.75rem);
    letter-spacing: -0.035em;
}

.polished-page-head .muted {
    max-width: 760px;
    font-size: 1.02rem;
}

.button,
button {
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(18, 108, 132, 0.12);
}

.button-secondary {
    box-shadow: none;
}

.button-ghost {
    background: transparent;
    border: 1px solid var(--line);
    box-shadow: none;
    color: var(--brand-dark);
}

.button-ghost:hover {
    background: var(--brand-soft);
    border-color: #b7d9e4;
    color: var(--brand-dark);
}

.small-button {
    font-size: .82rem;
    padding: .55rem .75rem;
}

.panel {
    border-radius: 18px;
}

.table-panel {
    padding: 0;
    overflow: hidden;
}

.table-panel > .section-head {
    padding: 20px 22px 8px;
    margin-bottom: 0;
}

.polished-table-wrap {
    padding: 0 16px 16px;
}

.polished-table {
    border-radius: 16px;
    table-layout: fixed;
}

.polished-table th {
    font-size: .76rem;
    letter-spacing: .04em;
}

.polished-table td {
    line-height: 1.38;
}

.entity-title {
    color: var(--brand);
    display: inline-block;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: .18rem;
}

.entity-meta {
    color: var(--muted);
    display: block;
    font-size: .88rem;
    line-height: 1.35;
}

.breakable {
    overflow-wrap: anywhere;
    word-break: normal;
}

.role-pill,
.priority-pill {
    background: #f3f7fa;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.2;
    padding: .42rem .62rem;
    white-space: normal;
}

.priority-urgent,
.priority-high {
    background: #fff0ef;
    border-color: #fecaca;
    color: #991b1b;
}

.priority-normal,
.priority-medium {
    background: #fff7df;
    border-color: #fde68a;
    color: #854d0e;
}

.priority-low {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.empty-state,
.compact-empty {
    align-items: flex-start;
    background: #f8fbfc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: var(--muted);
    display: grid;
    gap: .25rem;
    padding: 18px;
}

.catalog-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.catalog-grid-products {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.catalog-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 220px;
    padding: 20px;
}

.catalog-card:hover {
    border-color: #b7d9e4;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .075);
}

.catalog-card-head {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.catalog-card h2 {
    font-size: 1.18rem;
    line-height: 1.22;
    margin: .15rem 0 0;
}

.catalog-label {
    color: var(--muted);
    display: inline-block;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

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

.catalog-meta-grid p,
.detail-grid p {
    background: #f8fbfc;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    margin: 0;
    min-width: 0;
    padding: 12px;
}

.catalog-meta-grid strong,
.detail-grid strong {
    color: var(--muted);
    display: block;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    margin-bottom: .35rem;
    text-transform: uppercase;
}

.catalog-meta-grid span,
.detail-grid span {
    color: var(--text);
    display: block;
    overflow-wrap: anywhere;
}

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

.price-strip div {
    background: linear-gradient(135deg, #f8fbfc, #ffffff);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 12px;
}

.price-strip span {
    color: var(--muted);
    display: block;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .05em;
    margin-bottom: .3rem;
    text-transform: uppercase;
}

.price-strip strong {
    display: block;
    font-size: 1.05rem;
    white-space: nowrap;
}

.catalog-card-actions,
.demo-card-action {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.user-table th:nth-child(1),
.user-table td:nth-child(1) { width: 25%; }
.user-table th:nth-child(2),
.user-table td:nth-child(2) { width: 14%; }
.user-table th:nth-child(3),
.user-table td:nth-child(3) { width: 24%; }
.user-table th:nth-child(4),
.user-table td:nth-child(4) { width: 11%; }
.user-table th:nth-child(5),
.user-table td:nth-child(5) { width: 14%; }
.user-table th:nth-child(6),
.user-table td:nth-child(6) { width: 12%; }

.attention-grid {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}

.attention-card {
    align-items: center;
    background: #f8fbfc;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 14px;
}

.attention-card h3 {
    font-size: 1rem;
    margin: .15rem 0;
}

.demo-stat-grid .metric-card-lite {
    border-left: 0;
    display: grid;
    gap: .25rem;
    min-height: 110px;
}

.metric-card-lite strong {
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
}

.metric-card-lite span {
    color: var(--muted);
}

.flow-panel .section-head {
    margin-bottom: 14px;
}

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

.flow-steps p {
    background: #f8fbfc;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    display: grid;
    gap: 8px;
    margin: 0;
    min-height: 120px;
    padding: 16px;
}

.flow-steps strong {
    color: var(--brand-dark);
    font-size: .78rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.flow-steps span {
    color: var(--muted);
}

.demo-card-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.demo-card-pro {
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.demo-card-content {
    display: grid;
    gap: 14px;
}

.deployment-index-footer {
    border-top: 1px solid #e2e8f0;
    grid-column: 1 / -1;
    padding-top: .9rem;
}

.runtime-pill-strong {
    font-weight: 900;
}

.deployment-readiness-card.ready {
    background: linear-gradient(135deg, #effdf5, #ffffff);
    border-color: #bbf7d0;
}

.deployment-readiness-card.ready strong {
    color: #047857;
}

.runtime-live-card {
    border-width: 1px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .075);
}

.spec-nav-panel {
    top: 16px;
}

.spec-section-nav {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.spec-section-link {
    min-height: 54px;
}

.spec-form.wide {
    max-width: 1080px;
}

.spec-panel {
    border-radius: 20px;
}

.spec-panel textarea {
    min-height: 74px;
}

.spec-panel .section-head h2 {
    letter-spacing: -0.02em;
}

.spec-check-grid .readiness-check,
.onboarding-summary-panel .readiness-check {
    min-height: 74px;
}

.alert {
    border-radius: 16px;
}

@media (max-width: 1180px) {
    .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .polished-table { table-layout: auto; }
}

@media (max-width: 760px) {
    .catalog-meta-grid,
    .price-strip,
    .flow-steps { grid-template-columns: 1fr; }
    .catalog-card-head,
    .attention-card { align-items: flex-start; flex-direction: column; }
    .polished-page-head { align-items: stretch; flex-direction: column; }
    .polished-page-head .button { width: 100%; text-align: center; }
}


/* Phase 6A runtime details */
.runtime-hero .deployment-hero-actions {
    gap: .75rem;
}
.runtime-control-panel {
    border: 1px solid rgba(18, 108, 132, .12);
}
.runtime-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}
.runtime-check {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .75rem .85rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}
.runtime-check span {
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    font-size: .82rem;
}
.runtime-check.ok span {
    background: #dcfce7;
    color: #166534;
}
.runtime-check.missing span {
    background: #fee2e2;
    color: #991b1b;
}
.runtime-form {
    display: grid;
    gap: 1rem;
}
.runtime-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.runtime-form-grid .wide {
    grid-column: 1 / -1;
}
.runtime-form small {
    display: block;
    margin-top: .35rem;
    color: #64748b;
    line-height: 1.35;
}
.env-preview-card {
    margin-top: 1rem;
    border-radius: 18px;
    padding: 1rem;
    background: #0f172a;
    color: #e2e8f0;
}
.env-preview-card .muted {
    color: #94a3b8;
}
.env-preview-card h3 {
    color: #f8fafc;
}
.env-preview-card pre {
    overflow-x: auto;
    white-space: pre-wrap;
    margin: 1rem 0 0;
    font-size: .86rem;
    line-height: 1.55;
}
.notice.danger {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}
.notice.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
@media (max-width: 760px) {
    .runtime-form-grid {
        grid-template-columns: 1fr;
    }
}
/* Phase 6B package factory */
.package-factory-panel {
    border: 1px solid rgba(18, 108, 132, 0.12);
}
.pod-factory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.pod-factory-card {
    background: #f8fbfd;
    border: 1px solid #dbeaf0;
    border-radius: 16px;
    padding: 1rem;
}
.pod-factory-card h3 {
    margin: 0 0 .5rem;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #5c7184;
}
.pod-factory-card p {
    margin: 0 0 .35rem;
    word-break: break-word;
}
.package-history {
    margin-top: 1.2rem;
}
.compact-table td,
.compact-table th {
    vertical-align: middle;
}
.inline-form {
    margin: 1rem 0 0;
}
@media (max-width: 980px) {
    .pod-factory-grid {
        grid-template-columns: 1fr;
    }
}


/* Phase 6C project alignment */
.project-alignment-panel {
    border: 1px solid rgba(18, 108, 132, .14);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .07);
}
.alignment-owner-card {
    min-width: 170px;
    padding: .85rem 1rem;
    border-radius: 16px;
    background: #eef8fb;
    border: 1px solid #d7edf3;
    text-align: right;
}
.alignment-owner-card span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
}
.alignment-owner-card strong {
    color: #0f4758;
    font-size: 1.05rem;
}
.alignment-score-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    margin: 1rem 0;
}
.alignment-score {
    border-radius: 16px;
    padding: .85rem 1rem;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}
.alignment-score strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1;
}
.alignment-score span {
    display: block;
    margin-top: .35rem;
    color: #64748b;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
}
.alignment-score.ready { background: #ecfdf5; border-color: #bbf7d0; }
.alignment-score.review { background: #fffbeb; border-color: #fde68a; }
.alignment-score.missing { background: #fff1f2; border-color: #fecdd3; }
.alignment-score.waiting { background: #eff6ff; border-color: #bfdbfe; }
.alignment-step-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}
.alignment-step {
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: .9rem;
}
.alignment-step-head {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .35rem;
}
.alignment-step-head span {
    width: .62rem;
    height: .62rem;
    border-radius: 999px;
    background: #94a3b8;
}
.alignment-step p {
    margin: 0 0 .45rem;
    color: #334155;
}
.alignment-step small {
    color: #64748b;
    line-height: 1.35;
}
.alignment-ready { background: #f0fdf4; border-color: #bbf7d0; }
.alignment-ready .alignment-step-head span { background: #22c55e; }
.alignment-review { background: #fffbeb; border-color: #fde68a; }
.alignment-review .alignment-step-head span { background: #f59e0b; }
.alignment-missing { background: #fff1f2; border-color: #fecdd3; }
.alignment-missing .alignment-step-head span { background: #ef4444; }
.alignment-waiting { background: #f8fafc; border-color: #e5e7eb; }
.alignment-waiting .alignment-step-head span { background: #94a3b8; }
.alignment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1rem;
}
@media (max-width: 980px) {
    .alignment-score-row,
    .alignment-step-grid {
        grid-template-columns: 1fr;
    }
    .alignment-owner-card {
        text-align: left;
        width: 100%;
    }
}
