@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --scb-blue: #002D6E;
  --scb-blue-hover: #003D8F;
  --scb-blue-light: #E8EFF9;
  --scb-critical: #8B1538;
  --scb-red: #B42318;
  --scb-orange: #914F00;
  --scb-low-blue: #315EAA;
  --scb-info-grey: #596579;
  --scb-green: #176B45;

  --bg-page: #F5F7FA;
  --bg-white: #FFFFFF;
  --bg-hover: #EDF0F5;
  --border: #DDE2ED;
  --border-hover: #BFC7D9;
  --text-dark: #19252F;
  --text-body: #3B4A5A;
  --text-muted: #566684;
  --text-light: #687792;
  --text-white: #FFFFFF;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius: 8px;
  --radius-lg: 16px;
  --radius-pill: 100px;

  --shadow-sm: 0 1px 3px rgba(0,45,110,0.06);
  --shadow-md: 0 4px 16px rgba(0,45,110,0.08);
  --shadow-lg: 0 8px 32px rgba(0,45,110,0.1);

  --transition: 0.2s ease;

  --font-size-no-ios-zoom: 16px;
  --touch-target: 44px;
  --chip-gap: 8px;
  --z-modal: 120;
  --z-modal-confirm: 200;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg-page); color: var(--text-body); line-height: 1.5; }
a { color: var(--scb-blue); text-decoration: none; }
a:hover { color: var(--scb-blue-hover); }
h1, h2, h3, h4 { color: var(--text-dark); font-weight: 700; line-height: 1.25; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, select { font-family: var(--font); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #002D6E; outline-offset: 2px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-24 { gap: 24px; }
.hidden { display: none !important; }
html.is-auth .guest-only, html:not(.is-auth) .auth-only, html:not(.is-admin) .admin-only { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10000; left: 16px; top: 8px; padding: 10px 16px; background: var(--scb-blue); color: #fff; border-radius: var(--radius); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); color: #fff; }
.text-mono { font-family: var(--font-mono); font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch-target); padding: 10px 24px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  border: 1px solid transparent; transition: all var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--scb-blue); color: var(--text-white); border-color: var(--scb-blue); }
.btn-primary:hover { background: var(--scb-blue-hover); border-color: var(--scb-blue-hover); color: var(--text-white); }
.btn-ghost { background: transparent; color: var(--text-muted); border: none; padding: 8px 12px; }
.btn-ghost:hover { color: var(--text-dark); background: var(--bg-hover); }
.btn-outline { background: transparent; color: var(--scb-blue); border: 1.5px solid var(--scb-blue); }
.btn-outline:hover { background: var(--scb-blue); color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-sm { min-height: 40px; padding: 7px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent; pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

.input {
  width: 100%; min-height: var(--touch-target); padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: var(--font-size-no-ios-zoom); color: var(--text-dark); background: var(--bg-white); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus { border-color: var(--scb-blue); box-shadow: 0 0 0 3px rgba(0,45,110,0.08); }
.input[aria-invalid="true"] { border-color: var(--scb-red); box-shadow: 0 0 0 3px rgba(180,35,24,0.1); }
.input::placeholder { color: var(--text-light); }
.input-lg { padding: 14px 20px; font-size: var(--font-size-no-ios-zoom); }
.field-hint { color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.field-error { min-height: 18px; color: var(--scb-red); font-size: 12px; line-height: 1.45; }

.toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  padding: 12px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  color: #fff; pointer-events: auto; max-width: 420px; box-shadow: var(--shadow-md);
  animation: toast-in 0.3s ease forwards;
}
.toast.toast-out { animation: toast-out 0.3s ease forwards; }
.toast-error { background: var(--scb-red); }
.toast-success { background: var(--scb-green); }
.toast-info { background: var(--scb-blue); }

@keyframes toast-in { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }

.navbar {
  height: 56px; background: var(--bg-white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
}

.navbar-logo {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  font-size: 18px; font-weight: 700; color: var(--text-dark);
}

.navbar-logo .logo-icon {
  width: 28px; height: 28px;
}

.navbar-logo .logo-text span { color: var(--scb-blue); font-weight: 400; }

.navbar-auth { display: flex; align-items: center; gap: 8px; }
.navbar-user { display: flex; align-items: center; gap: 12px; }
.nav-username { font-size: 13px; font-weight: 600; color: var(--text-dark); }
.account-menu { position: relative; }
.account-menu-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 10px; border: none; border-radius: var(--radius); background: none; color: var(--text-dark); font: inherit; cursor: pointer; transition: background var(--transition); }
.account-menu-toggle:hover, .account-menu-toggle[aria-expanded="true"] { background: var(--bg-hover); }
.account-menu-icon, .account-menu-caret { flex-shrink: 0; color: var(--text-muted); }
.account-menu-toggle .nav-username { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-list { position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px; padding: 6px; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.account-menu-item { display: block; width: 100%; min-height: 40px; padding: 8px 12px; border: none; border-radius: 6px; background: none; color: var(--text-dark); font: inherit; font-size: 14px; text-align: left; white-space: nowrap; cursor: pointer; }
.account-menu-item:hover, .account-menu-item:focus-visible { background: var(--bg-hover); }
.account-menu-item[aria-current="page"] { font-weight: 600; }
a.account-menu-item { text-decoration: none; }
.account-menu-nav { display: none; }
.account-menu-logout { margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; }
.nav-link.active { color: var(--text-dark); background: var(--bg-hover); }

.navbar-burger { display: none; align-items: center; justify-content: center; width: var(--touch-target); height: var(--touch-target); border: none; background: none; color: var(--text-muted); padding: 4px; }

.mobile-menu {
  position: fixed; top: 56px; left: 0; right: 0; background: var(--bg-white);
  border-bottom: 1px solid var(--border); padding: 16px 24px; z-index: 99;
  display: flex; flex-direction: column; gap: 12px;
  animation: slide-down 0.2s ease;
}
.mobile-menu a:not(.btn) { font-size: 14px; color: var(--text-body); padding: 8px 0; }
.mobile-menu-auth { display: flex; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.hero {
  padding: 80px 0 60px; background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}

.hero-grid { display: flex; align-items: center; gap: 60px; }

.hero-text { flex: 1; }

.hero-title { font-size: 44px; font-weight: 800; margin-bottom: 16px; line-height: 1.15; }

.hero-subtitle { font-size: 17px; color: var(--text-muted); margin-bottom: 28px; max-width: 480px; line-height: 1.6; }

.hero-note { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; margin-bottom: 28px; background: var(--bg-page); border: 1px solid var(--border); border-radius: var(--radius-lg); font-size: 14px; color: var(--text-body); line-height: 1.55; }
.hero-note svg { flex: 0 0 auto; margin-top: 2px; color: var(--scb-blue); }
.hero-note strong { font-weight: 600; color: var(--text-dark); }
.hero-note a { color: var(--scb-blue); text-decoration: underline; }
.hero-note a:hover { text-decoration: none; }

.hero-form { display: flex; gap: 12px; margin-bottom: 12px; }
.hero-form .input { flex: 1; }

.hero-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.hero-consent input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--scb-blue); }
.auth-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-muted); cursor: pointer; margin: 4px 0 8px; text-align: left; }
.auth-consent input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--scb-blue); }
.auth-consent span a { color: var(--scb-blue); text-decoration: underline; }
.auth-consent span a:hover { text-decoration: none; }
.hero-captcha { margin-top: 16px; min-height: 100px; }
.hero-auth-gate { margin-top: 16px; padding: 20px 24px; background: var(--bg-white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); text-align: center; }
.hero-auth-text { font-size: 14px; color: var(--text-body); margin-bottom: 14px; }
.hero-auth-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }
.hero-auth-or { font-size: 13px; color: var(--text-muted); }

