:root { --bg: #12081f; --card: #1e0f33; --line: #3a2456; --text: #f6ecff; --muted: #b59fca; --y: #ffd23f; --pink: #ff3d8b; --green: #18c37e; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, 'Segoe UI', sans-serif; }
[hidden] { display: none !important; }
button, select, input { font: inherit; }
button { background: var(--y); color: #1a0b2e; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 700; cursor: pointer; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.hot { background: var(--pink); color: #fff; }
button:disabled { opacity: .4; cursor: default; }
input, select { background: #0d0618; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { display: grid; gap: 12px; width: min(100%, 360px); background: var(--card); padding: 28px; border-radius: 18px; border: 1px solid var(--line); }
.login h1 { margin: 0 0 6px; font-size: 20px; }
.err { color: #ff8fb4; margin: 0; }
#app { padding: 20px clamp(12px, 3vw, 32px); }
header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
header h1 { margin: 0; font-size: 22px; }
header small { color: var(--muted); font-weight: 500; font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
#q { width: 280px; max-width: 100%; }
.draw { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-bottom: 18px; }
.draw h2 { margin: 0 0 6px; font-size: 17px; }
.hint { color: var(--muted); margin: 0 0 8px; max-width: 760px; }
.draw-btns { display: flex; gap: 8px; align-items: flex-start; }
#drawInfo code { color: #2de2e6; word-break: break-all; font-size: 12.5px; }
#drawInfo p { margin: 4px 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; min-width: 1100px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
th { background: var(--card); color: var(--muted); font-weight: 600; position: sticky; top: 0; }
td.code { font-family: ui-monospace, Menlo, monospace; }
tr.verified td:first-child { box-shadow: inset 3px 0 var(--green); }
tr.rejected { opacity: .55; }
tr.rejected td:first-child { box-shadow: inset 3px 0 var(--pink); }
.warn { color: #ffb36b; font-weight: 700; }
td select { padding: 6px 8px; }
td input { width: 180px; padding: 6px 8px; }

/* v2 */
a { color: #ffd23f; }
.muted { color: var(--muted); }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); }
.howto { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 20px; margin-bottom: 18px; }
.howto summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.howto ol { margin: 10px 0 6px; padding-left: 20px; }
.howto li { margin-bottom: 4px; }
.pill { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 99px; background: var(--pink); color: #fff; font-size: 12px; }
.badge { white-space: nowrap; display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #3a2456; }
.badge.verified { background: rgba(24, 195, 126, .2); color: #4ef0a6; }
.badge.rejected { background: rgba(255, 61, 139, .18); color: #ff8fb4; }
.badge.pending { background: rgba(255, 179, 107, .18); color: #ffb36b; }
.act { display: flex; gap: 6px; flex-wrap: wrap; }
.act button { padding: 7px 11px; font-size: 13px; }
button.ok { background: var(--green); color: #fff; }
button.no { background: transparent; color: #ff8fb4; border: 1px solid rgba(255, 61, 139, .5); }
.empty { text-align: center; color: var(--muted); padding: 30px; }
table { min-width: 0; }
th, td { white-space: normal; }
@media (max-width: 860px) {
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  .table-wrap { border: 0; }
  tr { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; padding: 8px 4px; }
  td { border: 0; padding: 6px 12px; display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
  td::before { content: attr(data-l); color: var(--muted); font-size: 12px; }
  td.empty { display: block; }
  td.empty::before { content: none; }
  td input { width: 100%; }
  #q { width: 100%; }
}

.flag { color: #ffb36b; font-size: 12px; font-weight: 700; margin: 4px 0; }
button.sm { padding: 4px 9px; font-size: 12px; margin-top: 4px; }

/* stats */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.tab.on { background: var(--y); color: #1a0b2e; border-color: var(--y); }
.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; position: relative; overflow: hidden; }
.fcard b { display: block; font-size: 26px; line-height: 1.1; color: var(--y); }
.fcard span { color: var(--muted); font-size: 12.5px; }
.fcard i { font-style: normal; display: block; font-size: 12px; color: #4ef0a6; margin-top: 4px; }
.fcard .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--pink); }
.inzhur-box { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.inzhur-box input { width: 120px; margin-left: 6px; }
.small { font-size: 12.5px; max-width: 900px; }
.grid2 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; align-items: start; }
table.mini td, table.mini th { padding: 7px 10px; }
table.mini td:not(:first-child), table.mini th:not(:first-child) { text-align: right; }
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  table.mini, table.mini tbody, table.mini tr, table.mini td { display: revert; width: auto; }
  table.mini thead { display: table-header-group; }
  table.mini tr { background: none; border: 0; padding: 0; margin: 0; }
  table.mini td { display: table-cell; padding: 6px 8px; }
  table.mini td::before { content: none; }
  .table-wrap { overflow-x: auto; }
}

.mono-cell b { font-family: ui-monospace, Menlo, monospace; font-weight: 600; white-space: nowrap; }
