:root {
    color-scheme: light;
    --background: #f4f7fb;
    --surface: #ffffff;
    --text: #172033;
    --muted: #65718a;
    --primary: #2255d6;
    --primary-dark: #183fa5;
    --border: #dce3ef;
    --danger: #b42318;
    --warning: #9a6700;
    --success: #067647;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--background); color: var(--text); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: var(--primary); }
.site-header { min-height: 68px; padding: 12px clamp(16px, 4vw, 52px); background: #111a2e; color: white; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: white; font-size: 1.25rem; font-weight: 750; text-decoration: none; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.site-header nav a, .link-button { color: #eef3ff; text-decoration: none; font: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin: 36px auto 64px; }
.panel, .auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: clamp(20px, 4vw, 36px); box-shadow: 0 8px 28px rgba(26, 42, 75, .07); }
.auth-card { width: min(480px, 100%); margin: 70px auto; }
.wide-card { width: min(620px, 100%); text-align: center; }
.narrow-panel { width: min(600px, 100%); }
h1, h2, h3 { line-height: 1.2; margin-top: 0; }
h3 { margin-top: 28px; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 7px; font-weight: 650; }
input, textarea { width: 100%; border: 1px solid #b9c4d6; border-radius: 9px; padding: 12px 14px; background: white; color: var(--text); font: inherit; }
textarea { resize: vertical; min-height: 180px; }
input:focus, textarea:focus { outline: 3px solid rgba(34, 85, 214, .18); border-color: var(--primary); }
button, .button-link { min-height: 44px; border: 0; border-radius: 9px; padding: 11px 18px; background: var(--primary); color: white; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .button-link:hover { background: var(--primary-dark); }
.secondary { background: #e7ecf5; color: #20304d; }
.secondary:hover { background: #d7deeb; }
.inline-form { display: inline; }
.link-button { min-height: auto; padding: 0; background: none; font-weight: 400; }
.notice { border-radius: 10px; padding: 12px 14px; }
.notice.error { color: var(--danger); background: #fff0ee; }
.notice.warning { color: var(--warning); background: #fff8db; }
.notice.success { color: var(--success); background: #ecfdf3; }
.otp-qr { width: 240px; max-width: 100%; image-rendering: pixelated; }
code { overflow-wrap: anywhere; background: #f0f3f8; border-radius: 5px; padding: 2px 5px; }
.token-value { display: block; margin: 10px 0; padding: 12px; color: var(--text); }
.result-panel { margin-top: 26px; border-left-width: 7px; }
.verdict-dangerous { border-left-color: #d92d20; }
.verdict-suspicious { border-left-color: #dc8b12; }
.verdict-normal { border-left-color: #079455; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow, .muted { color: var(--muted); }
.score { font-size: clamp(2rem, 7vw, 4.5rem); font-weight: 800; }
.score span { color: var(--muted); font-size: 1rem; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 22px 0; }
.score-grid div { padding: 16px; border: 1px solid var(--border); border-radius: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.score-grid span { color: var(--muted); }
.score-grid strong { font-size: 1.4rem; }
.indicator-list { padding-left: 22px; }
.indicator-list li { margin-bottom: 7px; }
.url-result { margin-top: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #f9fbfe; }
.url-result p { display: grid; gap: 5px; }
.url-result code { display: block; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { background: #eef2f8; }
.details-cell { max-width: 420px; overflow-wrap: anywhere; }
.pagination, .admin-links, .horizontal-form { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.horizontal-form label { flex: 1 1 260px; }
.steps li { margin-bottom: 10px; }
.message-list { display: grid; gap: 16px; }
.message-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px; background: #fbfcff; }
.message-card h2 { font-size: 1.05rem; }
.suspicious-message { border-left: 5px solid #dc8b12; }

@media (max-width: 720px) {
    .site-header { align-items: flex-start; flex-direction: column; }
    .site-header nav { align-items: flex-start; flex-direction: column; width: 100%; }
    .container { width: min(100% - 20px, 1120px); margin-top: 18px; }
    .auth-card { margin-top: 18px; }
    .result-heading { align-items: flex-start; flex-direction: column; }
    button, .button-link { width: 100%; }
    .inline-form, .inline-form button, .link-button { width: auto; }
}
select { width: 100%; min-height: 44px; border: 1px solid #b9c4d6; border-radius: 9px; padding: 10px 12px; background: white; color: var(--text); font: inherit; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.filter-form { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; margin-bottom: 20px; }
.site-header nav > a, .site-header nav > .inline-form > .link-button { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 0; }

.message-preview { white-space: pre-wrap; overflow-wrap: anywhere; }
.nested-links code { overflow-wrap: anywhere; }