.hero-visual { flex-shrink: 0; }

.demo-card {
  width: 320px; padding: 0; background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.demo-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 12px;
}
.demo-status { color: var(--scb-green); font-weight: 600; }
.demo-status.scanning { color: var(--scb-blue); }
.demo-target { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }

.demo-donut { width: 140px; height: 140px; margin: 24px auto 16px; position: relative; }
.demo-donut canvas { width: 100%; height: 100%; }
.demo-donut-val {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 28px; font-weight: 700; color: var(--text-dark); text-align: center;
}
.demo-donut-val small { font-size: 13px; font-weight: 400; color: var(--text-light); }

.demo-bars { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.demo-bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.demo-bar-label { width: 112px; color: var(--text-muted); flex-shrink: 0; text-align: right; }
.demo-bar-track { flex: 1; height: 6px; background: var(--bg-page); border-radius: 3px; overflow: hidden; }
.demo-bar-fill { height: 100%; border-radius: 3px; width: 0; transition: width 0.6s ease; }
.demo-bar-fill.crit { background: var(--scb-critical); }
.demo-bar-fill.high { background: var(--scb-red); }
.demo-bar-fill.med { background: var(--scb-orange); }
.demo-bar-fill.low { background: var(--scb-low-blue); }
.demo-bar-fill.info { background: var(--scb-info-grey); }
.demo-bar-count { width: 20px; font-weight: 700; color: var(--text-dark); font-variant-numeric: tabular-nums; }

.section { padding: 72px 0; }
.section-white { background: var(--bg-white); }
.section-title { font-size: 28px; text-align: center; margin-bottom: 12px; }
.section-sub { font-size: 15px; color: var(--text-muted); text-align: center; margin-bottom: 48px; }

.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature-card {
  padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card:hover .feature-icon { background: var(--scb-blue); color: var(--text-white); }
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  background: var(--scb-blue-light); color: var(--scb-blue); margin-bottom: 16px;
  transition: background var(--transition), color var(--transition);
}
.feature-card h3 { font-size: 15px; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.steps-row { display: flex; align-items: flex-start; justify-content: center; gap: 8px; }
.step { flex: 1; max-width: 240px; text-align: center; padding: 20px; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--scb-blue); color: var(--text-white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin: 0 auto 14px;
}
.step h3 { font-size: 15px; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.step-arrow { padding-top: 28px; color: var(--text-light); flex-shrink: 0; }

.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; padding: 14px 18px; background: var(--bg-white); border: none; font-size: 14px; font-weight: 500;
  color: var(--text-dark); text-align: left; transition: background var(--transition);
}
.faq-q:hover { background: var(--bg-hover); }
.faq-q svg { flex-shrink: 0; color: var(--text-light); transition: transform var(--transition); }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a p { padding: 0 18px 14px; font-size: 13px; color: var(--text-muted); line-height: 1.7; }

.footer { padding: 20px 0; border-top: 1px solid var(--border); background: var(--bg-white); }
.footer a { display: inline-flex; align-items: center; min-height: 40px; font-size: 13px; color: var(--text-muted); }
.footer a:hover { color: var(--text-dark); }
.footer-copy { font-size: 13px; color: var(--text-light); }
.cookie-notice { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 110; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.cookie-notice p { font-size: 13px; line-height: 1.5; color: var(--text-body); }
.cookie-notice a { color: var(--scb-blue); text-decoration: underline; }
.cookie-notice .btn { flex: 0 0 auto; }
@media (max-width: 600px) { .cookie-notice { flex-direction: column; align-items: stretch; } }

.auth-page {
  min-height: calc(100vh - 56px); display: flex; align-items: center; justify-content: center;
  padding: 40px 16px; background: var(--bg-page);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px 36px; box-shadow: var(--shadow-sm);
}
.auth-card h1 { font-size: 24px; margin-bottom: 8px; }
.auth-card-compact { max-width: 400px; }
.auth-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--text-dark); margin-top: 10px; }
.auth-form .btn { margin-top: 16px; }
.auth-footer { margin-top: 24px; text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-footer a { font-weight: 500; }
.auth-forgot { align-self: flex-end; min-height: 36px; display: inline-flex; align-items: center; margin-top: 2px; font-size: 13px; font-weight: 500; }
.auth-legal { margin-top: 14px; text-align: center; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.auth-inline-actions { display: flex; justify-content: center; margin-top: 10px; }
.auth-captcha { margin-top: 12px; min-height: 100px; }
.password-field { position: relative; }
.password-field .input { padding-right: 92px; }
.password-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-width: 80px; height: var(--touch-target); padding: 0 8px; border: 0; border-radius: 6px; color: var(--scb-blue); background: transparent; font-size: 12px; font-weight: 600; }
.password-toggle:hover { background: var(--scb-blue-light); }
.code-input { text-align: center; letter-spacing: .3em; font-family: var(--font-mono); font-size: 20px; font-weight: 700; }
.verify-resend { margin-top: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.verify-resend .btn:disabled { color: var(--text-light); cursor: not-allowed; }
.verify-resend-timer { min-height: 18px; font-size: 12px; color: var(--text-muted); }
.phone-input-wrap {
  display: flex; align-items: center; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: border-color var(--transition);
}
.phone-input-wrap:focus-within { border-color: var(--scb-blue); }
.phone-input-wrap:has(.input[aria-invalid="true"]) { border-color: var(--scb-red); }
.phone-prefix {
  padding: 10px 0 10px 14px; font-size: 15px; font-weight: 600;
  color: var(--text-dark); background: var(--bg-page); flex-shrink: 0;
  user-select: none; border-right: 1px solid var(--border);
  padding-right: 10px;
}
.phone-input {
  border: none !important; border-radius: 0 !important;
  padding-left: 12px; flex: 1; min-width: 0;
}

.page-main { padding: 32px 0; min-height: calc(100vh - 56px); }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { font-size: 24px; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.filter-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 220px; gap: 12px; margin-bottom: 16px; }
.dashboard-footer { margin-top: 24px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.data-table th {
  position: relative;
  padding: 10px 16px; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted); text-align: left;
  background: var(--bg-page); border-bottom: 1px solid var(--border);
  user-select: none;
}
.col-resizer {
  position: absolute; top: 0; right: 0; width: 8px; height: 100%;
  cursor: col-resize; user-select: none; z-index: 5; touch-action: none;
}
.col-resizer:hover, .col-resizer.is-resizing {
  background: var(--scb-blue); opacity: 0.7;
}
.data-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.data-table td[data-label="Время"] { white-space: nowrap; }
.dash-url { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.dash-url .text-mono { display: block; overflow: hidden; text-overflow: ellipsis; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }
.table-empty { text-align: center; color: var(--text-light); padding: 40px 16px !important; }

.dash-status { display: inline-flex; padding: 2px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; }
.dash-status-done { background: #e6f4ea; color: var(--scb-green); }
.dash-status-running { background: var(--scb-blue-light); color: var(--scb-blue); }
.dash-status-error { background: #fdeaea; color: var(--scb-red); }
.dash-url { max-width: 310px; }
.dash-url .text-mono { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-date { white-space: nowrap; }
.dash-retention { margin-top: 3px; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.dash-error { margin-top: 6px; max-width: 250px; color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.dash-error details { margin-top: 4px; }
.dash-error summary { color: var(--scb-blue); cursor: pointer; }
.dash-error code { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: 11px; }
.dash-risk { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 3px 8px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; }
.dash-risk-high { color: #fff; background: var(--scb-red); }
.dash-risk-medium { color: #fff; background: var(--scb-orange); }
.dash-risk-low { color: #fff; background: var(--scb-low-blue); }
.dash-risk-none { color: var(--text-muted); background: var(--bg-hover); }
.scan-result-link { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; white-space: nowrap; }
.dash-actions { display: flex; align-items: center; gap: 8px; }
.dash-delete-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--touch-target); height: var(--touch-target); border: none; border-radius: 8px;
  background: transparent; color: var(--text-muted); cursor: pointer; flex: 0 0 auto;
}
.dash-delete-btn:hover { color: var(--scb-red); background: rgba(212, 42, 42, 0.08); }

.modal-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 22, 40, 0.55); padding: 24px;
}
#confirm-modal.modal-overlay { z-index: var(--z-modal-confirm); }
.modal-card {
  position: relative; width: 100%; max-width: 420px; background: var(--bg-white);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 24px;
}
.modal-card h2 { overflow-wrap: anywhere; padding-right: 32px; }
.modal-card .field-label { display: block; margin-bottom: 6px; }
.modal-card h2 { font-size: 18px; color: var(--text-body); margin-bottom: 8px; }
.modal-card p { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }
.modal-card p.field-error { font-size: 12px; color: var(--scb-red); margin-bottom: 8px; }
.modal-card p.modal-text { font-size: 13px; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; }

.domains-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px 24px; margin-bottom: 24px;
}
.domains-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.domains-head h2 { font-size: 16px; color: var(--text-body); margin-bottom: 4px; }
.domains-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-note { font-size: 13px; color: var(--text-muted); margin: 0; max-width: 560px; }
.domains-list { display: flex; flex-wrap: wrap; gap: var(--chip-gap); margin-top: 14px; }
.domains-list:empty, .domains-pending:empty { display: none; }
.muted-note { font-size: 13px; color: var(--text-muted); }
.domain-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: 16px; font-size: 13px; color: var(--text-body);
  background: var(--bg-hover); overflow-wrap: anywhere;
}
.domain-chip .domain-chip-badge { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.domain-chip-expiring .domain-chip-badge { color: var(--scb-orange); }
.domain-chip button {
  border: none; background: none; color: var(--text-muted); cursor: pointer;
  min-width: var(--touch-target); min-height: var(--touch-target);
  margin: calc(var(--chip-gap) * -0.75) calc(var(--chip-gap) * -0.75) calc(var(--chip-gap) * -0.75) 2px;
  padding: 0; font-size: 16px; line-height: 1;
}
.domain-chip button:hover { color: var(--scb-red); }
.admin-chip-remove { font-size: 15px !important; margin-left: 2px; }
.domains-pending { margin-top: 12px; display: grid; gap: 8px; }
.domain-pending-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 10px 14px; border: 1px dashed var(--border);
  border-radius: var(--radius); font-size: 13px; color: var(--text-muted);
}
.domain-pending-item .domain-pending-name { font-weight: 600; color: var(--text-body); }
.domain-pending-item .domain-pending-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.domain-pending-item .domain-pending-error { color: var(--scb-orange); }
.domain-modal-card { max-width: 520px; }
.modal-close {
  position: absolute; top: 6px; right: 8px; border: none; background: none;
  font-size: 24px; line-height: 1; color: var(--text-muted); cursor: pointer;
  width: var(--touch-target); height: var(--touch-target); padding: 0;
}
.modal-close:hover { color: var(--text-body); }
.modal-text { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-bottom: 14px; }
.dns-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  padding: 10px 12px; background: var(--bg-hover);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.dns-label { font-size: 12px; font-weight: 600; color: var(--text-muted); flex: 0 0 104px; }
.dns-value {
  flex: 1; min-width: 0; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--text-body); overflow-wrap: anywhere; word-break: break-all;
}
.dns-value-token { font-size: 11px; }
#domain-modal-step2 .modal-actions { margin-top: 16px; }

.dns-steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: dns-step; }
.dns-steps > li {
  position: relative; counter-increment: dns-step;
  padding: 0 0 14px 36px; font-size: 13px; color: var(--text-body); line-height: 1.5;
}
.dns-steps > li::before {
  content: counter(dns-step);
  position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--scb-blue); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.dns-steps > li:not(:last-child)::after {
  content: ''; position: absolute; left: 11px; top: 26px; bottom: 2px;
  width: 2px; background: var(--border);
}
.dns-steps .dns-row { margin: 8px 0 6px; }
.dns-step-note { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.domain-pending-wrap { display: grid; gap: 4px; }
.dns-checks-details {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-hover); font-size: 12px; color: var(--text-muted);
}
.dns-checks-details summary {
  cursor: pointer; padding: 8px 12px; font-weight: 600; color: var(--text-body);
  user-select: none;
}
.dns-checks-list { list-style: none; margin: 0; padding: 2px 12px 10px 14px; display: grid; gap: 6px; }
.dns-check { display: flex; align-items: baseline; gap: 8px; line-height: 1.45; }
.dns-check-dot {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  align-self: center;
  background: var(--border); color: var(--text-muted);
}
.dns-check.ok .dns-check-dot { background: rgba(31, 168, 96, 0.15); color: var(--scb-green, #1FA860); }
.dns-check.warn .dns-check-dot { background: rgba(255, 159, 10, 0.18); color: var(--scb-orange); }
.dns-check.err .dns-check-dot { background: rgba(220, 53, 69, 0.15); color: var(--scb-red); }
.dns-check-time { flex: 0 0 118px; color: var(--text-muted); white-space: nowrap; }
.dns-check-label { color: var(--text-body); }
.dns-check-src {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-muted); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 0 6px; margin-left: 2px;
}
#dns-checks .dns-checks-list { padding: 0 12px 10px; }

.domains-empty { margin: 0; color: var(--text-muted); font-size: 14px; }

.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tab {
  border: 1px solid var(--border); background: var(--bg-white); color: var(--text-muted);
  border-radius: 999px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.admin-tab:hover { color: var(--text-body); }
.admin-tab.active { background: var(--scb-blue); border-color: var(--scb-blue); color: #fff; }
.admin-user-modal-card { display: flex; flex-direction: column; max-width: 760px; max-height: 86vh; }
#admin-user-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.admin-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 18px; margin: 12px 0 16px; }
.admin-detail-item { font-size: 13px; }
.admin-detail-item .k { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.admin-detail-item .v { color: var(--text-body); word-break: break-word; }
.admin-section-title { font-size: 13px; font-weight: 700; color: var(--text-body); margin: 16px 0 8px; }
.admin-wildcard-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: rgba(31, 168, 96, 0.08); border: 1px solid rgba(31, 168, 96, 0.25);
  border-radius: var(--radius); margin: 8px 0 12px; font-size: 13px; color: var(--text-body);
}
.admin-scope-add-box {
  display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px;
}
.admin-pw-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-pw-row .input { flex: 1; min-width: 220px; max-width: 360px; }
.admin-danger-btn { color: var(--scb-red); border-color: rgba(180, 35, 24, 0.4); }
.admin-danger-btn:hover { border-color: var(--scb-red); }
#admin-tab-users .filter-toolbar { grid-template-columns: minmax(240px, 1fr) 220px auto; }
.admin-scope-actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.admin-account-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0;
}
.admin-mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-mini-table th { text-align: left; color: var(--text-muted); font-size: 11px; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.admin-mini-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); color: var(--text-body); }
.admin-user-row { cursor: pointer; }
.admin-user-row:hover td { background: var(--bg-hover); }
.admin-stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat-card .stat-val { font-size: 26px; font-weight: 800; color: var(--text-body); }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.admin-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.admin-chart-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.admin-chart-card h3 { font-size: 14px; color: var(--text-body); margin-bottom: 12px; }
.admin-chart-card svg { width: 100%; height: auto; display: block; }
.admin-chart-note { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.admin-chart-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.admin-table-scroll { overflow-x: auto; }
.admin-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.admin-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.admin-hbar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; }
.admin-hbar-label { flex: 0 0 46%; color: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-hbar-track { flex: 1; height: 14px; background: var(--bg-hover); border-radius: 7px; overflow: hidden; }
.admin-hbar-fill { display: block; height: 100%; background: var(--scb-blue); border-radius: 7px; }
.admin-hbar-count { flex: 0 0 34px; text-align: right; color: var(--text-muted); }
.admin-health-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-health-list { display: grid; gap: 8px; }
.health-item { display: flex; align-items: center; gap: 12px; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }
.health-item .health-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; }
.health-item.ok .health-dot { background: #1fa860; }
.health-item.fail .health-dot { background: var(--scb-red); }
.health-item.warn .health-dot { background: var(--scb-orange); }
.health-item .health-name { font-weight: 600; color: var(--text-body); font-size: 13px; flex: 0 0 190px; }
.health-item .health-detail { flex: 1; color: var(--text-muted); font-size: 12.5px; overflow-wrap: anywhere; }
.health-item .health-ms { color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.admin-status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.admin-status-pill.active { background: rgba(31, 168, 96, 0.12); color: #1fa860; }
.admin-status-pill.pending { background: rgba(230, 137, 14, 0.14); color: var(--scb-orange); }
.admin-status-pill.blocked { background: rgba(212, 42, 42, 0.12); color: var(--scb-red); }
.admin-scope-mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.pagination button { min-width: var(--touch-target); min-height: var(--touch-target); padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; background: var(--bg-white); cursor: pointer; }
.pagination button.active { background: var(--scb-blue); color: #fff; border-color: var(--scb-blue); }

.legal-page { min-height: calc(100vh - 56px); padding: 48px 0 72px; background: var(--bg-white); }
.legal-content { max-width: 820px; }
.legal-content h1 { margin-bottom: 24px; font-size: 32px; }
.legal-content h2 { margin: 28px 0 8px; font-size: 19px; }
.legal-content p { color: var(--text-body); line-height: 1.75; }
.legal-content p + p { margin-top: 8px; }
.legal-content .legal-meta { margin: -12px 0 24px; color: var(--text-muted); font-size: 14px; }
.legal-content ul { margin: 8px 0; padding-left: 22px; color: var(--text-body); line-height: 1.75; }
.legal-content a { color: var(--scb-blue); text-decoration: underline; }
.legal-content a:hover { text-decoration: none; }
.legal-table-wrap { margin: 12px 0; overflow-x: auto; }
.legal-content table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.legal-content th, .legal-content td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; vertical-align: top; color: var(--text-body); }
.legal-content th { background: var(--bg-page); color: var(--text-dark); font-weight: 600; }

.results-topbar {
  height: 52px; background: var(--bg-white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 12px;
}
.results-topbar .home-btn {
  width: var(--touch-target); height: var(--touch-target); display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); color: var(--text-muted); transition: all var(--transition);
  border: none; background: none; cursor: pointer; flex: 0 0 auto;
}
.results-topbar .home-btn:hover { background: var(--bg-hover); color: var(--text-dark); }
.results-topbar .scan-id { min-height: 40px; padding: 6px 10px; border: 0; border-radius: var(--radius); background: transparent; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); font-weight: 500; }
.results-topbar .scan-id:hover { background: var(--bg-hover); color: var(--text-dark); }
.results-topbar .target-url {
  flex: 1; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: var(--font-size-no-ios-zoom); color: var(--text-dark); background: var(--bg-page);
  outline: none; max-width: 400px; cursor: default;
}
.results-topbar .export-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px; flex-shrink: 0;
  background: var(--scb-blue); color: #fff; border: none; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.results-topbar .export-btn:hover { background: var(--scb-blue-hover); }
.results-topbar .export-btn:disabled { background: var(--bg-hover); color: var(--text-light); cursor: not-allowed; }

.summary-panel { padding: 24px 32px; background: var(--bg-white); border-bottom: 1px solid var(--border); }
.summary-grid { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }

.donut-wrap { position: relative; width: 100px; height: 100px; flex-shrink: 0; }
.donut-wrap svg { width: 100%; height: 100%; }
.donut-val {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 22px; font-weight: 700; color: var(--text-dark);
}
.donut-val small { font-size: 12px; font-weight: 400; color: var(--text-light); }

.sev-legend { display: flex; flex-direction: column; gap: 6px; }
.sev-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.sev-bar { width: 3px; height: 18px; border-radius: 2px; }
.sev-row strong { margin-left: 4px; color: var(--text-dark); font-weight: 600; }

.meta-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 32px; margin-left: 16px; }
.meta-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.meta-item { display: flex; gap: 6px; font-size: 13px; }
.meta-label { color: var(--text-light); white-space: nowrap; }
.meta-val { color: var(--text-dark); font-weight: 500; }

.md-layout { display: flex; height: min(760px, calc(100vh - 120px)); min-height: 520px; border-bottom: 1px solid var(--border); }

.md-sidebar {
  width: 300px; border-right: 1px solid var(--border); background: var(--bg-white);
  overflow-y: auto; flex-shrink: 0;
}
.md-sidebar-search { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.md-sidebar-search .input { font-size: var(--font-size-no-ios-zoom); padding: 8px 12px; }
.search-field { position: relative; }
.search-field .input { padding-right: 82px; }
.search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  min-width: var(--touch-target); height: var(--touch-target); padding: 0 8px;
  border: 0; border-radius: 6px; background: transparent; color: var(--scb-blue);
  font-size: 11px; font-weight: 600;
}
.search-clear:hover { background: var(--scb-blue-light); }
.search-empty { padding: 28px 16px; color: var(--text-muted); text-align: center; font-size: 13px; }

.md-detail { flex: 1; background: var(--bg-white); overflow-y: auto; }

.cat-group { border-bottom: 1px solid var(--border); }
.cat-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-dark);
  transition: background var(--transition); border: none; background: none; width: 100%; text-align: left;
}
.cat-head:hover { background: var(--bg-hover); }
.cat-head .cat-icon { font-size: 10px; color: var(--text-light); transition: transform var(--transition); }
.cat-group.open .cat-head .cat-icon { transform: rotate(90deg); }
.cat-head .cat-cnt {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-light);
  background: var(--bg-hover); padding: 1px 8px; border-radius: var(--radius-pill);
}
.cat-children { display: none; }
.cat-group.open .cat-children { display: block; }

.cat-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px 10px 36px;
  font-size: 13px; color: var(--text-body); cursor: pointer;
  width: 100%; min-height: var(--touch-target); border: 0; border-left: 3px solid transparent; background: var(--bg-white); text-align: left; transition: all var(--transition);
  animation: item-slide-in 0.2s ease;
}
.cat-item:hover { background: var(--bg-hover); }
.cat-item.active { background: var(--scb-blue-light); color: var(--scb-blue); border-left-color: var(--scb-blue); font-weight: 500; }

.cat-item .sev-bar-sm { width: 3px; height: 14px; border-radius: 2px; flex-shrink: 0; }
.cat-item-text { min-width: 0; overflow-wrap: anywhere; }

.finding-family { border-top: 1px solid var(--border); }
.finding-family > summary { list-style: none; }
.finding-family > summary::-webkit-details-marker { display: none; }
.finding-family-summary {
  display: flex; align-items: center; gap: 8px; min-height: var(--touch-target);
  padding: 9px 14px 9px 32px; cursor: pointer; color: var(--text-dark);
  background: var(--bg-hover);
  font-size: 13px; font-weight: 600;
}
.finding-family-summary:hover { background: var(--bg-hover); }
.finding-family-chevron { flex-shrink: 0; color: var(--text-light); font-size: 9px; transition: transform var(--transition); }
.finding-family[open] .finding-family-chevron { transform: rotate(90deg); }
.finding-family-summary .sev-bar-sm { width: 3px; height: 14px; border-radius: 2px; flex-shrink: 0; }
.finding-family-title { min-width: 0; overflow-wrap: anywhere; }
.finding-family-count {
  margin-left: auto; min-width: 24px; padding: 1px 7px; border-radius: var(--radius-pill);
  background: var(--bg-white); color: var(--text-muted); text-align: center;
  font-size: 11px; font-variant-numeric: tabular-nums;
}
.finding-family .cat-item { padding-left: 52px; background: #fbfcfe; }
.finding-family .cat-item:last-child { border-bottom: 1px solid var(--border); }

@keyframes item-slide-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }

.vuln-panel { padding: 28px 32px; }
.vuln-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }

.sev-badge {
  display: inline-block; padding: 2px 10px; border-radius: 3px;
  font-size: 12px; font-weight: 600; color: #fff;
}
.sev-badge-critical { background: var(--scb-critical); }
.sev-badge-high { background: var(--scb-red); }
.sev-badge-medium { background: var(--scb-orange); }
.sev-badge-low { background: var(--scb-low-blue); }
.sev-badge-info { background: var(--scb-info-grey); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border: 1px solid #bfcbe0; border-radius: var(--radius-pill); background: var(--scb-blue-light); color: var(--scb-blue); font-size: 12px; font-weight: 600; }
.finding-status { margin-top: 8px; font-weight: 700; }
.evidence-list { display: grid; gap: 12px; }
.evidence-list > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; }
.evidence-list dt { color: var(--text-muted); font-size: 13px; }
.evidence-list dd { min-width: 0; overflow-wrap: anywhere; color: var(--text-dark); font-size: 13px; }
.evidence-list code { display: inline-block; margin: 0 4px 4px 0; padding: 2px 6px; border-radius: 4px; background: var(--bg-hover); font-family: var(--font-mono); font-size: 11px; }

.perim-cards { padding: 24px 32px; }
.perim-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; }
.perim-card-title { font-size: 15px; font-weight: 600; color: var(--text-dark); font-family: var(--font-mono); margin-bottom: 12px; }
.perim-card-details { display: flex; flex-wrap: wrap; gap: 8px; }
.perim-tag { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 500; background: var(--bg-page); color: var(--text-body); border: 1px solid var(--border); }
.perim-tag-ok { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }

