@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&display=swap");

:root {
    --ink: #172033;
    --ink-soft: #2d3950;
    --muted: #7b879c;
    --line: #e7ebf4;
    --line-strong: #d8dfef;
    --paper: #f5f7fc;
    --paper-strong: #fbfcff;
    --panel: rgba(255,255,255,.96);
    --panel-solid: #ffffff;
    --accent: #635bff;
    --accent-strong: #4d45e6;
    --accent-soft: #eef0ff;
    --accent-glow: rgba(99, 91, 255, .18);
    --accent-soft-strong: #dfe3ff;
    --nav: #ffffff;
    --nav-soft: #f5f7fc;
    --warn: #d68b2f;
    --bad: #b42318;
    --good: #18b57b;
    --shadow-sm: 0 8px 22px rgba(31, 41, 55, .06);
    --shadow-lg: 0 18px 42px rgba(31, 41, 55, .08);
    --shadow-xl: 0 28px 70px rgba(27, 39, 65, .14);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 8%, rgba(99, 91, 255, .08), transparent 26%),
        linear-gradient(180deg, #fafbff 0%, var(--paper) 100%);
    color: var(--ink);
    font-family: "Manrope", "Segoe UI", sans-serif;
}
body.app-shell {
    display: grid;
    grid-template-columns: 294px minmax(0, 1fr);
}
body.modal-open {
    overflow: hidden;
}
.side {
    position: sticky;
    top: 0;
    min-height: 100vh;
    max-height: 100vh;
    border-right: 1px solid var(--line);
    background: rgba(255,255,255,.78);
    color: var(--ink);
    padding: 18px 16px 22px;
    overflow-y: auto;
    backdrop-filter: blur(12px);
}
.side::before {
    content: "";
    position: absolute;
    inset: 0;
    border-right: 1px solid rgba(255,255,255,.6);
    pointer-events: none;
}
.brand-lockup,
.side-user,
.side-nav,
.nav-section,
.side-divider {
    position: relative;
    z-index: 1;
}
.brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 18px;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #edf0ff 0%, #dfe4ff 100%);
    color: var(--accent-strong);
    font-family: "Sora", sans-serif;
    font-size: 18px;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}
.brand-overline {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.brand {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    letter-spacing: -.03em;
    font-size: 24px;
    color: var(--ink);
}
.side-divider {
    height: 1px;
    margin: 0 8px 18px;
    background: var(--line);
}
.nav-section {
    margin-bottom: 18px;
}
.nav-section-title {
    margin: 0 8px 10px;
    color: #adb7cc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.side-nav { display: grid; gap: 8px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink-soft);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #f4f6fc;
    color: #6f7b91;
    box-shadow: inset 0 0 0 1px rgba(216, 223, 239, .4);
}
.nav-link-icon svg,
.topbar-icon svg,
.topbar-page-icon svg,
.topbar-chip-icon svg {
    width: 20px;
    height: 20px;
}
.nav-link:hover,
.nav-link.active {
    background: var(--accent-soft);
    border-color: var(--accent-soft-strong);
    color: var(--accent-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.nav-link.active .nav-link-icon,
.nav-link:hover .nav-link-icon {
    background: #ffffff;
    color: var(--accent-strong);
    box-shadow: inset 0 0 0 1px rgba(99, 91, 255, .12);
}
.side-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin: 22px 8px 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #fbfcff);
    box-shadow: var(--shadow-sm);
}
.side-user-avatar,
.topbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffdf9e, #f6a850);
    color: #7b4a00;
    font-weight: 800;
}
.side-user strong {
    display: block;
    font-size: 14px;
}
.side-user span,
.side-user small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}
.app-stage {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.mobile-route-strip {
    display: none;
}
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 84px;
    padding: 16px 28px;
    background: rgba(255,255,255,.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}
.topbar-left,
.topbar-right,
.topbar-icon-group {
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar-divider {
    width: 1px;
    height: 42px;
    background: var(--line);
}
.topbar-icon,
.topbar-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: #72809a;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.topbar-page-icon,
.topbar-chip-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: var(--accent-strong);
    background: linear-gradient(135deg, #f2f3ff, #e6e9ff);
    border-color: rgba(99, 91, 255, .1);
}
.topbar-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow-sm);
}
.topbar-chip strong,
.topbar-chip span {
    display: block;
}
.topbar-chip strong {
    font-size: 14px;
    color: var(--ink);
}
.topbar-chip span {
    color: var(--muted);
    font-size: 12px;
}
.topbar-title {
    margin: 0;
    font-size: 17px;
}
.topbar-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}
.main {
    padding: 28px 28px 36px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}
