/* =====================================================
   ResQAI — Complete Stylesheet
   Palette: Deep black-navy (v1) + glowing accents
   Font: Inter — clean and readable throughout
   Blue: Darker than before (#1560c4)
   ===================================================== */

:root {
  /* ── Background layers ── */
  --bg:        #030810;
  --bg-card:   rgba(6, 15, 36, 0.82);
  --bg-input:  rgba(4, 12, 30, 0.9);
  --bg-item:   rgba(8, 20, 48, 0.65);

  /* ── Borders ── */
  --bdr:       rgba(0, 155, 255, 0.13);
  --bdr-hover: rgba(0, 155, 255, 0.35);

  /* ── Primary blue — darker ── */
  --blue:       #1560c4;
  --blue-mid:   #1e78e0;
  --blue-glow:  rgba(21, 96, 196, 0.38);
  --blue-dim:   rgba(21, 96, 196, 0.13);
  --cyan:       #00aaff;
  --cyan-dim:   rgba(0, 170, 255, 0.1);

  /* ── Status ── */
  --green:        #00e87a;
  --green-bg:     rgba(0, 232, 122, 0.08);
  --green-bdr:    rgba(0, 232, 122, 0.22);

  --yellow:       #f0c040;
  --yellow-bg:    rgba(240, 192, 64, 0.08);
  --yellow-bdr:   rgba(240, 192, 64, 0.22);

  --red:          #ff2d55;
  --red-bg:       rgba(255, 45, 85, 0.1);
  --red-bdr:      rgba(255, 45, 85, 0.28);

  /* ── Text ── */
  --t1: #e8f4ff;
  --t2: rgba(185, 215, 255, 0.62);
  --t3: rgba(150, 190, 235, 0.35);

  /* ── Shape / font ── */
  --r:   10px;
  --rl:  16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow: 0 8px 40px rgba(0,0,0,0.55);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Animated grid background ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,160,255,0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,160,255,0.038) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ── Ambient glow ── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(0, 80, 200, 0.15) 0%, transparent 68%),
    radial-gradient(ellipse 55% 60% at 90% 100%, rgba(0, 150, 255, 0.08) 0%, transparent 68%);
}

/* ── Pages ── */
.page { display: none; }
.page.active { display: block; position: relative; z-index: 1; min-height: 100vh; }

.hidden { display: none !important; }


/* ═══════════════════════════════════════════════
   ANIMATED HEX LOGO  (used in both auth + header)
═══════════════════════════════════════════════ */

