:root {
    --bg: #efe6d6;
    --bg-soft: #fbf7ef;
    --panel: rgba(255, 252, 247, 0.9);
    --panel-strong: #fffefa;
    --line: rgba(33, 53, 54, 0.12);
    --ink: #182527;
    --muted: #627173;
    --teal: #0d7068;
    --teal-strong: #0a5852;
    --teal-soft: #d8efe9;
    --blue: #235b91;
    --blue-soft: #dce9f7;
    --gold: #a86b25;
    --gold-soft: #f7e7d3;
    --red: #ab3c2d;
    --red-soft: #f9dfda;
    --green: #1d7a56;
    --green-soft: #dff2e9;
    --shadow: 0 26px 70px rgba(39, 45, 45, 0.12);
    --shadow-soft: 0 14px 28px rgba(39, 45, 45, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-body: "Bahnschrift", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-title: "Bahnschrift SemiCondensed", "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(13, 112, 104, 0.16), transparent 24%),
        radial-gradient(circle at 82% 14%, rgba(35, 91, 145, 0.12), transparent 20%),
        radial-gradient(circle at bottom right, rgba(168, 107, 37, 0.14), transparent 30%),
        linear-gradient(180deg, #efe6d7 0%, #f8f3eb 48%, #eee1d2 100%);
    font-family: var(--font-body);
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    cursor: pointer;
}

code,
pre {
    font-family: "Consolas", "SFMono-Regular", monospace;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(13, 112, 104, 0.4);
    box-shadow: 0 0 0 4px rgba(13, 112, 104, 0.12);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

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

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 22px;
    background:
        linear-gradient(180deg, rgba(16, 30, 33, 0.96), rgba(24, 37, 39, 0.92)),
        linear-gradient(150deg, rgba(13, 112, 104, 0.14), transparent 38%);
    color: #f8f4ed;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    padding: 18px 18px 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand strong,
.auth-brand strong {
    display: block;
    font-family: var(--font-title);
    font-size: 24px;
    letter-spacing: 0.04em;
}

.sidebar-brand span,
.auth-brand span {
    display: block;
    margin-top: 8px;
    color: rgba(248, 244, 237, 0.68);
    line-height: 1.6;
    font-size: 14px;
}

.app-nav {
    display: grid;
    gap: 8px;
    margin: 28px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(248, 244, 237, 0.74);
    border: 1px solid transparent;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.nav-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.nav-item.is-featured:not(.is-active) {
    color: #fff;
    border-color: rgba(168, 107, 37, 0.28);
    background: linear-gradient(135deg, rgba(168, 107, 37, 0.28), rgba(13, 112, 104, 0.24));
    box-shadow: 0 10px 24px rgba(10, 25, 26, 0.16);
}

.nav-item.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(13, 112, 104, 0.8), rgba(35, 91, 145, 0.82));
    box-shadow: 0 14px 26px rgba(10, 25, 26, 0.22);
}

.sidebar-foot {
    display: grid;
    gap: 16px;
    margin-top: auto;
}

.session-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.session-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.session-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(13, 112, 104, 0.92), rgba(168, 107, 37, 0.88));
    font-weight: 700;
    font-size: 18px;
}

.session-body strong {
    display: block;
    font-size: 16px;
}

.session-role-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.session-body .session-meta {
    display: block;
    color: rgba(248, 244, 237, 0.68);
    line-height: 1.5;
    font-size: 13px;
}

.session-body .status-badge {
    align-self: flex-start;
}

.app-main {
    padding: 26px;
    position: relative;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(13, 112, 104, 0.1);
    color: var(--teal-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title,
.hero-panel h1,
.auth-panel h1 {
    margin: 12px 0 8px;
    font-family: var(--font-title);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.04;
    letter-spacing: 0.01em;
}

.page-description,
.hero-panel p,
.panel-subtitle,
.muted {
    color: var(--muted);
    line-height: 1.7;
}

.hero-panel,
.panel,
.auth-panel,
.api-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.95), rgba(255, 249, 241, 0.84));
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: 28px;
    margin-bottom: 18px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(13, 112, 104, 0.13), transparent 46%),
        radial-gradient(circle at top right, rgba(35, 91, 145, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 253, 249, 0.99), rgba(255, 248, 240, 0.92));
}

.hero-panel::after {
    content: "";
    position: absolute;
}

.panel,
.api-card {
    padding: 22px;
}

