/* ===== Dashboard Layout ===== */
.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 64px 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
  min-height: 100vh;
}

/* Site Switcher */
.site-switcher {
  padding: 8px 36px 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238892a4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.site-switcher:hover { border-color: var(--primary); }
.site-switcher:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }

/* Header */
.dash-header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(6,8,13,.9);
  backdrop-filter: blur(12px);
  z-index: 50;
}
.dash-header__left { display: flex; align-items: center; gap: 20px; }
.dash-header__logo { font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.dash-header__menu { display: none; background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.4rem; padding: 4px; }
.dash-header__right { display: flex; align-items: center; gap: 16px; }
.dash-header__notif {
  position: relative; background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1.2rem; padding: 6px; border-radius: 8px; transition: .2s;
}
.dash-header__notif:hover { background: var(--bg-card); color: var(--text); }
.notif-badge {
  position: absolute; top: 2px; right: 2px; width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%;
}
.dash-header__user {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px;
  border-radius: 10px; cursor: pointer; transition: .2s;
}
.dash-header__user:hover { background: var(--bg-card); }

/* Balance Widget */
.balance-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: .2s;
}
.balance-widget:hover {
  border-color: var(--primary);
}
.balance-label {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.balance-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--success);
  min-width: 60px;
}
.balance-checks {
  font-size: .75rem;
  color: var(--text-muted);
  padding: 2px 8px;
  background: rgba(99,102,241,.08);
  border-radius: 50px;
}
.btn--sm {
  padding: 6px 14px;
  font-size: .8rem;
}
.dash-header__avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--gradient); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: .85rem; color: #fff;
}
.dash-header__name { font-size: .9rem; font-weight: 500; }

/* Sidebar */
.dash-sidebar {
  grid-area: sidebar;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.dash-sidebar__section { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); padding: 16px 12px 8px; font-weight: 600; }
.dash-nav__link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; font-size: .9rem; color: var(--text-muted);
  transition: .2s; cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; font-family: inherit;
}
.dash-nav__link:hover { background: rgba(99,102,241,.08); color: var(--text); }
.dash-nav__link.active { background: rgba(99,102,241,.15); color: var(--primary-light); font-weight: 600; }
.dash-nav__icon { font-size: 1.15rem; width: 24px; text-align: center; }
.dash-nav__badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: .7rem; padding: 2px 8px; border-radius: 50px; font-weight: 600;
}
.dash-sidebar__bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }

/* Main */
.dash-main {
  grid-area: main;
  padding: 32px;
  overflow-y: auto;
  background: var(--bg);
}

