:root {
  --bg: #07101f;
  --panel: #0d1728;
  --panel-2: #111e32;
  --line: #22324a;
  --text: #edf3ff;
  --muted: #91a1ba;
  --accent: #5b8cff;
  --accent-2: #7aa2ff;
  --good: #37d68a;
  --bad: #ff6b72;
  --warn: #f4c152;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #102447 0, var(--bg) 45%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
.shell { width: min(1280px, calc(100% - 32px)); margin: 36px auto 70px; }
.hero { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.eyebrow { color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 8px 0 8px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.04em; }
h2, h3 { margin: 0; }
.hero p, .result-head p, .section-title-row p { color: var(--muted); margin: 7px 0 0; }
.connection { background: rgba(13,23,40,.85); border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--warn); margin-right: 7px; }
.dot.good { background: var(--good); }
.dot.bad { background: var(--bad); }
.panel { background: rgba(13,23,40,.94); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.24); }
.token-panel { padding: 22px; margin-bottom: 20px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
.section-title-row h2 { margin-top: 5px; }
.inc-list { display: grid; gap: 12px; }
.inc-card { border: 1px solid var(--line); background: #0a1423; border-radius: 14px; padding: 14px; }
.inc-grid { display: grid; grid-template-columns: minmax(180px, .6fr) minmax(320px, 1.5fr) auto; gap: 14px; align-items: end; }
.field label { display: block; font-weight: 750; margin-bottom: 8px; }
.field small { color: var(--muted); display: block; margin-top: 8px; }
input[type="date"], input[type="text"], input[type="password"], textarea, select { width: 100%; border: 1px solid var(--line); background: #091322; color: var(--text); border-radius: 12px; outline: none; }
input[type="date"], input[type="text"], input[type="password"] { padding: 12px 13px; }
textarea { min-height: 205px; resize: vertical; padding: 13px 14px; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,140,255,.12); }
.token-input-wrap { display: flex; gap: 7px; align-items: stretch; }
.token-input-wrap input { min-width: 0; }
.eye-btn { flex: 0 0 46px; border: 1px solid var(--line); border-radius: 11px; background: #17253a; color: var(--text); cursor: pointer; font-size: 18px; }
.inc-actions { display: flex; gap: 8px; align-items: center; }
.remove-inc-btn { border: 0; background: transparent; color: #ff9ca1; cursor: pointer; padding: 8px; }
.token-status { margin-top: 10px; font-size: 13px; }
.good-text { color: #6aeba9; }
.bad-text { color: #ff9ca1; }
.security-note { margin-top: 14px; padding: 10px 12px; border: 1px solid rgba(91,140,255,.25); background: rgba(91,140,255,.07); border-radius: 11px; color: #bdd0ef; font-size: 13px; }
.controls { padding: 22px; display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.link-btn { border: 0; color: var(--accent-2); background: transparent; cursor: pointer; padding: 0; }
.actions { grid-column: 1/-1; display: flex; justify-content: flex-end; gap: 10px; }
.btn { border: 0; border-radius: 11px; padding: 11px 16px; cursor: pointer; font-weight: 750; }
.btn:disabled { opacity: .55; cursor: wait; }
.primary { color: white; background: linear-gradient(135deg, var(--accent), #806fff); }
.secondary { color: var(--text); background: #17253a; border: 1px solid var(--line); }
.message { grid-column: 1/-1; padding: 11px 13px; border-radius: 10px; background: #10213b; color: #bdd0ef; }
.message.error { background: rgba(255,107,114,.1); color: #ffb8bc; border: 1px solid rgba(255,107,114,.35); }
.hidden { display: none !important; }
.summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 20px 0 12px; }
.summary-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 15px; padding: 15px; }
.summary-card span { color: var(--muted); font-size: 13px; display: block; }
.summary-card strong { font-size: 26px; display: block; margin-top: 4px; }
.summary-card.safe strong { color: var(--good); }
.summary-card.missing strong { color: var(--bad); }
.summary-card.other strong { color: var(--warn); }
.summary-card.review strong { color: #c4d0e3; }
.results-panel { overflow: hidden; }
.result-head { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.toolbar { display: flex; gap: 9px; align-items: center; }
.toolbar select { min-width: 190px; padding: 10px 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { padding: 13px 15px; border-bottom: 1px solid rgba(34,50,74,.8); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; background: #0b1525; white-space: nowrap; }
td { font-size: 14px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.SAFE { background: rgba(55,214,138,.12); color: #6aeba9; }
.badge.NOT_FOUND { background: rgba(255,107,114,.12); color: #ff9ca1; }
.badge.OTHER_DATE { background: rgba(244,193,82,.12); color: #ffd779; }
.badge.REVIEW, .badge.ERROR { background: rgba(123,142,173,.13); color: #c4d0e3; }
.tiny { margin-top: 5px; font-size: 11px; }
.detail-btn { border: 1px solid var(--line); color: var(--text); background: #132238; border-radius: 9px; padding: 7px 9px; cursor: pointer; }
.muted { color: var(--muted); }
dialog { width: min(800px, calc(100% - 30px)); max-height: 80vh; overflow: auto; background: #0d1728; color: var(--text); border: 1px solid var(--line); border-radius: 17px; padding: 0; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
.dialog-head { position: sticky; top: 0; background: #0d1728; display: flex; align-items: center; justify-content: space-between; padding: 17px 18px; border-bottom: 1px solid var(--line); z-index: 2; }
.icon-btn { font-size: 25px; line-height: 1; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #132238; color: white; cursor: pointer; }
#detailContent { padding: 18px; }
.detail-inc-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 18px 0 8px; }
.detail-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px; margin-bottom: 11px; background: #0a1423; }
.detail-card p { margin: 6px 0; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-word; }
@media (max-width: 980px) {
  .inc-grid { grid-template-columns: 1fr; align-items: stretch; }
  .inc-actions { justify-content: flex-end; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .hero, .section-title-row { align-items: flex-start; flex-direction: column; }
  .controls { grid-template-columns: 1fr; }
  .actions, .message { grid-column: 1; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .result-head { align-items: flex-start; flex-direction: column; }
  .toolbar { width: 100%; flex-wrap: wrap; }
}
