
@font-face {
    font-family: 'NotoArabic';
    src: url('/fonts/noto-arabic.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/inter.woff2') format('woff2');
    font-display: swap;
}

/* =====================================
   EMPIRE TOP - DESIGN SYSTEM
===================================== */

:root {
    color-scheme: dark;

    --background: #0d0b0d;
    --background-soft: #131013;

    --panel: #191417;
    --panel-light: #21191e;
    --panel-hover: #281c22;

    --red: #d83245;
    --red-light: #ff5266;
    --red-dark: #8f172b;

    --gold: #e9bd72;
    --gold-light: #ffe0a3;

    --text: #fff7f4;
    --muted: #a99ba0;
    --muted-dark: #766a70;

    --green: #51d99b;
    --border: rgba(255, 255, 255, .065);
    --red-border: rgba(216, 50, 69, .22);

    --sidebar-width: 270px;

    --radius: 18px;

    --shadow:
        0 15px 45px rgba(0, 0, 0, .22);

    --glow:
        0 0 35px rgba(216, 50, 69, .15);
}

/* =====================================
   GLOBAL
===================================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    background: var(--background);
    color: var(--text);

    font-family:
        'NotoArabic',
        'Inter',
        sans-serif;

    overflow-x: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
select:focus-visible {
    outline: 2px solid var(--red-light);
    outline-offset: 3px;
}

img {
    display: block;
    max-width: 100%;
}

.hidden {
    display: none !important;
}

::selection {
    background: var(--red);
    color: white;
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: #100d10;
}

::-webkit-scrollbar-thumb {
    background: #493039;
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red);
}

/* =====================================
   BACKGROUND EFFECTS
===================================== */

.background-effects {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.ambient {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .13;
}

.ambient-one {
    top: -280px;
    right: -100px;
    background: #e62e48;
}

.ambient-two {
    bottom: -300px;
    left: -120px;
    background: #8e263e;
}

.ambient-three {
    top: 40%;
    left: 45%;
    width: 300px;
    height: 300px;
    background: #bd8541;
    opacity: .035;
}

.background-grid {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, .012) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, .012) 1px,
            transparent 1px
        );

    background-size: 55px 55px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 85%
        );
}

/* =====================================
   LOGIN SCREEN
===================================== */

.login-screen {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 25px;

    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(139, 27, 47, .22),
            transparent 45%
        ),
        linear-gradient(
            145deg,
            #100c0f,
            #171014,
            #0c0b0d
        );
}

.login-card {
    position: relative;
    width: min(100%, 460px);

    padding: 44px 38px 25px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(36, 24, 30, .97),
            rgba(20, 15, 18, .98)
        );

    border: 1px solid rgba(232, 189, 114, .15);

    border-radius: 25px;

    box-shadow:
        0 35px 100px rgba(0, 0, 0, .55),
        0 0 70px rgba(216, 50, 69, .08);

    overflow: hidden;

    animation: loginAppear .7s ease both;
}

.login-decoration {
    position: absolute;
    top: 0;
    right: 12%;
    left: 12%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--gold),
            var(--red),
            transparent
        );

    box-shadow: 0 0 20px var(--red);
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.brand-symbol {
    width: 100px;
    height: 100px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(233, 189, 114, .45);
    border-radius: 27px;

    background:
        linear-gradient(
            145deg,
            #42212b,
            #1d1419
        );

    box-shadow:
        inset 0 0 25px rgba(216, 50, 69, .16),
        0 0 40px rgba(216, 50, 69, .13);

    transform: rotate(-5deg);
}

.brand-symbol span {
    font: 900 20px 'Inter';
    color: var(--gold-light);
    letter-spacing: 1px;
}

.brand-symbol small {
    font: 900 15px 'Inter';
    color: var(--red-light);
    letter-spacing: 5px;
}

.login-content .eyebrow {
    margin-bottom: 12px;
}

.login-content h1 {
    font-size: 24px;
    line-height: 1.6;
    margin: 0;
}

.login-content h1 span {
    color: var(--gold);
}

.login-content p {
    color: var(--muted);
    font-size: 13px;
    line-height: 2;
    margin: 12px 0 28px;
}

