@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --red:#e53935; --bg:#0c0e13; --panel:rgba(20,22,28,.72); --line:rgba(255,255,255,.08); --mut:#8a8d96; --txt:#e9eaee; }
html, body { min-height: 100%; background: var(--bg); color: var(--txt); font-family: Inter, sans-serif; }
body { background: radial-gradient(1200px 600px at 20% -10%, rgba(229,57,53,.16), transparent 60%), var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; }
.red { color: var(--red); }
.hidden { display: none !important; }

/* Topbar */
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 40px; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-weight: 800; font-size: 23px; letter-spacing: -.5px; }
.tag { font-size: 10.5px; letter-spacing: .26em; color: var(--mut); margin-top: 2px; }
.me { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #c9cbd1; }
.ava { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#5865F2,#8b3ffb); background-size: cover; }
.chip { font-size: 10.5px; padding: 4px 10px; border-radius: 20px; background: rgba(229,57,53,.15); color: #ff8a87; font-weight: 700; letter-spacing: .08em; }
.lnk { font-size: 13px; color: var(--mut); } .lnk:hover { color: #fff; }
.navlink { font-size: 13.5px; color: #c9cbd1; padding: 7px 12px; border-radius: 9px; } .navlink:hover { background: rgba(255,255,255,.06); }
.navlink.on { background: rgba(229,57,53,.15); color: #ff8a87; }

/* Layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 36px 40px 60px; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 27px; font-weight: 800; margin-bottom: 6px; }
.sub { color: var(--mut); font-size: 14px; margin-bottom: 26px; line-height: 1.5; }
.sub b { color: #fff; }

/* Login */
.login { min-height: 86vh; display: grid; place-items: center; text-align: center; padding: 20px; }
.lcard { width: 440px; max-width: 94vw; background: rgba(20,22,28,.7); border: 1px solid var(--line); border-radius: 20px; padding: 46px 40px; }
.biglogo { font-size: 50px; font-weight: 800; letter-spacing: -2px; margin-bottom: 4px; }
.lead { color: #9aa0ab; font-size: 14.5px; line-height: 1.55; margin: 12px 0 28px; }
.dbtn { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; height: 54px; border-radius: 13px; background: #5865F2; color: #fff; font-weight: 700; font-size: 16px; transition: filter .15s; }
.dbtn:hover { filter: brightness(1.08); } .dbtn svg { width: 23px; height: 23px; }
.foot { color: #5f636c; font-size: 12px; margin-top: 20px; }

/* Panels / grid */
.grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } .top { padding: 16px 20px; } .wrap { padding: 24px 20px 50px; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.panel h3 { font-size: 12.5px; letter-spacing: .16em; color: var(--mut); margin-bottom: 18px; font-weight: 600; }

.fld { margin-bottom: 15px; }
.fld label { display: block; font-size: 13px; color: #c3c6cd; margin-bottom: 7px; line-height: 1.4; }
.fld input, .fld textarea { width: 100%; background: #13151b; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 12px 14px; color: #fff; font-size: 14px; outline: none; resize: vertical; font-family: inherit; }
.fld input:focus, .fld textarea:focus { border-color: var(--red); }
.send { width: 100%; height: 50px; border-radius: 12px; background: var(--red); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 10px 24px rgba(229,57,53,.28); transition: filter .15s; margin-top: 6px; }
.send:hover { filter: brightness(1.07); }
.send:disabled { background: #3a3c42; color: #888; box-shadow: none; cursor: default; }

/* Status / badges */
.srow { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.06); gap: 10px; }
.srow:last-child { border: 0; } .srow b { font-size: 14px; } .srow small { color: var(--mut); font-size: 12px; display: block; margin-top: 3px; }
.st { font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 20px; letter-spacing: .04em; white-space: nowrap; }
.st.p { background: rgba(255,190,70,.14); color: #ffce7a; }
.st.a { background: rgba(52,199,89,.14); color: #86e6a4; }
.st.d { background: rgba(229,57,53,.14); color: #ff9a97; }
.st.n { background: rgba(255,255,255,.07); color: #aab; }

.banner { border-radius: 12px; padding: 14px 18px; font-size: 13.5px; line-height: 1.5; margin-bottom: 22px; border: 1px solid; }
.banner.ok { background: rgba(52,199,89,.1); border-color: rgba(52,199,89,.35); color: #bdf0cd; }
.banner.warn { background: rgba(255,190,70,.1); border-color: rgba(255,190,70,.35); color: #ffddb0; }
.banner.bad { background: rgba(229,57,53,.1); border-color: rgba(229,57,53,.4); color: #ffd3d1; }

/* Admin */
.kpi { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.kc { flex: 1; min-width: 150px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.kc .n { font-size: 28px; font-weight: 800; } .kc .l { color: var(--mut); font-size: 12.5px; margin-top: 3px; }
.filters { display: flex; gap: 9px; margin-bottom: 20px; flex-wrap: wrap; }
.flt { padding: 8px 15px; border-radius: 20px; background: rgba(255,255,255,.05); color: #b4b7bf; font-size: 13px; border: 1px solid transparent; }
.flt.on { background: rgba(229,57,53,.15); color: #ff8a87; border-color: rgba(229,57,53,.4); }
.acard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.ahead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ava2 { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#5865F2,#8b3ffb); background-size: cover; flex: none; }
.ahead b { font-size: 15.5px; } .ahead small { color: var(--mut); font-size: 12px; display: block; margin-top: 2px; }
.qa { background: #13151b; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 12px 15px; margin-bottom: 10px; }
.qa .q { font-size: 12px; color: var(--mut); margin-bottom: 4px; }
.qa .a { font-size: 13.5px; color: #dfe1e6; line-height: 1.5; white-space: pre-wrap; }
.meta { display: flex; gap: 20px; margin: 12px 0 14px; font-size: 12.5px; color: var(--mut); flex-wrap: wrap; }
.meta b { color: var(--txt); font-weight: 600; }
.arow { display: flex; gap: 10px; }
.btn { flex: 1; height: 44px; border-radius: 11px; font-weight: 700; font-size: 14px; transition: filter .15s; }
.btn:hover { filter: brightness(1.08); }
.ok { background: #2ecc71; color: #06220f; } .no { background: rgba(229,57,53,.16); color: #ff9a97; }
.empty { color: var(--mut); text-align: center; padding: 50px 0; font-size: 14px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 7vh; transform: translateX(-50%); background: var(--red); color: #fff; padding: 13px 20px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 50; max-width: 90vw; text-align: center; }
.toast.ok { background: #1f8a4c; }
.spin { text-align: center; color: var(--mut); padding: 60px 0; }
