:root {
    --ink: #102033;
    --muted: #5f7186;
    --line: #dce6ef;
    --cream: #f7f9fc;
    --green: #0f8f68;
    --green-deep: #0b6d50;
    --navy: #0b3253;
    --gold: #d89b2b;
    --rose: #cc4b4b;
    --shadow-soft: 0 18px 42px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 20px 46px rgba(15, 23, 42, 0.11);
}

body.control-room-body {
    min-height: 100vh;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Segoe UI Variable Text", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(216, 155, 43, 0.09), transparent 24%),
        radial-gradient(circle at top right, rgba(15, 143, 104, 0.11), transparent 28%),
        linear-gradient(180deg, #f8fbfe, #edf3f8 52%, #eef4f9 100%);
    color: var(--ink);
}

.control-room-body h1,
.control-room-body h2,
.control-room-body h3,
.control-room-body h4,
.control-room-body h5,
.control-room-body h6 {
    font-family: Georgia, "Palatino Linotype", serif;
    letter-spacing: -0.02em;
}

.page-shell {
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px;
}

.hero-card,
.nav-card,
.surface-card,
.metric-card,
.mini-card {
    border: 0;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    animation: rise 0.6s ease both;
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 2vw, 2rem);
    background: linear-gradient(135deg, rgba(15, 143, 104, 0.98), rgba(11, 50, 83, 0.98));
    color: #fff;
}

.hero-card::before,
.hero-card::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.hero-card::before {
    width: 260px;
    height: 260px;
    right: -70px;
    top: -60px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.hero-card::after {
    width: 220px;
    height: 220px;
    left: 48%;
    bottom: -120px;
    background: radial-gradient(circle, rgba(216, 155, 43, 0.26), rgba(216, 155, 43, 0));
}

.hero-card > * {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-card p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.02rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: flex-end;
}

.hero-actions .btn,
.logout-link {
    border-radius: 999px;
    padding-inline: 1.1rem;
}

.hero-chip-group,
.chip-group,
.status-cluster,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.68rem 0.98rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.92rem;
}

.nav-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    padding: 1rem 1.15rem;
}

.nav-card-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1.05rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.section-link:hover,
.section-link.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.logout-link {
    border-color: rgba(11, 50, 83, 0.18);
    color: var(--navy);
}

.logout-link:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.metric-card,
.surface-card,
.mini-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.metric-card:hover,
.surface-card:hover,
.mini-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.metric-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    background: rgba(255, 255, 255, 0.94);
    padding: 1.3rem 1.35rem;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--green));
}

.metric-label {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.metric-value {
    margin-top: 0.65rem;
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1;
}

.metric-note {
    margin-top: 0.65rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.surface-card {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(10px);
}

.mini-card {
    background: rgba(255, 255, 255, 0.92);
    padding: 1.1rem 1.15rem;
}

.panel-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    padding: 1.3rem 1.4rem;
}

.panel-title {
    margin: 0;
    font-size: 1.35rem;
}

.panel-copy {
    margin: 0.35rem 0 0;
    max-width: 820px;
    color: var(--muted);
}

.panel-body {
    padding: 1.35rem 1.4rem;
}

.info-grid,
.split-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.callout {
    border: 1px solid rgba(15, 143, 104, 0.18);
    background: linear-gradient(135deg, rgba(232, 242, 255, 0.92), rgba(240, 253, 249, 0.98));
    border-radius: 20px;
    padding: 1rem 1.15rem;
    box-shadow: 0 10px 25px rgba(11, 50, 83, 0.05);
}

.callout strong {
    display: block;
    margin-bottom: 0.25rem;
}

.summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(220, 230, 239, 0.8);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98));
}

.summary-item small,
.entity-meta,
.muted-copy {
    color: var(--muted);
}

.entity-cell {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.entity-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(216, 155, 43, 0.18), rgba(15, 143, 104, 0.18));
    color: var(--navy);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.entity-title {
    font-weight: 700;
    font-size: 1.02rem;
}

.entity-meta {
    font-size: 0.9rem;
    line-height: 1.5;
}

.entity-meta code {
    border-radius: 999px;
    background: rgba(11, 50, 83, 0.08);
    color: var(--navy);
    padding: 0.15rem 0.4rem;
}

.table-wrap {
    padding: 0 1rem 1rem;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    margin-top: -12px;
}

.data-table thead th {
    padding: 1rem 0.9rem 0.65rem;
    border-bottom: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody tr {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.data-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.data-table tbody td {
    padding: 1rem 0.95rem;
    vertical-align: top;
    border-top: 1px solid rgba(220, 230, 239, 0.4);
    border-bottom: 1px solid rgba(220, 230, 239, 0.4);
    background: transparent;
}

.data-table tbody td:first-child {
    border-left: 1px solid rgba(220, 230, 239, 0.4);
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

.data-table tbody td:last-child {
    border-right: 1px solid rgba(220, 230, 239, 0.4);
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

.tone-success {
    background: rgba(15, 143, 104, 0.12);
    color: var(--green);
}

.tone-danger {
    background: rgba(204, 75, 75, 0.12);
    color: var(--rose);
}

.tone-warning {
    background: rgba(216, 155, 43, 0.16);
    color: #9b6a0a;
}

.tone-info {
    background: rgba(11, 50, 83, 0.1);
    color: var(--navy);
}

.tone-neutral {
    background: rgba(95, 113, 134, 0.12);
    color: var(--muted);
}

.tone-navy {
    background: rgba(11, 50, 83, 0.12);
    color: var(--navy);
}

.tone-gold {
    background: rgba(216, 155, 43, 0.16);
    color: #9b6a0a;
}

.inline-actions .btn,
.table-wrap .btn {
    border-radius: 999px;
    padding-inline: 0.95rem;
}

.empty-state {
    padding: 2.5rem 1rem;
    color: var(--muted);
    text-align: center;
}

.form-control,
.form-select {
    border-radius: 14px;
    border-color: var(--line);
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 143, 104, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(15, 143, 104, 0.12);
}

.form-check-input:checked {
    background-color: var(--green);
    border-color: var(--green);
}

.modal-content {
    border: 0;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.modal-header,
.modal-footer {
    border-color: rgba(220, 230, 239, 0.8);
}

.alert {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.list-clean {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-clean li + li {
    margin-top: 0.8rem;
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--green), var(--green-deep));
    box-shadow: 0 10px 18px rgba(15, 143, 104, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #129d73, #0a5f46);
    border-color: transparent;
}

.btn-success {
    background: linear-gradient(135deg, #1ea672, #0f7e58);
    border-color: transparent;
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, #1a9366, #0d6a4a);
    border-color: transparent;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .page-shell {
        padding: 18px;
    }

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

    .nav-card-inner {
        align-items: stretch;
    }

    .logout-link {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .page-shell {
        padding: 14px;
    }

    .data-table {
        min-width: 720px;
        border-spacing: 0 8px;
    }

    .metric-value {
        font-size: 1.85rem;
    }

    .panel-header,
    .panel-body {
        padding-inline: 1rem;
    }
}
