:root {
    color-scheme: dark;
    font-family: Inter, "SF Pro Display", "SF Pro Text", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --bg-1: #070c17;
    --bg-2: #0b1221;
    --text: #f5f7ff;
    --muted: #b4bed0;
    --glass: rgba(18, 28, 50, 0.56);
    --glass-strong: rgba(21, 33, 60, 0.78);
    --glass-border: rgba(191, 210, 255, 0.2);
    --shadow-soft: 0 16px 45px rgba(2, 6, 23, 0.4);
    --shadow-focus: 0 0 0 1px rgba(174, 197, 255, 0.45), 0 0 0 5px rgba(140, 182, 255, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    min-height: 100vh;
    background:
        radial-gradient(900px 520px at -5% -10%, rgba(92, 162, 255, 0.32), transparent 55%),
        radial-gradient(760px 520px at 110% 0%, rgba(179, 127, 255, 0.26), transparent 55%),
        linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    filter: blur(40px);
    opacity: 0.45;
}

body::before {
    width: 340px;
    height: 340px;
    left: -110px;
    top: 30vh;
    background: #5f8bff;
    border-radius: 999px;
}

body::after {
    width: 300px;
    height: 300px;
    right: -90px;
    top: 14vh;
    background: #8b5cf6;
    border-radius: 999px;
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.1rem;
}

.topbar {
    position: sticky;
    top: 0.65rem;
    z-index: 20;
    margin-bottom: 1rem;
    padding: 0.8rem 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    background: linear-gradient(160deg, rgba(31, 48, 86, 0.58), rgba(18, 29, 53, 0.42));
    backdrop-filter: saturate(150%) blur(18px);
    -webkit-backdrop-filter: saturate(150%) blur(18px);
    box-shadow: var(--shadow-soft);
}

.topbar h1 {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: 0.01em;
}

.muted {
    color: var(--muted);
    margin: 0.22rem 0;
    font-size: 0.94rem;
}

.panel {
    border-radius: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--glass-border);
    background: linear-gradient(165deg, var(--glass), rgba(14, 23, 42, 0.48));
    backdrop-filter: saturate(140%) blur(15px);
    -webkit-backdrop-filter: saturate(140%) blur(15px);
    box-shadow: var(--shadow-soft);
}

.flash {
    border-radius: 0.78rem;
    padding: 0.7rem 0.86rem;
    margin-bottom: 0.8rem;
    font-size: 0.94rem;
    border: 1px solid transparent;
}

.flash-success {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(52, 211, 153, 0.5);
}

.flash-error {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(248, 113, 113, 0.55);
}

.desktop-table {
    display: none;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.7rem;
    border-bottom: 1px solid rgba(180, 198, 235, 0.16);
}

th {
    color: #d6dff2;
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 650;
}

td {
    color: #eff4ff;
}

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

tbody tr:hover {
    background: rgba(156, 188, 255, 0.08);
}

.mobile-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.card {
    border: 1px solid rgba(188, 205, 243, 0.2);
    border-radius: 0.95rem;
    padding: 0.78rem;
    background: linear-gradient(160deg, rgba(40, 59, 96, 0.4), rgba(16, 27, 49, 0.56));
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.5rem;
}

.card-actions,
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn {
    min-height: 44px;
    padding: 0.62rem 0.95rem;
    border-radius: 0.68rem;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 620;
    color: #f8fbff;
    transition: transform 120ms ease, filter 120ms ease, border-color 140ms ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: 0;
    box-shadow: var(--shadow-focus);
}

.btn:disabled {
    opacity: 0.46;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(160deg, rgba(89, 156, 255, 0.84), rgba(54, 112, 237, 0.88));
    border-color: rgba(161, 199, 255, 0.35);
}

.btn-danger {
    background: linear-gradient(160deg, rgba(247, 116, 116, 0.85), rgba(206, 56, 72, 0.88));
    border-color: rgba(251, 170, 176, 0.35);
}

.btn-secondary {
    background: linear-gradient(160deg, rgba(88, 112, 162, 0.65), rgba(69, 88, 127, 0.7));
    border-color: rgba(185, 200, 231, 0.22);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.68rem;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    border: 1px solid transparent;
}

.badge.ok {
    background: rgba(6, 78, 59, 0.58);
    border-color: rgba(110, 231, 183, 0.45);
    color: #eafff6;
}

.badge.warn {
    background: rgba(120, 53, 15, 0.62);
    border-color: rgba(252, 211, 77, 0.48);
    color: #fff7d4;
}

.badge.neutral {
    background: rgba(55, 65, 81, 0.72);
    border-color: rgba(181, 198, 226, 0.34);
    color: #f4f8ff;
}

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

@media (min-width: 768px) {
    .page {
        padding: 1.35rem;
    }

    .desktop-table {
        display: block;
    }

    .mobile-cards {
        display: none;
    }

    .topbar h1 {
        font-size: 1.58rem;
    }
}
