:root {
    --lex-black: #000000;
    --lex-panel: #111111;
    --lex-panel-2: #171717;
    --lex-white: #fdfdfd;
    --lex-gray: #cccccc;
    --lex-gold: #d4af37;
    --lex-gold-bright: #ffcc66;
    --lex-red: #ff5d5d;
    --lex-green: #55d982;
    --lex-border: rgba(255, 255, 255, 0.1);
    --lex-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
    --lex-blur: blur(16px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: rgba(212, 175, 55, 0.78) rgba(10, 10, 10, 0.88);
    scrollbar-width: thin;
}

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

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.96), rgba(17, 17, 17, 0.96));
}

::-webkit-scrollbar-thumb {
    border: 2px solid rgba(10, 10, 10, 0.96);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--lex-gold-bright), var(--lex-gold));
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    color: var(--lex-white);
    background:
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.16), transparent 30%),
        linear-gradient(180deg, #050505, #0d0d0d);
    min-height: 100vh;
}

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

.wrap {
    width: min(100% - 32px, 1220px);
    margin: 0 auto;
    padding: 36px 0;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.panel {
    border: 1px solid var(--lex-border);
    border-radius: 22px;
    background: rgba(17, 17, 17, 0.86);
    box-shadow: var(--lex-shadow);
    backdrop-filter: var(--lex-blur);
    overflow: hidden;
}

.hero {
    padding: 40px 34px;
    border-bottom: 1px solid var(--lex-border);
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(212, 175, 55, 0.11), rgba(255, 255, 255, 0.03));
}

.hero span,
.eyebrow {
    color: var(--lex-gold-bright);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; }
h1 {
    font-size: clamp(2.35rem, 5vw, 4.3rem);
    line-height: 0.96;
    margin-bottom: 18px;
    letter-spacing: -0.03em;
}

h2 {
    color: var(--lex-gold-bright);
}

p {
    color: var(--lex-gray);
    line-height: 1.65;
}

.content {
    padding: 34px;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

.stat-card {
    min-height: 112px;
    padding: 18px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.1), rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.04);
}

.stat-card span {
    display: block;
    color: var(--lex-gold-bright);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 12px;
    color: var(--lex-white);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
}

.card {
    padding: 22px;
    border: 1px solid var(--lex-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.question {
    min-inline-size: 0;
    margin: 0;
    padding: 22px;
    border: 0;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.026)),
        rgba(10, 10, 10, 0.42);
    box-shadow:
        inset 0 0 0 1px var(--lex-border),
        0 12px 32px rgba(0, 0, 0, 0.24);
}

.question legend {
    display: block;
    width: 100%;
    float: left;
    padding: 0 0 16px;
    margin: 0 0 18px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
    color: var(--lex-white);
    font-size: 1.03rem;
    font-weight: 900;
    line-height: 1.35;
}

.question::after {
    content: "";
    display: table;
    clear: both;
}

.option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 42px;
    margin: 9px 0;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    color: #dddddd;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.option:hover {
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.075);
    transform: translateX(3px);
}

.option input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: var(--lex-gold);
}

textarea,
input[type="text"],
input[type="search"] {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.35);
    color: var(--lex-white);
    font: inherit;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

textarea:focus,
input[type="text"]:focus,
input[type="search"]:focus {
    border-color: var(--lex-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--lex-gold), var(--lex-gold-bright));
    color: #111111;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(212, 175, 55, 0.22);
}

.btn.secondary {
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(255, 255, 255, 0.04);
    color: var(--lex-white);
}

.btn.danger {
    background: linear-gradient(135deg, #ff5d5d, #ff8a8a);
    color: #160000;
}

.btn.small {
    min-height: 38px;
    padding: 0 16px;
    font-size: 0.88rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.actions.compact {
    margin-top: 12px;
}

.bot-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
}

.bot-control h2 {
    margin: 8px 0 6px;
}

.bot-control p {
    margin: 0;
}

.bot-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    background: rgba(212, 175, 55, 0.15);
    color: var(--lex-gold-bright);
}

.badge.approved,
.ok {
    color: var(--lex-green);
    background: rgba(85, 217, 130, 0.12);
}

.badge.rejected,
.bad {
    color: var(--lex-red);
    background: rgba(255, 93, 93, 0.12);
}

.badge.pending,
.badge.reviewing,
.badge.correction,
.manual {
    color: var(--lex-gold-bright);
    background: rgba(212, 175, 55, 0.13);
}

.answer {
    border-left: 3px solid var(--lex-gold);
    padding-left: 14px;
    margin-top: 10px;
}

.answer.correct { border-color: var(--lex-green); }
.answer.incorrect { border-color: var(--lex-red); }

.manual-review {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(212, 175, 55, 0.24);
    border-radius: 14px;
    background: rgba(212, 175, 55, 0.08);
    color: var(--lex-gold-bright);
    font-weight: 900;
}

.manual-review small {
    color: var(--lex-gray);
    font-weight: 700;
}

.manual-review.good {
    border-color: rgba(85, 217, 130, 0.42);
    background: rgba(85, 217, 130, 0.1);
    color: var(--lex-green);
}

.manual-review.bad {
    border-color: rgba(255, 93, 93, 0.42);
    background: rgba(255, 93, 93, 0.1);
    color: var(--lex-red);
}

.manual-review-form {
    margin-top: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 16px;
}

th, td {
    padding: 13px;
    border-bottom: 1px solid var(--lex-border);
    color: var(--lex-gray);
    text-align: left;
    vertical-align: top;
}

th { color: var(--lex-gold-bright); }

.notice {
    padding: 16px 18px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 14px;
    background: rgba(212, 175, 55, 0.08);
    color: var(--lex-gray);
}

.danger-zone {
    border-color: rgba(255, 93, 93, 0.32);
    background: rgba(255, 93, 93, 0.07);
}

.danger-zone h2 {
    color: #ff8a8a;
}

@media (max-width: 760px) {
    .topbar,
    .grid.two,
    .stats-grid,
    .bot-control {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .bot-status {
        justify-content: flex-start;
    }

    .hero,
    .content {
        padding: 24px;
    }

    .question {
        padding: 18px;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }
}