.empty { text-align: center; padding: 60px 24px; }
.empty h3 { font-size: 16px; margin-bottom: 6px; }
.empty p { font-size: 13px; color: var(--text-muted); max-width: 360px; margin: 0 auto; }

.scan-status-banner {
  display: flex; align-items: center; gap: 16px; padding: 14px 32px;
  background: var(--scb-blue); color: #fff;
  transition: background 0.5s ease;
}
.scan-status-banner.done { background: var(--scb-green); }
.scan-status-banner.error { background: var(--scb-red); }
.scan-status-banner.hidden { display: none !important; }

.scan-spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; flex-shrink: 0;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scan-status-icon { width: 18px; height: 18px; flex-shrink: 0; }
.scan-status-icon svg { animation: icon-pop 0.3s ease; }
@keyframes icon-pop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

.scan-status-text { font-size: 14px; font-weight: 500; flex: 1; }
.scan-status-meta { display: flex; align-items: center; gap: 20px; font-size: 13px; opacity: 0.9; }
.scan-timer { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.scan-counter { font-variant-numeric: tabular-nums; }

.scan-meta-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch-target); padding: 5px 14px;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius); color: #fff; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.scan-meta-btn:hover { background: rgba(255,255,255,0.25); }
.scan-cancel-btn { background: rgba(0,0,0,.16); border-color: rgba(255,255,255,.72); font-weight: 700; }