/* ===== Tab Panels ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== KPI Cards ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.kpi-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: .3s;
}
.kpi-card:hover { border-color: var(--primary); }
.kpi-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kpi-card__icon { font-size: 1.5rem; }
.kpi-card__change { font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 50px; }
.kpi-card__change.up { background: rgba(34,197,94,.12); color: var(--success); }
.kpi-card__change.down { background: rgba(239,68,68,.12); color: var(--danger); }
.kpi-card__value { font-size: 2rem; font-weight: 900; margin-bottom: 4px; }
.kpi-card__label { font-size: .85rem; color: var(--text-muted); }

/* ===== Chart ===== */
.chart-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 24px; position: relative;
}
.chart-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.chart-card__title { font-size: 1rem; font-weight: 700; }
.chart-tabs { display: flex; gap: 4px; }
.chart-tab {
  padding: 6px 14px; border-radius: 8px; font-size: .8rem; font-weight: 500;
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-family: inherit; transition: .2s;
}
.chart-tab.active { background: var(--primary); color: #fff; }
.chart-bar-row { display: flex; gap: 3px; height: 120px; align-items: flex-end; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart-bar-fill { width: 100%; border-radius: 4px 4px 0 0; background: var(--gradient); min-height: 4px; transition: height .5s ease; opacity: .7; }
.chart-bar-fill:hover { opacity: 1; }
.chart-bar-label { font-size: .65rem; color: var(--text-muted); }

/* ===== Two Column ===== */
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; margin-bottom: 24px; }

/* ===== Table ===== */
.table-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 24px;
}
.table-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.table-card__title { font-size: 1rem; font-weight: 700; }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
  text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border); font-weight: 600;
}
.dash-table td { padding: 12px; font-size: .85rem; border-bottom: 1px solid var(--border); }
.dash-table tr:last-child td { border: none; }
.dash-table tr:hover td { background: rgba(99,102,241,.04); }
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 50px; font-size: .75rem; font-weight: 600;
}
.status--blocked { background: rgba(239,68,68,.12); color: var(--danger); }
.status--allowed { background: rgba(34,197,94,.12); color: var(--success); }
.status--pending { background: rgba(234,179,8,.12); color: #eab308; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status--blocked .status-dot { background: var(--danger); }
.status--allowed .status-dot { background: var(--success); }
.status--pending .status-dot { background: #eab308; }

/* ===== Donut Chart ===== */
.donut-wrap { display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.donut {
  width: 160px; height: 160px; border-radius: 50%;
  background: conic-gradient(
    var(--danger) 0% 45%,
    var(--primary) 45% 70%,
    var(--accent) 70% 85%,
    #eab308 85% 95%,
    var(--success) 95% 100%
  );
  position: relative;
}
.donut::after {
  content: ''; position: absolute; inset: 30px;
  background: var(--bg-card); border-radius: 50%;
}
.donut-legend { display: flex; flex-direction: column; gap: 8px; margin-left: 24px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* ===== Sites Grid ===== */
.sites-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.sites-header h2 { font-size: 1.5rem; font-weight: 800; }
.sites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.site-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: .3s;
}
.site-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.site-card__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.site-card__domain { font-size: 1.1rem; font-weight: 700; }
.site-card__status { font-size: .75rem; padding: 4px 10px; border-radius: 50px; font-weight: 600; }
.site-card__status--active { background: rgba(34,197,94,.12); color: var(--success); }
.site-card__status--inactive { background: rgba(136,146,164,.12); color: var(--text-muted); }
.site-card__stats { display: flex; gap: 20px; margin-bottom: 16px; }
.site-stat { font-size: .8rem; }
.site-stat strong { display: block; font-size: 1.1rem; font-weight: 800; }
.site-stat span { color: var(--text-muted); }
.site-card__actions { display: flex; gap: 8px; }
.site-card__actions .btn { padding: 8px 14px; font-size: .8rem; }

/* ===== Filters ===== */
.filters-section { margin-bottom: 28px; }
.filters-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filter-chip {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  border-radius: 50px; border: 1px solid var(--border); background: var(--bg-card);
  font-size: .85rem; color: var(--text-muted); cursor: pointer; transition: .2s;
}
.filter-chip:hover { border-color: var(--primary); }
.filter-chip.active { background: rgba(99,102,241,.15); border-color: var(--primary); color: var(--primary-light); }
.filter-chip input { display: none; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.filter-input {
  width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: .9rem; font-family: inherit;
  outline: none; transition: .2s;
}
.filter-input:focus { border-color: var(--primary); }
.filter-input::placeholder { color: #4a5568; }
.filter-actions { display: flex; gap: 12px; margin-top: 24px; }

/* Toggle label & description */
.toggle-label {
  font-size: .9rem; font-weight: 600; color: var(--text); margin-bottom: 4px; display: block;
}
.filter-description {
  font-size: .8rem; color: var(--text-muted); margin-top: 6px; margin-bottom: 0;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: .2s;
}
.info-card:hover {
  border-color: var(--primary);
}
.info-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,.08);
  border-radius: 10px;
}
.info-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.info-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Blacklist textarea */
.blacklist-textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  font-family: monospace;
  font-size: .85rem;
}

/* Blacklist tags */
.blacklist-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.blacklist-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 6px;
  font-size: .8rem;
  font-family: monospace;
  color: var(--danger);
}
.blacklist-tag button {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
}
.blacklist-tag button:hover {
  opacity: .7;
}

/* IP stats in modal */
.ip-stat-card {
  text-align: center;
  padding: 16px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.ip-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
}
.ip-stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Danger button */
.btn--danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}
.btn--danger:hover {
  opacity: .9;
}

