:root {
    --bg: #ffffff;
    --panel: rgba(255, 255, 255, 0.96);
    --ink: #2f3947;
    --muted: #738094;
    --line: #e6ebf2;
    --accent: #1376e8;
    --accent-dark: #2f3947;
    --danger: #b42318;
    --sand: #f5f9ff;
    --shadow: 0 14px 30px rgba(19, 118, 232, 0.06);
    --field-shadow: 0 4px 14px rgba(47, 57, 71, 0.05);
}

* {
    box-sizing: border-box;
}

body.admin-shell {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(19, 118, 232, 0.05), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    color: var(--ink);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

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

.hero-card,
.panel {
    background: var(--panel);
    border: 1px solid rgba(230, 235, 242, 0.98);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-card {
    width: min(560px, 100%);
    padding: 36px;
}

.hero-card h1,
.page-header h1,
.error-panel h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.hero-copy {
    margin: 0 0 20px;
    max-width: 36rem;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.65;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.topbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}

.topbar .navbar-brand {
    letter-spacing: -0.03em;
}

.brand-lockup {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
}

.brand-next,
.brand-edge {
    font-size: 1.55rem;
    font-weight: 800;
}

.brand-next {
    color: var(--accent);
}

.brand-edge {
    color: var(--ink);
}

.brand-sub {
    margin-top: 0.18rem;
    color: var(--ink);
    font-size: 0.58rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.sidebar-panel {
    position: sticky;
    top: 82px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 253, 0.98));
}

.sidebar-nav .list-group-item {
    border: 0;
    border-radius: 14px !important;
    margin-bottom: 6px;
    padding: 0.72rem 0.9rem;
    color: var(--ink);
    font-weight: 700;
    background: transparent;
    font-size: 0.94rem;
}

.sidebar-nav .list-group-item.active {
    background: linear-gradient(135deg, #1376e8, #4898f0);
    color: #fff;
    box-shadow: 0 10px 22px rgba(19, 118, 232, 0.16);
}

.sidebar-nav .list-group-item:hover {
    background: rgba(19, 118, 232, 0.08);
}

.page-header {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 16px;
}

.token-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(244, 249, 255, 0.98));
    border: 1px solid rgba(221, 231, 244, 0.95);
    border-radius: 20px;
    box-shadow: 0 14px 28px rgba(19, 118, 232, 0.06);
}

.token-header-copy {
    min-width: 0;
}

.token-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.token-header-chip,
.token-header-id {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.token-header-chip {
    background: rgba(19, 118, 232, 0.1);
    color: var(--accent);
    text-transform: uppercase;
}

.token-header-id {
    background: #f3f7fc;
    color: var(--ink);
}

.token-header-title {
    margin: 0;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--accent-dark);
}

.token-header-text {
    max-width: 34rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.panel {
    padding: 18px;
}

.section-title {
    margin: 0 0 14px;
    font-size: 1.08rem;
    font-weight: 700;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

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

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.96));
    border: 1px solid rgba(230, 235, 242, 0.95);
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 8px 18px rgba(19, 118, 232, 0.04);
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.2rem;
    font-weight: 700;
}

.stat-label {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: #eef5fd;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-badge.active {
    background: rgba(19, 118, 232, 0.12);
    color: var(--accent);
}

.status-badge.inactive {
    background: rgba(180, 35, 24, 0.10);
    color: var(--danger);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.35);
    --bs-table-hover-bg: rgba(19, 118, 232, 0.05);
}

.table thead th {
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom-color: var(--line);
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.table tbody td {
    color: var(--ink);
    font-size: 0.88rem;
    border-bottom-color: var(--line);
    padding-top: 0.72rem;
    padding-bottom: 0.72rem;
}

.premium-input {
    border: 1px solid rgba(218, 227, 239, 0.95);
    border-radius: 14px;
    padding: 0.65rem 0.85rem;
    background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
    color: var(--ink);
    line-height: 1.4;
    box-shadow: var(--field-shadow);
    font-size: 0.92rem;
}

.premium-input:focus {
    border-color: rgba(19, 118, 232, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(19, 118, 232, 0.10), var(--field-shadow);
}

.password-group .premium-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.password-toggle {
    min-width: 54px;
    border-color: rgba(218, 227, 239, 0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    color: var(--accent-dark);
    box-shadow: var(--field-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.password-toggle:hover,
.password-toggle:focus {
    border-color: rgba(19, 118, 232, 0.35);
    background: #eef5ff;
    color: var(--accent);
}

.password-toggle-icon {
    line-height: 1;
}

.premium-check .form-check-input {
    border-color: rgba(218, 227, 239, 0.95);
}

.premium-check .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn-primary {
    background: linear-gradient(135deg, #1376e8, #3790ee);
    border-color: #1376e8;
    box-shadow: 0 8px 18px rgba(19, 118, 232, 0.15);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0f6bd2, #2f86e3);
    border-color: #0f6bd2;
}

.btn-outline-primary {
    color: var(--accent-dark);
    border-color: #d4e1f4;
    background: rgba(255, 255, 255, 0.8);
}

.btn {
    font-weight: 700;
    font-size: 0.88rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.field-note {
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.45;
    font-weight: 400;
}

.error-panel {
    text-align: center;
}

.admin-toast-container {
    z-index: 1085;
}

.admin-toast {
    min-width: 320px;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(47, 57, 71, 0.12);
}

.admin-toast.text-bg-success {
    background: linear-gradient(135deg, #1376e8, #4a9bf0) !important;
}

.admin-toast .toast-body {
    font-weight: 700;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .two-column,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: start;
        flex-direction: column;
    }

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

    .hero-card,
    .panel {
        padding: 16px;
    }
}