.logo-anim {
  position: relative;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.logo-hex {
  width: 52px; height: 52px;
  color: var(--cyan);
  filter: drop-shadow(0 0 10px rgba(0,170,255,0.6));
  animation: hex-spin 10s linear infinite;
  display: block;
  flex-shrink: 0;
}

.logo-plus {
  position: absolute;
  font-size: 22px; font-weight: 900;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 8px rgba(0,170,255,0.9);
}

@keyframes hex-spin {
  0%   { transform: rotate(0deg);   filter: drop-shadow(0 0 10px rgba(0,170,255,0.6)); }
  50%  { filter: drop-shadow(0 0 18px rgba(0,170,255,1)); }
  100% { transform: rotate(360deg); filter: drop-shadow(0 0 10px rgba(0,170,255,0.6)); }
}


/* ═══════════════════════════════════════════════
   SVG ICON SIZES
═══════════════════════════════════════════════ */

.card-ico        { width: 16px; height: 16px; stroke: var(--cyan); fill: none; flex-shrink: 0; }
.danger-ico      { stroke: var(--red); }
.btn-ico         { width: 16px; height: 16px; stroke: currentColor; fill: none; flex-shrink: 0; }
.btn-ico-sm      { width: 14px; height: 14px; stroke: currentColor; fill: none; flex-shrink: 0; }
.disc-ico        { width: 15px; height: 15px; stroke: var(--yellow); fill: none; flex-shrink: 0; }
.banner-ico      { width: 17px; height: 17px; stroke: var(--cyan); fill: none; flex-shrink: 0; margin-top: 2px; }
.em-ico          { width: 24px; height: 24px; stroke: currentColor; fill: none; margin-bottom: 8px; }
.chip-ico        { width: 12px; height: 12px; stroke: currentColor; fill: none; flex-shrink: 0; }
.idle-ico-svg    { width: 32px; height: 32px; stroke: var(--t3); fill: none; opacity: 0.6; }
.overlay-icon-svg{ width: 42px; height: 42px; stroke: var(--red); fill: none; margin-bottom: 12px; }
.input-ico       { width: 16px; height: 16px; stroke: var(--t3); fill: none; flex-shrink: 0; }


/* ═══════════════════════════════════════════════
   AUTH PAGE (Login + Sign Up)
═══════════════════════════════════════════════ */

.auth-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.auth-container {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 20px; gap: 22px;
}

/* Auth logo / brand */
.auth-logo {
  display: flex; align-items: center; gap: 16px;
}
.auth-brand-wrap { line-height: 1.2; }
.auth-brand {
  font-family: 'Syne', var(--font);
  font-size: 30px; font-weight: 800;
  color: var(--t1); letter-spacing: -0.5px;
}
.auth-brand span { color: var(--cyan); }
.auth-tagline { font-size: 12px; color: var(--t3); letter-spacing: 0.6px; margin-top: 3px; }

/* Tabs */
.auth-tabs {
  display: flex; gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-radius: calc(var(--r) + 4px);
  padding: 5px;
  backdrop-filter: blur(20px);
  width: 100%; max-width: 430px;
}
.auth-tab {
  flex: 1; padding: 9px 14px;
  background: transparent; border: none; border-radius: var(--r);
  color: var(--t2); font-family: var(--font); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.auth-tab.active {
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: #fff; font-weight: 600;
  box-shadow: 0 2px 12px var(--blue-glow);
}
.auth-tab:hover:not(.active) { color: var(--t1); }

/* Auth card */
.auth-card {
  width: 100%; max-width: 430px;
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  padding: 34px 38px;
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow), 0 0 60px rgba(0,100,255,0.06);
  transition: border-color 0.3s;
}
.auth-card:focus-within { border-color: var(--bdr-hover); }

.auth-card-header { margin-bottom: 26px; }
.auth-card-header h1 { font-size: 22px; font-weight: 700; color: var(--t1); margin-bottom: 5px; }
.auth-card-header p  { font-size: 14px; color: var(--t2); }

/* Two-column row for first/last name */
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

/* Form groups */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--t2); margin-bottom: 7px;
}
.optional { font-weight: 400; color: var(--t3); font-size: 12px; }

/* Input wrap with icon */
.input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.input-wrap .input-ico {
  position: absolute; left: 12px;
  pointer-events: none;
}
.input-wrap input,
.input-wrap select {
  width: 100%; padding: 11px 14px 11px 38px;
  background: var(--bg-input);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  color: var(--t1);
  font-family: var(--font); font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none; -webkit-appearance: none;
}
.input-wrap input:focus,
.input-wrap select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,170,255,0.1);
}
.input-wrap input::placeholder { color: var(--t3); }
.input-wrap select { cursor: pointer; }
.input-wrap select option {
  background: #060f24; color: var(--t1);
}

/* Eye toggle button */
.eye-btn {
  position: absolute; right: 10px;
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--t3); transition: color 0.2s;
  display: flex; align-items: center;
}
.eye-btn:hover { color: var(--cyan); }
.eye-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }

/* Input with eye button — add right padding */
.input-wrap input[type="password"] { padding-right: 40px; }

/* Password strength */
.pw-strength-bar {
  height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.06);
  margin-top: 8px; overflow: hidden;
}
.pw-strength-fill {
  height: 100%; width: 0; border-radius: 2px;
  transition: width 0.35s ease, background 0.35s ease;
}
.pw-strength-label {
  font-size: 11px; font-weight: 600; margin-top: 5px;
  letter-spacing: 0.3px; min-height: 16px;
}