/* ===== Settings ===== */
.settings-grid { display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; }
.settings-nav__link {
  padding: 10px 14px; border-radius: 10px; font-size: .9rem; color: var(--text-muted);
  cursor: pointer; transition: .2s; border: none; background: none; text-align: left;
  font-family: inherit;
}
.settings-nav__link:hover { background: var(--bg-card); color: var(--text); }
.settings-nav__link.active { background: rgba(99,102,241,.15); color: var(--primary-light); font-weight: 600; }
.settings-panel { display: none; }
.settings-panel.active { display: block; animation: fadeIn .3s ease; }
.settings-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-bottom: 20px;
}
.settings-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }
.settings-form { display: flex; flex-direction: column; gap: 16px; }
.settings-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-form label { font-size: .85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; display: block; }
.settings-form input, .settings-form select {
  width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: .9rem; font-family: inherit;
  outline: none; transition: .2s;
}
.settings-form input:focus, .settings-form select:focus { border-color: var(--primary); }
.toggle-wrap { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.toggle-wrap:last-child { border: none; }
.toggle-label { font-size: .9rem; }
.toggle-sub { font-size: .8rem; color: var(--text-muted); }
.toggle {
  width: 44px; height: 24px; border-radius: 12px; background: var(--border);
  position: relative; cursor: pointer; transition: .3s; border: none;
}
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: .3s;
}
.toggle.on { background: var(--primary); }
.toggle.on::after { left: 23px; }
.api-key-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.api-key-row:last-child { border: none; }
.api-key { font-family: monospace; font-size: .85rem; color: var(--text-muted); background: var(--bg); padding: 6px 12px; border-radius: 6px; flex: 1; }
.plan-badge {
  display: inline-flex; padding: 6px 16px; border-radius: 8px; font-size: .85rem;
  font-weight: 600; margin-bottom: 16px;
}
.plan-badge--pro { background: rgba(99,102,241,.15); color: var(--primary-light); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  z-index: 200; display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; width: 100%; max-width: 480px; animation: modalIn .3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal__header h3 { font-size: 1.2rem; font-weight: 700; }
.modal__close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.3rem; padding: 4px; }
.modal__close:hover { color: var(--text); }
.modal .form-group { margin-bottom: 16px; }
.modal .form-group label { font-size: .85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; display: block; }
.modal .form-group input {
  width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: .9rem; font-family: inherit;
  outline: none; transition: .2s;
}
.modal .form-group input:focus { border-color: var(--primary); }
.modal__footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* Script Status Alert */
#scriptStatus .chart-card {
  border-color: #eab308;
  background: rgba(234,179,8,.04);
}

/* Chart Tooltip */
.chart-tooltip {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: .8rem;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.chart-tooltip::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--primary);
}
.chart-tooltip.visible {
  opacity: 1;
}
.chart-tooltip__time {
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--primary-light);
}
.chart-tooltip__value {
  font-size: 1rem;
  font-weight: 800;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 1024px) {
  .dashboard { grid-template-columns: 1fr; grid-template-areas: "header" "main"; }
  .dash-sidebar { display: none; }
  .dash-sidebar.open {
    display: flex; position: fixed; top: 64px; left: 0; bottom: 0;
    width: 260px; z-index: 60; box-shadow: var(--shadow);
  }
  .dash-header__menu { display: block; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .filter-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .dash-main { padding: 20px 16px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .sites-grid { grid-template-columns: 1fr; }
  .settings-form .form-row { grid-template-columns: 1fr; }
  .dash-header__name { display: none; }
}

/* ============================================
   VULNERABILITY SCANNER
   ============================================ */

/* Score display */
.vuln-score-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  margin: 0 auto 16px;
  position: relative;
}

.vuln-score-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid var(--border);
}

