:root {
    --color-bg: #eef3f7;
    --color-bg-deep: #e4ebf2;
    --color-panel: rgba(255, 255, 255, 0.88);
    --color-panel-strong: #ffffff;
    --color-border: rgba(148, 163, 184, 0.22);
    --color-border-strong: rgba(100, 116, 139, 0.18);
    --color-text: #162132;
    --color-muted: #5f6f86;
    --color-muted-soft: #7e8ca1;
    --color-primary: #0b4f7c;
    --color-primary-soft: rgba(11, 79, 124, 0.1);
    --color-primary-deep: #0b1729;
    --color-primary-glow: rgba(39, 100, 154, 0.22);
    --color-success: #13744a;
    --color-warning: #9a6409;
    --color-danger: #b42318;
    --color-info: #005f99;
    --shadow-panel: 0 22px 44px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(39, 100, 154, 0.14), transparent 26%),
        radial-gradient(circle at top right, rgba(15, 23, 42, 0.06), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, var(--color-bg) 45%, var(--color-bg-deep) 100%);
    color: var(--color-text);
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

a {
    text-decoration: none;
}

::selection {
    background: rgba(11, 79, 124, 0.18);
}

.app-shell {
    min-height: 100vh;
}

.shell-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 28%),
        linear-gradient(180deg, #09111f 0%, #0d1729 46%, #101c30 100%);
    box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.1);
}

.shell-main {
    position: relative;
}

.shell-main::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 180px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.sidebar-brand {
    letter-spacing: 0.08em;
}

.sidebar-link {
    display: block;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    color: rgba(226, 232, 240, 0.82);
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
    border: 1px solid transparent;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(71, 85, 105, 0.35);
    transform: translateX(1px);
}

.sidebar-link-active {
    color: #f8fafc;
    background: linear-gradient(180deg, rgba(19, 35, 58, 0.88), rgba(11, 23, 41, 0.92));
    border-color: rgba(100, 116, 139, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 24px rgba(2, 6, 23, 0.28);
}

.topbar {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(20px);
}

.topbar-user {
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.page-stage {
    position: relative;
    z-index: 1;
}

.panel {
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-panel);
    backdrop-filter: blur(14px);
}

.panel-strong {
    background: var(--color-panel-strong);
}

.metric-card {
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(11, 79, 124, 0.95), rgba(59, 130, 246, 0.55));
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -38px -42px auto;
    width: 140px;
    height: 140px;
    border-radius: 9999px;
    background: radial-gradient(circle, rgba(11, 79, 124, 0.12), rgba(11, 79, 124, 0));
}

.flash-banner {
    box-shadow: var(--shadow-soft);
}

.status-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 9999px;
}

.status-dot.success {
    background: var(--color-success);
}

.status-dot.warning {
    background: var(--color-warning);
}

.status-dot.danger {
    background: var(--color-danger);
}

.section-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-muted-soft);
}

.section-title {
    margin-top: 0.55rem;
    font-size: 1.7rem;
    line-height: 1.15;
    font-weight: 600;
    color: var(--color-text);
}

.section-copy {
    margin-top: 0.75rem;
    max-width: 72ch;
    color: var(--color-muted);
    line-height: 1.75;
}

.action-primary,
.action-secondary,
.action-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    padding: 0.82rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 160ms ease;
}

.action-primary {
    background: linear-gradient(180deg, #12243f 0%, #0b1729 100%);
    color: #fff;
    box-shadow: 0 14px 24px rgba(11, 23, 41, 0.18);
}

.action-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #173056 0%, #10213a 100%);
}

.action-secondary {
    border: 1px solid rgba(148, 163, 184, 0.44);
    background: rgba(255, 255, 255, 0.85);
    color: #304154;
}

.action-secondary:hover,
.action-ghost:hover {
    border-color: rgba(100, 116, 139, 0.46);
    background: rgba(255, 255, 255, 0.96);
}

.action-ghost {
    color: var(--color-primary);
    padding-inline: 0;
}

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

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.form-field label {
    margin-bottom: 0.55rem;
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: rgba(255, 255, 255, 0.94);
    padding: 0.92rem 1rem;
    color: var(--color-text);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: rgba(11, 79, 124, 0.55);
    box-shadow: 0 0 0 4px rgba(11, 79, 124, 0.1);
    background: #fff;
}

.form-hint {
    margin-top: 0.55rem;
    font-size: 0.78rem;
    color: var(--color-muted-soft);
}

.summary-strip {
    display: grid;
    gap: 1rem;
}

.summary-tile {
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
    box-shadow: var(--shadow-soft);
}

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

.grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.grid-table th,
.grid-table td {
    border-bottom: 1px solid rgba(226, 232, 240, 0.94);
    padding: 1rem 1rem;
    text-align: left;
    vertical-align: top;
}

.grid-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(248, 250, 252, 0.92);
    color: #475569;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.grid-table tbody tr {
    transition: background-color 140ms ease;
}

.grid-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.76);
}

.info-stack {
    display: grid;
    gap: 0.75rem;
}

.info-row {
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.82);
}

@media (max-width: 1279px) {
    .shell-sidebar {
        position: relative;
        min-height: auto;
    }

    .grid-table th {
        position: static;
    }
}
