:root {
    --bg: #0b1220;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --panel-muted: rgba(20, 29, 48, 0.72);
    --stroke: rgba(148, 163, 184, 0.14);
    --stroke-strong: rgba(148, 163, 184, 0.24);
    --text: #e5eefc;
    --text-strong: #f8fbff;
    --muted: #94a3b8;
    --blue: #4f7cff;
    --blue-2: #6d98ff;
    --cyan: #2dd4bf;
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
    --shadow: 0 20px 50px rgba(2, 6, 23, 0.34);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --sidebar-width: 272px;
    --content-max: 1520px;
    --font-main: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-main);
    background:
        radial-gradient(circle at top left, rgba(79, 124, 255, 0.18), transparent 24%),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.10), transparent 20%),
        linear-gradient(180deg, #0b1220 0%, #0d1526 100%);
    color: var(--text);
}

body {
    line-height: 1.5;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--panel-strong);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.login-card h1 {
    margin: 0 0 12px;
    font-size: 28px;
    color: var(--text-strong);
}

.login-card p {
    margin: 0 0 24px;
    color: var(--muted);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--muted);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--stroke-strong);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    outline: none;
}

.form-group input:focus {
    border-color: rgba(79, 124, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.page {
    min-height: 100vh;
    padding: 32px;
}

.page-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--panel-strong);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.page-card--wide {
    max-width: 1100px;
}

.admin-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    background: transparent;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 16px;
    border-right: 1px solid var(--stroke);
    background: linear-gradient(180deg, rgba(7, 14, 28, 0.92), rgba(10, 17, 32, 0.82));
    backdrop-filter: blur(14px);
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 18px;
    margin-bottom: 12px;
}

.sidebar__brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 10px 30px rgba(79, 124, 255, 0.30);
}

.sidebar__brand-title {
    font-size: 20px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--text-strong);
}

.sidebar__brand-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

.sidebar__nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: #cfe0ff;
    text-decoration: none;
    font-weight: 600;
    transition: 0.22s ease;
}

.sidebar__link:hover {
    background: rgba(79, 124, 255, 0.10);
    border-color: rgba(79, 124, 255, 0.18);
    transform: translateX(2px);
}

.sidebar__link--active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.24), rgba(109, 152, 255, 0.16));
    border-color: rgba(109, 152, 255, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.main-content {
    padding: 20px 24px 28px 30px;
}

.content-shell {
    max-width: none;
    margin: 0;
    display: grid;
    gap: 22px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.topbar__main {
    max-width: 920px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    border: 1px solid rgba(79, 124, 255, 0.24);
    background: rgba(79, 124, 255, 0.10);
    color: #dbe7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-strong);
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.btn--primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 12px 30px rgba(79, 124, 255, 0.28);
}

.btn--primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.btn--secondary {
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.48);
    border-color: var(--stroke-strong);
}

.btn--secondary:hover {
    background: rgba(15, 23, 42, 0.68);
}

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

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 154px;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.82), rgba(15, 23, 42, 0.92));
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -30px -30px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 124, 255, 0.22), transparent 68%);
    pointer-events: none;
}

.stat-card__label {
    margin-bottom: 12px;
    color: #d9e7ff;
    font-size: 14px;
    font-weight: 700;
}

.stat-card__value {
    color: var(--text-strong);
    font-size: clamp(34px, 4vw, 46px);
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.panel,
.content-card {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.content-card {
    padding: 24px;
}

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

.content-card__header h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--text-strong);
}

.pill,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #dce7fb;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    vertical-align: middle;
}

.data-table th {
    color: #a7b6ca;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.data-table td {
    color: #d9e4f5;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.data-table td strong {
    font-weight: 600;
    color: #eef4ff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
}

.status-pill--pending {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.18);
}

.status-pill--approved {
    color: #86efac;
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.18);
}

.status-pill--blocked {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.18);
}

.table-wrap {
    overflow: auto;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(8, 15, 29, 0.34);
}

.section {
    display: grid;
    gap: 16px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.section-title {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 22px;
    align-items: end;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.input,
.select,
.search-box input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    outline: none;
}

.input:focus,
.select:focus,
.search-box input:focus {
    border-color: rgba(79, 124, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.12);
}

.search-box {
    max-width: 360px;
}

.info-list {
    display: grid;
    gap: 14px;
}

.info-list__item,
.activity-item,
.insight-item,
.action-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.10);
}

.action-card {
    display: block;
    text-decoration: none;
}

.meta-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

@media (max-width: 1320px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .sidebar {
        position: relative;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--stroke);
    }

    .main-content {
        padding: 18px;
    }
}

@media (max-width: 720px) {
    .topbar,
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .topbar__actions {
        width: 100%;
        flex-wrap: wrap;
    }
}


.users-table {
    table-layout: fixed;
}

.users-table .cell-id {
    width: 1%;
    white-space: nowrap;
}

.users-table .cell-user {
    width: 36%;
    line-height: 1.45;
    word-break: break-word;
}

.users-table .cell-brigade {
    white-space: nowrap;
    width: 96px;
}

.users-table .cell-max {
    width: 150px;
    white-space: nowrap;
}

.users-table .cell-phone {
    width: 150px;
    white-space: nowrap;
}

.users-table .cell-status {
    width: 116px;
    white-space: nowrap;
}

.users-table .cell-datetime {
    width: 170px;
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
}

.users-table .status-pill {
    min-width: 92px;
}

@media (max-width: 1400px) {
    .users-table .cell-user {
        width: 26%;
    }

    .users-table .cell-datetime {
        width: 150px;
    }
}

.users-table th:first-child,
.users-table td:first-child {
    width: 34px;
    max-width: 34px;
    min-width: 34px;
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
    width: 34%;
}