.eyebrow {
    display: block;
    font: 10px 'Inter';
    color: var(--gold);
    letter-spacing: 2px;
    direction: ltr;
}

.discord-button {
    width: 100%;
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 13px;

    background:
        linear-gradient(
            110deg,
            #a7273c,
            #d83b51
        );

    color: white;
    font-weight: 900;

    box-shadow:
        0 8px 25px rgba(216, 50, 69, .2);

    transition:
        transform .25s,
        box-shadow .25s,
        filter .25s;
}

.discord-button svg {
    width: 23px;
    height: 23px;
}

.discord-button:hover {
    transform: translateY(-3px);

    box-shadow:
        0 13px 32px rgba(216, 50, 69, .35);

    filter: brightness(1.12);
}

.discord-button:active {
    transform: scale(.98);
}

.login-security {
    margin-top: 22px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: var(--muted-dark);
    font-size: 10px;
}

.security-icon {
    color: var(--green);
}

.login-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    margin-top: 38px;
    padding-top: 18px;

    border-top: 1px solid var(--border);

    color: var(--muted-dark);
    font: 9px 'Inter';
    letter-spacing: 1px;
    direction: ltr;
}

.error-message {
    min-height: 18px;
    margin-top: 13px;
    color: #ff7181;
    font-size: 12px;
}

/* =====================================
   DASHBOARD LAYOUT
===================================== */

.dashboard {
    min-height: 100vh;
    display: flex;
}

/* =====================================
   SIDEBAR
===================================== */

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;

    z-index: 100;

    width: var(--sidebar-width);

    display: flex;
    flex-direction: column;

    padding: 25px 17px;

    background:
        linear-gradient(
            180deg,
            #191317,
            #120f12
        );

    border-left: 1px solid var(--border);

    box-shadow:
        10px 0 50px rgba(0, 0, 0, .13);

    transition: transform .3s ease;
}

.sidebar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 5px;
    margin-bottom: 48px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 14px;

    border: 1px solid rgba(233, 189, 114, .3);

    background:
        linear-gradient(
            140deg,
            #652636,
            #27151c
        );

    box-shadow: 0 0 25px rgba(216, 50, 69, .12);
}

.brand-mark span {
    font: 900 11px 'Inter';
    color: var(--gold-light);
    letter-spacing: .5px;
    direction: ltr;
}

.brand-details h2 {
    font: 900 16px 'Inter';
    color: var(--gold-light);
    margin: 0 0 6px;
    direction: ltr;
}

.brand-details span {
    display: block;
    color: var(--muted-dark);
    font: 9px 'Inter';
    letter-spacing: 1.3px;
    direction: ltr;
}

.sidebar-caption {
    color: var(--muted-dark);
    font-size: 10px;
    margin: 0 12px 15px;
}

.sidebar-links {
    display: grid;
    gap: 8px;
}

.nav-link {
    position: relative;

    width: 100%;
    min-height: 49px;

    display: flex;
    align-items: center;
    gap: 13px;

    padding: 0 14px;

    color: var(--muted);

    background: transparent;

    border: 1px solid transparent;
    border-radius: 12px;

    text-align: right;
    font-size: 12px;

    transition: .22s ease;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .035);
    transform: translateX(-3px);
}

.nav-link.active {
    color: var(--gold-light);

    background:
        linear-gradient(
            100deg,
            rgba(216, 50, 69, .16),
            rgba(216, 50, 69, .035)
        );

    border-color: var(--red-border);
}

.nav-link.active::before {
    content: '';
    position: absolute;

    right: -1px;
    top: 10px;
    bottom: 10px;

    width: 3px;

    border-radius: 5px;

    background: var(--red-light);
    box-shadow: 0 0 12px var(--red);
}

.nav-icon {
    width: 25px;
    height: 25px;

    display: grid;
    place-items: center;

    color: var(--gold);
    font-size: 19px;
}

.nav-arrow {
    margin-right: auto;
    color: var(--muted-dark);
    font-size: 20px;
}

.sidebar-spacer {
    flex: 1;
    min-height: 25px;
}

