/**
 * Ex Machina – unified site stylesheet (source of truth: public main page look)
 * Path: htdocs/assets/em.css
 * Load: <link rel="stylesheet" href="/assets/em.css">
 *
 * Structure:
 *  1. Design tokens (:root)
 *  2. Base / typography / links
 *  3. Layout shell
 *  4. Header / brand / buttons
 *  5. Cards, grids, sections
 *  6. Main-page sections (hero, install, telemetry, footer chrome)
 */

        :root {
            --bg: #121212;
            --card: rgba(36,36,36,0.94);
            --border: #333;
            --green: #7cc576;
            --green-dim: rgba(124,197,118,0.15);
            --text: #ccc;
            --muted: #888;
            --white: #f2f2f2;
        }
        * { box-sizing: border-box; }
        body {
            margin: 0;
            font-family: 'Open Sans', system-ui, sans-serif;
            color: var(--text);
            background-color: var(--bg);
            background-position: center;
            background-size: cover;
            background-attachment: fixed;
            line-height: 1.55;
        }
        h1,h2,h3 { font-family: 'Montserrat', system-ui, sans-serif; color: var(--white); margin: 0 0 10px; }
        a { color: var(--green); text-decoration: none; }
        a:hover { text-decoration: underline; }
        .shell { max-width: 1400px; margin: 0 auto; padding: 20px 20px 28px; }
        .topbar {
            display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
            gap: 12px; margin-bottom: 20px;
            background: var(--card); border: 1px solid var(--border); border-radius: 12px;
            padding: 12px 16px;
        }
        a.site-header-brand {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            color: #7cc576;
            font-family: 'Montserrat', sans-serif;
            font-weight: 700;
            font-size: 0.92em;
            letter-spacing: 0.02em;
            height: 36px;
            padding: 0 12px;
            border-radius: 6px;
            box-sizing: border-box;
            border: 1px solid transparent;
            background: linear-gradient(135deg, rgba(124,197,118,0.12), rgba(52,152,219,0.08));
            transition: 0.25s ease;
            cursor: pointer;
        }
        a.site-header-brand i {
            font-size: 1.15em;
            background: linear-gradient(135deg, #7cc576, #5dade2);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            filter: drop-shadow(0 0 6px rgba(124,197,118,0.35));
            transition: 0.25s ease;
        }
        a.site-header-brand:hover {
            color: #a8e89f;
            border-color: rgba(124,197,118,0.45);
            background: linear-gradient(135deg, rgba(124,197,118,0.22), rgba(52,152,219,0.14));
            box-shadow: 0 0 16px rgba(124,197,118,0.2);
            text-decoration: none;
        }
        a.site-header-brand:hover i {
            filter: drop-shadow(0 0 10px rgba(124,197,118,0.55));
            transform: rotate(25deg);
        }
        .topbar-right {
            display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
        }
        .hdr-btn {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 7px 12px; border-radius: 6px; font-size: 0.88em; font-weight: 600;
            background: #1e1e1e; border: 1px solid #444; color: #ccc;
            text-decoration: none !important; white-space: nowrap;
        }
        .hdr-btn:hover {
            border-color: var(--green); color: var(--green);
        }
        .hdr-btn i { font-size: 1.1em; color: var(--green); }
        .hdr-btn-rt {
            border-color: #3a5a38;
            color: #fff;
        }
        .hdr-btn-rt span { color: #fff; }
        .hdr-btn-rt i { color: var(--green); }
        .hdr-btn-rt:hover {
            background: rgba(124,197,118,0.12);
            border-color: var(--green);
            color: var(--green);
        }
        .hdr-btn-rt:hover span { color: var(--green); }
        .hero {
            background: var(--card); border: 1px solid var(--border); border-radius: 14px;
            padding: 36px 28px 32px; margin-bottom: 22px; text-align: center;
        }
        .hero h1,
        .hero-title-wrap h1 {
            font-size: clamp(2.2em, 6vw, 3.4em);
            font-weight: 800;
            letter-spacing: 0.14em;
            margin: 0 0 4px;
            line-height: 1.1;
            text-transform: uppercase;
            background: linear-gradient(100deg, #a8e89f 0%, #7cc576 28%, #5dade2 55%, #7cc576 78%, #c5f0bf 100%);
            background-size: 200% auto;
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent !important;
            filter: drop-shadow(0 0 18px rgba(124,197,118,0.35));
            animation: titleShimmer 8s ease-in-out infinite;
        }
        .login-box .hero-title-wrap h1 {
            font-size: clamp(1.6em, 5vw, 2.1em);
        }
        @keyframes titleShimmer {
            0%, 100% { background-position: 0% center; }
            50% { background-position: 100% center; }
        }
        .hero-title-wrap {
            position: relative;
            display: inline-block;
            margin-bottom: 10px;
        }
        .hero-title-wrap::after {
            content: '';
            display: block;
            height: 2px;
            margin: 12px auto 0;
            width: min(220px, 55%);
            border-radius: 2px;
            background: linear-gradient(90deg, transparent, #7cc576, #5dade2, #7cc576, transparent);
            opacity: 0.85;
        }
        .hero .sub { color: var(--muted); font-size: 1.05em; margin-bottom: 18px; }
        .hero blockquote {
            max-width: 720px; margin: 0 auto 22px; padding: 14px 18px;
            border-left: 3px solid var(--green); background: #1e1e1e;
            border-radius: 0 8px 8px 0; color: #bbb; font-style: italic; text-align: left;
        }
        .badges {
            display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px;
        }
        .badge {
            background: #1e1e1e; border: 1px solid #444; border-radius: 999px;
            padding: 6px 12px; font-size: 0.85em; color: #aaa;
        }
        .badge strong { color: var(--green); }
        .cta-row {
            display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
        }
        .btn {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 12px 18px; border-radius: 8px; font-weight: 700;
            font-family: 'Montserrat', sans-serif; font-size: 0.95em;
            border: 1px solid var(--green); text-decoration: none !important;
        }
        .btn-primary {
            background: linear-gradient(145deg, #2d5a2a, #1e3d1c); color: var(--green);
        }
        .btn-primary:hover { background: rgba(124,197,118,0.25); color: #9ed49a; }
        .btn-secondary {
            background: #1e1e1e; color: var(--text); border-color: #555;
        }
        .btn-secondary:hover { border-color: var(--green); color: var(--green); }
        .btn-discord {
            background: rgba(88,101,242,0.15); border-color: #5865F2; color: #8b93f7;
        }
        .btn-discord:hover { background: rgba(88,101,242,0.28); color: #c5c9ff; }
        .btn-shop {
            background: linear-gradient(145deg, #5a4a1c, #3d3212);
            border-color: #f1c40f;
            color: #ffe566;
        }
        .btn-shop:hover { background: rgba(241,196,15,0.22); color: #fff3b0; }
        section {
            background: var(--card); border: 1px solid var(--border); border-radius: 14px;
            padding: 28px 24px; margin-bottom: 20px;
        }
        section > h2 {
            color: var(--green); font-size: 1.35em; margin-bottom: 6px;
        }
        .section-sub { color: var(--muted); margin: 0 0 20px; font-size: 0.95em; }
        .grid-4 {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 14px;
        }
        .grid-2 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 16px;
        }
        .card {
            background: #1e1e1e; border: 1px solid #333; border-radius: 10px;
            padding: 16px 18px;
        }
        a.card-link {
            display: block;
            text-decoration: none !important;
            color: inherit;
            height: 100%;
        }
        a.card-link .card {
            height: 100%;
            box-sizing: border-box;
        }
        a.card-link:hover .card {
            border-color: #4a6a48;
            transform: translateY(-1px);
        }
        a.install-step-link {
            display: block;
            text-decoration: none !important;
            color: inherit;
        }
        .card h3 {
            color: var(--green); font-size: 1.05em; margin-bottom: 10px;
        }
        .card ul { margin: 0; padding-left: 1.15em; }
        .card li { margin-bottom: 6px; font-size: 0.94em; }
        .card strong { color: var(--white); }
        code {
            background: #111; border: 1px solid #444; border-radius: 4px;
            padding: 1px 6px; font-size: 0.9em; color: var(--green);
        }
        .live-row {
            display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }
        .live-row-left {
            display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
        }
        .btn-boards {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 9px 16px; border-radius: 8px; font-weight: 700;
            font-family: 'Montserrat', sans-serif; font-size: 0.9em;
            background: linear-gradient(145deg, #2d5a2a, #1e3d1c);
            border: 1px solid var(--green); color: var(--green);
            text-decoration: none !important;
            white-space: nowrap;
        }
        .btn-boards:hover {
            background: rgba(124,197,118,0.22);
            color: #9ed49a;
        }
        .online-pill {
            display: inline-flex; align-items: center;
            background: var(--green-dim); border: 1px solid var(--green);
            color: var(--green); font-weight: 700; padding: 8px 14px; border-radius: 8px;
            text-decoration: none !important;
        }
        a.online-pill:hover {
            background: rgba(124,197,118,0.25);
            color: #9ed49a;
        }
        .chart-wrap { height: 220px; margin-bottom: 18px; position: relative; }
        .lb-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 12px;
        }
        table.data {
            width: 100%; border-collapse: collapse; font-size: 0.9em;
        }
        table.data th, table.data td {
            padding: 8px 10px; border-bottom: 1px solid #333; text-align: left;
        }
        table.data th { color: var(--green); background: #181818; }
        table.data td.rank { color: var(--muted); width: 2.2em; }
        .lvl-badge {
            display: inline-block;
            min-width: 2em;
            text-align: center;
            padding: 2px 7px;
            border-radius: 4px;
            background: rgba(124,197,118,0.15);
            border: 1px solid rgba(124,197,118,0.45);
            color: #7cc576;
            font-weight: 700;
            font-size: 0.85em;
        }
        .manifesto .card h3 { color: var(--white); }
        .footer-cta {
            text-align: center; padding-top: 8px;
        }
        .site-foot {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 20px 22px;
            margin-top: 8px;
            color: var(--muted);
            font-size: 0.9em;
        }
        .site-foot-inner {
            display: flex; flex-wrap: wrap; gap: 18px 28px;
            align-items: flex-start; justify-content: space-between;
        }
        .site-foot-brand-btn {
            display: inline-flex; align-items: center; gap: 6px;
            color: var(--green); font-family: 'Montserrat', sans-serif;
            font-weight: 700; font-size: 1.05em; text-decoration: none !important;
        }
        .site-foot-brand-btn:hover { color: #9ed49a; }
        .site-foot-links {
            display: flex; flex-wrap: wrap; gap: 10px 14px;
        }
        .site-foot-links a { color: #bbb; text-decoration: none; }
        .site-foot-links a:hover { color: var(--green); }
        .site-foot-social {
            display: flex; gap: 10px; align-items: center;
        }
        .site-foot-icon {
            display: inline-flex; align-items: center; justify-content: center;
            width: 36px; height: 36px; border-radius: 8px;
            background: #1e1e1e; border: 1px solid #444; color: #ccc;
            text-decoration: none !important; font-size: 1.25em;
        }
        .site-foot-icon:hover { border-color: var(--green); color: var(--green); }
        .site-foot-icon:hover .bxl-discord-alt { color: #5865F2; }
        .site-foot-icon:hover .bxl-youtube { color: #FF0000; }
        .site-foot-copy {
            margin-top: 14px; padding-top: 12px; border-top: 1px solid #333;
            text-align: center; font-size: 0.85em; color: #777;
        }

        .online-pill .dot {
            display: inline-block; width: 8px; height: 8px; border-radius: 50%;
            background: #2ecc71; margin-right: 6px;
            box-shadow: 0 0 0 0 rgba(46,204,113,0.5);
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(46,204,113,0.5); }
            70% { box-shadow: 0 0 0 8px rgba(46,204,113,0); }
            100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
        }
        .card {
            transition: border-color 0.15s ease, transform 0.15s ease;
        }
        .card:hover {
            border-color: #4a6a48;
            transform: translateY(-1px);
        }
        .install-steps {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 12px;
            margin: 16px 0;
        }
        .install-step {
            background: #1e1e1e; border: 1px solid #333; border-radius: 10px;
            padding: 14px 16px; position: relative;
            transition: border-color 0.15s ease, transform 0.15s ease;
        }
        .install-step:hover {
            border-color: #4a6a48;
            transform: translateY(-1px);
        }
        .install-step .n {
            display: inline-flex; align-items: center; justify-content: center;
            width: 28px; height: 28px; border-radius: 50%;
            background: rgba(124,197,118,0.15); border: 1px solid #7cc576;
            color: #7cc576; font-weight: 700; font-size: 0.85em; margin-bottom: 8px;
        }
        .install-step h3 { font-size: 0.98em; color: #fff; margin: 0 0 6px; }
        .install-step p { margin: 0; font-size: 0.9em; color: #aaa; }
        .warn-box {
            background: rgba(241,196,15,0.1); border: 1px solid #f1c40f;
            border-radius: 8px; padding: 12px 14px; color: #e8d48b;
            font-size: 0.9em; margin-top: 12px; line-height: 1.5;
        }
        .warn-box strong { color: #f1c40f; }
        .hero {
            background:
                radial-gradient(ellipse at top, rgba(124,197,118,0.08), transparent 55%),
                var(--card);
        }

        .hero-proof {
            margin: 14px auto 0;
            max-width: 640px;
            color: #9ab;
            font-size: 0.92em;
            line-height: 1.45;
        }
        .hero-proof strong { color: #cde; font-weight: 600; }
        .path-steps {
            display: flex; flex-wrap: wrap; gap: 8px 10px;
            justify-content: center; align-items: center;
            margin-top: 16px; font-size: 0.88em; color: #9aa;
        }
        .path-steps .ps {
            display: inline-flex; align-items: center; gap: 6px;
            background: #1e1e1e; border: 1px solid #333;
            border-radius: 999px; padding: 6px 12px; color: #bbb;
        }
        .path-steps .ps i { color: var(--green); }
        .path-steps .arrow { color: #555; font-size: 0.9em; }
        .maint-line {
            text-align: center;
            margin-top: 14px;
            font-size: 0.88em;
            color: #888;
        }
        .maint-line i { color: var(--green); vertical-align: middle; }
        .maint-line strong { color: #ccc; }
        .armory-search {
            display: flex; flex-wrap: wrap; gap: 8px;
            align-items: center; margin: 4px 0 16px;
        }
        .armory-search input[type="text"] {
            flex: 1 1 180px;
            min-width: 160px;
            max-width: 280px;
            background: #1e1e1e;
            border: 1px solid #444;
            border-radius: 6px;
            color: #eee;
            padding: 9px 12px;
            font-size: 0.92em;
        }
        .armory-search input:focus {
            outline: none;
            border-color: var(--green);
        }
        .armory-search button {
            background: linear-gradient(145deg, #2d5a2a, #1e3d1c);
            border: 1px solid var(--green);
            color: var(--green);
            font-weight: 700;
            padding: 9px 14px;
            border-radius: 6px;
            cursor: pointer;
            font-family: 'Montserrat', sans-serif;
            font-size: 0.88em;
        }
        .armory-search button:hover {
            background: rgba(124,197,118,0.22);
            color: #9ed49a;
        }
        @media (max-width: 600px) {
            .hero { padding: 26px 16px; }
            section { padding: 22px 16px; }
        }


/* ===== Auth / Login (centered full-page card) ===== */
body.em-auth {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 24px 12px;
    box-sizing: border-box;
    color: var(--text);
    font-family: 'Open Sans', system-ui, sans-serif;
    background-color: var(--bg);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}
.login-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 36px 34px 28px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    background-image: radial-gradient(ellipse at top, rgba(124, 197, 118, 0.08), transparent 55%);
    background-color: var(--card);
}
.login-sub {
    color: var(--muted);
    margin: 12px 0 22px;
    font-size: 0.95em;
}
.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="email"] {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid #444;
    color: #fff;
    padding: 13px 16px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 1em;
    box-sizing: border-box;
}
.login-box input:focus {
    border-color: var(--green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(124, 197, 118, 0.15);
}
.login-box .remember {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #aaa;
    font-size: 0.9em;
}
.login-box .cf-turnstile,
.login-box .turnstile-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.login-box button[type="submit"] {
    width: 100%;
    background: linear-gradient(145deg, #2d5a2a, #1e3d1c);
    color: var(--green);
    border: 1px solid var(--green);
    padding: 13px;
    border-radius: 8px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.02em;
    cursor: pointer;
    transition: 0.2s;
}
.login-box button[type="submit"]:hover {
    background: rgba(124, 197, 118, 0.22);
    color: #9ed49a;
}
.login-box .error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.92em;
    font-weight: 600;
}
.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}
.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.88em;
    font-weight: 600;
    text-decoration: none !important;
    background: #1e1e1e;
    border: 1px solid #444;
    color: #ccc;
    transition: 0.15s ease;
}
.link-btn i {
    color: var(--green);
    font-size: 1.1em;
}
.link-btn:hover {
    border-color: var(--green);
    color: var(--green);
    text-decoration: none;
}
.link-btn-primary {
    border-color: rgba(124, 197, 118, 0.45);
    background: linear-gradient(135deg, rgba(124, 197, 118, 0.12), rgba(52, 152, 219, 0.08));
    color: var(--green);
}
.link-btn-primary:hover {
    background: rgba(124, 197, 118, 0.2);
    color: #9ed49a;
}
.login-box .foot-note {
    margin-top: 18px;
    font-size: 0.82em;
    color: #666;
}


/* ===== Module shell (logged-in pages: sidebar + content) ===== */
.page-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 16px 24px;
}
.admin-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    width: 100%;
    min-height: 60vh;
}
.admin-sidebar {
    width: 250px;
    min-width: 250px;
    flex: 0 0 250px;
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: 18px 15px;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
}
.admin-sidebar h2 {
    color: var(--green);
    font-size: 0.95em;
    font-weight: 700;
    margin: 0 0 10px 8px;
    font-family: 'Montserrat', system-ui, sans-serif;
}
.admin-sidebar a {
    display: block;
    padding: 7px 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 2px;
    transition: 0.2s;
    font-size: 0.92em;
    line-height: 1.25;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: #1e1e1e;
    color: var(--green);
    text-decoration: none;
}
.admin-sidebar a.logout-link { color: #e74c3c; margin-top: 14px; }
.admin-sidebar a.logout-link:hover { color: #ff6b6b; }
.admin-sidebar a i {
    margin-right: 8px;
    width: 1.2em;
    display: inline-block;
    text-align: center;
}
.admin-sidebar-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.admin-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px 28px 30px;
    overflow-x: auto;
}
body.em-module {
    background-color: var(--bg);
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Open Sans', system-ui, sans-serif;
    margin: 0;
    padding: 0;
}
@media (max-width: 900px) {
    .admin-wrapper { flex-direction: column !important; }
    .admin-sidebar {
        width: 100%;
        min-width: 0;
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

/* ===== Statistics module ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}
.kpi {
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.kpi .label { color: var(--muted); font-size: 0.85em; margin-bottom: 6px; }
.kpi .value {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.4em;
    color: var(--green);
}
.kpi .value.blue { color: #3498db; }
.kpi .value.red { color: #e74c3c; }
.chart-wrap {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    height: 380px;
}
.chart-wrap.tall { height: 420px; }
table.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
    margin-top: 8px;
}
table.stats-table th,
table.stats-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #3a3a3a;
    text-align: left;
}
table.stats-table th {
    background: #1e1e1e;
    color: var(--green);
    font-weight: 600;
}
.note {
    color: var(--muted);
    font-size: 0.88em;
    margin-top: 12px;
    line-height: 1.5;
}
/* .error-box uses the shared .message banner standard above */
code.sql-box {
    display: block;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px;
    font-size: 0.82em;
    white-space: pre-wrap;
    color: #bbb;
    margin-top: 10px;
}
.card h3 {
    color: var(--green);
    margin: 0 0 16px 0;
    font-size: 1.15em;
    font-weight: 700;
}


/* ===== Layout aliases (Boards uses .wrapper / .content) ===== */
.wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    width: 100%;
    min-height: 60vh;
}
.content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px 28px 30px;
    overflow-x: auto;
}
@media (max-width: 900px) {
    .wrapper { flex-direction: column !important; }
}

/* ===== Boards module ===== */
.card h1 {
    color: var(--green);
    font-size: 1.35em;
    margin: 0 0 6px;
    font-weight: 700;
}
.card .sub {
    color: var(--muted);
    font-size: 0.9em;
    margin-bottom: 18px;
}
table.board {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
}
table.board th {
    background: #1e1e1e;
    color: var(--green);
    font-weight: 600;
    padding: 7px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
table.board td {
    padding: 6px 10px;
    border-bottom: 1px solid #2e2e2e;
    vertical-align: middle;
}
table.board tr:hover td {
    background: rgba(124, 197, 118, 0.05);
}
.rank {
    color: var(--muted);
    font-weight: 600;
    width: 48px;
}
.rank.top1 { color: #ffd700; }
.rank.top2 { color: #c0c0c0; }
.rank.top3 { color: #cd7f32; }
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.online-dot.on {
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.6);
}
.online-dot.off { background: #555; }
.badge-level {
    display: inline-block;
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.85em;
    color: var(--green);
    font-weight: 600;
}
.char-link {
    color: var(--green);
    text-decoration: none;
}
.char-link:hover { text-decoration: underline; }
.empty {
    color: var(--muted);
    padding: 30px;
    text-align: center;
}
a.link {
    color: var(--green);
    text-decoration: none;
}
a.link:hover { text-decoration: underline; }


/* ===== Armory module ===== */
/* Index filters & roster */
.sidebar-filter-form input,
        .sidebar-filter-form select {
            width: 100%;
            background: #1e1e1e;
            border: 1px solid #444;
            color: #fff;
            padding: 9px 12px;
            border-radius: 4px;
            font-size: 0.88em;
            box-sizing: border-box;
            margin-bottom: 8px;
        }
        .sidebar-filter-form input:focus,
        .sidebar-filter-form select:focus {
            border-color: #7cc576;
            outline: none;
        }
        .sidebar-filter-form button {
            width: 100%;
            background: #7cc576;
            color: #fff;
            border: none;
            padding: 10px;
            border-radius: 4px;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            font-size: 0.9em;
            cursor: pointer;
            margin-top: 4px;
        }
        .sidebar-filter-form button:hover { background: #61b959; }
        .btn-clear-side {
            display: block;
            text-align: center;
            color: #aaa;
            font-size: 0.85em;
            margin-top: 10px;
            text-decoration: none;
        }
        .btn-clear-side:hover { color: #7cc576; }
        .content { flex: 1; padding: 30px 35px; }

        .page-header {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 10px;
            padding: 22px 28px;
            margin-bottom: 25px;
            backdrop-filter: blur(5px);
            text-align: center;
        }
        .page-header h1 {
            color: #7cc576; font-weight: 700; margin: 0 0 6px 0; letter-spacing: 1px;
        }
        .page-header p { color: #888; margin: 0; }

        .filters {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 10px;
            padding: 18px 22px;
            margin-bottom: 25px;
            backdrop-filter: blur(5px);
        }
        .filters form {
            display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
        }
        .filters label {
            display: block; font-size: 0.75em; text-transform: uppercase;
            color: #888; margin-bottom: 4px;
        }
        .filters input[type="text"],
        .filters select {
            background: #1e1e1e; border: 1px solid #444; color: #fff;
            padding: 9px 12px; border-radius: 4px; font-size: 0.9em;
            min-width: 140px;
        }
        .filters input:focus, .filters select:focus { border-color: #7cc576; outline: none; }
        .filters .btn-search {
            background: #7cc576; color: #fff; border: none; padding: 10px 20px;
            border-radius: 5px; font-family: 'Montserrat', sans-serif; font-weight: 600;
            cursor: pointer; transition: 0.25s;
        }
        .filters .btn-search:hover { background: #61b959; }
        .filters .btn-clear {
            background: transparent; color: #aaa; border: 1px solid #555;
            padding: 9px 14px; border-radius: 5px; text-decoration: none; font-size: 0.9em;
        }
        .filters .btn-clear:hover { border-color: #7cc576; color: #7cc576; text-decoration: none; }

        .online-badge {
            display: inline-block;
            background: rgba(46, 204, 113, 0.15);
            color: #2ecc71;
            border: 1px solid #2ecc71;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.85em;
            font-weight: 600;
            margin-left: 10px;
        }

        .roster-card {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 10px;
            padding: 20px 25px;
            backdrop-filter: blur(5px);
            overflow-x: auto;
        }
        .roster-card h3 {
            color: #7cc576; margin: 0 0 16px 0; font-size: 1.15em;
        }

        table.armory {
            width: 100%; border-collapse: collapse; font-size: 0.92em;
        }
        table.armory th {
            background: #1e1e1e; color: #7cc576; padding: 7px 10px;
            text-align: left; border-bottom: 1px solid #444; white-space: nowrap;
        }
        table.armory td {
            padding: 6px 10px; border-bottom: 1px solid #2a2a2a; vertical-align: middle;
        }
        table.armory tr:hover td { background: rgba(124, 197, 118, 0.06); }
        a.char-link {
            color: #7cc576; font-weight: 700; text-decoration: none;
        }
        a.char-link:hover { color: #9ed49a; text-decoration: underline; }
        .badge-level {
            background: #1a3a1a; color: #7cc576; padding: 3px 9px;
            border-radius: 4px; font-weight: 700; border: 1px solid #7cc576; font-size: 0.9em;
        }
        .online-dot {
            display: inline-block; width: 8px; height: 8px; border-radius: 50%;
            margin-right: 6px; vertical-align: middle;
        }
        .online-dot.on { background: #2ecc71; box-shadow: 0 0 5px #2ecc71; }
        .online-dot.off { background: #555; }
        .empty { color: #888; padding: 25px; text-align: center; }

        .sort-links { margin-bottom: 14px; font-size: 0.9em; }
        .sort-links a {
            color: #aaa; text-decoration: none; margin-right: 14px;
            padding: 4px 0; border-bottom: 2px solid transparent;
        }
        .sort-links a:hover, .sort-links a.active {
            color: #7cc576; border-bottom-color: #7cc576;
        }

        @media (max-width: 768px) {
            .wrapper { flex-direction: column; }
            .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #333; }
        }
/* Shared site header */
.page-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px 28px;
    box-sizing: border-box;
}
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(36, 36, 36, 0.93);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 8px 14px;
    margin-bottom: 12px;
    backdrop-filter: blur(5px);
}
.site-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.site-header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7cc576;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.05em;
    white-space: nowrap;
}
.site-header-brand i { font-size: 1.3em; }
.site-header-divider {
    width: 1px;
    height: 22px;
    background: #444;
    flex-shrink: 0;
}
.site-header-page {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #eee;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.02em;
    min-width: 0;
}
.site-header-page i { color: #7cc576; font-size: 1.05em; }
.site-header-sep { color: #666; margin: 0 4px; font-weight: 500; }
.site-header-sub { color: #bbb; font-weight: 600; font-size: 0.95em; }
.site-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-header-online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid #2ecc71;
    color: #2ecc71;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
    white-space: nowrap;
}
.site-header-online:hover {
    background: rgba(46, 204, 113, 0.22);
    color: #3ee687;
    text-decoration: none;
}
.site-header-online i { font-size: 1.1em; }

.admin-sidebar a i {
            margin-right: 8px;
            width: 1.2em;
            display: inline-block;
            text-align: center;
        }
@media (max-width: 768px) {
    .site-header { flex-direction: column; align-items: flex-start; }
    .site-header-right { width: 100%; flex-wrap: wrap; }
    .site-header-divider { display: none; }
    .page-shell { padding: 12px; }
}

        .admin-sidebar a i {
            margin-right: 8px;
            width: 1.2em;
            display: inline-block;
            text-align: center;
        }

    
/* Shared site footer – full width under sidebar+content */
.site-footer {
    margin-top: 16px;
    background: rgba(28, 28, 28, 0.95);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 16px 20px;
    backdrop-filter: blur(5px);
}
.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}
.site-footer-col {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.site-footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.site-footer-title {
    color: #7cc576;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.site-footer-title i { font-size: 1.15em; }
.site-footer-copy {
    color: #777;
    font-size: 0.8em;
}
.site-footer-copy a {
    color: #7cc576;
    text-decoration: none;
}
.site-footer-copy a:hover { text-decoration: underline; }
.site-footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.site-footer-links a:hover { color: #7cc576; }
.site-footer-links a i { font-size: 1.05em; }
.site-footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #1e1e1e;
    border: 1px solid #444;
    color: #ccc;
    font-size: 1.25em;
    text-decoration: none;
    transition: 0.2s;
}
.site-footer-icon:hover {
    border-color: #7cc576;
    color: #7cc576;
    text-decoration: none;
}
a.site-footer-icon:hover .bxl-discord-alt { color: #5865F2; }
a.site-footer-icon:hover .bxl-youtube { color: #FF0000; }
a.site-footer-icon:hover .bx-envelope { color: #7cc576; }
.site-footer-perf {
    color: #666;
    font-size: 0.8em;
    gap: 14px;
}
.site-footer-perf span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.site-footer-perf i { color: #555; font-size: 1.05em; }
@media (max-width: 768px) {
    .site-footer-inner { flex-direction: column; align-items: flex-start; }
    .site-footer-links { gap: 10px 14px; }
}

   
/* Character profile */
.profile-card {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 10px;
            padding: 25px 30px;
            margin-bottom: 25px;
            backdrop-filter: blur(5px);
        }
        .hero-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 15px;
            border-bottom: 2px solid #7cc576;
            padding-bottom: 18px;
            margin-bottom: 22px;
        }
        .hero-header h1 { margin: 0; color: #fff; font-weight: 700; font-size: 2em; }
        .badge-level {
            background: #1a3a1a; color: #7cc576; padding: 6px 14px; border-radius: 4px;
            font-weight: 700; border: 1px solid #7cc576; font-size: 0.95em;
        }
        .stat-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 12px;
        }
        .stat-box {
            background: #1e1e1e; border: 1px solid #444; border-radius: 6px;
            padding: 12px 14px; text-align: center;
        }
        .stat-box .label {
            font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.5px;
            color: #888; margin-bottom: 4px;
        }
        .stat-box .value { font-size: 1.25em; font-weight: 700; color: #7cc576; }
        .stat-box .value.online { color: #2ecc71; }
        .stat-box .value.offline { color: #888; }
        .section-title { color: #7cc576; font-weight: 700; margin: 0 0 16px 0; font-size: 1.15em; }
        .paperdoll { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
        .pd-column { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
        .pd-bottom { display: flex; gap: 10px; justify-content: center; width: 100%; margin-top: 8px; }
        .gear-slot {
            background: #1e1e1e; border: 1px solid #444; border-radius: 6px;
            padding: 8px 12px; display: flex; align-items: center; gap: 10px; min-height: 48px;
            transition: border-color 0.2s;
        }
        .gear-slot:hover { border-color: #7cc576; }
        .gear-slot .slot-label {
            font-size: 0.7em; text-transform: uppercase; color: #7cc576;
            font-weight: 700; width: 70px; flex-shrink: 0;
        }
        .gear-slot a { color: #ff8000; text-decoration: none; font-size: 0.9em; }
        .gear-slot .empty { color: #555; font-size: 0.85em; font-style: italic; }
        .prof-list { display: flex; flex-wrap: wrap; gap: 10px; }
        .prof-chip {
            background: #1e1e1e; border: 1px solid #444; border-radius: 5px;
            padding: 8px 14px; font-size: 0.9em;
        }
        .prof-chip strong { color: #7cc576; }
        .companions-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 16px;
            margin-top: 8px;
        }
        .companions-col {
            background: #1e1e1e;
            border: 1px solid #444;
            border-radius: 6px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            min-height: 200px;
            max-height: 420px;
        }
        .companions-col-header {
            background: #1a1a1a;
            color: #7cc576;
            font-weight: 700;
            font-size: 0.9em;
            padding: 10px 14px;
            border-bottom: 1px solid #444;
            flex-shrink: 0;
        }
        .companions-col-header span {
            color: #888;
            font-weight: 400;
            font-size: 0.85em;
            margin-left: 6px;
        }
        .companions-col-body {
            overflow-y: auto;
            flex: 1;
        }
        .companions-col-body table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.88em;
        }
        .companions-col-body td {
            padding: 7px 12px;
            border-bottom: 1px solid #2a2a2a;
            color: #ccc;
        }
        .companions-col-body tr:hover td {
            background: rgba(124, 197, 118, 0.06);
        }
        .companions-col-body a {
            color: #ff8000;
            text-decoration: none;
        }
        .companions-col-body a:hover { text-decoration: underline; }
        .companions-empty {
            color: #666;
            font-size: 0.85em;
            padding: 16px 12px;
            text-align: center;
            font-style: italic;
        }
        .back-row { margin-top: 20px; }
        .btn-green {
            display: inline-block; background: #7cc576; color: #fff; border: none;
            padding: 10px 20px; border-radius: 5px; font-family: 'Montserrat', sans-serif;
            font-weight: 600; text-decoration: none; transition: 0.25s;
        }
        .btn-green:hover { background: #61b959; color: #fff; text-decoration: none; }
        .btn-outline {
            display: inline-block; color: #7cc576; border: 2px solid #7cc576;
            padding: 8px 16px; border-radius: 5px; font-family: 'Montserrat', sans-serif;
            font-weight: 600; text-decoration: none; margin-left: 10px; transition: 0.25s;
        }
        .btn-outline:hover { background: #7cc576; color: #fff; text-decoration: none; }
        @media (max-width: 900px) {
            .companions-grid { grid-template-columns: 1fr; }
            .companions-col { max-height: 280px; }
        }
        @media (max-width: 768px) {
            .wrapper { flex-direction: column; }
            .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #333; }
            .paperdoll { flex-direction: column; align-items: stretch; }
            .pd-column { min-width: 100%; }
        }

/* Guild extras */
table.armory { width: 100%; border-collapse: collapse; font-size: 0.92em; }
        table.armory th {
            background: #1e1e1e; color: #7cc576; padding: 7px 10px;
            text-align: left; border-bottom: 1px solid #444;
        }
        table.armory td {
            padding: 6px 10px; border-bottom: 1px solid #2a2a2a; vertical-align: middle;
        }
        table.armory tr:hover td { background: rgba(124, 197, 118, 0.06); }
        a.char-link { color: #7cc576; font-weight: 700; text-decoration: none; }
        a.char-link:hover { color: #9ed49a; text-decoration: underline; }
        .badge-level {
            background: #1a3a1a; color: #7cc576; padding: 3px 9px;
            border-radius: 4px; font-weight: 700; border: 1px solid #7cc576; font-size: 0.9em;
        }
        .online-dot {
            display: inline-block; width: 8px; height: 8px; border-radius: 50%;
            margin-right: 6px; vertical-align: middle;
        }
        .online-dot.on { background: #2ecc71; box-shadow: 0 0 5px #2ecc71; }
        .online-dot.off { background: #555; }
        .btn-green {
            display: inline-block; background: #7cc576; color: #fff; border: none;
            padding: 10px 20px; border-radius: 5px; font-family: 'Montserrat', sans-serif;
            font-weight: 600; text-decoration: none; transition: 0.25s;
        }
        .btn-green:hover { background: #61b959; color: #fff; text-decoration: none; }
        .motd {
            background: #1e1e1e; border-left: 3px solid #7cc576;
            padding: 12px 16px; margin: 14px 0; color: #bbb; font-style: italic;
        }
        

.armory-page .wrapper { min-height: 0; align-items: stretch; }
.armory-page .admin-sidebar { align-self: stretch; height: auto; }
.admin-sidebar-section h3 i {
    margin-right: 6px;
    width: 1.2em;
    display: inline-block;
    text-align: center;
}


/* Armory cards: same hover lift as main .card */
.profile-card,
.roster-card {
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.profile-card:hover,
.roster-card:hover {
    border-color: #4a6a48;
    transform: translateY(-1px);
}

/* Guild names: same weight/color as character links (Boards style) */
a.char-link,
a.guild-link {
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
}
a.char-link:hover,
a.guild-link:hover {
    color: #9ed49a;
    text-decoration: underline;
}


/* Local sidebar section titles (Search & Filters, Leaderboards, Charts, …) */
.admin-sidebar h2,
.admin-sidebar h3,
.admin-sidebar-section h2,
.admin-sidebar-section h3 {
    color: var(--green) !important;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.95em !important;
    line-height: 1.3;
    margin: 0 0 10px 8px;
}
.admin-sidebar h2 i,
.admin-sidebar h3 i,
.admin-sidebar-section h2 i,
.admin-sidebar-section h3 i {
    color: var(--green) !important;
    font-size: 1.15em !important;
    vertical-align: -2px;
    margin-right: 6px;
}


/* Compact data tables (site standard) */
table.board th,
table.board td,
table.armory th,
table.armory td,
table.stats-table th,
table.stats-table td,
table.char-table th,
table.char-table td,
table.history-table th,
table.history-table td {
    padding-top: 6px;
    padding-bottom: 6px;
}


/* ===== Planner module ===== */
.clock-bar {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.95em;
    line-height: 1.55;
    color: #ddd;
}
.clock-bar .realm {
    color: var(--green);
    font-weight: 700;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.clock-bar .tz-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #aaa;
    font-size: 0.88em;
}
.clock-bar .tz-row span strong {
    color: #ccc;
    font-weight: 600;
}
/* ===== Status banners (site standard) =====
   Solid dark card + colored left rail + icon. Readable on any background.
   Markup: <div class="message success"><i class="bx bx-check-circle"></i><span>Saved.</span></div>
*/
.message,
.error-box,
.flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin: 0 0 16px;
    border-radius: 10px;
    background: rgba(18, 18, 18, 0.96);
    border: 1px solid #3a3a3a;
    border-left: 4px solid #7cc576;
    color: #f2f2f2;
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1.4;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
}
.message i,
.error-box i,
.flash i {
    font-size: 1.35em;
    line-height: 1;
    margin-top: 1px;
    flex: 0 0 auto;
    color: #7cc576;
}
.message.success {
    border-left-color: #7cc576;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(124, 197, 118, 0.12);
}
.message.success i { color: #7cc576; }
.message.error,
.error-box {
    border-left-color: #e74c3c;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(231, 76, 60, 0.12);
}
.message.error i,
.error-box i { color: #e74c3c; }
.message.warning {
    border-left-color: #f1c40f;
}
.message.warning i { color: #f1c40f; }
.message.info {
    border-left-color: #5dade2;
}
.message.info i { color: #5dade2; }
.cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.cal-table th {
    background: #1e1e1e;
    color: var(--green);
    font-weight: 600;
    font-size: 0.88em;
    padding: 8px 6px;
    text-align: center;
    border: 1px solid var(--border);
}
.cal-table th.week-label {
    width: 72px;
    color: #aaa;
    font-size: 0.8em;
}
.cal-table td {
    vertical-align: top;
    border: 1px solid var(--border);
    background: rgba(20, 20, 20, 0.55);
    height: 120px;
    padding: 6px;
}
.cal-table td.today {
    background: rgba(124, 197, 118, 0.12);
    box-shadow: inset 0 0 0 1px var(--green);
}
.cal-table td.past { opacity: 0.75; }
.day-num {
    font-weight: 700;
    font-size: 0.95em;
    color: #eee;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.day-num .add-btn {
    font-size: 0.75em;
    color: var(--green);
    text-decoration: none;
    border: 1px solid var(--green);
    border-radius: 3px;
    padding: 1px 5px;
}
.day-num .add-btn:hover {
    background: var(--green);
    color: #111;
}
.event-chip {
    display: block;
    font-size: 0.7em;
    line-height: 1.25;
    padding: 3px 5px;
    margin-bottom: 3px;
    border-radius: 3px;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.event-chip:hover {
    filter: brightness(1.12);
    color: #fff;
    text-decoration: none;
}
.event-chip.cancelled {
    opacity: 0.55;
    text-decoration: line-through;
}
.event-chip .meta { opacity: 0.9; }
.week-cell {
    background: #1a1a1a !important;
    text-align: center;
    vertical-align: middle !important;
    color: var(--green);
    font-weight: 700;
    font-size: 0.85em;
    width: 72px;
}
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.legend span {
    font-size: 0.78em;
    padding: 3px 8px;
    border-radius: 3px;
    color: #fff;
}
table.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
}
table.list-table th,
table.list-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #3a3a3a;
    text-align: left;
}
table.list-table th {
    background: #1e1e1e;
    color: var(--green);
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78em;
    font-weight: 600;
    color: #fff;
}
/* Event detail / forms */
.meta-row {
    color: #aaa;
    font-size: 0.95em;
    margin-bottom: 12px;
}
.meta-row strong { color: var(--green); }
.role-block { margin-bottom: 18px; }
.role-block h4 {
    color: var(--green);
    font-size: 0.95em;
    margin: 0 0 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}
.slot-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid #2a2a2a;
    font-size: 0.9em;
}
.slot-empty {
    color: #666;
    font-style: italic;
}
.slot-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.slot-form select,
.slot-form input[type=text] {
    width: auto;
    max-width: 180px;
    margin: 0;
    padding: 5px 8px;
    font-size: 0.85em;
}
.back { margin-bottom: 12px; }
.back a {
    color: var(--green);
    text-decoration: none;
}
.back a:hover { text-decoration: underline; }
.planner-form input[type=text],
.planner-form input[type=time],
.planner-form input[type=date],
.planner-form select,
.planner-form textarea {
    width: 100%;
    max-width: 420px;
    background: #1e1e1e;
    border: 1px solid #444;
    color: #fff;
    padding: 10px 12px;
    border-radius: 5px;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.planner-form textarea {
    max-width: 100%;
    min-height: 70px;
}
button.btn-planner,
.btn-planner {
    background: var(--green);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 5px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: none;
    display: inline-block;
}
button.btn-planner:hover,
.btn-planner:hover {
    background: #61b959;
    color: #fff;
    text-decoration: none;
}
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; color: #fff; }
.btn-secondary { background: #3498db; color: #fff; }
.btn-secondary:hover { background: #2980b9; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 0.8em; }


/* Premium action buttons (main Statistics-style) */
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.85em;
    background: linear-gradient(145deg, #2d5a2a, #1e3d1c);
    border: 1px solid var(--green);
    color: var(--green);
    text-decoration: none !important;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
}
.btn-premium:hover {
    background: rgba(124, 197, 118, 0.22);
    color: #9ed49a;
}
.btn-premium.btn-sm {
    padding: 4px 10px;
    font-size: 0.78em;
    gap: 4px;
}
.btn-premium.btn-danger,
button.btn-premium.btn-danger,
a.btn-premium.btn-danger {
    background: linear-gradient(145deg, #5a2a2a, #3d1c1c);
    border-color: #e74c3c;
    color: #e74c3c;
}
.btn-premium.btn-danger:hover,
button.btn-premium.btn-danger:hover,
a.btn-premium.btn-danger:hover {
    background: rgba(231, 76, 60, 0.22);
    color: #ff8a7a;
}
.btn-premium.btn-secondary {
    background: linear-gradient(145deg, #1c3a5a, #152a3d);
    border-color: #5dade2;
    color: #5dade2;
}
.btn-premium.btn-secondary:hover {
    background: rgba(93, 173, 226, 0.22);
    color: #8ecae6;
}
.btn-premium i { font-size: 1.1em; }


/* ===== Page navigation / pager (site standard) =====
   Use for list paging (Prev · 1 · 2 · Next) and single "back" browse links.
   Markup:
     <div class="page-pager">
       <a class="nav" href="?page=1">&laquo; Prev</a>
       <a href="?page=1">1</a>
       <span class="current">2</span>
       <a class="nav" href="?page=3">Next &raquo;</a>
     </div>
   Single back link:
     <a class="page-nav" href="..."><i class="bx bx-chevron-left"></i> Back</a>
*/
.page-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
}
.page-pager a,
.page-pager span,
a.page-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 2em;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    font-family: 'Montserrat', system-ui, sans-serif;
    text-decoration: none !important;
    white-space: nowrap;
    background: #1e1e1e;
    border: 1px solid #444;
    color: #ccc;
    line-height: 1.2;
}
.page-pager a:hover,
a.page-nav:hover {
    border-color: #7cc576;
    color: #7cc576;
    text-decoration: none !important;
}
.page-pager span.current,
.page-pager .current {
    background: rgba(124, 197, 118, 0.15);
    border: 1px solid #7cc576;
    color: #7cc576;
}
.page-pager .nav,
a.page-nav {
    color: #7cc576;
    border-color: rgba(124, 197, 118, 0.4);
}
.page-pager .nav:hover,
a.page-nav:hover {
    background: rgba(124, 197, 118, 0.12);
    color: #9ed49a;
}
.page-pager-top {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}
.page-pager-bottom {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #333;
}
.page-pager .gap {
    background: none;
    border: none;
    color: #666;
    min-width: 0;
    padding: 6px 2px;
}
.card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 10px;
}
.card-head h3 {
    margin: 0;
    flex: 1 1 auto;
}
.card-head .page-nav {
    flex: 0 0 auto;
    margin-left: auto;
}


/* ===== Lore / philosophy quotes (site standard) =====
   Use for realm voice, origin, rules preamble, roadmap philosophy.
   Markup: <div class="quote">A fortress does not stand still…</div>
*/
.prose {
    line-height: 1.65;
    color: #ccc;
    font-size: 0.98em;
}
.prose h2 {
    color: var(--green);
    font-size: 1.12em;
    margin: 26px 0 10px;
    font-weight: 700;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
    color: #9ed49a;
    font-size: 1.02em;
    margin: 20px 0 8px;
    font-weight: 600;
}
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 1.25em; }
.prose li { margin-bottom: 6px; }
.prose strong { color: #fff; }
.quote,
.prose .quote,
.lore {
    background: #1e1e1e;
    border-left: 3px solid var(--green);
    padding: 12px 16px;
    margin: 0 0 18px;
    border-radius: 0 8px 8px 0;
    color: #ddd;
    font-style: italic;
    font-weight: 400;
    line-height: 1.65;
}
.quote strong,
.prose .quote strong,
.lore strong {
    color: #fff;
    font-weight: 700;
    font-style: italic;
}
.prose .act {
    display: inline-block;
    background: rgba(124, 197, 118, 0.12);
    border: 1px solid var(--green);
    color: var(--green);
    font-weight: 700;
    font-size: 0.82em;
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.prose .status {
    display: inline-block;
    font-size: 0.8em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}
.prose .status.live { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.prose .status.wait { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.prose .status.dev { background: rgba(52, 152, 219, 0.2); color: #3498db; }
.rate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}
.rate-pill {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 14px;
}
.rate-pill .k { color: #888; font-size: 0.82em; margin-bottom: 4px; }
.rate-pill .v { color: var(--green); font-weight: 700; font-size: 1.05em; }
.rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
    margin: 0 0 16px;
}
.rate-table th, .rate-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #333;
    text-align: left;
}
.rate-table th { color: var(--green); background: #1e1e1e; }
.rate-table td.val { color: var(--green); font-weight: 700; white-space: nowrap; }
.nav-next {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #333;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}
.nav-next a {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92em;
}
.nav-next a:hover { text-decoration: underline; }


/* Key lore lines — stronger than a normal quote */
/* Inline key lines use <strong> inside .quote — no extra panel needed */
.quote.accent,
.prose .quote.accent {
    color: #fff;
    font-weight: 700;
}


/* ===== Support module ===== */
.faq-item {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.faq-item .q {
    color: var(--green);
    font-weight: 700;
    margin: 0 0 8px;
    font-size: 0.98em;
}
.faq-item .a {
    color: #ccc;
    margin: 0;
    line-height: 1.55;
    font-size: 0.95em;
}
.faq-item .a strong { color: #fff; }
.step {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    align-items: flex-start;
}
.step-num {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(124, 197, 118, 0.15);
    border: 1px solid var(--green);
    color: var(--green);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', system-ui, sans-serif;
}
.step-body { flex: 1; min-width: 0; }
.step-body h3 { margin-top: 4px; }
.cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(145deg, #2d5a2a, #1e3d1c);
    border: 1px solid var(--green);
    color: var(--green);
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    margin: 8px 0 16px;
    font-size: 0.98em;
}
.cta:hover {
    background: rgba(124, 197, 118, 0.2);
    color: #9ed49a;
    text-decoration: none;
}
.codebox {
    display: inline-block;
    background: #111;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 10px;
    font-family: Consolas, monospace;
    color: var(--green);
    font-size: 0.92em;
}
.tip {
    background: rgba(52, 152, 219, 0.12);
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 14px 0;
    color: #bcd;
    font-size: 0.92em;
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin: 8px 0 18px;
}
.contact-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.contact-card .badge {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--green);
    border: 1px solid var(--green);
    border-radius: 4px;
    padding: 2px 8px;
    width: fit-content;
}
.contact-card h3 {
    color: #fff;
    font-size: 1.05em;
    margin: 0;
}
.contact-card p {
    margin: 0;
    font-size: 0.92em;
    color: #bbb;
    line-height: 1.5;
    flex: 1;
}
.contact-card .meta { font-size: 0.85em; color: #888; }
.contact-card .cta-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(124, 197, 118, 0.12);
    border: 1px solid var(--green);
    color: var(--green);
    font-weight: 700;
    font-size: 0.9em;
    text-decoration: none;
    width: fit-content;
}
.contact-card .cta-mini:hover {
    background: rgba(124, 197, 118, 0.22);
    color: #9ed49a;
    text-decoration: none;
}
.contact-card.business { border-color: #555; grid-column: 1 / -1; }
.contact-card.business .badge { color: #aaa; border-color: #666; }
.prose a { color: var(--green); text-decoration: none; font-weight: 600; }
.prose a:hover { text-decoration: underline; }


/* Prev left / next right browse row */
.page-pager.split,
.nav-next.page-pager {
    justify-content: space-between;
    width: 100%;
}


/* ===== Auction module ===== */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}
.toolbar input[type=text],
.toolbar select {
    background: #1e1e1e;
    border: 1px solid #444;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.92em;
}
.toolbar input[type=text] { min-width: 220px; flex: 1; }
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.stat-pill {
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.88em;
    color: #aaa;
}
.stat-pill strong { color: var(--green); }
table.auc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
table.auc-table th {
    background: #1e1e1e;
    color: var(--green);
    font-weight: 600;
    padding: 7px 10px;
    text-align: left;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1;
}
table.auc-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #2e2e2e;
    vertical-align: middle;
}
table.auc-table tr:hover td { background: rgba(124, 197, 118, 0.05); }
.item-cell { display: flex; align-items: center; gap: 10px; }
.item-icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #111;
    flex-shrink: 0;
    object-fit: cover;
}
.item-icon-wrap { display: inline-block; line-height: 0; }
.item-name { font-weight: 600; }
.item-name a { text-decoration: none; }
.item-name a:hover { text-decoration: underline; }
.item-meta { color: #777; font-size: 0.82em; }
.coin-gold { color: #ffd700; }
.coin-silver { color: #c0c0c0; }
.coin-copper { color: #cd7f32; }
.time-soon { color: #f39c12; font-weight: 600; }
.time-ended { color: #e74c3c; }
.badge-house {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.78em;
    background: #2a2a2a;
    color: #bbb;
}
.badge-house.alliance { background: rgba(52, 152, 219, 0.2); color: #5dade2; }
.badge-house.horde { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }
.badge-house.neutral { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.bmah-banner {
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.25), rgba(36, 36, 36, 0.5));
    border: 1px solid #6c3483;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #d2b4de;
    font-size: 0.92em;
}


/* Register extras */
.login-box h2 {
    color: #fff;
    text-align: center;
    font-size: 1.2em;
    margin: 4px 0 6px;
    font-family: 'Montserrat', system-ui, sans-serif;
}
.login-box .lead {
    text-align: center;
    color: var(--muted);
    font-size: 0.92em;
    margin: 0 0 16px;
    line-height: 1.45;
}
.login-box label {
    display: block;
    color: #aaa;
    font-size: 0.85em;
    margin: 0 0 4px;
}
.login-box .hint {
    font-size: 0.8em;
    color: #666;
    margin: -6px 0 12px;
}
.login-box .points {
    text-align: center;
    background: rgba(124, 197, 118, 0.12);
    border: 1px solid var(--green);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    color: var(--green);
    font-weight: 700;
    font-size: 0.95em;
}
.login-box .foot {
    text-align: center;
    margin-top: 16px;
    font-size: 0.88em;
    color: #888;
}
.login-box .foot a {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
}
.login-box .foot a:hover { text-decoration: underline; }


/* Forgot / reset extras */
.login-box .success,
.login-box .ok {
    background: rgba(124, 197, 118, 0.12);
    border: 1px solid var(--green);
    color: #ddd;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    line-height: 1.5;
    font-size: 0.92em;
}
.login-box .ok strong,
.login-box .success strong { color: var(--green); }
.login-box .cred {
    background: #111;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 12px 0;
    font-family: Consolas, monospace;
    color: #eee;
}
.login-box a.btn-premium {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}


/* ===== Account module ===== */
.sidebar-pw-form input {
            width: 100%;
            background: #1e1e1e;
            border: 1px solid #444;
            color: #fff;
            padding: 9px 12px;
            border-radius: 4px;
            font-size: 0.88em;
            box-sizing: border-box;
            margin-bottom: 8px;
        }
        .sidebar-pw-form input:focus {
            border-color: #7cc576;
            outline: none;
        }
        .sidebar-pw-form button {
            width: 100%;
            background: #7cc576;
            color: #fff;
            border: none;
            padding: 10px;
            border-radius: 4px;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            font-size: 0.9em;
            cursor: pointer;
            margin-top: 4px;
        }
        .sidebar-pw-form button:hover { background: #61b959; }
        .badge-level {
            background: #1a3a1a;
            color: #7cc576;
            padding: 3px 9px;
            border-radius: 4px;
            font-weight: 700;
            border: 1px solid #7cc576;
            font-size: 0.9em;
        }

        .content { flex: 1 1 auto; min-width: 0; padding: 20px 28px 30px; overflow-x: auto; }

        .header-box {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 8px;
            padding: 18px 25px;
            margin-bottom: 25px;
            backdrop-filter: blur(5px);
        }
        .header-box h1 {
            color: #7cc576;
            font-weight: 700;
            margin: 0 0 10px 0;
            font-size: 1.5em;
        }
        .header-meta {
            color: #aaa;
            font-size: 0.92em;
            line-height: 1.7;
            flex-wrap: wrap;
        }
        .header-meta strong { color: #7cc576; }
        .logout-btn {
            color: #e74c3c;
            text-decoration: none;
            margin-left: 15px;
            font-size: 0.9em;
        }
        .logout-btn:hover { text-decoration: underline; }

        .block {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 8px;
            padding: 20px 25px;
            margin-bottom: 25px;
            backdrop-filter: blur(5px);
        }
        .block h2 {
            color: #7cc576;
            margin: 0 0 15px 0;
            font-size: 1.2em;
        }

        /* Characters table */
        .char-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9em;
        }
        .char-table th {
            background: #1e1e1e;
            color: #7cc576;
            padding: 7px 10px;
            text-align: left;
            border-bottom: 1px solid #444;
            white-space: nowrap;
        }
        .char-table td {
            padding: 6px 10px;
            border-bottom: 1px solid #2a2a2a;
            white-space: nowrap;
        }
        .char-table tr:hover td { background: rgba(124, 197, 118, 0.06); }
        .char-table a {
            color: #7cc576;
            text-decoration: none;
            font-weight: 600;
        }
        .char-table a:hover { text-decoration: underline; }

        /* Services */
        .char-select {
            background: #1e1e1e;
            border: 1px solid #444;
            color: #fff;
            padding: 10px 14px;
            border-radius: 5px;
            font-size: 0.95em;
            min-width: 220px;
            margin-bottom: 18px;
        }
        .char-select:focus { border-color: #7cc576; outline: none; }

        .service-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
        }
        .service-btn {
            width: 64px;
            height: 64px;
            background: linear-gradient(145deg, #1f2d3a, #152029);
            border: 1px solid #7cc576;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: 0.2s;
            position: relative;
            box-shadow: 0 0 8px rgba(124, 197, 118, 0.2);
        }
        .service-btn:hover {
            background: linear-gradient(145deg, #2a3d4a, #1a2a35);
            box-shadow: 0 0 14px rgba(124, 197, 118, 0.4);
            transform: translateY(-2px);
        }
        .service-btn i {
            font-size: 28px;
            color: #7cc576;
        }
        .service-btn.disabled {
            opacity: 0.45;
            cursor: not-allowed;
            border-color: #555;
        }
        .service-btn.disabled i { color: #666; }
        .service-btn .price-tag {
            position: absolute;
            bottom: -8px;
            right: -8px;
            background: #7cc576;
            color: #111;
            font-size: 0.7em;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 10px;
            font-family: 'Montserrat', sans-serif;
        }
        .service-btn .price-tag.free { background: #3498db; color: #fff; }

        /* Tooltip */
        .service-btn[title]:hover::after {
            content: attr(title);
            position: absolute;
            bottom: 110%;
            left: 50%;
            transform: translateX(-50%);
            background: #1a1a1a;
            color: #eee;
            padding: 8px 12px;
            border-radius: 6px;
            border: 1px solid #7cc576;
            white-space: normal;
            width: 200px;
            font-size: 0.8em;
            z-index: 100;
            pointer-events: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
            text-align: center;
            line-height: 1.4;
        }

        /* History table */
        .history-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9em;
        }
        .history-table th {
            background: #1e1e1e;
            color: #7cc576;
            padding: 10px 12px;
            text-align: left;
            border-bottom: 1px solid #444;
        }
        .history-table td {
            padding: 9px 12px;
            border-bottom: 1px solid #2a2a2a;
        }
        .history-table tr:hover td { background: rgba(124, 197, 118, 0.05); }
        .status-success { color: #7cc576; }
        .status-failed { color: #e74c3c; }
        .status-refunded { color: #f39c12; }

        .empty {
            color: #888;
            padding: 20px;
            text-align: center;
        }

        .online-dot {
            display: inline-block;
            width: 9px;
            height: 9px;
            border-radius: 50%;
            margin-right: 6px;
            vertical-align: middle;
        }
        .online-dot.on { background: #2ecc71; box-shadow: 0 0 6px #2ecc71; }
        .online-dot.off { background: #555; }
        .rc-icon {
            width: 22px;
            height: 22px;
            border-radius: 3px;
            vertical-align: middle;
            margin-right: 4px;
            border: 1px solid #444;
        }
        .vote-section, .password-section {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 8px;
            padding: 18px 22px;
            margin-bottom: 25px;
            backdrop-filter: blur(5px);
        }
        .vote-section h3, .password-section h3 {
            color: #7cc576;
            margin: 0 0 12px 0;
            font-size: 1.1em;
        }
        .vote-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
        .vote-btn {
            display: inline-block;
            padding: 10px 18px;
            border-radius: 5px;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            text-decoration: none;
            transition: 0.25s;
            min-width: 100px;
            text-align: center;
            font-size: 0.9em;
        }
        .vote-btn.available { background: #7cc576; color: #fff; }
        .vote-btn.available:hover { background: #61b959; color: #fff; text-decoration: none; }
        .vote-btn.cooldown { background: #444; color: #aaa; cursor: not-allowed; }
        .pw-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
        .pw-form input {
            background: #1e1e1e;
            border: 1px solid #444;
            color: #fff;
            padding: 9px 12px;
            border-radius: 4px;
            font-size: 0.9em;
            width: 180px;
        }
        .pw-form input:focus { border-color: #7cc576; outline: none; }
        .pw-form button {
            background: #7cc576;
            color: #fff;
            border: none;
            padding: 9px 18px;
            border-radius: 4px;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            cursor: pointer;
        }
        .pw-form button:hover { background: #61b959; }

        .action-msg {
            margin-bottom: 15px;
            padding: 10px 15px;
            background: rgba(30,30,30,0.8);
            border-radius: 5px;
            border: 1px solid #333;
        }


/* ===== Shop module ===== */
.admin-sidebar .sub { margin-left: 12px; margin-bottom: 6px; }
        .admin-sidebar .sub a { padding: 7px 14px; font-size: 0.87em; color: #aaa; }

        .admin-sidebar .search-box {
            margin: 12px 8px 20px 8px;
        }
        .admin-sidebar .search-box input {
            width: 100%;
            background: #1e1e1e;
            border: 1px solid #444;
            color: #fff;
            padding: 9px 12px;
            border-radius: 4px;
            font-size: 0.9em;
            box-sizing: border-box;
        }
        .admin-sidebar .search-box input:focus {
            border-color: #7cc576;
            outline: none;
        }

        .content { flex: 1 1 auto; min-width: 0; padding: 16px 24px 20px; overflow-x: hidden; }
        .wrapper { overflow-x: hidden; }
        /* Softer scrollbar (Windows) */
        .content::-webkit-scrollbar { width: 0; height: 0; }
        body { overflow-x: hidden; }


        .top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }
        .user-info {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 6px;
            padding: 12px 20px;
            backdrop-filter: blur(5px);
        }
        .user-info strong { color: #7cc576; }
        .logout-btn {
            color: #e74c3c;
            text-decoration: none;
            margin-left: 15px;
            font-size: 0.9em;
        }
        .logout-btn:hover { text-decoration: underline; }

        .top-back a {
            display: inline-block;
            color: #7cc576;
            border: 2px solid #7cc576;
            padding: 7px 16px;
            border-radius: 4px;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            text-decoration: none;
            transition: 0.25s;
        }
        .top-back a:hover {
            background: #7cc576;
            color: #fff;
            text-decoration: none;
        }

        h1 {
            color: #7cc576;
            font-weight: 700;
            margin: 0 0 8px 0;
        }
        .subtitle { color: #999; margin-bottom: 25px; }

        /* Vote buttons */
        .vote-section {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 8px;
            padding: 20px 25px;
            margin-bottom: 30px;
            backdrop-filter: blur(5px);
        }
        .vote-section h3 {
            color: #7cc576;
            margin: 0 0 15px 0;
            font-size: 1.15em;
        }
        .vote-buttons {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }
        .vote-btn {
            display: inline-block;
            padding: 12px 22px;
            border-radius: 5px;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            text-decoration: none;
            transition: 0.25s;
            min-width: 120px;
            text-align: center;
        }
        .vote-btn.available {
            background: #7cc576;
            color: #fff;
        }
        .vote-btn.available:hover {
            background: #61b959;
            color: #fff;
            text-decoration: none;
        }
        .vote-btn.cooldown {
            background: #444;
            color: #aaa;
            cursor: not-allowed;
        }
        .vote-message {
            margin-top: 12px;
            color: #7cc576;
            font-size: 0.95em;
        }

        /* Product cards */
        .product {
            background: rgba(36, 36, 36, 0.93);
            border: 1px solid #333;
            border-radius: 6px;
            padding: 18px 22px;
            margin-bottom: 14px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            backdrop-filter: blur(5px);
        }
        .product-left {
            display: flex;
            align-items: center;
            gap: 18px;
        }
        .item-icons {
            display: flex;
            gap: 6px;
            flex-shrink: 0;
        }
        .product-info h3 {
            margin: 0 0 5px 0;
            color: #fff;
            font-size: 1.1em;
        }
        .product-info p {
            margin: 0 0 8px 0;
            color: #999;
            font-size: 0.9em;
        }
        .price {
            color: #7cc576;
            font-weight: 700;
            font-size: 1.1em;
        }

        .buy-form {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .buy-form select {
            background: #1e1e1e;
            border: 1px solid #444;
            color: #fff;
            padding: 9px 12px;
            border-radius: 4px;
            min-width: 160px;
        }
        .buy-form button:not(.btn-premium) {
            background: #7cc576;
            color: white;
            border: none;
            padding: 9px 18px;
            border-radius: 4px;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            cursor: pointer;
            transition: 0.25s;
        }
        .buy-form button:not(.btn-premium):hover { background: #61b959; }
        .product-foot .btn-premium,
        .product-foot button.btn-premium {
            background: linear-gradient(145deg, #2d5a2a, #1e3d1c);
            border: 1px solid var(--green);
            color: var(--green);
            font-weight: 700;
            height: 48px;
            padding: 0 14px;
        }
        .product-foot .btn-premium:hover,
        .product-foot button.btn-premium:hover {
            background: rgba(124, 197, 118, 0.22);
            color: #9ed49a;
        }

        /* History table (aligned with Account page) */
        .history-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.92em;
            background: transparent;
        }
        .history-table th {
            background: #1e1e1e;
            color: #7cc576;
            padding: 10px 12px;
            text-align: left;
            font-weight: 600;
            font-family: 'Montserrat', sans-serif;
            font-size: 0.88em;
            border-bottom: 1px solid #333;
        }
        .history-table td {
            padding: 10px 12px;
            border-bottom: 1px solid #2a2a2a;
            color: #ccc;
            vertical-align: middle;
        }
        .history-table tr:hover td {
            background: rgba(124, 197, 118, 0.05);
        }
        .history-table td.status-success, .status-success { color: #7cc576 !important; font-weight: 700; }
        .history-table td.status-refunded, .status-refunded { color: #e67e22 !important; font-weight: 700; }
        .history-table td.status-failed, .status-failed { color: #e74c3c !important; font-weight: 700; }

        .shop-section-title {
            color: #7cc576;
            font-family: 'Montserrat', sans-serif;
            font-size: 1.25em;
            font-weight: 700;
            margin: 0 0 6px 0;
        }
        .shop-section-sub {
            color: #888;
            font-size: 0.92em;
            margin: 0 0 16px 0;
            line-height: 1.45;
        }
        .premium-card {
            background: rgba(36, 36, 36, 0.94);
            border: 1px solid #333;
            border-radius: 12px;
            padding: 16px 18px;
            backdrop-filter: blur(5px);
            transition: border-color 0.15s ease, transform 0.15s ease;
            box-sizing: border-box;
        }
        .guide-grid .premium-card,
        .support-grid .premium-card {
            height: 100%;
        }
        .premium-card:hover {
            border-color: #4a6a48;
            transform: translateY(-1px);
        }
        .premium-card h3 {
            color: #7cc576;
            font-family: 'Montserrat', sans-serif;
            font-size: 1.05em;
            font-weight: 700;
            margin: 0 0 10px 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .premium-card h3 i { font-size: 1.15em; }
        .premium-card p, .premium-card li {
            color: #bbb;
            font-size: 0.9em;
            line-height: 1.55;
        }
        .premium-card ul {
            margin: 0;
            padding-left: 1.15em;
        }
        .premium-card li { margin-bottom: 8px; }
        .premium-card strong { color: #eee; }
        .guide-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 12px;
            margin-bottom: 14px;
            align-items: stretch;
        }
        .support-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 12px;
            margin-bottom: 14px;
            align-items: stretch;
        }
        .history-pager {

            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
            justify-content: center;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid #333;
        }
        .history-pager a, .history-pager span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 2em;
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 0.88em;
            font-weight: 600;
            text-decoration: none;
        }
        .history-pager a {
            background: #1e1e1e;
            border: 1px solid #444;
            color: #ccc;
        }
        .history-pager a:hover {
            border-color: #7cc576;
            color: #7cc576;
        }
        .history-pager span.current {
            background: rgba(124,197,118,0.15);
            border: 1px solid #7cc576;
            color: #7cc576;
        }
        .history-pager .nav {
            color: #7cc576;
            border-color: rgba(124,197,118,0.4);
        }
        .vote-btn {
            display: inline-block;
            padding: 11px 18px;
            border-radius: 8px;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            text-decoration: none;
            transition: 0.2s;
            min-width: 110px;
            text-align: center;
            font-size: 0.92em;
        }
        .vote-btn.available {
            background: linear-gradient(145deg, #2d5a2a, #1e3d1c);
            border: 1px solid #7cc576;
            color: #7cc576;
        }
        .vote-btn.available:hover {
            background: rgba(124,197,118,0.22);
            color: #9ed49a;
            text-decoration: none;
        }
        .vote-btn.cooldown {
            background: #1e1e1e;
            border: 1px solid #444;
            color: #888;
            cursor: not-allowed;
        }
        .donation-btn {
            background: #1e1e1e !important;
            color: #ccc !important;
            border: 1px solid #444 !important;
            padding: 11px 16px !important;
            border-radius: 8px !important;
            cursor: pointer;
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            font-size: 0.9em;
            transition: 0.15s ease;
        }
        .donation-btn:hover, .donation-btn.selected {
            border-color: #7cc576 !important;
            color: #7cc576 !important;
            background: rgba(124,197,118,0.12) !important;
        }

        .empty {
            text-align: center;
            color: #777;
            padding: 20px;
            background: rgba(36, 36, 36, 0.93);
            border-radius: 6px;
            border: 1px solid #333;
        }
		.admin-sidebar a.logout-link {
			color: #e74c3c;
			margin-top: 14px;
		}
		.admin-sidebar a.logout-link:hover {
			background: #1e1e1e;
			color: #ff6b6b;
		}


/* ===== Shop Admin ===== */
.shop-admin .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px 25px;
    margin-bottom: 22px;
    backdrop-filter: blur(5px);
}
.shop-admin table { width: 100%; border-collapse: collapse; }
.shop-admin th, .shop-admin td {
    padding: 6px 10px;
    border-bottom: 1px solid #3a3a3a;
    text-align: left;
    font-size: 0.92em;
}
.shop-admin th { background: #1e1e1e; color: var(--green); font-weight: 600; }
.shop-admin .btn {
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-size: 0.84em;
    margin-right: 4px;
    font-weight: 600;
    display: inline-block;
}
.shop-admin .btn-edit { background: #3498db; }
.shop-admin .btn-toggle { background: #f39c12; }
.shop-admin .btn-delete { background: #e74c3c; }
.shop-admin .btn:hover { opacity: 0.9; color: white; text-decoration: none; }
.shop-admin label { display: block; margin-bottom: 4px; color: #aaa; font-size: 0.9em; }
.shop-admin input[type="text"],
.shop-admin input[type="number"],
.shop-admin select,
.shop-admin textarea {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid #444;
    color: #fff;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 14px;
    box-sizing: border-box;
}
.shop-admin input:focus,
.shop-admin select:focus,
.shop-admin textarea:focus { border-color: var(--green); outline: none; }
.shop-admin .items-grid {
    display: grid;
    grid-template-columns: 1fr 80px;
    gap: 8px 12px;
    margin-bottom: 18px;
}
.shop-admin .items-grid label { margin: 0; font-size: 0.85em; }
.shop-admin .items-grid input { margin-bottom: 0; }
.shop-admin button[type="submit"] {
    background: linear-gradient(145deg, #2d5a2a, #1e3d1c);
    color: var(--green);
    border: 1px solid var(--green);
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    cursor: pointer;
}
.shop-admin button[type="submit"]:hover {
    background: rgba(124, 197, 118, 0.22);
    color: #9ed49a;
}
.shop-admin .status-success { color: #7cc576; }
.shop-admin .status-refunded { color: #e67e22; }
.shop-admin .status-failed { color: #e74c3c; }
.shop-admin a.cancel { margin-left: 15px; color: #aaa; text-decoration: none; }
.shop-admin a.cancel:hover { color: #fff; }

.shop-admin .actions {
    white-space: nowrap;
}
.shop-admin .actions .btn-premium {
    margin-right: 4px;
    padding: 3px 8px;
    font-size: 0.75em;
    gap: 3px;
}
.btn-premium.btn-warn,
a.btn-premium.btn-warn {
    background: linear-gradient(145deg, #5a4a1c, #3d3212);
    border-color: #f1c40f;
    color: #f1c40f;
}
.btn-premium.btn-warn:hover,
a.btn-premium.btn-warn:hover {
    background: rgba(241, 196, 15, 0.18);
    color: #ffe08a;
}
.btn-premium.btn-purple,
a.btn-premium.btn-purple {
    background: linear-gradient(145deg, #3d2458, #2a183d);
    border-color: #a569bd;
    color: #c39bd3;
}
.btn-premium.btn-purple:hover,
a.btn-premium.btn-purple:hover {
    background: rgba(165, 105, 189, 0.2);
    color: #d7bde2;
}


/* Shop product grid */
.char-pick select {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid #444;
    color: #eee;
    padding: 8px 10px;
    border-radius: 6px;
    box-sizing: border-box;
}
.char-picked {
    margin-top: 8px;
    font-size: 0.82em;
    color: #aaa;
}
.char-picked strong { color: var(--green); }
.product-pane {
    background: rgba(36, 36, 36, 0.93);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0;
}
.product-card {
    background: rgba(22, 22, 22, 0.96);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.product-card:hover {
    border-color: #4a6a48;
    transform: translateY(-2px);
}
.product-card h3 {
    margin: 0 0 8px;
    color: var(--green);
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 1.05em;
    font-weight: 700;
}
.product-card p {
    margin: 0 0 12px;
    color: #fff;
    font-weight: 400;
    font-size: 0.9em;
    line-height: 1.45;
    flex: 1;
}
.product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}
.product-foot .item-icons { flex: 0 0 auto; }
.points-chip {
    flex: 0 0 auto;
    height: 48px;
    min-width: 72px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #6b5420, #3d3212);
    border: 1px solid #f1c40f;
    border-radius: 8px;
    color: #ffe566;
    font-weight: 700;
    font-size: 0.92em;
    white-space: nowrap;
}
.product-foot .buy-form { margin: 0; }
.product-foot .btn-premium {
    height: 48px;
    padding: 0 14px;
}
.product-foot .btn-premium:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .product-grid { grid-template-columns: 1fr; }
}


.shop-target {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 0 0 14px;
    border-radius: 10px;
    background: rgba(18, 18, 18, 0.96);
    border: 1px solid #3a3a3a;
    border-left: 4px solid #7cc576;
    color: #f2f2f2;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.shop-target i { font-size: 1.3em; color: #7cc576; }
.shop-target.none {
    border-left-color: #f1c40f;
}
.shop-target.none i { color: #f1c40f; }
.shop-target strong { font-weight: 700; }


/* Brand logos */
.brand-logo {
    width: 28px;
    height: 36px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 6px rgba(124,197,118,0.35));
}
.brand-logo-sm { width: 22px; height: 28px; }
.hero-crest {
    display: block;
    width: 92px;
    height: auto;
    margin: 0 auto 10px;
    filter: drop-shadow(0 0 16px rgba(124,197,118,0.45));
}
.login-box .hero-crest { width: 72px; }
.site-header-brand, .site-footer-brand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}


/* Shared header buttons (same as logged-in modules) */
.site-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #1e1e1e;
    border: 1px solid #444;
    color: #ccc;
    text-decoration: none;
    transition: 0.2s;
    font-size: 1.2em;
    box-sizing: border-box;
}
.site-header-btn:hover {
    border-color: #7cc576;
    color: #7cc576;
    text-decoration: none;
}
.site-header-btn-text {
    width: auto;
    min-height: 36px;
    padding: 0 12px;
    gap: 6px;
    font-size: 0.88em;
    font-weight: 600;
    white-space: nowrap;
}
.site-header-btn-text i {
    font-size: 1.15em;
    color: #7cc576;
}
.site-header-btn-text:hover i { color: #7cc576; }


.card-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 20px;
}
.card-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-card {
    background: rgba(22, 22, 22, 0.96);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.mini-card:hover { border-color: #4a6a48; transform: translateY(-1px); }
.mini-card h2, .mini-card h3 { margin-top: 0; color: #7cc576; }
.mini-card p, .mini-card li { color: #ddd; }
@media (max-width: 900px) {
    .card-row, .card-row.two { grid-template-columns: 1fr; }
}


.char-stats { display: flex; flex-direction: column; gap: 8px; }
.char-stats .stat-box { margin: 0; }
.pane-nav { display: flex; }
.pane-nav-top { justify-content: flex-end; margin: -6px 0 10px; }
.pane-nav-bottom { justify-content: flex-end; margin: 14px 0 0; }


a.site-footer-brand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #7cc576;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.88em;
    letter-spacing: 0.02em;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(124,197,118,0.12), rgba(52,152,219,0.08));
    transition: 0.25s ease;
}
a.site-footer-brand-btn:hover {
    color: #a8e89f;
    border-color: rgba(124,197,118,0.4);
    text-decoration: none;
    box-shadow: 0 0 12px rgba(124,197,118,0.18);
}