.scan-progress { padding: 0; background: var(--bg-white); border-bottom: 1px solid var(--border); }
.progress-track { width: 100%; height: 5px; background: var(--bg-hover); overflow: hidden; }
.progress-fill {
  height: 100%; background: var(--scb-blue); transition: width 0.5s ease; width: 0;
}
.progress-fill.active {
  background: linear-gradient(90deg, var(--scb-blue), #3b7ddd, var(--scb-blue));
  background-size: 200% 100%;
  transition: none;
  width: 30% !important;
  animation: progress-indeterminate 1.5s ease-in-out infinite,
             progress-shimmer 1.5s ease-in-out infinite;
}
@keyframes progress-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(333%); } }
@keyframes progress-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.donut-wrap.scanning .donut-val { opacity: 0.55; }

.scan-status-dot {
  width: 12px; height: 12px; border-radius: 50%; background: #fff; flex-shrink: 0;
  animation: dot-pulse 1.4s ease-in-out infinite;
}
@keyframes dot-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }

.scan-empty-state { text-align: center; padding: 80px 24px; }
.scan-empty-spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--scb-blue); border-radius: 50%; margin: 0 auto 20px;
  animation: spin 0.9s linear infinite;
}
.scan-empty-state h3 { font-size: 16px; margin-bottom: 6px; color: var(--text-dark); }
.scan-empty-state p { font-size: 13px; color: var(--text-muted); max-width: 340px; margin: 0 auto; }