/* USER */

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 13px 10px;
    margin-bottom: 18px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: rgba(255, 255, 255, .025);
}

.user-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.user-avatar-wrapper img {
    width: 43px;
    height: 43px;

    object-fit: cover;

    border-radius: 50%;

    border: 2px solid rgba(233, 189, 114, .45);

    background: var(--panel-light);
}

.user-online-dot {
    position: absolute;
    right: -1px;
    bottom: 1px;

    width: 11px;
    height: 11px;

    border: 2px solid #191317;
    border-radius: 50%;

    background: var(--green);
}

.sidebar-user-info {
    min-width: 0;
    flex: 1;
}

.sidebar-user-info strong {
    display: block;

    max-width: 130px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 11px;
    color: var(--text);
}

.sidebar-user-info span {
    display: block;
    margin-top: 5px;

    font: 9px 'Inter';
    color: var(--gold);
}

.logout-button {
    width: 33px;
    height: 33px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    color: #ff8190;

    border: 1px solid rgba(216, 50, 69, .18);
    border-radius: 9px;

    background: rgba(216, 50, 69, .08);

    font-size: 18px;

    transition: .2s;
}

.logout-button:hover {
    background: var(--red);
    color: white;
}

.sidebar-bottom {
    display: grid;
    gap: 15px;

    padding: 15px 8px 0;
    border-top: 1px solid var(--border);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);
    font-size: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;

    display: inline-block;
    flex-shrink: 0;

    border-radius: 50%;

    background: var(--green);

    box-shadow: 0 0 12px rgba(81, 217, 155, .6);
}

.sidebar-version {
    color: var(--muted-dark);
    font: 9px 'Inter';
    direction: ltr;
}

/* =====================================
   MAIN CONTENT
===================================== */

.main-content {
    flex: 1;
    min-width: 0;

    margin-right: var(--sidebar-width);

    padding: 30px 34px;

    animation: contentAppear .5s ease both;
}

/* =====================================
   TOPBAR
===================================== */

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

    margin-bottom: 30px;
}

.topbar-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.topbar h1 {
    margin: 6px 0 0;

    font-size: 25px;
    font-weight: 900;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 13px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 9px 12px;

    color: var(--green);

    border: 1px solid rgba(81, 217, 155, .14);
    border-radius: 9px;

    background: rgba(81, 217, 155, .055);

    font: 10px 'Inter';
    letter-spacing: 1px;
}

.live-indicator .status-dot {
    width: 6px;
    height: 6px;

    animation: livePulse 1.7s infinite;
}

.icon-button {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    color: var(--gold);

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 12px;

    font-size: 25px;

    transition: .25s;
}

.icon-button:hover {
    color: white;

    background: var(--red-dark);

    border-color: var(--red-border);

    transform: rotate(35deg);
}

.server-info {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 7px 12px;

    border: 1px solid var(--border);
    border-radius: 13px;

    background: var(--panel);
}

.server-info img {
    width: 39px;
    height: 39px;

    object-fit: cover;

    border-radius: 12px;

    background: var(--panel-light);
}

.server-info strong {
    display: block;
    font-size: 11px;
}

.server-info span {
    display: block;
    margin-top: 4px;

    color: var(--muted-dark);
    font: 8px 'Inter';
    letter-spacing: 1px;
}

.mobile-menu-button,
.mobile-close {
    display: none;
}

/* =====================================
   WELCOME BANNER
===================================== */

.welcome-banner {
    position: relative;

    min-height: 205px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 30px 35px;

    overflow: hidden;

    border: 1px solid rgba(233, 189, 114, .16);
    border-radius: 21px;

    background:
        radial-gradient(
            ellipse at 82% 50%,
            rgba(216, 50, 69, .25),
            transparent 42%
        ),
        linear-gradient(
            115deg,
            #2a171e,
            #21151b 55%,
            #171116
        );

    box-shadow: var(--shadow);
}

.welcome-banner::before {
    content: '';

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            110deg,
            transparent 50%,
            rgba(255, 255, 255, .025),
            transparent 80%
        );

    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 580px;
}