/* Terms row */
.terms-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 18px;
}
.terms-row input[type="checkbox"] {
  margin-top: 3px; flex-shrink: 0; accent-color: var(--cyan);
  width: 15px; height: 15px; cursor: pointer;
}
.terms-row label {
  font-size: 13px; color: var(--t2); line-height: 1.5; cursor: pointer;
}
.terms-link { color: var(--cyan); text-decoration: underline; cursor: pointer; }

/* Remember Me row */
.remember-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: -4px 0 20px;
}
.remember-label {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--t2);
  cursor: pointer; user-select: none;
}
.remember-label input[type="checkbox"] { display: none; }
.custom-check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--bdr-hover);
  background: var(--bg-input);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s;
}
.check-ico {
  width: 11px; height: 11px; opacity: 0;
  transition: opacity 0.2s;
  stroke: var(--cyan); fill: none;
}
.remember-label input:checked ~ .custom-check {
  background: var(--blue-dim);
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0,170,255,0.15);
}
.remember-label input:checked ~ .custom-check .check-ico { opacity: 1; }

.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--cyan); font-family: var(--font); font-size: 13px;
  font-weight: 500; padding: 0; text-decoration: none;
  transition: color 0.2s;
}
.link-btn:hover { color: #66ccff; }
.forgot-btn { font-size: 12px; color: var(--t3); }
.forgot-btn:hover { color: var(--t2); }

/* Form error */
.form-error {
  padding: 11px 14px; border-radius: 8px;
  background: var(--red-bg); border: 1px solid var(--red-bdr);
  color: var(--red); font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

/* Auth button */
.btn-auth {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  border: none; border-radius: var(--r); color: #fff;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  cursor: pointer; letter-spacing: 0.2px;
  box-shadow: 0 4px 20px var(--blue-glow);
  transition: all 0.25s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 16px;
}
.btn-auth:hover {
  background: linear-gradient(135deg, var(--blue-mid), var(--cyan));
  box-shadow: 0 6px 28px rgba(0,170,255,0.38);
  transform: translateY(-1px);
}
.btn-auth:active { transform: translateY(0); }

/* Auth switch hint */
.auth-switch-hint {
  text-align: center; font-size: 13px; color: var(--t3);
}

/* Auth footer */
.auth-footer {
  font-size: 12px; color: var(--t3); text-align: center; max-width: 400px;
  line-height: 1.5;
}


/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */

.header {
  position: sticky; top: 0; z-index: 100;
  height: 66px;
  padding: 0 28px;
  display: flex; align-items: center; gap: 20px;
  background: rgba(3, 8, 18, 0.93);
  border-bottom: 1px solid var(--bdr);
  backdrop-filter: blur(24px);
}

/* Header animated hex logo */
.header-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }

.header-logo-anim {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.h-hex {
  width: 36px; height: 36px;
  color: var(--cyan);
  filter: drop-shadow(0 0 7px rgba(0,170,255,0.55));
  animation: hex-spin 10s linear infinite;
  display: block;
}
.h-plus {
  position: absolute;
  font-size: 15px; font-weight: 900; color: #fff; line-height: 1;
  text-shadow: 0 0 6px rgba(0,170,255,0.8);
}

.header-brand-wrap { line-height: 1.2; }
.header-brand {
  font-family: 'Syne', var(--font);
  font-size: 20px; font-weight: 800; color: var(--t1);
}
.header-brand span { color: var(--cyan); }
.header-sub { font-size: 11px; color: var(--t3); letter-spacing: 0.3px; }

/* Status pill */
.header-center
.status-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 14px;
  background: var(--green-bg); border: 1px solid var(--green-bdr);
  border-radius: 20px; font-size: 12px; font-weight: 500; color: var(--green);
  white-space: nowrap;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.25} }

/* Profile section */
.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.profile-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 7px;
  background: rgba(0,160,255,0.07);
  border: 1px solid var(--bdr-hover);
  border-radius: 28px;
  transition: background 0.2s;
  cursor: default;
}
.profile-chip:hover { background: rgba(0,160,255,0.13); }