.vuln-score-ring--good {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 4px solid var(--success);
}

.vuln-score-ring--warning {
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
  border: 4px solid #eab308;
}

.vuln-score-ring--danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 4px solid var(--danger);
}

/* Severity badges */
.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.severity-badge--critical {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.severity-badge--high {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

.severity-badge--medium {
  background: rgba(234, 179, 8, 0.12);
  color: #eab308;
}

.severity-badge--low {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.severity-badge--info {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}

/* Vulnerability card */
.vuln-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.vuln-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.08);
}

.vuln-card--critical {
  border-left: 4px solid #ef4444;
}

.vuln-card--high {
  border-left: 4px solid #f97316;
}

.vuln-card--medium {
  border-left: 4px solid #eab308;
}

.vuln-card--low {
  border-left: 4px solid #22c55e;
}

.vuln-card--safe {
  opacity: 0.6;
}

.vuln-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.vuln-card__title {
  font-size: 0.9rem;
  font-weight: 700;
}

.vuln-card__body {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.vuln-card__evidence {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  font-family: monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 100px;
  overflow-y: auto;
}

.vuln-card__remediation {
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  font-size: 0.85rem;
}

.vuln-card__remediation::before {
  content: '💡 ';
}

/* Category filter */
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Scan history item */
.scan-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.scan-history-item:hover {
  border-color: var(--primary-light);
}

.scan-history-item__date {
  font-size: 0.85rem;
  font-weight: 600;
}

.scan-history-item__url {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.scan-history-item__score {
  font-size: 1.2rem;
  font-weight: 900;
}

/* Progress animation */
@keyframes scan-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.scan-running {
  animation: scan-pulse 1.5s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
  .vuln-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .scan-history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ===== Tariffs Page ===== */
.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tariff-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: .3s;
  position: relative;
  overflow: hidden;
}

.tariff-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99,102,241,.12);
}

.tariff-card--popular {
  border-color: var(--primary);
}

.tariff-card--popular::before {
  content: 'Популярный';
  position: absolute;
  top: 16px;
  right: -32px;
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 40px;
  transform: rotate(45deg);
}

.tariff-card--current {
  border-color: var(--success);
  background: rgba(34,197,94,.03);
}

.tariff-card--current::before {
  content: 'Ваш текущий';
  position: absolute;
  top: 16px;
  right: -32px;
  background: var(--success);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 40px;
  transform: rotate(45deg);
}

.tariff-card__header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tariff-card__icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.tariff-card__name {
  font-size: 1.3rem;
  font-weight: 800;
}

.tariff-card__price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
}

.tariff-card__price span {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.tariff-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.tariff-card__features li {
  padding: 8px 0;
  font-size: .85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tariff-card__features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

.tariff-card__cta {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  border: 2px solid var(--primary);
  background: none;
  color: var(--primary);
  font-family: inherit;
}

.tariff-card__cta:hover {
  background: var(--primary);
  color: #fff;
}

.tariff-card--current .tariff-card__cta {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  cursor: default;
}

.tariff-card__cta--primary {
  background: var(--primary);
  color: #fff;
}

.tariff-card__cta--primary:hover {
  background: transparent;
  color: var(--primary);
}

/* ============================================================
   DNS Shield — site cards and status badges
   ============================================================ */

.dns-site-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.dns-site-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-inactive {
  background: rgba(234, 179, 8, 0.1);
  color: var(--warning);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-available {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.status-unavailable {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(156, 163, 175, 0.3);
}