.welcome-label {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--gold);
    font: 10px 'Inter';
    letter-spacing: 1.7px;
    direction: ltr;
}

.welcome-dot {
    width: 7px;
    height: 7px;

    background: var(--red-light);
    border-radius: 50%;

    box-shadow: 0 0 12px var(--red);
}

.welcome-banner h2 {
    margin: 15px 0 10px;

    font-size: clamp(21px, 3vw, 30px);
    font-weight: 900;
}

.welcome-banner h2 span {
    color: var(--gold);
}

.welcome-banner p {
    max-width: 480px;

    color: #b7a4aa;

    font-size: 12px;
    line-height: 2;
}

.welcome-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 11px;

    margin-top: 20px;

    color: #c9a6a5;
    font-size: 10px;
}

.welcome-visual {
    position: relative;

    width: 170px;
    height: 170px;

    display: grid;
    place-items: center;

    flex-shrink: 0;
}

.visual-ring {
    position: absolute;

    width: 145px;
    height: 145px;

    border: 1px solid rgba(233, 189, 114, .3);
    border-radius: 50%;
}

.ring-one {
    transform: rotateX(65deg) rotate(-30deg);
    animation: ringRotate 15s linear infinite;
}

.ring-two {
    width: 115px;
    height: 115px;

    border-color: rgba(216, 50, 69, .6);

    transform: rotateX(65deg) rotate(40deg);

    animation: ringRotate 10s linear infinite reverse;
}

.visual-core {
    width: 82px;
    height: 82px;

    display: grid;
    place-items: center;

    border-radius: 25px;

    border: 1px solid rgba(233, 189, 114, .55);

    background:
        linear-gradient(
            145deg,
            #773044,
            #301a24
        );

    color: var(--gold-light);

    font: 900 48px 'Inter';

    box-shadow:
        0 0 45px rgba(216, 50, 69, .3),
        inset 0 0 20px rgba(255, 255, 255, .04);

    transform: rotate(-8deg);
}

.visual-star {
    position: absolute;
    color: var(--gold);
}

.star-one {
    top: 12px;
    right: 22px;
    font-size: 20px;
}

.star-two {
    bottom: 18px;
    left: 18px;
    font-size: 25px;
}

/* =====================================
   SECTION TITLES
===================================== */

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin: 33px 0 17px;
}

.section-kicker {
    display: block;

    margin-bottom: 6px;

    color: var(--gold);
    font: 9px 'Inter';
    letter-spacing: 1.5px;
    direction: ltr;
}

.section-title h2,
.page-intro h2 {
    margin: 0;
    font-size: 19px;
}

.today-badge {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 9px 12px;

    border: 1px solid rgba(81, 217, 155, .15);
    border-radius: 9px;

    background: rgba(81, 217, 155, .05);

    color: var(--green);
    font-size: 10px;
}

.today-badge .status-dot {
    width: 6px;
    height: 6px;
}

/* =====================================
   STATISTICS CARDS
===================================== */

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

    margin-bottom: 27px;
}

.stat-card {
    position: relative;

    min-width: 0;
    min-height: 175px;

    padding: 19px;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 17px;

    background:
        linear-gradient(
            145deg,
            #21191e,
            #171316
        );

    box-shadow: 0 8px 25px rgba(0, 0, 0, .12);

    transition:
        transform .25s,
        border-color .25s,
        box-shadow .25s;
}

.stat-card:hover {
    transform: translateY(-5px);

    border-color: var(--red-border);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, .2),
        var(--glow);
}

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 17px;
}

.stat-icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: rgba(216, 50, 69, .12);
    border: 1px solid rgba(216, 50, 69, .14);

    color: var(--red-light);
    font-size: 21px;
}

.stat-tag {
    color: var(--muted-dark);
    font: 8px 'Inter';
    letter-spacing: 1px;
    direction: ltr;
}

.stat-label {
    display: block;

    color: var(--muted);
    font-size: 11px;
}

.stat-card strong {
    display: block;

    position: relative;
    z-index: 2;

    margin: 8px 0;

    color: var(--gold-light);

    font: 900 27px 'Inter';

    overflow-wrap: anywhere;
}