.profile-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
  box-shadow: 0 0 12px var(--blue-glow);
  flex-shrink: 0; text-transform: uppercase;
}

.profile-info { display: flex; flex-direction: column; line-height: 1.25; }
.profile-name {
  font-size: 13px; font-weight: 600; color: var(--t1);
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-role { font-size: 10px; color: var(--t3); letter-spacing: 0.3px; }

.btn-logout {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid rgba(255,45,85,0.22); border-radius: 8px;
  color: rgba(255,45,85,0.65);
  font-family: var(--font); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }


/* ═══════════════════════════════════════════════
   INFO BANNER
═══════════════════════════════════════════════ */

.info-banner {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 22px 28px 0;
  padding: 14px 18px;
  background: rgba(0,160,255,0.06);
  border: 1px solid rgba(0,160,255,0.16);
  border-radius: var(--r);
  font-size: 13.5px; color: var(--t2); line-height: 1.6;
  backdrop-filter: blur(8px);
}
.info-banner strong { color: var(--t1); }


/* ═══════════════════════════════════════════════
   MAIN GRID
═══════════════════════════════════════════════ */

.main-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; padding: 20px 28px;
  max-width: 1360px; margin: 0 auto;
}
.col { display: flex; flex-direction: column; gap: 20px; }


/* ═══════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  overflow: hidden;
  backdrop-filter: blur(24px);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  border-color: var(--bdr-hover);
  box-shadow: 0 0 30px rgba(0,140,255,0.06);
}

.card-danger { border-color: rgba(255,45,85,0.18); }
.card-danger:hover { border-color: rgba(255,45,85,0.4); box-shadow: 0 0 28px rgba(255,45,85,0.07); }

.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--bdr);
  background: rgba(0,160,255,0.03);
}
.card-head-title { font-size: 14px; font-weight: 700; color: var(--t1); flex: 1; }

.kill-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 9px; border-radius: 5px;
  background: var(--red-bg); border: 1px solid var(--red-bdr); color: var(--red);
}

.card-body { padding: 20px; }


/* ═══════════════════════════════════════════════
   INPUT AREA
═══════════════════════════════════════════════ */

.field-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--t2); margin-bottom: 10px;
}

textarea {
  width: 100%; padding: 13px 15px;
  background: var(--bg-input);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  color: var(--t1);
  font-family: var(--font); font-size: 14px; line-height: 1.65;
  resize: none; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,170,255,0.1);
}
textarea::placeholder { color: var(--t3); }

.char-count {
  font-size: 11px; color: var(--t3);
  text-align: right; margin-top: 6px; margin-bottom: 16px;
}

/* Example chips */
.examples-block { margin-bottom: 18px; }
.examples-label { font-size: 12px; font-weight: 600; color: var(--t3); margin-bottom: 8px; display: block; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 6px 13px;
  background: var(--bg-item);
  border: 1px solid var(--bdr);
  border-radius: 20px;
  color: var(--t2); font-family: var(--font); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.chip:hover {
  border-color: var(--cyan); color: #7dd3ff;
  background: var(--cyan-dim);
}

/* Buttons */
.btn-row { display: flex; gap: 10px; }

.btn-primary {
  flex: 1; padding: 13px 20px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  border: none; border-radius: var(--r); color: #fff;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.22s;
  box-shadow: 0 4px 16px var(--blue-glow);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-mid), var(--cyan));
  box-shadow: 0 6px 24px rgba(0,170,255,0.38);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: wait; transform: none; }

.btn-ghost {
  padding: 13px 18px;
  background: transparent; border: 1px solid var(--bdr-hover);
  border-radius: var(--r); color: var(--t2);
  font-family: var(--font); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.btn-ghost:hover { border-color: var(--t2); color: var(--t1); }


/* ═══════════════════════════════════════════════
   IDLE / EMPTY STATES
═══════════════════════════════════════════════ */

.idle-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 30px 16px; gap: 10px; text-align: center;
}
.idle-text {
  font-size: 13px; color: var(--t3); line-height: 1.65; max-width: 260px;
}
.idle-text strong { color: var(--t2); }


