:root {
    --bg: #050505;
    --bg-soft: #0b0b0b;
    --panel: rgba(12, 12, 12, 0.92);
    --panel-strong: rgba(18, 18, 18, 0.98);
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.22);
    --text: #f5f5f5;
    --muted: #a1a1aa;
    --white-glow: 0 0 30px rgba(255,255,255,.10);
    --shadow: 0 30px 120px rgba(0, 0, 0, 0.55);
    --success-bg: rgba(34, 197, 94, 0.14);
    --success-text: #86efac;
    --danger-bg: rgba(239, 68, 68, 0.14);
    --danger-text: #fca5a5;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.08), transparent 34%),
        radial-gradient(circle at bottom right, rgba(255,255,255,.05), transparent 28%),
        linear-gradient(180deg, #080808 0%, #030303 100%);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,.18));
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 26px;
}

.login-card {
    width: min(440px, 100%);
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(18,18,18,.96), rgba(8,8,8,.96));
    border: 1px solid var(--line);
    box-shadow: var(--shadow), inset 0 0 40px rgba(255,255,255,.02), var(--white-glow);
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.login-card::before,
.card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,.14), transparent 35%, transparent 65%, rgba(255,255,255,.08));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    padding: 1px;
}

.login-card h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -1px;
    color: #fff;
    text-shadow: 0 0 24px rgba(255,255,255,.18);
}

.login-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

input,
button {
    width: 100%;
    height: 52px;
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 0 16px;
    margin-top: 14px;
    font-weight: 800;
    transition: .2s ease;
}

input {
    background: rgba(255,255,255,.05);
    color: var(--text);
    outline: none;
    box-shadow: inset 0 0 18px rgba(255,255,255,.015);
}

input::placeholder {
    color: rgba(255,255,255,.34);
}

input:focus {
    border-color: rgba(255,255,255,.45);
    box-shadow: 0 0 0 4px rgba(255,255,255,.05), 0 0 25px rgba(255,255,255,.06);
}

button {
    background: linear-gradient(180deg, #ffffff, #e9e9e9);
    color: #080808;
    cursor: pointer;
    box-shadow: 0 10px 35px rgba(255,255,255,.10);
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 38px rgba(255,255,255,.16);
}

button:active {
    transform: translateY(0);
}

.error {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(239,68,68,.10);
    color: #fda4af;
    border: 1px solid rgba(239,68,68,.18);
    font-weight: 800;
}

header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 26px;
    background: rgba(6,6,6,.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(0,0,0,.26);
}

header h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -1px;
    text-shadow: 0 0 26px rgba(255,255,255,.12);
}

header span {
    display: inline-block;
    margin-top: 4px;
    color: var(--muted);
}

.logout {
    color: #0a0a0a;
    text-decoration: none;
    background: linear-gradient(180deg, #ffffff, #ececec);
    border: 1px solid rgba(255,255,255,.5);
    padding: 12px 18px;
    border-radius: 16px;
    font-weight: 900;
    box-shadow: 0 8px 30px rgba(255,255,255,.09);
    transition: .2s ease;
}

.logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(255,255,255,.14);
}

main {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    padding: 26px 0 34px;
    display: grid;
    gap: 22px;
}

.card {
    position: relative;
    background: linear-gradient(180deg, rgba(16,16,16,.96), rgba(10,10,10,.96));
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 28px;
    padding: 22px;
    box-shadow: var(--shadow), inset 0 0 36px rgba(255,255,255,.02);
    overflow: hidden;
}

.card h2 {
    margin: 0 0 18px;
    font-size: 22px;
    letter-spacing: -.5px;
}

.grid-form {
    display: grid;
    grid-template-columns: 1.5fr .7fr .9fr .8fr;
    gap: 12px;
}

.grid-form input,
.grid-form button {
    margin-top: 0;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.05);
    background: rgba(255,255,255,.02);
}

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

th,
td {
    padding: 14px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-align: left;
}

th {
    color: #fff;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255,255,255,.04);
}

tbody tr {
    transition: background .2s ease;
}

tbody tr:hover {
    background: rgba(255,255,255,.03);
}

td strong {
    color: #fff;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    font-weight: 900;
    padding: 7px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .4px;
    border: 1px solid transparent;
}

.status.active {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: rgba(34,197,94,.18);
}

.status.blocked {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: rgba(239,68,68,.18);
}

.small {
    width: auto;
    height: 38px;
    margin: 0;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: none;
}

.danger {
    background: linear-gradient(180deg, #ef4444, #dc2626);
    color: #fff;
    border: 1px solid rgba(239,68,68,.28);
}

.danger:hover {
    box-shadow: 0 12px 28px rgba(239,68,68,.18);
}

.mono {
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    color: #d4d4d8;
}

@media (max-width: 1100px) {
    main {
        width: min(100%, calc(100% - 24px));
    }

    .grid-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    header {
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    main {
        width: min(100%, calc(100% - 20px));
        padding-top: 18px;
    }

    .login-card,
    .card {
        border-radius: 24px;
    }

    .grid-form {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 760px;
    }
}


.panel-logo {
    display:block;
    width:72px;
    height:auto;
    object-fit:contain;
    filter: drop-shadow(0 10px 24px rgba(239, 68, 68, .18));
}

.panel-logo-login {
    width:92px;
    margin: 0 auto 14px;
}

.header-brand {
    display:flex;
    align-items:center;
    gap:16px;
}

.header-brand .panel-logo {
    width:58px;
    flex:0 0 auto;
}
