:root {
    --bg: #061116;
    --surface: #0a1b23;
    --surface-2: #0e2630;
    --surface-3: rgba(255, 255, 255, 0.045);
    --line: rgba(124, 229, 255, 0.15);
    --line-strong: rgba(124, 229, 255, 0.30);
    --text: #effbff;
    --muted: #91aab3;
    --muted-2: #bfd4dc;
    --cyan: #73e7ff;
    --cyan-2: #35c9e8;
    --green: #73f0bd;
    --danger: #ff6c8c;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.30);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% -10%, rgba(115, 231, 255, 0.13), transparent 30rem),
        linear-gradient(180deg, var(--bg), #050b10);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.admin-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px;
    border-right: 1px solid var(--line);
    background: rgba(6, 17, 22, 0.84);
    backdrop-filter: blur(18px);
}

.admin-brand,
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #031116;
    background: linear-gradient(145deg, #ffffff 0%, var(--cyan) 54%, var(--cyan-2) 100%);
    font-weight: 950;
    letter-spacing: -0.085em;
}

.admin-brand strong {
    letter-spacing: -0.04em;
}

.side-nav {
    display: grid;
    gap: 6px;
    margin-top: 34px;
}

.side-nav a {
    padding: 12px 13px;
    border-radius: 14px;
    color: var(--muted-2);
    transition: 160ms ease;
}

.side-nav a:hover,
.side-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.065);
}

.sidebar-footer {
    display: grid;
    gap: 4px;
    margin-top: auto;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.sidebar-footer small {
    color: var(--muted);
}

.sidebar-footer a {
    margin-top: 10px;
    color: var(--cyan);
    font-weight: 780;
}

.content {
    padding: 32px;
}

.content-top {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 26px;
}

.content-top span,
.panel-header span,
.stat-card span {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.065em;
}

h2 {
    margin-bottom: 0;
    font-size: 26px;
    letter-spacing: -0.045em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card,
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(10, 27, 35, 0.78);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 22px;
}

.stat-card strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 42px;
    line-height: 1;
    letter-spacing: -0.07em;
}

.stat-card small {
    color: var(--muted);
}

.panel {
    padding: 24px;
    margin-bottom: 18px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 13px;
    font: inherit;
    font-weight: 820;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    color: #031116;
    background: linear-gradient(135deg, #ffffff 0%, var(--cyan) 54%, var(--cyan-2) 100%);
}

.btn-muted,
.btn-ghost {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.055);
}

.btn-ghost {
    color: var(--muted-2);
    background: transparent;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
}

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

th,
td {
    padding: 14px 15px;
    border-bottom: 1px solid rgba(124, 229, 255, 0.10);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

td {
    color: var(--muted-2);
}

.email-cell {
    color: var(--text);
    font-weight: 740;
}

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

.empty {
    text-align: center;
    color: var(--muted);
}

.filter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

input[type="search"],
input[type="text"],
input[type="password"] {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.055);
    font: inherit;
}

input:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(115, 231, 255, 0.08);
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    color: var(--muted);
}

.pagination div {
    display: flex;
    gap: 8px;
}

.bars {
    display: flex;
    align-items: end;
    gap: 12px;
    min-height: 180px;
    overflow-x: auto;
    padding: 18px 0 2px;
}

.bar-item {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 58px;
}

.bar {
    position: relative;
    width: 34px;
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, var(--cyan), var(--cyan-2));
}

.bar span {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.bar-item small {
    color: var(--muted);
    font-size: 12px;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 440px);
    padding: 28px;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background:
        radial-gradient(circle at 100% 0%, rgba(115, 231, 255, 0.14), transparent 18rem),
        rgba(10, 27, 35, 0.86);
    box-shadow: var(--shadow);
}

.login-brand {
    margin-bottom: 28px;
}

.login-brand div {
    display: grid;
}

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

.login-card h1 {
    margin-bottom: 10px;
}

.login-card p {
    color: var(--muted-2);
    line-height: 1.6;
}

.login-card form {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.login-card label {
    color: var(--muted-2);
    font-weight: 740;
}

.login-card button {
    margin-top: 10px;
}

.alert {
    padding: 13px 14px;
    border-radius: 14px;
    font-weight: 760;
}

.alert.error {
    color: var(--danger);
    background: rgba(255, 108, 140, 0.08);
    border: 1px solid rgba(255, 108, 140, 0.22);
}

.login-note {
    display: block;
    margin-top: 18px;
    color: var(--muted);
    line-height: 1.5;
}

code {
    color: var(--cyan);
}

@media (max-width: 980px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .side-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .content {
        padding: 20px;
    }

    .stats-grid,
    .side-nav {
        grid-template-columns: 1fr;
    }

    .panel-header,
    .filter-form,
    .pagination {
        flex-direction: column;
        align-items: stretch;
    }
}


.admin-logo {
    width: 42px;
    height: 42px;
    display: block;
    object-fit: contain;
    border-radius: 12px;
}

.compact-stats {
    margin-bottom: 0;
}

.panel .stats-grid {
    box-shadow: none;
}

.truncate-cell {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}