/* ═══════════════════════════════════════════════
   RISK RESULT DISPLAY
═══════════════════════════════════════════════ */

.risk-result {
  display: flex; align-items: center; gap: 20px; padding-bottom: 10px;
}

.risk-badge {
  padding: 14px 20px; border-radius: 12px;
  font-size: 17px; font-weight: 800; letter-spacing: 1px;
  flex-shrink: 0; text-align: center; min-width: 114px; line-height: 1.2;
}
.risk-badge.low    { background: var(--green-bg); border: 2px solid var(--green-bdr); color: var(--green); }
.risk-badge.medium { background: var(--yellow-bg); border: 2px solid var(--yellow-bdr); color: var(--yellow); }
.risk-badge.high   {
  background: var(--red-bg); border: 2px solid var(--red-bdr); color: var(--red);
  animation: high-pulse 1.6s ease-in-out infinite;
}
@keyframes high-pulse {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: 0 0 24px rgba(255,45,85,0.38); }
}

.risk-info { flex: 1; }
.risk-sup {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: var(--t3); text-transform: uppercase; margin-bottom: 4px;
}
.risk-title {
  font-size: 15px; font-weight: 700; color: var(--t1);
  line-height: 1.3; margin-bottom: 12px;
}

.risk-bars { display: flex; flex-direction: column; gap: 7px; }
.rbar {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; color: var(--t3);
}
.rbar span { width: 52px; text-align: right; }
.rbar-track { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.05); overflow: hidden; }
.rbar-fill { height: 100%; width: 0; border-radius: 3px; transition: width 0.85s cubic-bezier(.4,0,.2,1); }
.rbar-fill.g { background: var(--green); box-shadow: 0 0 6px rgba(0,232,122,0.5); }
.rbar-fill.y { background: var(--yellow); box-shadow: 0 0 6px rgba(240,192,64,0.5); }
.rbar-fill.r { background: var(--red);    box-shadow: 0 0 6px rgba(255,45,85,0.5); }


/* ═══════════════════════════════════════════════
   DETECTION RESULT ROWS
═══════════════════════════════════════════════ */

.det-grid { display: flex; flex-direction: column; gap: 12px; }

.det-row {
  padding: 13px 15px;
  background: var(--bg-item); border: 1px solid var(--bdr); border-radius: var(--r);
  backdrop-filter: blur(6px);
}
.det-lbl {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: var(--t3); text-transform: uppercase; margin-bottom: 4px;
}
.det-val { font-size: 14px; font-weight: 600; color: var(--t1); line-height: 1.4; }

.lvl-tag {
  display: inline-block; padding: 4px 12px; border-radius: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
}
.lvl-tag.low    { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-bdr); }
.lvl-tag.medium { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow-bdr); }
.lvl-tag.high   { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-bdr); }


/* ═══════════════════════════════════════════════
   FIRST AID STEPS
═══════════════════════════════════════════════ */

.steps-list { display: flex; flex-direction: column; gap: 10px; }

.step-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--bg-item); border: 1px solid var(--bdr); border-radius: var(--r);
  backdrop-filter: blur(6px);
  animation: slide-up 0.35s ease forwards; opacity: 0;
  transition: border-color 0.2s;
}
.step-row:hover { border-color: var(--bdr-hover); }
@keyframes slide-up { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

.step-num {
  width: 26px; height: 26px; flex-shrink: 0;
  background: var(--blue-dim); border: 1px solid rgba(0,170,255,0.22); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--cyan);
}
.step-text { font-size: 13px; font-weight: 500; color: var(--t1); line-height: 1.55; }

.action-box {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--r);
  border-left: 4px solid var(--cyan); background: var(--cyan-dim);
}
.action-box.low    { border-left-color: var(--green); background: var(--green-bg); }
.action-box.medium { border-left-color: var(--yellow); background: var(--yellow-bg); }
.action-box.high   { border-left-color: var(--red); background: var(--red-bg); }
.action-lbl { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--t3); text-transform: uppercase; margin-bottom: 5px; }
.action-txt { font-size: 14px; font-weight: 600; color: var(--t1); line-height: 1.4; }