.stat-card small {
    display: block;

    color: var(--muted-dark);
    font-size: 9px;
}

.stat-decoration {
    position: absolute;

    bottom: -25px;
    left: 5px;

    color: rgba(216, 50, 69, .045);

    font-size: 105px;
    line-height: 1;

    pointer-events: none;
}

.voice-card .stat-icon {
    color: #76c5ff;
    background: rgba(75, 160, 255, .09);
    border-color: rgba(75, 160, 255, .13);
}

.members-card .stat-icon {
    color: var(--green);
    background: rgba(81, 217, 155, .08);
    border-color: rgba(81, 217, 155, .13);
}

.server-card .stat-icon {
    color: var(--gold);
    background: rgba(233, 189, 114, .08);
    border-color: rgba(233, 189, 114, .13);
}

/* =====================================
   CONTENT CARDS
===================================== */

.content-card {
    min-width: 0;

    padding: 23px;

    margin-bottom: 21px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(31, 23, 28, .97),
            rgba(22, 17, 20, .98)
        );

    box-shadow: var(--shadow);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 22px;
}

.section-heading h3 {
    margin: 0;

    color: var(--text);
    font-size: 16px;
}

.section-heading p {
    margin: 7px 0 0;

    color: var(--muted);
    font-size: 10px;
    line-height: 1.8;
}

.text-button {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 12px;

    color: var(--gold);

    border: 1px solid rgba(233, 189, 114, .15);
    border-radius: 9px;

    background: rgba(233, 189, 114, .045);

    font-size: 10px;

    white-space: nowrap;

    transition: .2s;
}

.text-button:hover {
    color: white;
    background: var(--red-dark);
    border-color: var(--red-border);
}

.text-button span {
    font-size: 17px;
}

/* =====================================
   TABLES
===================================== */

.table-wrapper {
    width: 100%;
    overflow-x: auto;

    border-radius: 11px;
}

table {
    width: 100%;
    min-width: 650px;

    border-collapse: separate;
    border-spacing: 0;

    text-align: right;
}

thead {
    background: rgba(255, 255, 255, .025);
}

th {
    padding: 14px 13px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 500;

    white-space: nowrap;

    border-bottom: 1px solid var(--border);
}

td {
    padding: 13px;

    color: #e8dfe2;

    font-size: 11px;

    border-bottom: 1px solid rgba(255, 255, 255, .035);

    white-space: nowrap;
}

tbody tr {
    transition: background .2s;
}

tbody tr:hover {
    background: rgba(216, 50, 69, .045);
}

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

.rank-number {
    display: inline-grid;
    place-items: center;

    min-width: 29px;
    height: 29px;

    border-radius: 9px;

    color: var(--gold-light);

    background: rgba(233, 189, 114, .08);

    font: 900 11px 'Inter';
}

.loading-cell {
    padding: 35px 15px;

    text-align: center;

    color: var(--muted);
}

/* Member rows - for app.js rendering */

.member-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-avatar {
    width: 37px;
    height: 37px;

    flex-shrink: 0;

    object-fit: cover;

    border-radius: 50%;

    border: 1px solid rgba(233, 189, 114, .2);

    background: var(--panel-light);
}

.member-details {
    min-width: 0;
}

.member-name {
    display: block;

    max-width: 180px;

    overflow: hidden;
    text-overflow: ellipsis;

    color: var(--text);
    font-weight: 700;
    font-size: 11px;
}

.member-id {
    display: block;

    margin-top: 4px;

    color: var(--muted-dark);
    font: 9px 'Inter';
    direction: ltr;
}

.voice-location {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    max-width: 190px;

    padding: 6px 9px;

    border: 1px solid rgba(81, 217, 155, .12);
    border-radius: 8px;

    background: rgba(81, 217, 155, .045);

    color: var(--green);

    font-size: 10px;
}

.voice-location.offline {
    color: var(--muted-dark);

    border-color: var(--border);

    background: rgba(255, 255, 255, .025);
}

/* =====================================
   LEADERBOARD PAGE
===================================== */