.panel + .panel,
.panel + .section-grid,
.section-grid + .panel,
.hero-panel + .panel,
.hero-panel + .section-grid {
    margin-top: 18px;
}

.section-grid,
.metric-grid,
.info-grid,
.form-grid,
.split-grid,
.api-grid {
    display: grid;
    gap: 18px;
}

.metric-grid,
.info-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

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

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

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

.metric-card,
.info-card,
.sub-panel {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(33, 53, 54, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 240, 233, 0.84));
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover,
.info-card:hover,
.sub-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(39, 45, 45, 0.12);
    border-color: rgba(13, 112, 104, 0.16);
}

.metric-label,
.info-label,
.field-label,
.table-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.metric-value {
    display: block;
    margin-top: 10px;
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 700;
    color: var(--ink);
}

.metric-meta {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.info-value {
    margin-top: 12px;
    line-height: 1.6;
    word-break: break-word;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.panel-title,
.api-card h3 {
    margin: 0;
    font-size: 22px;
    font-family: var(--font-title);
}

.field {
    display: grid;
    gap: 8px;
}

.field-label {
    font-size: 13px;
}

.field-hint {
    color: var(--muted);
    line-height: 1.6;
    font-size: 13px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.button,
.button-subtle,
.button-danger,
.button-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover,
.button-subtle:hover,
.button-danger:hover,
.button-light:hover {
    transform: translateY(-1px);
}

.button {
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    box-shadow: 0 14px 28px rgba(13, 112, 104, 0.2);
}

.button-subtle {
    color: var(--teal-strong);
    background: var(--teal-soft);
    border-color: rgba(13, 112, 104, 0.15);
}

.button-light {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
    border-color: var(--line);
}

.button-danger {
    color: var(--red);
    background: var(--red-soft);
    border-color: rgba(171, 60, 45, 0.16);
}

.notice {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    line-height: 1.6;
}

.notice-info {
    color: var(--blue);
    background: var(--blue-soft);
}

.notice-success {
    color: var(--green);
    background: var(--green-soft);
}

.notice-danger {
    color: var(--red);
    background: var(--red-soft);
}

.notice-warning {
    color: var(--gold);
    background: var(--gold-soft);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-blue {
    background: var(--blue-soft);
    color: var(--blue);
}

.badge-green {
    background: var(--green-soft);
    color: var(--green);
}

.badge-gold {
    background: var(--gold-soft);
    color: var(--gold);
}

.badge-red {
    background: var(--red-soft);
    color: var(--red);
}

.badge-sand {
    background: rgba(89, 72, 45, 0.12);
    color: #6e5635;
}

.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.choice-chip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 180px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.choice-chip:hover {
    transform: translateY(-1px);
}

.choice-chip input {
    width: auto;
    margin-top: 2px;
}

.choice-chip.is-active {
    border-color: rgba(13, 112, 104, 0.3);
    background: linear-gradient(180deg, rgba(216, 239, 233, 0.92), rgba(255, 255, 255, 0.85));
}

.choice-main {
    display: grid;
    gap: 4px;
}

.choice-main small {
    color: var(--muted);
    line-height: 1.5;
}

.table-shell {
    overflow: auto;
    border-radius: 20px;
    border: 1px solid rgba(33, 53, 54, 0.08);
    background: rgba(255, 255, 255, 0.8);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

thead th {
    padding: 14px;
    text-align: left;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(33, 53, 54, 0.08);
    background: rgba(247, 243, 237, 0.9);
}

tbody td {
    padding: 14px;
    border-bottom: 1px solid rgba(33, 53, 54, 0.06);
    vertical-align: top;
}

tbody tr:hover {
    background: rgba(13, 112, 104, 0.04);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.mini-button.is-danger {
    color: var(--red);
    background: var(--red-soft);
}

.output {
    min-height: 180px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #142326;
    color: #e9f0ee;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
}

.empty-state {
    padding: 20px;
    border-radius: 18px;
    border: 1px dashed rgba(33, 53, 54, 0.18);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.48);
}

.hero-banner {
    position: relative;
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(13, 112, 104, 0.06), transparent 30%),
        radial-gradient(circle at right center, rgba(35, 91, 145, 0.08), transparent 26%);
    pointer-events: none;
}

.cluster-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.live-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(13, 112, 104, 0.12);
    box-shadow: var(--shadow-soft);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 0 rgba(13, 112, 104, 0.36);
    animation: pulse 1.8s infinite;
}

.quick-action-grid,
.node-grid {
    display: grid;
    gap: 18px;
}

.quick-action-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.action-tile {
    display: block;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(33, 53, 54, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 238, 231, 0.86));
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 38px rgba(39, 45, 45, 0.12);
}

.action-tile.is-featured {
    border-color: rgba(13, 112, 104, 0.18);
    background:
        linear-gradient(135deg, rgba(13, 112, 104, 0.14), rgba(35, 91, 145, 0.08)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 238, 231, 0.9));
}

.action-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.action-tile span {
    color: var(--muted);
    line-height: 1.6;
}

.node-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(33, 53, 54, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 238, 231, 0.88));
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.node-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 40px rgba(39, 45, 45, 0.12);
    border-color: rgba(13, 112, 104, 0.18);
}