.vuln-section { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.vuln-section:last-child { border-bottom: none; margin-bottom: 0; }
.vuln-section h4 { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: var(--text-dark); }
.vuln-section p { font-size: 14px; line-height: 1.7; color: var(--text-body); margin-bottom: 8px; }
.vuln-section pre {
  background: var(--bg-page); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; font-family: var(--font-mono); font-size: 12px; overflow-x: auto;
  line-height: 1.5; color: var(--text-muted); margin: 8px 0 0; white-space: pre-wrap;
  position: relative;
}
.vuln-section pre.has-copy { padding-top: 52px; }
.vuln-section .copy-pre {
  position: absolute; top: 8px; right: 8px; min-height: 36px; padding: 4px 10px; font-size: 11px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-white);
  color: var(--text-muted); cursor: pointer; transition: all var(--transition);
}
.vuln-section .copy-pre:hover { color: var(--text-dark); border-color: var(--border-hover); }
.http-preview { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.http-preview > summary { padding: 12px 14px; cursor: pointer; font-weight: 600; color: var(--text-dark); background: var(--bg-page); }
.http-preview-tabs { display: flex; gap: 4px; padding: 8px 10px 0; border-top: 1px solid var(--border); }
.http-preview-tab { min-height: 38px; padding: 7px 14px; border: 1px solid transparent; border-radius: 6px 6px 0 0; background: transparent; color: var(--text-muted); font-weight: 600; }
.http-preview-tab.active { color: var(--scb-blue); background: var(--scb-blue-light); border-color: #bfcbe0; }
.http-preview-panel { padding: 0 10px 10px; }
.http-preview-panel pre { max-height: 420px; overflow: auto; padding-right: 96px; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-truncated { margin: 8px 0 0; padding: 7px 10px; border-radius: 6px; background: #fff4df; color: #7a4b00; font-size: 12px; font-weight: 600; }

.ai-summary-wrap { padding: 0 32px 0; background: var(--bg-white); border-bottom: 1px solid var(--border); }
.ai-summary-card {
  margin: 16px 0; padding: 0; border: 1px solid #bfcbe0;
  border-radius: var(--radius-lg); background: linear-gradient(135deg, #f0f4fb 0%, #e8eef9 100%);
}
.ai-summary-head {
  display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  min-height: 48px; padding: 14px 20px; color: var(--scb-blue); cursor: default; list-style: none;
}
details.ai-summary-card > .ai-summary-head { cursor: pointer; }
details.ai-summary-card > .ai-summary-head::-webkit-details-marker { display: none; }
details.ai-summary-card > .ai-summary-head::after { content: '\25B6'; margin-left: auto; font-size: 10px; transition: transform var(--transition); }
details.ai-summary-card[open] > .ai-summary-head::after { transform: rotate(90deg); }
.ai-summary-card .ai-summary-note { padding: 0 20px 14px; font-size: 13px; color: var(--text-muted); }
.ai-summary-body { padding: 2px 24px 20px; }
.ai-summary-card p {
  font-size: 14px; line-height: 1.7; color: var(--text-body); margin: 0; white-space: pre-line;
}
.ai-summary-body { font-size: 14px; line-height: 1.7; color: var(--text-body); }
.ai-summary-body h3 { color: var(--scb-blue); font-weight: 600; font-size: 15px; margin: 20px 0 8px; }
.ai-summary-body h4 { color: var(--scb-blue); font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
.ai-summary-body h3:first-child, .ai-summary-body h4:first-child { margin-top: 0; }
.ai-summary-body p { margin: 0 0 8px; line-height: 1.7; }
.ai-summary-body p:last-child { margin-bottom: 0; }
.ai-summary-body strong { color: var(--text-dark); }
.ai-summary-body ul, .ai-summary-body ol { margin: 8px 0; padding-left: 24px; }
.ai-summary-body ul { list-style: disc; }
.ai-summary-body ol { list-style: decimal; }
.ai-summary-body li { margin-bottom: 4px; line-height: 1.6; }
.ai-summary-body code {
  font-family: var(--font-mono); font-size: 12px;
  background: rgba(0,45,110,0.06); padding: 1px 5px; border-radius: 3px;
}
.ai-summary-body pre { margin: 12px 0; padding: 14px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #f7f9fc; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-summary-body pre code { padding: 0; background: transparent; }
.technical-details { max-width: 620px; margin: 16px auto 0; color: var(--text-muted); font-size: 12px; }
.technical-details summary { color: var(--scb-blue); cursor: pointer; }
.technical-details code { display: block; margin-top: 6px; overflow-wrap: anywhere; }
.ai-summary-body blockquote, .ai-quote {
  margin: 12px 0; padding: 10px 16px; border-left: 3px solid var(--scb-blue);
  background: rgba(0,45,110,0.03); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13px; color: var(--text-body);
}
.ai-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.ai-table th, .ai-table td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.ai-table th { background: var(--bg-page); font-weight: 600; color: var(--text-dark); }
.ai-table td { color: var(--text-body); }

@media (prefers-reduced-motion: no-preference) {
  .anim-fade-in {
    opacity: 0; transform: translateY(16px);
    animation: fade-up 0.6s ease forwards;
  }
  .anim-delay-1 { animation-delay: 0.15s; }

  .anim-on-scroll { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .anim-on-scroll.visible { opacity: 1; transform: translateY(0); }

  .sev-row strong { transition: transform 0.15s ease; }
  .sev-row strong.pulse { animation: num-pulse 0.3s ease; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@keyframes fade-up { to { opacity: 1; transform: translateY(0); } }
@keyframes num-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

@media (max-width: 1024px) {
  .hero-grid { flex-direction: column; text-align: center; }
  .hero-subtitle { margin: 0 auto 32px; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-row { flex-direction: column; align-items: center; gap: 16px; }
  .step-arrow { display: none; }
  .step { max-width: 100%; width: 100%; }
  .md-sidebar { width: 240px; }
  .scan-status-meta { gap: 12px; }
}

@media (max-width: 768px) {
  .page-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .filter-toolbar { grid-template-columns: 1fr; }
  #admin-tab-users .filter-toolbar { grid-template-columns: 1fr; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table { border: 0; background: transparent; }
  .data-table tbody { display: grid; gap: 12px; }
  .data-table tr { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-white); box-shadow: var(--shadow-sm); }
  .data-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 14px; }
  .data-table td::before { content: attr(data-label); color: var(--text-muted); font-size: 12px; font-weight: 600; }
  .data-table .table-empty { display: block; }
  .data-table .table-empty::before { display: none; }
  .dash-url { max-width: none; }
  .dash-url .text-mono { white-space: normal; overflow-wrap: anywhere; }
  .dash-error { max-width: none; }
}

@media (max-width: 900px) {
  .account-nav .nav-link { display: none; }
  .account-menu-nav { display: block; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .health-item { flex-wrap: wrap; }
  .health-item .health-name { flex: 1 1 auto; }
  .health-item .health-detail { flex: 1 1 100%; }

  .navbar { padding: 0 12px; height: 48px; }
  .mobile-menu { top: 48px; }
  .navbar-logo { font-size: 16px; gap: 8px; }
  .navbar-logo .logo-icon { width: 24px; height: 24px; }
  .navbar-auth { display: none; }
  #nav-user-landing { display: none; }
  .navbar-burger { display: flex; }
  .account-nav { gap: 2px; }
  .account-menu-toggle { min-width: var(--touch-target); min-height: var(--touch-target); justify-content: center; padding: 4px; }
  .account-menu-toggle .nav-username { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .account-menu-caret { display: none; }
  .domains-actions { width: 100%; }
  .domains-actions .btn { flex: 1 1 auto; }
  .mobile-menu-auth { flex-wrap: wrap; }
  .mobile-menu-auth .nav-username { flex: 1 1 100%; overflow-wrap: anywhere; }
  .mobile-menu-auth.mobile-menu-account { flex-direction: column; align-items: flex-start; gap: 4px; }
  .mobile-menu-account .btn { padding-left: 0; padding-right: 0; }

  .hero { padding: 40px 0 32px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 15px; margin-bottom: 24px; }
  .hero-form { flex-direction: column; gap: 10px; }
  .hero-form .btn-lg { padding: 14px 24px; font-size: 15px; }
  .hero-consent { font-size: 12px; }

  .section { padding: 48px 0; }
  .section-title { font-size: 22px; margin-bottom: 8px; }
  .section-sub { font-size: 14px; margin-bottom: 32px; }

  .feature-card { padding: 20px; }
  .feature-card h3 { font-size: 14px; }
  .feature-card p { font-size: 12px; }

  .step { padding: 12px; }
  .step h3 { font-size: 14px; }
  .step p { font-size: 12px; }

  .faq-q { padding: 12px 14px; font-size: 13px; }
  .faq-a p { padding: 0 14px 12px; font-size: 12px; }

  .footer { padding: 16px 0; }
  .footer .container { flex-direction: column; gap: 8px; text-align: center; }
  .footer-links { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .footer a { font-size: 12px; }
  .footer-copy { font-size: 12px; }

  .auth-card { padding: 28px 20px; }
  .auth-page { min-height: calc(100vh - 48px); padding: 24px 12px; }
  .legal-page { min-height: calc(100vh - 48px); padding: 32px 0 48px; }
  .legal-content h1 { font-size: 26px; }

  .results-topbar { padding: 0 12px; min-height: var(--touch-target); height: auto; gap: 8px; }
  .results-topbar .scan-id { display: none; }
  .results-topbar .target-url { padding: 4px 8px; max-width: none; flex: 1; min-width: 0; }

  .scan-status-banner { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .scan-status-text { font-size: 13px; flex: 1; min-width: 0; }
  .scan-status-meta { gap: 8px; font-size: 11px; width: 100%; justify-content: flex-start; flex-wrap: wrap; opacity: 1; }
  .scan-timer { font-size: 12px; }
  .scan-meta-btn { padding: 4px 10px; font-size: 11px; }
  .scan-spinner { width: 14px; height: 14px; border-width: 2px; }

  .summary-panel { padding: 16px; }
  .summary-grid { gap: 16px; align-items: center; }
  .donut-wrap { width: 80px; height: 80px; }
  .donut-val { font-size: 18px; }
  .donut-val small { font-size: 10px; }
  .sev-row { font-size: 12px; }
  .meta-grid { flex-basis: 100%; grid-template-columns: 1fr; gap: 4px 16px; margin-left: 0; }
  .meta-grid-3 { grid-template-columns: 1fr; }
  .meta-item { font-size: 12px; }
  .meta-label { font-size: 11px; }
  .meta-val { font-size: 12px; }

  .ai-summary-wrap { padding: 0 12px; }
  .ai-summary-card { padding: 0; margin: 12px 0; }
  .ai-summary-head { min-height: 48px; padding: 12px 14px; font-size: 13px; gap: 6px; }
  .ai-summary-body { padding: 2px 14px 14px; font-size: 13px; line-height: 1.6; }
  .ai-summary-card .ai-summary-note { padding: 0 14px 12px; }
  .ai-summary-body h3 { font-size: 14px; margin: 14px 0 6px; }
  .ai-summary-body h4 { font-size: 13px; margin: 12px 0 4px; }
  .ai-summary-body p { font-size: 13px; margin: 0 0 6px; }
  .ai-summary-body ul, .ai-summary-body ol { padding-left: 18px; margin: 6px 0; }
  .ai-summary-body li { font-size: 13px; margin-bottom: 3px; }
  .ai-summary-body code { font-size: 11px; word-break: break-all; }
  .ai-summary-body blockquote, .ai-quote { font-size: 12px; padding: 8px 12px; margin: 8px 0; }

  .ai-table { font-size: 11px; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ai-table th, .ai-table td { padding: 6px 8px; white-space: nowrap; }
  .ai-table td { white-space: normal; min-width: 80px; }

  .perim-cards { padding: 16px; }

  .md-layout { flex-direction: column; height: auto; min-height: auto; }
  .md-sidebar { width: 100%; max-height: none; overflow: visible; border-right: none; border-bottom: 1px solid var(--border); }
  .md-detail { min-height: 360px; }
  .md-sidebar-search { position: sticky; top: 48px; z-index: 3; padding: 8px 12px; background: var(--bg-white); }
  .md-sidebar-search .input { padding: 6px 10px; }
  .cat-head { padding: 10px 12px; font-size: 13px; min-height: var(--touch-target); }
  .cat-item { padding: 10px 12px 10px 28px; font-size: 12px; }
  .finding-family-summary { padding: 9px 12px 9px 24px; font-size: 12px; }
  .finding-family .cat-item { padding-left: 40px; }

  .vuln-panel { padding: 16px; }
  .vuln-title { font-size: 16px; margin-bottom: 6px; }
  .vuln-section h4 { font-size: 14px; }
  .vuln-section p { font-size: 13px; }
  .vuln-section pre { padding: 10px; font-size: 11px; }
  .evidence-list > div { grid-template-columns: 1fr; gap: 4px; }

  .empty { padding: 40px 16px; }
  .scan-empty-state { padding: 40px 16px; }
  .scan-empty-spinner { width: 32px; height: 32px; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 22px; }
  .hero-subtitle { font-size: 14px; }
  .scan-status-text { font-size: 12px; }
  .scan-status-meta { font-size: 10px; }
  .vuln-title { font-size: 15px; }
  .donut-wrap { width: 64px; height: 64px; }
  .donut-val { font-size: 16px; }
}