.page-intro {
    margin: 8px 0 23px;
}

.page-intro h2 {
    font-size: 24px;
    margin-bottom: 9px;
}

.page-intro p {
    color: var(--muted);
    font-size: 11px;
    line-height: 2;
}

.leaderboard-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 19px 23px;

    margin-bottom: 20px;

    border: 1px solid var(--red-border);
    border-radius: 15px;

    background:
        linear-gradient(
            100deg,
            rgba(216, 50, 69, .11),
            rgba(233, 189, 114, .045)
        );
}

.leaderboard-summary span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 6px;
}

.leaderboard-summary strong {
    color: var(--gold);
    font: 11px 'Inter';
    letter-spacing: 1px;
}

.summary-crown {
    color: var(--gold);
    font-size: 35px;
}

/* =====================================
   SETTINGS
===================================== */

.settings-card {
    max-width: 850px;
}

.admin-badge {
    padding: 8px 11px;

    color: var(--gold);

    border: 1px solid rgba(233, 189, 114, .17);
    border-radius: 8px;

    background: rgba(233, 189, 114, .06);

    font: 8px 'Inter';
    letter-spacing: 1px;
    direction: ltr;
    white-space: nowrap;
}

.settings-form {
    display: grid;
    gap: 21px;

    max-width: 620px;
}

.settings-form label {
    display: grid;
    gap: 9px;

    color: var(--text);
    font-size: 12px;
}

.settings-form label > span {
    color: var(--gold-light);
    font-weight: 700;
}

.settings-form label small {
    color: var(--muted-dark);
    font-size: 9px;
    line-height: 1.8;
}

.settings-form select {
    width: 100%;
    min-height: 48px;

    padding: 12px 14px;

    color: var(--text);

    background: #130f12;

    border: 1px solid var(--border);
    border-radius: 11px;

    outline: none;

    transition: border-color .2s, box-shadow .2s;
}

.settings-form select:hover {
    border-color: rgba(233, 189, 114, .25);
}

.settings-form select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(216, 50, 69, .1);
}

.settings-form select option {
    background: #191317;
    color: white;
}

.primary-button {
    width: fit-content;
    min-width: 175px;
    min-height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 12px 22px;

    color: white;

    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 11px;

    background:
        linear-gradient(
            110deg,
            #a82339,
            #d83a51
        );

    font-size: 12px;
    font-weight: 900;

    box-shadow: 0 8px 22px rgba(216, 50, 69, .15);

    transition: .25s;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(216, 50, 69, .28);
    filter: brightness(1.1);
}

#settingsMessage {
    min-height: 18px;
    color: var(--green);
    font-size: 11px;
}

/* =====================================
   PAGE SECTIONS
===================================== */

.page-section {
    animation: sectionAppear .35s ease both;
}

/* =====================================
   FOOTER
===================================== */

.dashboard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding: 24px 3px 10px;
    margin-top: 15px;

    border-top: 1px solid var(--border);

    direction: ltr;
}

.dashboard-footer div {
    display: grid;
    gap: 5px;
}

.dashboard-footer strong {
    color: var(--gold);
    font: 900 11px 'Inter';
    letter-spacing: 1px;
}

.dashboard-footer div span,
.dashboard-footer > span {
    color: var(--muted-dark);
    font: 8px 'Inter';
    letter-spacing: .8px;
}

/* =====================================
   MOBILE SIDEBAR
===================================== */

.sidebar-overlay {
    display: none;
}

.mobile-menu-button,
.mobile-close {
    border: 1px solid var(--border);
    border-radius: 10px;

    color: var(--gold);

    background: var(--panel);

    font-size: 20px;
}

.mobile-menu-button {
    width: 39px;
    height: 39px;
}

.mobile-close {
    width: 34px;
    height: 34px;

    font-size: 23px;
}

/* =====================================
   ANIMATIONS
===================================== */

@keyframes loginAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes contentAppear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sectionAppear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px var(--green);
    }

    50% {
        opacity: .45;
        box-shadow: 0 0 2px var(--green);
    }
}

@keyframes ringRotate {
    from {
        rotate: 0deg;
    }

    to {
        rotate: 360deg;
    }
}