.node-header,
.node-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.node-name {
    margin: 0;
    font-family: var(--font-title);
    font-size: 24px;
}

.node-host {
    color: var(--muted);
    font-size: 14px;
}

.node-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.node-meta {
    flex-wrap: wrap;
}

.node-stat {
    min-width: 110px;
}

.node-stat strong {
    display: block;
    font-size: 18px;
}

.node-stat span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.resource-stack {
    display: grid;
    gap: 12px;
}

.resource-meter {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(33, 53, 54, 0.06);
    background: rgba(255, 255, 255, 0.82);
}

.resource-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 10px;
}

.resource-label {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.resource-value {
    font-size: 16px;
}

.resource-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(24, 37, 39, 0.08);
}

.resource-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), var(--blue));
}

.tone-gold .resource-fill {
    background: linear-gradient(90deg, #d9a24d, #a86b25);
}

.tone-red .resource-fill {
    background: linear-gradient(90deg, #d76a56, #ab3c2d);
}

.tone-blue .resource-fill {
    background: linear-gradient(90deg, #68a0d8, #235b91);
}

.resource-hint {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.modal-root {
    position: fixed;
    inset: 0;
    z-index: 90;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 25, 28, 0.52);
    backdrop-filter: blur(8px);
}

.modal-shell {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 26px;
}

.modal-window {
    width: min(720px, 100%);
    max-height: min(86vh, 920px);
    overflow: auto;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background:
        linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(246, 239, 232, 0.94));
    box-shadow: 0 34px 80px rgba(15, 27, 29, 0.28);
}

.modal-window[data-size="wide"] {
    width: min(980px, 100%);
}

.modal-header,
.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding: 24px 24px 0;
}

.modal-heading {
    display: grid;
    gap: 10px;
}

.modal-title {
    margin: 0;
    font-family: var(--font-title);
    font-size: clamp(28px, 3vw, 34px);
}

.modal-subtitle,
.modal-copy {
    color: var(--muted);
    line-height: 1.7;
}

.modal-body {
    padding: 18px 24px 0;
}

.modal-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 22px 24px 24px;
}

.modal-close {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(33, 53, 54, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    font-size: 28px;
    line-height: 1;
    color: var(--ink);
}

.modal-close:hover {
    transform: translateY(-1px);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 112, 104, 0.36);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 112, 104, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 112, 104, 0);
    }
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(33, 53, 54, 0.08);
    background: rgba(255, 255, 255, 0.8);
}

.timeline-item strong {
    display: block;
    margin-bottom: 8px;
}

.endpoint {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(35, 91, 145, 0.08);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

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

.auth-layout {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
}

.auth-brand,
.auth-panel {
    padding: 30px;
}

.auth-brand {
    border-radius: 32px;
    color: #fbf6ef;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 28%),
        linear-gradient(145deg, #142326 0%, #0f4a48 52%, #8a4e22 100%);
    box-shadow: var(--shadow);
}

.auth-brand ul {
    margin: 24px 0 0;
    padding-left: 18px;
    line-height: 1.8;
    color: rgba(251, 246, 239, 0.84);
}

.tab-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-button {
    flex: 1;
    min-height: 48px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-weight: 700;
}

.tab-button.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--teal), var(--blue));
}

.auth-panel form[hidden],
[hidden] {
    display: none !important;
}

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

.approval-journey-panel {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(13, 112, 104, 0.12);
    background:
        radial-gradient(circle at top right, rgba(35, 91, 145, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255, 254, 250, 0.96), rgba(247, 240, 229, 0.92));
    box-shadow: var(--shadow-soft);
}