.top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 18px;
    margin-bottom: 22px;
}
h1, h2 {
    margin: 0;
    letter-spacing: -.03em;
    font-family: "Sora", sans-serif;
}
h1 { font-size: 36px; }
h2 { font-size: 20px; margin-bottom: 16px; }
.eyebrow {
    color: #a2acbf;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    margin: 0 0 6px;
}
.page-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 17px;
}
.top-actions {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 12px;
    flex-wrap: wrap;
}
.top-actions form {
    margin: 0;
}
.top-chip,
.top-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.94);
    color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    font-weight: 700;
}
.top-button {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #ffffff;
    border-color: transparent;
}
.compact-subtitle {
    font-size: 14px;
    margin-top: 8px;
}
.module-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: #f7f8fd;
}
.module-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    color: var(--ink-soft);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.module-tab.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #ffffff;
    box-shadow: 0 14px 24px rgba(99, 91, 255, .18);
}
.tabs-panel {
    padding-top: 14px;
    padding-bottom: 14px;
}
.github-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.info-pairs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}
.info-pairs span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.info-pairs strong,
.info-pairs code {
    display: block;
}
.muted-block {
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.6;
}
.github-steps {
    margin: 0;
    padding-left: 18px;
    color: var(--ink-soft);
    line-height: 1.65;
}
.github-steps li + li {
    margin-top: 8px;
}
.github-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.github-form > .wide,
.github-form > .secret-flags,
.github-form > .modal-actions {
    grid-column: 1 / -1;
}
.secret-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.inline-log {
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #f8faff;
    color: var(--ink-soft);
    white-space: pre-wrap;
    font: 13px/1.55 "Consolas", "Courier New", monospace;
}
.panel {
    background: var(--panel);
    border: 1px solid rgba(225, 231, 244, .92);
    border-radius: 28px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-lg);
}
.panel {
    backdrop-filter: blur(10px);
}
.panel-actions {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 16px;
}
.analytics-hero {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.analytics-hero-card {
    min-height: 100%;
}
.analytics-primary {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    color: var(--ink);
    border-color: rgba(220, 225, 243, .96);
    box-shadow: var(--shadow-lg);
}
.analytics-primary .eyebrow,
.analytics-primary .analytics-subhead,
.analytics-primary .analytics-hero-stats span {
    color: var(--muted);
}
.analytics-primary h2 {
    color: var(--ink);
    font-size: 30px;
    margin-bottom: 10px;
}
.analytics-subhead {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}
.analytics-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.analytics-hero-stats div,
.analytics-inline-trend {
    background: #f8f9ff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px 14px;
}
.analytics-hero-stats span,
.analytics-inline-trend span {
    display: block;
    font-size: 12px;
}
.analytics-hero-stats strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
}
.analytics-inline-trend {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    background: #f8f9ff;
    border-color: var(--line);
}
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.analytics-grid-wide {
    grid-template-columns: 1.2fr 1fr;
}
.metric-card h2 {
    font-size: 30px;
    margin-bottom: 8px;
}
.metric-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.chart-panel {
    min-height: 100%;
}
.chart-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.cadence-chart {
    display: grid;
    grid-template-columns: repeat(14, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    min-height: 250px;
}
.cadence-day {
    display: grid;
    justify-items: center;
    gap: 8px;
}
.cadence-day strong {
    font-size: 13px;
}
.cadence-day span {
    color: var(--muted);
    font-size: 11px;
}
.cadence-bar {
    width: 100%;
    max-width: 28px;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    border-radius: 999px;
    background: #eef2fb;
    overflow: hidden;
    border: 1px solid #e3e9f5;
}
.bar-segment {
    width: 100%;
    display: block;
}
.bar-segment.success {
    background: linear-gradient(180deg, #48d693, #18b57b);
}
.bar-segment.failed {
    background: linear-gradient(180deg, #f97066, #d92d20);
}
.bar-segment.active {
    background: linear-gradient(180deg, #847dff, #635bff);
}
.status-breakdown {
    display: grid;
    gap: 14px;
}
.status-breakdown-row {
    display: grid;
    grid-template-columns: 170px 1fr 56px;
    gap: 12px;
    align-items: center;
}
.status-breakdown-label {
    display: flex;
    align-items: center;
    gap: 10px;
}
.status-breakdown-label strong,
.status-breakdown-percent {
    font-size: 13px;
}
.status-breakdown-track {
    height: 10px;
    border-radius: 999px;
    background: #eef2fb;
    overflow: hidden;
}
.status-breakdown-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
}
.tone-success { background: linear-gradient(90deg, #48d693, #18b57b); }
.tone-failed,
.tone-rejected,
.tone-cancelled { background: linear-gradient(90deg, #f97066, #d92d20); }
.tone-running,
.tone-queued,
.tone-approved,
.tone-pending_approval { background: linear-gradient(90deg, #847dff, #635bff); }
.leaderboard,
.failure-list {
    display: grid;
    gap: 12px;
}
.leaderboard-row,
.failure-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fbfcff;
}
.leaderboard-row strong,
.failure-item strong {
    display: block;
    margin-bottom: 4px;
}
.leaderboard-row span,
.failure-item span,
.table-subtle {
    color: var(--muted);
    font-size: 12px;
}
.leaderboard-metrics {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: end;
}
.failure-item {
    color: inherit;
    text-decoration: none;
}
.failure-item:hover {
    border-color: #d7def3;
    background: #f6f8ff;
}
.empty-copy {
    margin: 0;
    color: var(--muted);
}
.status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.status-card {
    min-height: 144px;
}
.status-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.status-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}
.grid-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(140px, .7fr) minmax(240px, 1.5fr) auto;
    gap: 14px;
    align-items: end;
}
.grid-form > * {
    min-width: 0;
}
label {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
input, select, textarea {
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0 14px;
    font: inherit;
    background: rgba(255,255,255,.96);
    color: var(--ink);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(99, 91, 255, .42);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: #ffffff;
}
textarea {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
}
button {
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: white;
    font-weight: 800;
    padding: 0 18px;
    cursor: pointer;
    box-shadow: 0 16px 28px rgba(99, 91, 255, .2);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
button:hover {
    filter: brightness(.98);
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(99, 91, 255, .24);
}
button.secondary {
    background: #ffffff;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th, td {
    text-align: left;
    padding: 16px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
th { color: #97a2b8; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:hover {
    background: #fafbff;
}
code {
    background: #f3f5fb;
    border: 1px solid var(--line);
    padding: 4px 8px;
    border-radius: 10px;
}
.status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f5fb;
    color: var(--muted);
    font-weight: 800;
    font-size: 12px;
}
.status.success { background: #e5fbf0; color: var(--good); }
.status.failed, .status.rejected { background: #fee4e2; color: var(--bad); }
.status.pending_approval, .status.running, .status.queued, .status.approved { background: #eef0ff; color: var(--accent-strong); }
.actions { display: flex; gap: 8px; }
.actions form { margin: 0; }
.actions form select {
    min-width: 110px;
    margin-right: 8px;
}
.small-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}
.link-button {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    height: auto;
    min-height: 34px;
    color: var(--accent);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.link-button:hover {
    color: var(--accent-strong);
    background: transparent;
}
.filter-form {
    display: flex;
    justify-content: end;
}
.filter-form label {
    min-width: 320px;
}
.projects-toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: end;
}
.search-field {
    min-width: 320px;
}
.view-switch {
    display: inline-flex;
    gap: 8px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f7f8fd;
}
.view-switch button {
    min-width: 84px;
}
.view-switch button.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: white;
}
.form-hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.project-browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.project-browser-card {
    background: #fbfcff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.project-browser-card-clickable,
tr[data-project-href] {
    cursor: pointer;
}
.project-browser-card-clickable:hover {
    border-color: #d4dcf2;
    background: #f7f8ff;
    box-shadow: var(--shadow-lg);
}
.project-browser-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 12px;
}
.project-browser-repo {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.45;
}
.project-browser-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.project-browser-metrics div {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    background: #f8f9ff;
}
.project-browser-metrics span,
.project-browser-meta {
    color: var(--muted);
    font-size: 12px;
}
.project-browser-metrics strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
    color: var(--ink);
}
.project-browser-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.project-browser-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.project-table-wrap {
    margin-top: 10px;
}
.modal-shell {
    position: fixed;
    inset: 0;
    place-items: center;
    z-index: 40;
}
.modal-shell[hidden] {
    display: none !important;
}
.modal-shell:not([hidden]) {
    display: grid;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(27, 36, 58, .36);
    backdrop-filter: blur(4px);
}
.modal-card {
    position: relative;
    z-index: 1;
    width: min(960px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow-xl);
    padding: 24px;
}
.modal-close {
    min-width: 84px;
}
.modal-form {
    margin: 0;
}
.project-modal-card {
    width: min(1120px, calc(100vw - 32px));
}
.project-modal-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
}
.project-modal-form > label {
    grid-column: span 3;
}
.project-modal-form > label.wide {
    grid-column: span 6;
}
.project-modal-form > label.field-credential {
    grid-column: span 4;
}
.project-modal-form > label.field-deploy-path {
    grid-column: span 8;
}
.project-modal-form > label.field-auto-branch,
.project-modal-form > label.check {
    grid-column: span 3;
}
.project-modal-form > label.check {
    display: flex;
    min-height: 46px;
    padding-top: 34px;
}
.project-modal-form > .modal-actions {
    grid-column: 1 / -1;
    justify-content: start;
    margin-top: 4px;
}
.modal-actions {
    display: flex;
    justify-content: end;
    align-items: end;
}
.dual-actions {
    gap: 10px;
    flex-wrap: wrap;
}
.inline-flash {
    margin-bottom: 14px;
}
.overview-hero {
    margin-bottom: 18px;
}
.overview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}
.overview-meta span {
    background: #f7f8fd;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
}
.overview-detail-card,
.overview-deploy-panel {
    min-height: 100%;
    min-width: 0;
}
.overview-rows {
    margin-bottom: 16px;
}
.overview-rows div {
    min-width: 0;
}
.overview-rows code,
.overview-rows strong {
    display: block;
    line-height: 1.5;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.overview-deploy-form {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(280px, 1.4fr);
    gap: 16px 16px;
    align-items: start;
}
.overview-deploy-form > label,
.overview-deploy-form > .overview-deploy-meta,
.overview-deploy-form > .modal-actions {
    min-width: 0;
}
.overview-deploy-form > .overview-field-commit,
.overview-deploy-form > .wide.overview-field-commit {
    grid-column: auto;
}
.overview-deploy-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    grid-column: 1 / span 2;
    color: var(--muted);
    font-size: 12px;
    align-self: start;
}
.overview-deploy-meta span {
    background: #f7f8fd;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px 14px;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: anywhere;
}
.overview-deploy-form > .modal-actions {
    grid-column: 3;
    justify-content: stretch;
    align-self: stretch;
}
.overview-deploy-form .dual-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}
.overview-deploy-form .dual-actions button {
    width: 100%;
    min-height: 56px;
    height: auto;
    white-space: normal;
    text-align: center;
}
.overview-workspace-grid {
    grid-template-columns: minmax(320px, .95fr) minmax(520px, 1.35fr);
}
.overview-deploy-panel .panel-head {
    align-items: start;
    flex-wrap: wrap;
}
.row-selected {
    background: #f6f8ff;
}
.row-selected td {
    border-bottom-color: #d7dff3;
}
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #ffffff, #f8f9ff);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.project-card.selected {
    outline: 2px solid rgba(99, 91, 255, .26);
    outline-offset: 0;
}
.project-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 10px;
}
.project-kicker {
    margin: 0 0 4px;
    color: #a2acbf;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
}
.project-card h2,
.workspace-hero h2,
.environment-card h2 {
    margin: 0;
}
.project-card h2 {
    color: var(--ink);
    font-size: 21px;
}
.project-repo {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.project-repo-hero {
    color: var(--muted);
}
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 13px;
}
.project-meta span {
    background: #f7f8fd;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
}
.project-last {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.workspace-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
}
.workspace-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
}
.workspace-stats div {
    background: #f7f8fd;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px 14px;
}
.metric-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}
.environment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.environment-card {
    min-height: 100%;
}
.environment-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 14px;
}
.environment-rows {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}
.environment-rows div {
    display: grid;
    gap: 6px;
}
.environment-rows span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
}
.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.workspace-form {
    min-height: 100%;
    min-width: 0;
}
.workspace-deploy-form {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}
.live-run-panel {
    margin-bottom: 18px;
}
.run-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
}
.run-meta span {
    background: #f7f8fd;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
}
.progress-shell {
    height: 12px;
    border-radius: 999px;
    background: #edf0fb;
    overflow: hidden;
    margin-bottom: 14px;
}
.progress-bar {
    height: 100%;
    border-radius: 999px;
    transition: width .35s ease;
}
.progress-running,
.progress-queued {
    background: linear-gradient(90deg, #847dff, #635bff);
}
.progress-success {
    background: linear-gradient(90deg, #067647, #12b76a);
}
.progress-failed {
    background: linear-gradient(90deg, #b42318, #f04438);
}
.progress-copy {
    margin-bottom: 16px;
}
.progress-copy strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
}
.progress-copy p {
    margin: 0;
    color: var(--muted);
}
.live-terminal {
    min-height: 280px;
    max-height: 420px;
    padding: 16px;
}
.empty-state {
    text-align: center;
    padding: 36px 20px;
}
.empty-state p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}
.empty-state.compact {
    padding: 18px 0 0;
    text-align: left;
}
.grid-form.tall {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    align-items: start;
}
.wide { grid-column: span 2; }
.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
}
.check input {
    width: 18px;
    height: 18px;
}
.terminal {
    background: #101615;
    color: #d9e5e2;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.5;
    overflow-x: auto;
}
.terminal time {
    color: #8fb8b1;
    margin-right: 10px;
}
.flash {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,.74);
    background: rgba(255,255,255,.88);
    box-shadow: 0 12px 26px rgba(13, 26, 39, .08);
}
.flash.success { border-color: #abefc6; color: var(--good); }
.flash.error { border-color: #fecdca; color: var(--bad); }
.auth-main {
    min-height: 100vh;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 18px;
    padding: 32px;
}
.auth-main > .flash {
    width: min(100%, 460px);
    margin: 0;
}
.auth-shell {
    width: min(1220px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
    gap: 28px;
    align-items: stretch;
}
.auth-visual,
.auth-card {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
}
.auth-visual {
    display: grid;
    gap: 24px;
    padding: 36px;
    color: #eef8fb;
    background:
        radial-gradient(circle at 82% 18%, rgba(132, 125, 255, .18), transparent 24%),
        radial-gradient(circle at 16% 12%, rgba(155, 149, 255, .12), transparent 28%),
        linear-gradient(155deg, #171f35 0%, #20294a 54%, #2a3563 100%);
    border: 1px solid rgba(181, 214, 230, .16);
    box-shadow: var(--shadow-xl);
}
.auth-visual::before {
    content: "";
    position: absolute;
    inset: 16px;
    border-radius: 24px;
    border: 1px solid rgba(181, 214, 230, .1);
    pointer-events: none;
}
.auth-visual-copy,
.auth-visual-frame,
.auth-highlights {
    position: relative;
    z-index: 1;
}
.auth-kicker {
    margin: 0 0 10px;
    color: #b8b5ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.auth-visual h1 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.04;
    margin-bottom: 14px;
    color: #fbffff;
}
.auth-description {
    max-width: 620px;
    margin: 0;
    color: #b7ccd8;
    font-size: 16px;
    line-height: 1.7;
}
.auth-visual-frame {
    padding: 18px;
    border-radius: 28px;
    border: 1px solid rgba(181, 214, 230, .16);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.auth-visual-frame img {
    display: block;
    width: 100%;
    height: auto;
}
.auth-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.auth-highlights article {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(181, 214, 230, .12);
    background: rgba(255,255,255,.05);
}
.auth-highlights strong {
    font-size: 15px;
    color: #f8fdff;
}
.auth-highlights span {
    color: #a9bfcb;
    font-size: 13px;
    line-height: 1.55;
}
.auth-form-column {
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-card {
    width: min(100%, 470px);
    padding: 32px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248, 251, 253, .95)),
        var(--panel-solid);
    border: 1px solid rgba(255,255,255,.88);
    box-shadow: var(--shadow-xl);
    display: grid;
    gap: 24px;
}
.auth-card::before {
    content: "";
    position: absolute;
    inset: auto auto -48px -32px;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(99, 91, 255, .12), transparent 68%);
}
.auth-branding,
.auth-copy,
.auth-form,
.auth-footer {
    position: relative;
    z-index: 1;
}
.auth-branding {
    display: flex;
    align-items: center;
    gap: 14px;
}
.auth-brand-kicker {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.auth-branding strong {
    display: block;
    font-family: "Sora", sans-serif;
    font-size: 28px;
    letter-spacing: -.04em;
}
.auth-eyebrow {
    margin-bottom: 10px;
}
.auth-copy h2 {
    font-size: 34px;
    line-height: 1.08;
    margin-bottom: 12px;
}
.auth-copy p:last-child {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}
.auth-form {
    display: grid;
    gap: 16px;
}
.auth-form input {
    height: 52px;
    border-radius: 16px;
    border-color: var(--line);
    background: rgba(255,255,255,.98);
}
.auth-form button {
    height: 54px;
    margin-top: 6px;
}
.auth-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.auth-footer span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
@media (max-width: 860px) {
    body.app-shell { grid-template-columns: 1fr; }
    .side { display: none; }
    .mobile-route-strip {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 12px 18px 0;
    }
    .mobile-route-link {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 0 14px;
        border-radius: 16px;
        border: 1px solid var(--line);
        background: rgba(255,255,255,.94);
        color: var(--ink-soft);
        text-decoration: none;
        white-space: nowrap;
        box-shadow: var(--shadow-sm);
        font-weight: 700;
    }
    .mobile-route-link.active {
        background: var(--accent-soft);
        border-color: var(--accent-soft-strong);
        color: var(--accent-strong);
    }
    .mobile-route-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 10px;
        background: #f5f6fd;
    }
    .mobile-route-icon svg {
        width: 16px;
        height: 16px;
    }
    .app-topbar,
    .topbar-left,
    .topbar-right {
        flex-wrap: wrap;
    }
    .app-topbar {
        padding: 16px 18px;
        align-items: start;
    }
    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }
    .topbar-chip-org {
        order: 1;
    }
    .topbar-chip-user {
        order: 3;
        width: 100%;
    }
    .topbar-icon-group {
        order: 2;
    }
    .grid-form { grid-template-columns: 1fr; }
    .grid-form.tall { grid-template-columns: 1fr; }
    .project-modal-form { grid-template-columns: 1fr; }
    .workspace-deploy-form { grid-template-columns: 1fr; }
    .analytics-hero { grid-template-columns: 1fr; }
    .analytics-grid { grid-template-columns: 1fr; }
    .analytics-grid-wide { grid-template-columns: 1fr; }
    .github-grid { grid-template-columns: 1fr; }
    .info-pairs { grid-template-columns: 1fr; }
    .github-form { grid-template-columns: 1fr; }
    .analytics-hero-stats { grid-template-columns: 1fr; }
    .cadence-chart { grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 16px; }
    .status-breakdown-row { grid-template-columns: 1fr; }
    .leaderboard-row, .failure-item { flex-direction: column; align-items: start; }
    .leaderboard-metrics { justify-content: start; }
    .projects-toolbar { justify-content: stretch; }
    .search-field { min-width: 0; width: 100%; }
    .view-switch { width: 100%; }
    .view-switch button { flex: 1; }
    .project-browser-metrics { grid-template-columns: 1fr; }
    .modal-card { width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 16px; }
    .overview-deploy-form { grid-template-columns: 1fr; }
    .overview-meta,
    .overview-deploy-meta { flex-direction: column; }
    .overview-deploy-meta {
        grid-template-columns: 1fr;
        grid-column: auto;
    }
    .overview-deploy-form > .modal-actions {
        grid-column: auto;
    }
    .status-grid { grid-template-columns: 1fr; }
    .wide,
    .project-modal-form > label,
    .project-modal-form > label.wide,
    .project-modal-form > label.field-credential,
    .project-modal-form > label.field-deploy-path,
    .project-modal-form > label.field-auto-branch,
    .project-modal-form > label.check,
    .project-modal-form > .modal-actions { grid-column: auto; }
    .panel-actions { flex-direction: column; align-items: stretch; }
    .filter-form { justify-content: stretch; }
    .filter-form label { min-width: 0; width: 100%; }
    .workspace-hero { flex-direction: column; align-items: stretch; }
    .workspace-stats { grid-template-columns: 1fr 1fr; }
    .workspace-grid { grid-template-columns: 1fr; }
    .main { padding: 20px 18px 28px; overflow-x: auto; }
    .top { flex-direction: column; }
    .top-actions { justify-content: start; }
    .module-tabs {
        width: 100%;
        overflow-x: auto;
    }
    .auth-main { padding: 18px; align-content: start; }
    .auth-shell { grid-template-columns: 1fr; gap: 18px; }
    .auth-form-column { order: -1; }
    .auth-visual { order: 2; }
    .auth-visual,
    .auth-card { border-radius: 26px; }
    .auth-visual { padding: 24px; }
    .auth-visual h1 { font-size: 2.25rem; }
    .auth-highlights { grid-template-columns: 1fr; }
    .auth-card { width: 100%; padding: 24px; }
    .auth-copy h2 { font-size: 28px; }
}
@media (max-width: 1180px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .auth-form-column { order: -1; }
    .auth-visual { order: 2; }
    .auth-card {
        width: min(100%, 560px);
    }
}