/* =====================================
   TABLET
===================================== */

@media (max-width: 1150px) {

    :root {
        --sidebar-width: 235px;
    }

    .main-content {
        padding: 25px 23px;
    }

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

    .stat-card {
        min-height: 160px;
    }
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 760px) {

    .dashboard {
        display: block;
    }

    .sidebar {
        width: min(300px, 85vw);

        transform: translateX(110%);

        box-shadow: 0 0 60px rgba(0, 0, 0, .5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-brand {
        margin-bottom: 30px;
    }

    .mobile-close {
        display: grid;
        place-items: center;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;

        z-index: 90;

        display: block;

        background: rgba(0, 0, 0, .65);

        opacity: 0;
        visibility: hidden;

        transition: .25s;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        margin-right: 0;
        padding: 18px 15px;
    }

    .mobile-menu-button {
        display: grid;
        place-items: center;
        flex-shrink: 0;
    }

    .topbar {
        align-items: center;
        margin-bottom: 22px;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .topbar-actions {
        gap: 8px;
    }

    .live-indicator {
        padding: 8px;
        font-size: 8px;
    }

    .icon-button {
        width: 37px;
        height: 37px;
    }

    .server-info {
        display: none;
    }

    .welcome-banner {
        min-height: 190px;
        padding: 23px 19px;
    }

    .welcome-content {
        max-width: 100%;
    }

    .welcome-banner h2 {
        font-size: 21px;
    }

    .welcome-banner p {
        max-width: 290px;
        font-size: 10px;
    }

    .welcome-visual {
        position: absolute;
        left: -35px;
        opacity: .27;
        transform: scale(.8);
    }

    .welcome-meta {
        font-size: 9px;
    }

    .section-title {
        margin-top: 27px;
    }

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

    .stat-card {
        min-height: 153px;
        padding: 14px;
    }

    .stat-card strong {
        font-size: 23px;
    }

    .stat-tag {
        font-size: 7px;
    }

    .content-card {
        padding: 16px 13px;
        border-radius: 14px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .section-heading h3 {
        font-size: 14px;
    }

    .section-heading p {
        font-size: 9px;
    }

    .text-button {
        padding: 8px;
        font-size: 9px;
    }

    .dashboard-footer {
        flex-wrap: wrap;
        font-size: 8px;
    }

    .page-intro h2 {
        font-size: 21px;
    }
}

/* =====================================
   SMALL PHONES
===================================== */

@media (max-width: 420px) {

    .main-content {
        padding: 14px 11px;
    }

    .topbar h1 {
        font-size: 17px;
    }

    .topbar-heading {
        gap: 8px;
    }

    .eyebrow {
        font-size: 8px;
    }

    .live-indicator {
        gap: 5px;
        padding: 7px;
    }

    .welcome-banner {
        min-height: 175px;
        padding: 17px;
    }

    .welcome-banner h2 {
        font-size: 18px;
    }

    .welcome-banner p {
        font-size: 9px;
    }

    .welcome-meta {
        gap: 6px;
        font-size: 8px;
    }

    .stats-grid {
        gap: 8px;
    }

    .stat-card {
        min-height: 145px;
        padding: 12px;
    }

    .stat-icon {
        width: 33px;
        height: 33px;
        font-size: 18px;
    }

    .stat-card strong {
        font-size: 20px;
    }

    .stat-card small {
        font-size: 8px;
    }

    .section-heading {
        flex-wrap: wrap;
    }

    .today-badge {
        font-size: 9px;
    }

    .login-card {
        padding: 35px 21px 22px;
    }

    .login-content h1 {
        font-size: 20px;
    }

    .login-footer {
        font-size: 7px;
    }

    .dashboard-footer {
        gap: 10px;
    }
}

/* =====================================
   VERY SMALL PHONES
===================================== */

@media (max-width: 340px) {

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

    .stat-card {
        min-height: 130px;
    }

    .topbar-actions {
        gap: 5px;
    }

    .live-indicator {
        display: none;
    }
}

/* =====================================
   REDUCED MOTION
===================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