.approval-journey-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--teal) 0%, var(--blue) 52%, var(--gold) 100%);
}

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

.approval-journey-head .panel-title {
    margin-top: 6px;
    font-size: 24px;
}

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

.approval-journey-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.approval-step {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    min-height: 128px;
    padding: 18px 16px;
    border-radius: 22px;
    border: 1px solid rgba(33, 53, 54, 0.08);
    background: rgba(255, 255, 255, 0.78);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.approval-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 23px;
    right: -21px;
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(13, 112, 104, 0.5), rgba(168, 107, 37, 0.3));
}

.approval-step-marker {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    color: var(--teal-strong);
    background: linear-gradient(180deg, rgba(216, 239, 233, 0.95), rgba(255, 255, 255, 0.88));
    border: 1px solid rgba(13, 112, 104, 0.14);
}

.approval-step-body {
    display: grid;
    gap: 10px;
}

.approval-step-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: baseline;
    justify-content: space-between;
}

.approval-step-top strong {
    font-size: 16px;
    line-height: 1.4;
}

.approval-step-state {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.approval-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 13px;
}

.approval-step.is-done {
    border-color: rgba(29, 122, 86, 0.18);
    background: linear-gradient(180deg, rgba(223, 242, 233, 0.96), rgba(255, 255, 255, 0.92));
}

.approval-step.is-done .approval-step-marker {
    color: #fff;
    background: linear-gradient(135deg, var(--green), #2d9365);
    border-color: transparent;
}

.approval-step.is-done .approval-step-state {
    color: var(--green);
}

.approval-step.is-active {
    transform: translateY(-1px);
    border-color: rgba(35, 91, 145, 0.22);
    background: linear-gradient(180deg, rgba(220, 233, 247, 0.98), rgba(255, 255, 255, 0.94));
    box-shadow: 0 18px 30px rgba(35, 91, 145, 0.12);
}

.approval-step.is-active .approval-step-marker {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    border-color: transparent;
}

.approval-step.is-active .approval-step-state {
    color: var(--blue);
}

.approval-step.is-rejected {
    border-color: rgba(171, 60, 45, 0.2);
    background: linear-gradient(180deg, rgba(249, 223, 218, 0.98), rgba(255, 255, 255, 0.94));
}

.approval-step.is-rejected .approval-step-marker {
    color: #fff;
    background: linear-gradient(135deg, var(--red), #c85f52);
    border-color: transparent;
}

.approval-step.is-rejected .approval-step-state {
    color: var(--red);
}

.approval-step.is-pending {
    background: rgba(255, 255, 255, 0.72);
}

.approval-step.is-pending .approval-step-marker {
    color: var(--gold);
    background: linear-gradient(180deg, rgba(247, 231, 211, 0.92), rgba(255, 255, 255, 0.9));
    border-color: rgba(168, 107, 37, 0.16);
}

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

    .app-sidebar {
        position: static;
        height: auto;
    }

    .sidebar-foot {
        margin-top: 22px;
    }
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .approval-flow {
        grid-template-columns: 1fr;
    }

    .approval-step:not(:last-child)::after {
        top: auto;
        right: auto;
        bottom: -15px;
        left: 23px;
        width: 2px;
        height: 16px;
    }

    .page-top {
        flex-direction: column;
    }

    .modal-shell {
        padding: 16px;
    }

    .modal-header,
    .modal-actions,
    .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 720px) {
    .app-main,
    .auth-shell {
        padding: 18px;
    }

    .app-sidebar {
        padding: 18px;
    }

    .hero-panel,
    .panel,
    .api-card,
    .auth-brand,
    .auth-panel {
        padding: 18px;
        border-radius: 22px;
    }

    .actions,
    .tab-row {
        flex-direction: column;
    }

    .approval-journey-head {
        flex-direction: column;
    }

    .approval-journey-head .status-badge {
        align-self: flex-start;
    }

    .approval-journey-actions {
        justify-content: flex-start;
    }

    .approval-step {
        grid-template-columns: 42px minmax(0, 1fr);
        min-height: auto;
        padding: 16px 14px;
    }

    .approval-step-marker {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .button,
    .button-subtle,
    .button-danger,
    .button-light,
    .tab-button {
        width: 100%;
    }
}
