:root {
    --bg: #06111a;
    --panel: #0b1a27;
    --panel-2: #10283a;
    --line: #1d4f70;
    --text: #ecfbff;
    --muted: #8fb6c8;
    --accent: #4bdcff;
    --danger: #ff5f7d;
    --warn: #ffc857;
    --info: #8be9ff;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(2, 8, 13, 0.48), rgba(2, 8, 13, 0.88)),
        radial-gradient(circle at 50% -15%, rgba(75, 220, 255, 0.22), transparent 42%),
        var(--bg);
    color: var(--text);
    font-family: Inter, Segoe UI, Arial, sans-serif;
}

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

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(7, 21, 33, 0.95), rgba(3, 11, 18, 0.98)),
        radial-gradient(circle at 50% 0, rgba(75, 220, 255, 0.18), transparent 46%);
    border-right: 1px solid rgba(75, 220, 255, 0.18);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 26px;
}

.brand span,
.brand-logo {
    display: grid;
    place-items: center;
    width: 200px;
    height: 112px;
    max-width: 100%;
    border-radius: 8px;
    background: var(--accent);
    color: #06120d;
    font-weight: 900;
    font-size: 22px;
}

.brand-logo {
    background: #030b12;
    border: 1px solid rgba(139, 233, 255, 0.35);
    padding: 4px;
    object-fit: contain;
    box-shadow: 0 0 34px rgba(75, 220, 255, 0.24);
}

.brand strong {
    font-size: 18px;
}

.brand small {
    display: block;
    color: var(--muted);
}

nav {
    display: grid;
    gap: 8px;
}

nav a, button, .button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: linear-gradient(180deg, #123149, #0b1b29);
    color: var(--text);
    padding: 8px 12px;
    cursor: pointer;
    font: inherit;
}

nav a {
    justify-content: flex-start;
}

nav a:hover, button:hover, .button:hover {
    border-color: var(--info);
}

.main {
    position: relative;
    padding: 24px;
}

.main::before {
    content: "";
    position: fixed;
    right: 24px;
    bottom: 18px;
    width: min(520px, 42vw);
    aspect-ratio: 16 / 9;
    pointer-events: none;
    background: url("linac-logo-original.png?v=20260625exact") center / contain no-repeat;
    opacity: 0.055;
    filter: drop-shadow(0 0 28px rgba(75, 220, 255, 0.25));
}

.topbar,
.flash,
.grid,
.card,
.toolbar,
table,
.form {
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; }
p, .muted { color: var(--muted); }

.grid {
    display: grid;
    gap: 14px;
}

.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
    background: linear-gradient(180deg, rgba(13, 34, 50, 0.96), rgba(6, 18, 29, 0.96));
    border: 1px solid rgba(75, 220, 255, 0.16);
    border-radius: 8px;
    padding: 16px;
}

.metric strong {
    display: block;
    font-size: 30px;
    margin-top: 8px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

input, select, textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #07131e;
    color: var(--text);
    padding: 8px 10px;
    font: inherit;
}

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

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.form {
    max-width: 980px;
    display: grid;
    gap: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(75, 220, 255, 0.14);
    background: #081621;
}

th, td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 13px;
    vertical-align: middle;
}

th {
    color: var(--muted);
    background: #07121c;
}

tr:last-child td { border-bottom: 0; }

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

.danger { border-color: rgba(255, 95, 125, 0.5); color: #ffdce3; }
.warn { border-color: rgba(255, 200, 87, 0.5); color: #fff1c9; }

.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #0d141c;
    color: var(--muted);
}

.badge.active, .badge.lifetime, .badge.owner { color: var(--accent); border-color: rgba(75, 220, 255, 0.5); }
.badge.expired { color: var(--warn); border-color: rgba(255, 200, 87, 0.5); }
.badge.inactive, .badge.invalid { color: var(--danger); border-color: rgba(255, 95, 125, 0.5); }

.flash {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(75, 220, 255, 0.35);
    background: rgba(75, 220, 255, 0.08);
}

.flash.error {
    border-color: rgba(255, 95, 125, 0.45);
    background: rgba(255, 95, 125, 0.08);
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(2, 8, 13, 0.30), rgba(2, 8, 13, 0.84)),
        url("linac-logo-original.png?v=20260625exact") center 7vh / min(720px, 82vw) auto no-repeat;
}

.login .card {
    width: min(440px, 100%);
    margin-top: min(260px, 30vh);
    backdrop-filter: blur(8px);
}

.login .brand {
    align-items: center;
    text-align: center;
}

.login .brand-logo {
    width: min(360px, 100%);
    height: auto;
    aspect-ratio: 16 / 9;
}

.code {
    font-family: Consolas, monospace;
    color: var(--accent);
}

@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .cols-4, .cols-2 { grid-template-columns: 1fr; }
}