/* ═══════════════════════════════════════════════
   EMERGENCY CARD
═══════════════════════════════════════════════ */

.danger-desc { font-size: 13px; color: var(--t2); line-height: 1.65; margin-bottom: 16px; }

.btn-danger {
  width: 100%; padding: 14px;
  background: var(--red-bg); border: 1px solid var(--red-bdr); border-radius: var(--r);
  color: var(--red);
  font-family: var(--font); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-danger:hover {
  background: rgba(255,45,85,0.18); border-color: var(--red);
  box-shadow: 0 0 22px rgba(255,45,85,0.2); transform: translateY(-1px);
}
.btn-danger:active { transform: translateY(0); }

.override-inline {
  margin-top: 12px; padding: 11px 14px;
  background: var(--red-bg); border: 1px solid var(--red-bdr); border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--red); text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}


/* ═══════════════════════════════════════════════
   DISCLAIMER
═══════════════════════════════════════════════ */

.disclaimer {
  margin: 0 28px 28px;
  padding: 13px 18px;
  background: var(--yellow-bg); border: 1px solid var(--yellow-bdr); border-radius: var(--r);
  font-size: 13px; color: rgba(240,192,64,0.72); line-height: 1.6;
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; gap: 10px;
}
.disclaimer strong { color: var(--yellow); }


/* ═══════════════════════════════════════════════
   OVERRIDE OVERLAY
═══════════════════════════════════════════════ */

.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(3,8,16,0.9);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  animation: fade-in 0.25s ease;
}
@keyframes fade-in { from { opacity:0; } }

.overlay-box {
  width: 90%; max-width: 500px;
  background: rgba(5,13,32,0.97);
  border: 1px solid rgba(255,45,85,0.36); border-radius: var(--rl);
  box-shadow: 0 0 70px rgba(255,45,85,0.14), 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden;
  animation: pop-in 0.32s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop-in { from { transform:scale(0.88); opacity:0; } }

.overlay-top {
  padding: 28px 28px 20px; text-align: center;
  border-bottom: 1px solid var(--bdr);
  background: var(--red-bg);
  display: flex; flex-direction: column; align-items: center;
}
.overlay-top h2 { font-size: 20px; font-weight: 800; color: var(--red); margin-bottom: 6px; }
.overlay-top p  { font-size: 14px; color: var(--t2); }

.overlay-numbers {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; padding: 24px;
}
.em-card {
  padding: 16px; text-align: center;
  background: var(--bg-item); border: 1px solid var(--bdr); border-radius: var(--r);
  transition: border-color 0.2s;
  display: flex; flex-direction: column; align-items: center;
}
.em-card:hover { border-color: var(--bdr-hover); }
.em-card.red { border-color: var(--red-bdr); background: var(--red-bg); }
.em-label { font-size: 11px; font-weight: 600; color: var(--t3); margin-bottom: 4px; }
.em-num { font-size: 28px; font-weight: 800; color: var(--t1); }
.em-card.red .em-num { color: var(--red); }

.btn-dismiss {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 48px); margin: 0 24px 24px;
  padding: 13px; background: transparent;
  border: 1px solid var(--bdr-hover); border-radius: var(--r);
  color: var(--t2); font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-dismiss:hover { border-color: var(--t1); color: var(--t1); }


/* ═══════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════ */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bdr-hover); border-radius: 3px; }


/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

@media (max-width: 880px) {
  .main-grid { grid-template-columns: 1fr; }
  .header-center { display: none; }
  .info-banner, .main-grid, .disclaimer { margin-left: 14px; margin-right: 14px; }
  .header { padding: 0 16px; }
  .profile-info { display: none; }
  .auth-card { padding: 26px 22px; }
  .auth-logo { gap: 12px; }
}

@media (max-width: 480px) {
  .header { gap: 10px; }
  .header-brand { font-size: 17px; }
  .profile-chip { padding: 5px 10px 5px 6px; }
  .profile-avatar { width: 28px; height: 28px; font-size: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .remember-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}