﻿:root {
    --bg1: #0b1020;
    --bg2: #0f1b3d;
    --card: #0f1730cc;
    --stroke: #26345f;
    --text: #eaf0ff;
    --muted: #a9b6d6;
    --accent: #7c5cff;
    --accent2: #22c55e;
    --danger: #ef4444;
    --shadow: 0 18px 60px rgba(0,0,0,.45);
    --radius: 18px;
    --radius2: 14px;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    background: radial-gradient(1200px 700px at 15% 20%, rgba(124,92,255,.35), transparent 55%), radial-gradient(900px 600px at 85% 15%, rgba(34,197,94,.22), transparent 55%), radial-gradient(800px 600px at 70% 85%, rgba(59,130,246,.18), transparent 55%), linear-gradient(180deg, var(--bg1), var(--bg2));
}

.wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    padding: 28px 16px;
    position: relative;
}

    /* subtle grid */
    .wrap:before {
        content: "";
        position: absolute;
        inset: -2px;
        background: linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
        background-size: 52px 52px;
        mask-image: radial-gradient(700px 420px at 50% 50%, black 40%, transparent 78%);
        pointer-events: none;
    }

.container {
    width: min(980px, 100%);
    position: relative;
    z-index: 1;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 22px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--card);
    border: 1px solid rgba(38,52,95,.75);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.panel-inner {
    padding: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), transparent 55%), linear-gradient(135deg, rgba(124,92,255,1), rgba(34,197,94,.9));
    box-shadow: 0 10px 28px rgba(124,92,255,.25);
    border: 1px solid rgba(255,255,255,.18);
}

.title {
    font-size: 22px;
    line-height: 1.15;
    margin: 0;
    letter-spacing: .2px;
}

.subtitle {
    margin: 4px 0 0 0;
    color: var(--muted);
    font-size: 13.5px;
}

.headline {
    margin: 14px 0 14px 0;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: .2px;
}

.desc {
    margin: 0 0 18px 0;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.55;
    max-width: 62ch;
}

.form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.field {
    display: grid;
    gap: 8px;
}

label {
    font-size: 13px;
    color: rgba(234,240,255,.92);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hint {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    opacity: .9;
}

.control {
    width: 100%;
    padding: 12px 12px;
    background: rgba(7,10,22,.55);
    border: 1px solid rgba(38,52,95,.95);
    border-radius: var(--radius2);
    color: var(--text);
    outline: none;
    transition: .18s ease;
}

    .control::placeholder {
        color: rgba(169,182,214,.65);
    }

    .control:focus {
        border-color: rgba(124,92,255,.85);
        box-shadow: 0 0 0 4px rgba(124,92,255,.18);
    }

select.control {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(234,240,255,.8) 50%), linear-gradient(135deg, rgba(234,240,255,.8) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 38px;
}

.row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 520px) {
    .row2 {
        grid-template-columns: 1fr;
    }
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.btn {
    border: 0;
    cursor: pointer;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .2px;
    transition: transform .08s ease, filter .18s ease, box-shadow .18s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn-primary {
    background: linear-gradient(135deg, rgba(124,92,255,1), rgba(99,102,241,1));
    box-shadow: 0 16px 40px rgba(124,92,255,.22);
    border: 1px solid rgba(255,255,255,.10);
}

.btn-ghost {
    background: rgba(7,10,22,.35);
    border: 1px solid rgba(38,52,95,.95);
    color: rgba(234,240,255,.92);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(7,10,22,.35);
    border: 1px solid rgba(38,52,95,.95);
    color: rgba(234,240,255,.9);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(34,197,94,.9);
    box-shadow: 0 0 0 4px rgba(34,197,94,.15);
}

/* Right panel */
.side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

.stat {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mini {
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(38,52,95,.75);
    background: rgba(7,10,22,.28);
}

.k {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 6px 0;
}

.v {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.list {
    display: grid;
    gap: 10px;
}

.item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(38,52,95,.75);
    background: rgba(7,10,22,.22);
}

.tick {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(34,197,94,.14);
    border: 1px solid rgba(34,197,94,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-top: 1px;
}

    .tick:before {
        content: "✓";
        font-size: 13px;
        color: rgba(34,197,94,.95);
        font-weight: 900;
    }

.item p {
    margin: 0;
    color: rgba(234,240,255,.9);
    font-size: 13.5px;
    line-height: 1.45;
}

.error {
    display: none;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(239,68,68,.10);
    border: 1px solid rgba(239,68,68,.35);
    color: rgba(255,220,220,.95);
    font-size: 13px;
}

/* ===== TOP AUTH BAR ===== */
.hero .authbar {
    grid-column: 1 / -1; /* chiếm từ cột 1 tới cột cuối */
    width: 100%;
    margin: 0 0 16px 0; /* bỏ auto center */
}

.authbar {
    width: 100%;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(10, 14, 28, .55);
    backdrop-filter: blur(10px);
}

.authbar-left {
    min-width: 0;
}

.authbar-title {
    color: rgba(255,255,255,.92);
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 2px;
}

.authbar-desc {
    color: rgba(255,255,255,.72);
    font-size: 13px;
    line-height: 1.35;
}

.authbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
    .authbar-right #authStateLoggedIn {
        display: flex;
        align-items: center;
        gap: 12px;
    }

.authbar-user {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.authbar-name {
    font-weight: 600;
    font-size: 16px;
}

.authbar-credits {
    font-size: 13px;
    opacity: .9;
}

.authbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    color: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.14);
    background: red;
}

    .authbar-btn:hover {
        filter: brightness(1.08);
    }

    .authbar-btn.outline {
        background: transparent;
    }

.authbar-ok {
    color: rgba(255,255,255,.85);
    font-weight: 700;
    font-size: 13px;
}

.authbar-form {
    margin: 0;
}

/* Mobile: xếp dọc */
@media (max-width: 720px) {
    .authbar {
        flex-direction: column;
        align-items: stretch;
    }

    .authbar-right {
        justify-content: flex-start;
    }

    .authbar-btn {
        width: 100%;
    }
}
.action-buttons {
    margin-top: 10px;
    display: flex;
    gap: 12px;
}

.btn-report {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #9bb6ff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

    .btn-report:hover {
        color: #c7d2ff;
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(155, 182, 255, 0.45);
    }

