/**
 * CyberGuard Pro — Stylesheet
 * Dark cybersecurity theme with professional design
 */

/* ============ VARIABLES ============ */
:root {
  --bg: #060a10;
  --bg2: #0c1220;
  --bg3: #121d30;
  --bg4: #182640;
  --cyan: #00e5ff;
  --red: #ff2d55;
  --green: #00e676;
  --orange: #ff9100;
  --purple: #b388ff;
  --yellow: #ffd740;
  --txt: #e4eaf6;
  --txt2: #8a9bbf;
  --txt3: #4a5c80;
  --brd: #1c2b48;
  --r: 12px;
  --rl: 18px;
  --font: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --head: 'Outfit', 'DM Sans', sans-serif;
}

/* ============ BASE ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--txt); line-height: 1.75; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; transition: .25s; }
a:hover { opacity: .85; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 3px; }

/* Scanline overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,229,255,.01) 3px, rgba(0,229,255,.01) 4px);
  pointer-events: none;
  z-index: 99999;
}

/* ============ LAYOUT ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.page-content { padding-top: 100px; padding-bottom: 4rem; min-height: 100vh; }
.section { margin-top: 4rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-desc { color: var(--txt2); max-width: 600px; margin: 0 auto; }

/* ============ GRID ============ */
.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ============ NAVBAR ============ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(6,10,16,.92);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--brd);
  z-index: 5000;
  padding: 0 1.5rem;
  transition: .3s;
}
.navbar.scrolled { box-shadow: 0 2px 40px rgba(0,229,255,.08); }
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-weight: 700; font-size: 1rem;
  color: var(--cyan); cursor: pointer;
}
.nav-logo i { font-size: 1.2rem; }
.nav-pro {
  font-size: .55rem; background: var(--cyan); color: var(--bg);
  padding: 1px 6px; border-radius: 4px; font-weight: 700;
  letter-spacing: 1px; margin-left: 2px;
}
.nav-links { display: flex; gap: .1rem; list-style: none; flex-wrap: wrap; }
.nav-links li span {
  color: var(--txt2); padding: .35rem .55rem; border-radius: 8px;
  font-size: .73rem; font-weight: 500; transition: .25s;
  cursor: pointer; white-space: nowrap; display: inline-flex;
  align-items: center; gap: 4px;
}
.nav-links li span i { font-size: .65rem; }
.nav-links li span:hover, .nav-links li span.active {
  color: var(--cyan); background: rgba(0,229,255,.07);
}
.nav-ham {
  display: none; background: none; border: none;
  color: var(--cyan); font-size: 1.4rem; cursor: pointer;
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 5rem 2rem 3rem;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(0,229,255,.07), transparent),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(255,45,85,.05), transparent),
    radial-gradient(ellipse 40% 35% at 15% 70%, rgba(179,136,255,.04), transparent);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,229,255,.03) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(0,229,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 50%, black, transparent);
}
.hero-content { position: relative; z-index: 2; max-width: 880px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,45,85,.1); border: 1px solid rgba(255,45,85,.25);
  color: var(--red); padding: .4rem 1.1rem; border-radius: 50px;
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  margin-bottom: 1.6rem; animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,45,85,.3); } 50% { box-shadow: 0 0 0 10px rgba(255,45,85,0); } }
.hero h1 {
  font-family: var(--head); font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800; line-height: 1.1; margin-bottom: 1.2rem;
}
.gradient-cyan { background: linear-gradient(135deg, var(--cyan), var(--green)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-red { background: linear-gradient(135deg, var(--red), var(--orange)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 1.02rem; color: var(--txt2); max-width: 620px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; justify-content: center; gap: 2.5rem;
  margin-top: 3rem; padding-top: 2.2rem; border-top: 1px solid var(--brd);
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; color: var(--cyan); }
.stat-label { font-size: .75rem; color: var(--txt3); margin-top: 2px; }

/* ============ PAGE HEADER ============ */
.page-header { text-align: center; margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--brd); }
.page-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  padding: .3rem .9rem; border-radius: 50px; margin-bottom: .8rem;
}
.tag-red { background: rgba(255,45,85,.1); color: var(--red); border: 1px solid rgba(255,45,85,.2); }
.tag-cyan { background: rgba(0,229,255,.1); color: var(--cyan); border: 1px solid rgba(0,229,255,.2); }
.tag-green { background: rgba(0,230,118,.1); color: var(--green); border: 1px solid rgba(0,230,118,.2); }
.tag-orange { background: rgba(255,145,0,.1); color: var(--orange); border: 1px solid rgba(255,145,0,.2); }
.tag-purple { background: rgba(179,136,255,.1); color: var(--purple); border: 1px solid rgba(179,136,255,.2); }
.tag-yellow { background: rgba(255,215,64,.1); color: var(--yellow); border: 1px solid rgba(255,215,64,.2); }
.page-title { font-family: var(--head); font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 800; line-height: 1.15; margin-bottom: .6rem; }
.page-desc { color: var(--txt2); font-size: 1rem; max-width: 680px; margin: 0 auto; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: .7rem 1.6rem; border-radius: 50px;
  font-weight: 600; font-size: .9rem; font-family: var(--font);
  text-decoration: none; border: none; cursor: pointer; transition: .3s;
}
.btn-primary { background: linear-gradient(135deg, var(--cyan), #0090ff); color: var(--bg); box-shadow: 0 4px 18px rgba(0,229,255,.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,229,255,.4); color: var(--bg); }
.btn-outline { background: transparent; color: var(--txt); border: 1px solid var(--brd); }
.btn-outline:hover { border-color: var(--cyan); background: rgba(0,229,255,.05); color: var(--txt); }
.btn-danger { background: linear-gradient(135deg, var(--red), #cc0033); color: #fff; }
.btn-sm { padding: .45rem 1rem; font-size: .8rem; }

/* ============ ALERTS ============ */
.alert {
  border-radius: var(--rl); padding: 1.5rem 1.7rem;
  display: flex; align-items: flex-start; gap: 1.1rem;
  margin-bottom: 2rem;
}
.alert i:first-child { font-size: 1.5rem; flex-shrink: 0; margin-top: .15rem; }
.alert h4 { font-family: var(--head); margin-bottom: .2rem; font-size: 1rem; }
.alert p { font-size: .88rem; color: var(--txt2); line-height: 1.65; }
.alert-danger { background: linear-gradient(135deg, rgba(255,45,85,.1), rgba(255,45,85,.03)); border: 1px solid rgba(255,45,85,.2); }
.alert-danger i:first-child, .alert-danger h4 { color: var(--red); }
.alert-info { background: linear-gradient(135deg, rgba(0,229,255,.08), rgba(0,229,255,.03)); border: 1px solid rgba(0,229,255,.2); }
.alert-info i:first-child, .alert-info h4 { color: var(--cyan); }
.alert-success { background: linear-gradient(135deg, rgba(0,230,118,.08), rgba(0,230,118,.03)); border: 1px solid rgba(0,230,118,.2); }
.alert-success i:first-child, .alert-success h4 { color: var(--green); }
.alert-warning { background: linear-gradient(135deg, rgba(255,145,0,.08), rgba(255,145,0,.03)); border: 1px solid rgba(255,145,0,.2); }
.alert-warning i:first-child, .alert-warning h4 { color: var(--orange); }

/* ============ CARDS ============ */
.card {
  background: var(--bg3); border: 1px solid var(--brd);
  border-radius: var(--rl); padding: 1.7rem;
  transition: .35s; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  opacity: 0; transition: .3s;
}
.card:hover { border-color: rgba(0,229,255,.25); transform: translateY(-3px); box-shadow: 0 10px 35px rgba(0,0,0,.3); }
.card:hover::before { opacity: 1; }
.card h3 { font-family: var(--head); font-size: 1.05rem; margin-bottom: .4rem; }
.card p { color: var(--txt2); font-size: .87rem; line-height: 1.6; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; margin-bottom: 1rem;
}
.icon-red { background: rgba(255,45,85,.12); color: var(--red); }
.icon-cyan { background: rgba(0,229,255,.12); color: var(--cyan); }
.icon-green { background: rgba(0,230,118,.12); color: var(--green); }
.icon-orange { background: rgba(255,145,0,.12); color: var(--orange); }
.icon-purple { background: rgba(179,136,255,.12); color: var(--purple); }
.icon-yellow { background: rgba(255,215,64,.12); color: var(--yellow); }
.card-more { color: var(--cyan); font-size: .8rem; margin-top: .5rem; display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }

/* Sign card specific */
.sign-card { cursor: pointer; }
.sign-meta { display: flex; align-items: center; justify-content: space-between; margin-top: .8rem; flex-wrap: wrap; gap: .5rem; }
.sign-weight { font-family: var(--mono); font-size: .7rem; }
.weight-dots .dot-filled { color: var(--red); }
.weight-dots .dot-empty { color: var(--txt3); opacity: .4; }
.badge-level { font-family: var(--mono); font-size: .6rem; padding: 2px 9px; border-radius: 50px; font-weight: 600; }
.badge-beginner { background: rgba(0,230,118,.1); color: var(--green); }
.badge-intermediate { background: rgba(255,145,0,.1); color: var(--orange); }
.badge-expert { background: rgba(255,45,85,.1); color: var(--red); }

/* ============ LEVEL FILTER ============ */
.level-bar { display: flex; justify-content: center; gap: .4rem; margin-bottom: 2rem; flex-wrap: wrap; }
.lbtn {
  padding: .45rem 1.1rem; border-radius: 50px; border: 1px solid var(--brd);
  background: transparent; color: var(--txt2); font-family: var(--font);
  font-weight: 600; font-size: .82rem; cursor: pointer; transition: .25s;
  display: flex; align-items: center; gap: 5px;
}
.lbtn:hover { border-color: var(--cyan); color: var(--cyan); }
.lbtn.active { background: rgba(0,229,255,.1); border-color: var(--cyan); color: var(--cyan); }

/* ============ NAV GRID (home) ============ */
.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.nav-card {
  display: flex; align-items: center; gap: 1.1rem;
  background: var(--bg3); border: 1px solid var(--brd);
  border-radius: var(--rl); padding: 1.2rem 1.4rem;
  cursor: pointer; transition: .3s; text-decoration: none;
}
.nav-card:hover { border-color: rgba(0,229,255,.3); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.3); }
.nav-card .card-icon { margin-bottom: 0; flex-shrink: 0; }
.nav-card h4 { font-family: var(--head); font-size: .92rem; margin-bottom: .1rem; color: var(--txt); }
.nav-card p { font-size: .75rem; color: var(--txt2); line-height: 1.4; }

/* ============ THREAT HIERARCHY ============ */
.threat-hierarchy { max-width: 850px; margin: 0 auto; }
.threat-row { display: flex; gap: 1.2rem; margin-bottom: 1rem; align-items: flex-start; }
.threat-level {
  flex-shrink: 0; width: 130px; font-family: var(--mono); font-size: .72rem;
  font-weight: 700; padding: .5rem .8rem; border-radius: var(--r);
  text-align: center; text-transform: uppercase; letter-spacing: 1px;
}
.threat-red { background: rgba(255,45,85,.15); color: var(--red); border: 1px solid rgba(255,45,85,.3); }
.threat-orange { background: rgba(255,145,0,.12); color: var(--orange); border: 1px solid rgba(255,145,0,.2); }
.threat-yellow { background: rgba(255,215,64,.1); color: var(--yellow); border: 1px solid rgba(255,215,64,.2); }
.threat-purple { background: rgba(179,136,255,.1); color: var(--purple); border: 1px solid rgba(179,136,255,.2); }
.threat-content { flex: 1; }
.threat-content ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.threat-content li { font-size: .82rem; color: var(--txt); background: var(--bg3); padding: .25rem .7rem; border-radius: 6px; border: 1px solid var(--brd); }
.threat-advice { font-size: .8rem; color: var(--txt3); font-style: italic; }

/* ============ TIMELINE (Attacks) ============ */
.timeline { position: relative; max-width: 850px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 28px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--red), var(--purple), var(--cyan)); }
.timeline-item { position: relative; padding-left: 72px; margin-bottom: 2rem; }
.tl-num {
  position: absolute; left: 8px; top: 0; width: 40px; height: 40px;
  background: var(--bg3); border: 2px solid var(--red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: .8rem; color: var(--red); z-index: 2;
}
.tl-card {
  background: var(--bg3); border: 1px solid var(--brd); border-radius: var(--r);
  padding: 1.3rem 1.6rem; transition: .3s; cursor: pointer;
}
.tl-card:hover { border-color: rgba(255,45,85,.25); box-shadow: 0 5px 25px rgba(0,0,0,.2); }
.tl-card h4 { font-family: var(--head); color: var(--red); margin-bottom: .3rem; font-size: 1.02rem; }
.tl-card p { color: var(--txt2); font-size: .86rem; }
.tl-meta { display: flex; align-items: center; justify-content: space-between; margin-top: .6rem; flex-wrap: wrap; gap: .4rem; }
.tl-tag { font-family: var(--mono); font-size: .6rem; padding: 2px 9px; border-radius: 50px; background: rgba(255,45,85,.1); color: var(--red); border: 1px solid rgba(255,45,85,.2); }
.tl-prob { font-family: var(--mono); font-size: .7rem; }
.prob-dots .dot-filled { color: var(--red); }
.prob-dots .dot-empty { color: var(--txt3); opacity: .3; }

/* ============ DIAGNOSTIC ============ */
.diag-box {
  background: var(--bg3); border: 1px solid var(--brd);
  border-radius: var(--rl); padding: 2rem; text-align: center; margin-bottom: 1.5rem;
}
.diag-box h3 { font-family: var(--head); font-size: 1.2rem; margin-bottom: .3rem; }
.diag-box p { color: var(--txt2); margin-bottom: 1.3rem; }
.device-buttons { display: flex; justify-content: center; gap: .7rem; flex-wrap: wrap; }
.device-btn {
  padding: .6rem 1.2rem; border-radius: var(--r);
  border: 1px solid var(--brd); background: var(--bg2);
  color: var(--txt2); font-family: var(--font); font-weight: 600;
  cursor: pointer; transition: .3s; display: flex; align-items: center;
  gap: 7px; font-size: .88rem;
}
.device-btn:hover, .device-btn.active { border-color: var(--cyan); color: var(--cyan); background: rgba(0,229,255,.04); }
.diag-q {
  background: var(--bg3); border: 1px solid var(--brd); border-radius: var(--r);
  padding: 1rem 1.2rem; margin-bottom: .5rem;
  display: flex; align-items: center; gap: .9rem;
  cursor: pointer; transition: .25s;
}
.diag-q:hover { border-color: rgba(0,229,255,.25); }
.diag-q.sel { border-color: var(--red); background: rgba(255,45,85,.04); }
.diag-radio {
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid var(--txt3); border-radius: 50%;
  transition: .3s; position: relative;
}
.diag-q.sel .diag-radio { border-color: var(--red); background: var(--red); }
.diag-q.sel .diag-radio::after { content: ''; position: absolute; inset: 4px; background: #fff; border-radius: 50%; }
.diag-q-content { flex: 1; }
.diag-q-title { font-size: .9rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.diag-q-title .info-help-btn { flex-shrink: 0; }
.diag-q-meta { display: flex; gap: .8rem; margin-top: .3rem; align-items: center; }
.diag-weight { font-family: var(--mono); font-size: .65rem; color: var(--txt3); }
.diag-weight .weight-empty { opacity: .3; }

/* Diagnostic result */
.diag-result-card {
  border-radius: var(--rl); padding: 2.5rem; text-align: center;
  margin-top: 1.5rem;
}
.risk-low { background: linear-gradient(135deg, rgba(0,230,118,.08), rgba(0,230,118,.02)); border: 1px solid rgba(0,230,118,.25); }
.risk-low .score-value, .risk-low h3 { color: var(--green); }
.risk-moderate { background: linear-gradient(135deg, rgba(255,145,0,.08), rgba(255,145,0,.02)); border: 1px solid rgba(255,145,0,.25); }
.risk-moderate .score-value, .risk-moderate h3 { color: var(--orange); }
.risk-high { background: linear-gradient(135deg, rgba(255,45,85,.08), rgba(255,45,85,.02)); border: 1px solid rgba(255,45,85,.25); }
.risk-high .score-value, .risk-high h3 { color: var(--red); }
.risk-critical { background: linear-gradient(135deg, rgba(255,45,85,.15), rgba(255,45,85,.05)); border: 2px solid var(--red); }
.risk-critical .score-value, .risk-critical h3 { color: var(--red); }
.diag-score-ring { margin-bottom: 1rem; }
.score-value { font-family: var(--mono); font-size: 3rem; font-weight: 700; }
.score-label { font-size: .75rem; color: var(--txt3); }
.diag-result-card h3 { font-family: var(--head); font-size: 1.3rem; margin-bottom: .4rem; }
.diag-result-msg { color: var(--txt2); max-width: 550px; margin: 0 auto .5rem; font-size: .92rem; }
.diag-breakdown { max-width: 400px; margin: 1.5rem auto; text-align: left; }
.breakdown-item { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid rgba(28,43,72,.5); font-size: .84rem; }
.breakdown-label { color: var(--txt2); }
.breakdown-value { font-family: var(--mono); font-weight: 600; }
.breakdown-item.correlated { color: var(--cyan); }
.breakdown-item.correlated .breakdown-label, .breakdown-item.correlated .breakdown-value { color: var(--cyan); }
.diag-correlations { margin: 1.5rem auto; max-width: 550px; text-align: left; }
.diag-correlations h4 { font-family: var(--head); color: var(--cyan); margin-bottom: .3rem; font-size: .95rem; }
.diag-correlations p { font-size: .82rem; color: var(--txt2); margin-bottom: .6rem; }
.corr-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.corr-tag { font-size: .7rem; background: rgba(0,229,255,.08); border: 1px solid rgba(0,229,255,.2); padding: .2rem .6rem; border-radius: 50px; color: var(--cyan); font-family: var(--mono); }
.diag-actions { margin: 1.5rem auto; max-width: 550px; text-align: left; }
.diag-actions h4 { font-family: var(--head); margin-bottom: .5rem; font-size: .95rem; }
.diag-actions ol { padding-left: 1.3rem; }
.diag-actions li { font-size: .88rem; color: var(--txt2); margin-bottom: .3rem; line-height: 1.5; }
.diag-actions a { color: var(--cyan); }
.diag-nav-btns { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
#diagResult.show { animation: fadeUp .4s ease; }

/* ============ SCENARIOS ============ */
.scenario-card { background: var(--bg3); border: 1px solid var(--brd); border-radius: var(--rl); padding: 2rem; margin-bottom: 1.5rem; }
.scenario-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.scenario-header .card-icon { margin-bottom: 0; flex-shrink: 0; }
.scenario-header h3 { font-family: var(--head); font-size: 1.2rem; margin-bottom: 0; }
.scenario-sub { color: var(--txt2); font-size: .85rem; }
.urgency-badge { font-family: var(--mono); font-size: .6rem; padding: 3px 10px; border-radius: 50px; font-weight: 600; margin-left: auto; }
.urgency-high { background: rgba(255,45,85,.12); color: var(--red); border: 1px solid rgba(255,45,85,.2); }
.urgency-medium { background: rgba(255,145,0,.1); color: var(--orange); border: 1px solid rgba(255,145,0,.2); }
.scenario-info { margin-bottom: 1.2rem; }
.info-row { display: flex; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid rgba(28,43,72,.5); font-size: .86rem; }
.info-label { color: var(--txt3); font-weight: 600; min-width: 140px; }
.scenario-steps { margin-bottom: 1.2rem; }
.scenario-steps h4 { font-family: var(--head); margin-bottom: .8rem; font-size: 1rem; display: flex; align-items: center; gap: 7px; }
.steps-list { padding-left: 1.5rem; }
.steps-list li { margin-bottom: .8rem; font-size: .9rem; }
.steps-list li strong { color: var(--txt); }
.steps-list li p { color: var(--txt2); font-size: .84rem; margin-top: .2rem; }
.scenario-resources h4 { font-family: var(--head); margin-bottom: .5rem; font-size: .95rem; display: flex; align-items: center; gap: 7px; }
.scenario-resources ul { list-style: none; }
.scenario-resources li { font-size: .85rem; color: var(--cyan); padding: .2rem 0; }

/* ============ FALSE POSITIVES ============ */
.fp-card { background: var(--bg3); border: 1px solid var(--brd); border-radius: var(--rl); padding: 1.8rem; margin-bottom: 1.2rem; }
.fp-myth { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.fp-num { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--purple); min-width: 30px; }
.fp-myth h3 { font-family: var(--head); font-size: 1.05rem; color: var(--red); }
.fp-reality { margin-bottom: 1rem; }
.fp-reality h4 { font-family: var(--head); color: var(--cyan); margin-bottom: .3rem; font-size: .92rem; }
.fp-reality p { color: var(--txt2); font-size: .88rem; }
.fp-verdict { background: rgba(0,230,118,.06); border: 1px solid rgba(0,230,118,.15); border-radius: var(--r); padding: .8rem 1.1rem; font-size: .88rem; color: var(--green); display: flex; align-items: flex-start; gap: .6rem; }

/* ============ CHECKLIST ============ */
.chk-group { background: var(--bg3); border: 1px solid var(--brd); border-radius: var(--rl); padding: 1.6rem; }
.chk-group h3 { font-family: var(--head); margin-bottom: .9rem; display: flex; align-items: center; gap: 9px; font-size: 1.02rem; }
.chk-item { display: flex; align-items: flex-start; gap: 11px; padding: .55rem 0; border-bottom: 1px solid rgba(28,43,72,.5); cursor: pointer; transition: .2s; }
.chk-item:last-of-type { border-bottom: none; }
.chk-item:hover { padding-left: 5px; }
.chk-box {
  width: 21px; height: 21px; min-width: 21px; border: 2px solid var(--txt3);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  transition: .3s; margin-top: 2px; font-size: .68rem;
}
.chk-item.done .chk-box { background: var(--green); border-color: var(--green); color: var(--bg); }
.chk-item.done .chk-box::after { content: '\2713'; font-weight: 700; }
.chk-text { font-size: .86rem; color: var(--txt2); transition: .2s; }
.chk-item.done .chk-text { color: var(--green); text-decoration: line-through; text-decoration-color: rgba(0,230,118,.3); }
.progress-wrap { margin-top: .9rem; padding-top: .7rem; border-top: 1px solid var(--brd); }
.progress-bar { height: 5px; background: rgba(28,43,72,.8); border-radius: 3px; overflow: hidden; margin-top: .3rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); border-radius: 3px; transition: width .5s; width: 0; }
.progress-label { font-family: var(--mono); font-size: .7rem; color: var(--txt3); }

/* ============ TABS (Commands) ============ */
.tab-container { }
.tabs { display: flex; justify-content: center; gap: .4rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.tab-btn {
  padding: .5rem 1.2rem; border-radius: 50px; border: 1px solid var(--brd);
  background: transparent; color: var(--txt2); font-family: var(--font);
  font-weight: 600; font-size: .85rem; cursor: pointer; transition: .25s;
  display: flex; align-items: center; gap: 7px;
}
.tab-btn:hover, .tab-btn.active { border-color: var(--cyan); color: var(--cyan); background: rgba(0,229,255,.07); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.cmd-section-title { font-family: var(--head); margin: 1.5rem 0 .7rem; font-size: 1.05rem; }

/* Code blocks */
.code-block {
  background: #080c14; border: 1px solid var(--brd); border-radius: var(--r);
  padding: 1.2rem 1.4rem; margin: .8rem 0; font-family: var(--mono);
  font-size: .78rem; line-height: 1.85; overflow-x: auto; position: relative;
}
.code-label { position: absolute; top: 7px; right: 10px; font-size: .58rem; color: var(--txt3); text-transform: uppercase; letter-spacing: 1px; }
.copy-btn {
  position: absolute; top: 7px; right: 65px;
  background: rgba(0,229,255,.1); border: 1px solid rgba(0,229,255,.2);
  color: var(--cyan); padding: 2px 9px; border-radius: 4px;
  font-size: .6rem; cursor: pointer; font-family: var(--mono); transition: .2s;
}
.copy-btn:hover { background: rgba(0,229,255,.2); }
.copy-btn.copied { background: rgba(0,230,118,.15); color: var(--green); border-color: rgba(0,230,118,.3); }
.cmd-line { display: flex; gap: .6rem; flex-wrap: wrap; }
.cmd-text { color: var(--cyan); word-break: break-all; }
.cmd-desc { color: #5a6a8a; font-style: italic; }
.cmd-expect { padding: .3rem 0 .6rem 1rem; font-size: .75rem; color: var(--txt3); border-left: 2px solid rgba(0,230,118,.2); margin: .2rem 0 .5rem; }
.cmd-expect strong { color: var(--green); }

/* ============ SOLUTIONS ============ */
.sol-card { cursor: default; }
.sol-desc { font-size: .8rem; color: var(--txt3); font-style: italic; margin-bottom: .8rem; }
.sol-steps { padding-left: 1.3rem; }
.sol-steps li { color: var(--txt2); font-size: .84rem; margin-bottom: .3rem; line-height: 1.55; }

/* ============ TABLE (Tools) ============ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th { background: var(--bg3); padding: .8rem 1rem; text-align: left; font-family: var(--head); font-size: .8rem; color: var(--cyan); border-bottom: 2px solid var(--brd); white-space: nowrap; }
td { padding: .65rem 1rem; border-bottom: 1px solid var(--brd); color: var(--txt2); }
tr:hover td { background: rgba(0,229,255,.02); }
.price-free { color: var(--green); font-family: var(--mono); font-size: .76rem; font-weight: 600; }
.price-paid { color: var(--orange); font-family: var(--mono); font-size: .76rem; font-weight: 600; }
.tool-stars { color: var(--yellow); }

/* ============ FAQ ============ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--bg3); border: 1px solid var(--brd); border-radius: var(--r); margin-bottom: .6rem; overflow: hidden; transition: .3s; }
.faq-item:hover { border-color: rgba(0,229,255,.2); }
.faq-question { padding: 1rem 1.3rem; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 600; font-size: .9rem; }
.faq-question i { color: var(--cyan); transition: transform .3s; flex-shrink: 0; margin-left: .8rem; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-answer-inner { padding: 0 1.3rem 1.3rem; color: var(--txt2); font-size: .88rem; line-height: 1.75; }

/* ============ EMERGENCY ============ */
.emergency-box {
  background: linear-gradient(135deg, rgba(255,45,85,.08), rgba(255,45,85,.02));
  border: 1px solid rgba(255,45,85,.2); border-radius: var(--rl); padding: 2.2rem;
  margin-bottom: 2rem;
}
.emergency-box h3 { font-family: var(--head); font-size: 1.3rem; color: var(--red); margin-bottom: 1.2rem; display: flex; align-items: center; gap: 9px; }
.emg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.emg-step { background: rgba(6,9,15,.6); border: 1px solid var(--brd); border-radius: var(--r); padding: 1.2rem; text-align: center; }
.emg-num { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; color: var(--red); }
.emg-icon { font-size: 1.2rem; color: var(--txt2); margin: .3rem 0; }
.emg-step h4 { font-family: var(--head); margin: .2rem 0; font-size: .95rem; }
.emg-step p { color: var(--txt2); font-size: .8rem; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.82);
  backdrop-filter: blur(12px); z-index: 10000;
  display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--bg2); border: 1px solid var(--brd);
  border-radius: var(--rl); max-width: 700px; width: 100%;
  max-height: 85vh; overflow-y: auto; padding: 2.2rem;
  position: relative; animation: fadeUp .3s ease;
}
.modal-close {
  position: absolute; top: .9rem; right: .9rem;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--brd); background: var(--bg3);
  color: var(--txt2); display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: .95rem; transition: .2s;
}
.modal-close:hover { border-color: var(--red); color: var(--red); }
.modal h2 { font-family: var(--head); font-size: 1.3rem; margin-bottom: .7rem; padding-right: 2rem; }
.modal h4 { color: var(--cyan); font-family: var(--head); margin-top: 1.1rem; margin-bottom: .3rem; font-size: .98rem; }
.modal p, .modal li { color: var(--txt2); font-size: .88rem; line-height: 1.7; }
.modal ul, .modal ol { padding-left: 1.3rem; margin: .3rem 0; }
.modal ul li, .modal ol li { margin-bottom: .2rem; }
.mo-d { background: rgba(255,45,85,.08); border: 1px solid rgba(255,45,85,.2); border-radius: var(--r); padding: .9rem 1.2rem; margin: .7rem 0; }
.mo-d h5 { color: var(--red); font-family: var(--mono); font-size: .75rem; margin-bottom: .15rem; }
.mo-t { background: rgba(0,230,118,.07); border: 1px solid rgba(0,230,118,.2); border-radius: var(--r); padding: .9rem 1.2rem; margin: .7rem 0; }
.mo-t h5 { color: var(--green); font-family: var(--mono); font-size: .75rem; margin-bottom: .15rem; }
.mo-compare { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: .7rem 0; }
.mo-normal { background: rgba(0,230,118,.05); border: 1px solid rgba(0,230,118,.15); border-radius: var(--r); padding: .8rem; }
.mo-normal h5 { color: var(--green); font-family: var(--mono); font-size: .72rem; margin-bottom: .2rem; }
.mo-suspect { background: rgba(255,45,85,.05); border: 1px solid rgba(255,45,85,.15); border-radius: var(--r); padding: .8rem; }
.mo-suspect h5 { color: var(--red); font-family: var(--mono); font-size: .72rem; margin-bottom: .2rem; }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--brd); padding: 2rem; text-align: center; }
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-brand { font-family: var(--mono); color: var(--cyan); font-weight: 600; margin-bottom: .4rem; font-size: .85rem; }
.footer-legal { color: var(--txt3); font-size: .75rem; line-height: 1.6; }

/* ============ BACK TO TOP ============ */
.btt {
  position: fixed; bottom: 1.2rem; right: 1.2rem;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--cyan); color: var(--bg); border: none;
  cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(16px); transition: .3s;
  z-index: 999; box-shadow: 0 4px 18px rgba(0,229,255,.3);
}
.btt.show { opacity: 1; transform: translateY(0); }
.btt:hover { transform: translateY(-3px); }

/* ============ ANIMATIONS ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { opacity: 0; transform: translateY(15px); transition: opacity .5s ease, transform .5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============ MOBILE HEADER ============ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: rgba(6, 10, 16, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--brd);
  z-index: 5000;
  padding: 0 1rem;
  align-items: center;
  justify-content: center;
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cyan);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-logo i {
  font-size: 1.1rem;
}

.mobile-pro {
  font-size: 0.5rem;
  background: var(--cyan);
  color: var(--bg);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-left: 2px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 58px; left: 0; right: 0;
    background: rgba(6,10,16,.97); padding: .8rem;
    border-bottom: 1px solid var(--brd); z-index: 5001;
  }
  .nav-ham { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .timeline::before { left: 18px; }
  .timeline-item { padding-left: 52px; }
  .tl-num { left: 0; width: 36px; height: 36px; font-size: .7rem; }
  .alert { flex-direction: column; }
  .emg-grid { grid-template-columns: 1fr; }
  .nav-grid { grid-template-columns: 1fr; }
  .mo-compare { grid-template-columns: 1fr; }
  .threat-row { flex-direction: column; }
  .threat-level { width: auto; }
  .scenario-header { flex-direction: column; align-items: flex-start; }
  .urgency-badge { margin-left: 0; }

  /* Show mobile header, hide desktop navbar */
  .mobile-header { display: flex; }
  .navbar { display: none; }
  .page-content { padding-top: 60px; padding-bottom: 100px; }

  /* Show bottom nav */
  .bottom-nav { display: flex !important; }

  /* Mobile menu visible */
  .mobile-menu-overlay.show {
    display: block;
  }
  .mobile-menu.show {
    transform: translateY(0);
  }
}

/* ============ MOBILE SLIDE-UP MENU ============ */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 6000;
  backdrop-filter: blur(4px);
}

.mobile-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 6001;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mobile-menu.show {
  transform: translateY(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--brd);
  flex-shrink: 0;
}

.mobile-menu-header span {
  font-weight: 600;
  font-size: 1.1rem;
}

.mobile-menu-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  border: none;
  color: var(--txt2);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-items {
  overflow-y: auto;
  padding: 0.5rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.mm-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  color: var(--txt);
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
}

.mm-item i {
  width: 24px;
  text-align: center;
  color: var(--txt3);
  font-size: 1rem;
}

.mm-item:hover, .mm-item:active {
  background: var(--bg3);
}

.mm-urgence {
  color: var(--red);
}

.mm-urgence i {
  color: var(--red);
}

.mm-small {
  font-size: 0.85rem;
  color: var(--txt2);
  padding: 0.7rem 1rem;
}

.mm-divider {
  height: 1px;
  background: var(--brd);
  margin: 0.5rem 1rem;
}

.mm-logout {
  color: var(--txt3);
}

.mm-logout:hover {
  color: var(--red);
  background: rgba(255, 45, 85, 0.1);
}

.mm-whatsapp {
  color: #25d366 !important;
  background: rgba(37, 211, 102, 0.1);
}

.mm-whatsapp i {
  color: #25d366 !important;
}

.mm-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
}

.mm-install {
  color: var(--cyan) !important;
  background: rgba(0, 229, 255, 0.1);
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.mm-install i {
  color: var(--cyan) !important;
}

.mm-install:hover {
  background: rgba(0, 229, 255, 0.2);
}

/* Cacher le bouton si déjà installé en PWA */
@media (display-mode: standalone) {
  .mm-install,
  .install-prompt {
    display: none !important;
  }
}

/* ============ BOTTOM NAVIGATION ============ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(6, 10, 16, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--brd);
  z-index: 5000;
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: none;
  border: none;
  color: var(--txt3);
  font-family: var(--font);
  font-size: 0.65rem;
  cursor: pointer;
  transition: 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.bnav-item i {
  font-size: 1.2rem;
  transition: 0.2s;
}

.bnav-item span {
  font-weight: 500;
}

.bnav-item:hover,
.bnav-item.active {
  color: var(--cyan);
}

.bnav-item.active i {
  transform: scale(1.1);
}

/* Urgence button special style */
.bnav-urgence {
  position: relative;
}

.bnav-urgence i {
  color: var(--red);
}

.bnav-urgence::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 45, 85, 0.1);
  border-radius: 50%;
  z-index: -1;
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg3);
  border: 1px solid var(--brd);
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  max-width: 90%;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: var(--green);
  color: var(--green);
}

.toast.success::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.toast.error {
  border-color: var(--red);
  color: var(--red);
}

.toast.error::before {
  content: '\f057';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.toast.warning {
  border-color: var(--orange);
  color: var(--orange);
}

.toast.warning::before {
  content: '\f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.toast.info {
  border-color: var(--cyan);
  color: var(--cyan);
}

.toast.info::before {
  content: '\f05a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

/* ============ EMERGENCY FLOATING BUTTON ============ */
.emergency-fab {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--red), #cc0033);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(255, 45, 85, 0.4);
  z-index: 4999;
  transition: 0.3s;
  animation: emergencyPulse 2s infinite;
}

.emergency-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(255, 45, 85, 0.6);
}

@keyframes emergencyPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 45, 85, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(255, 45, 85, 0.7); }
}

@media (max-width: 860px) {
  .emergency-fab {
    display: flex;
    bottom: 150px;
  }
}

/* ============ WHATSAPP FAB ============ */
.whatsapp-fab {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 4999;
  transition: 0.3s;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
  color: #fff;
}

@media (max-width: 860px) {
  .whatsapp-fab {
    display: flex;
    bottom: 85px;
  }
}

/* ============ PULL TO REFRESH INDICATOR ============ */
.pull-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  width: 40px;
  height: 40px;
  background: var(--bg3);
  border: 1px solid var(--brd);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 1rem;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.2s;
}

.pull-indicator.ready {
  color: var(--green);
}

/* ============ TOOLS PAGE ============ */
.tool-section {
  background: var(--bg3);
  border: 1px solid var(--brd);
  border-radius: var(--rl);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.tool-section h3 {
  font-family: var(--head);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-section h3 i {
  color: var(--cyan);
}

/* Password Generator */
.password-output {
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 1rem 1.2rem;
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  word-break: break-all;
}

.password-output .pwd-text {
  flex: 1;
  user-select: all;
}

.password-output .copy-pwd {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--cyan);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: 0.2s;
  white-space: nowrap;
}

.password-output .copy-pwd:hover {
  background: rgba(0, 229, 255, 0.2);
}

.password-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.password-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--txt2);
  cursor: pointer;
}

.password-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.password-options input[type="range"] {
  width: 120px;
  accent-color: var(--cyan);
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.8rem;
  font-size: 0.85rem;
}

.strength-bar {
  flex: 1;
  height: 6px;
  background: var(--bg2);
  border-radius: 3px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s, background 0.3s;
}

.strength-fill.weak { width: 25%; background: var(--red); }
.strength-fill.medium { width: 50%; background: var(--orange); }
.strength-fill.strong { width: 75%; background: var(--yellow); }
.strength-fill.very-strong { width: 100%; background: var(--green); }

.strength-label {
  font-family: var(--mono);
  font-weight: 600;
}

.strength-label.weak { color: var(--red); }
.strength-label.medium { color: var(--orange); }
.strength-label.strong { color: var(--yellow); }
.strength-label.very-strong { color: var(--green); }

/* Email/Link Checker */
.checker-input {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.checker-input input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 0.8rem 1rem;
  color: var(--txt);
  font-family: var(--font);
  font-size: 0.95rem;
}

.checker-input input:focus {
  outline: none;
  border-color: var(--cyan);
}

.checker-input button {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--cyan), #0090ff);
  border: none;
  border-radius: var(--r);
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}

.checker-input button:hover {
  transform: translateY(-2px);
}

.checker-result {
  padding: 1rem;
  border-radius: var(--r);
  margin-top: 0.5rem;
}

.checker-result.safe {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.2);
  color: var(--green);
}

.checker-result.danger {
  background: rgba(255, 45, 85, 0.1);
  border: 1px solid rgba(255, 45, 85, 0.2);
  color: var(--red);
}

.checker-result.warning {
  background: rgba(255, 145, 0, 0.1);
  border: 1px solid rgba(255, 145, 0, 0.2);
  color: var(--orange);
}

.checker-result h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.3rem;
}

/* Emergency Contacts */
.emergency-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.emergency-contact {
  background: var(--bg3);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 1.2rem;
  text-align: center;
  transition: 0.3s;
}

.emergency-contact:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.emergency-contact .contact-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 0.8rem;
  background: rgba(255, 45, 85, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--red);
}

.emergency-contact h4 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.emergency-contact p {
  font-size: 0.8rem;
  color: var(--txt2);
  margin-bottom: 0.8rem;
}

.emergency-contact .call-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, var(--red), #cc0033);
  color: #fff;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s;
}

.emergency-contact .call-btn:hover {
  transform: scale(1.05);
}

/* QR Code */
.qr-code-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--r);
  margin-top: 1rem;
}

.qr-code-img {
  max-width: 150px;
}

/* Export buttons */
.export-buttons {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.2rem;
  background: var(--bg3);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  color: var(--txt);
  font-size: 0.85rem;
  cursor: pointer;
  transition: 0.2s;
}

.export-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.export-btn i {
  color: var(--cyan);
}

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--bg3);
  border: 1px solid var(--brd);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4998;
  transition: 0.2s;
  color: var(--txt2);
}

.theme-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

@media (max-width: 860px) {
  .theme-toggle {
    top: 8px;
    right: 15px;
    z-index: 5001;
    width: 34px;
    height: 34px;
  }
}

/* ============ WIZARD DIAGNOSTIC ============ */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
}

.wizard-step {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--brd);
  transition: 0.3s;
}

.wizard-step.active {
  background: var(--cyan);
  border-color: var(--cyan);
  transform: scale(1.2);
}

.wizard-step.done {
  background: var(--green);
  border-color: var(--green);
}

.wizard-question {
  text-align: center;
  padding: 2rem;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wizard-question h3 {
  font-family: var(--head);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.wizard-question p {
  color: var(--txt2);
  margin-bottom: 2rem;
}

.wizard-answers {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.wizard-answer {
  padding: 1rem 2rem;
  border-radius: var(--r);
  border: 2px solid var(--brd);
  background: var(--bg3);
  cursor: pointer;
  transition: 0.2s;
  font-weight: 600;
}

.wizard-answer.yes {
  color: var(--red);
}

.wizard-answer.yes:hover,
.wizard-answer.yes.selected {
  border-color: var(--red);
  background: rgba(255, 45, 85, 0.1);
}

.wizard-answer.no {
  color: var(--green);
}

.wizard-answer.no:hover,
.wizard-answer.no.selected {
  border-color: var(--green);
  background: rgba(0, 230, 118, 0.1);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--brd);
}

.wizard-nav button {
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  border: 1px solid var(--brd);
  background: transparent;
  color: var(--txt);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-nav button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.wizard-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.wizard-nav button.primary {
  background: linear-gradient(135deg, var(--cyan), #0090ff);
  border: none;
  color: var(--bg);
}

/* ============ AUTH SCREEN ============ */
.auth-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-screen.show {
  display: flex;
}

.auth-container {
  background: var(--bg3);
  border: 1px solid var(--brd);
  border-radius: var(--rl);
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  animation: fadeUp 0.4s ease;
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--cyan), #0090ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--bg);
}

.auth-logo.auth-logo-rejected {
  background: linear-gradient(135deg, var(--red), #ff8800);
}

.auth-rejected-reason {
  display: flex;
  gap: 1rem;
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.3);
  border-radius: var(--r);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  text-align: left;
}

.auth-rejected-reason i {
  color: var(--red);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.auth-rejected-reason p {
  color: var(--txt2);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.auth-container h1 {
  font-family: var(--head);
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  color: var(--txt2);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.auth-form {
  margin-bottom: 1.5rem;
}

.auth-input-group {
  position: relative;
  margin-bottom: 1rem;
}

.auth-input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt3);
  font-size: 0.9rem;
}

.auth-input-group input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.8rem;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  color: var(--txt);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: 0.2s;
}

.auth-input-group input:focus {
  outline: none;
  border-color: var(--cyan);
}

.auth-input-group input::placeholder {
  color: var(--txt3);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.auth-switch {
  font-size: 0.85rem;
  color: var(--txt2);
}

.auth-switch a {
  color: var(--cyan);
  font-weight: 600;
}

.auth-error {
  display: none;
  background: rgba(255, 45, 85, 0.1);
  border: 1px solid rgba(255, 45, 85, 0.2);
  color: var(--red);
  padding: 0.8rem 1rem;
  border-radius: var(--r);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.auth-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--brd);
}

.auth-footer p {
  font-size: 0.8rem;
  color: var(--txt3);
  margin-bottom: 0.8rem;
}

.auth-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  transition: 0.2s;
}

.social-link:hover {
  transform: scale(1.1);
}

.social-link.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-link.tiktok {
  background: #000;
  border: 1px solid #333;
}

.social-link.twitter {
  background: #1da1f2;
}

.social-link.youtube {
  background: #ff0000;
}

.social-link.facebook {
  background: #1877f2;
}

.auth-pending-icon {
  font-size: 3rem;
  color: var(--orange);
  margin: 1.5rem 0;
  animation: pendingPulse 2s ease-in-out infinite;
}

@keyframes pendingPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.auth-info {
  font-size: 0.85rem;
  color: var(--txt2);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--txt3);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--cyan);
}

.hidden {
  display: none !important;
}

/* User menu when logged in */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--bg);
  cursor: pointer;
  font-weight: 600;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg3);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  padding: 0.5rem;
  min-width: 180px;
  display: none;
  z-index: 1000;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  color: var(--txt2);
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.user-dropdown-item:hover {
  background: var(--bg4);
  color: var(--txt);
}

.user-dropdown-item.danger {
  color: var(--red);
}

.user-dropdown-item.danger:hover {
  background: rgba(255, 45, 85, 0.1);
}

/* ============ AUTH CONSENT & PROFILE ============ */
.auth-profile-hint {
  font-size: 0.75rem;
  color: var(--txt3);
  margin: -0.5rem 0 1rem;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.auth-profile-hint i {
  margin-top: 2px;
  color: var(--cyan);
}

.auth-consent {
  margin: 1rem 0;
  text-align: left;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.8rem;
  color: var(--txt2);
  cursor: pointer;
  line-height: 1.5;
}

.consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.consent-link {
  color: var(--cyan);
  text-decoration: underline;
}

.consent-link:hover {
  color: var(--green);
}

/* ============ FOOTER LINKS ============ */
.footer-links {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--brd);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--txt3);
  transition: 0.2s;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-sep {
  color: var(--txt3);
}

.footer-copyright {
  color: var(--txt3);
}

.footer-whatsapp {
  color: #25d366 !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-whatsapp:hover {
  color: #128c7e !important;
}

/* ============ PWA INSTALL PROMPT ============ */
.install-prompt {
  display: none;
  position: fixed;
  bottom: 100px;
  left: 1rem;
  right: 1rem;
  z-index: 7000;
  animation: slideUp 0.3s ease;
}

.install-prompt.show {
  display: block;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.install-content {
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--rl);
  padding: 1.2rem;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.install-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  color: var(--txt3);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.3rem;
}

.install-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.install-header > i {
  font-size: 1.5rem;
  color: var(--cyan);
}

.install-header h3 {
  font-size: 1rem;
  margin: 0;
}

.install-header p {
  font-size: 0.8rem;
  color: var(--txt3);
  margin: 0;
}

.install-disguise {
  margin-bottom: 1rem;
}

.disguise-label {
  font-size: 0.8rem;
  color: var(--txt2);
  margin-bottom: 0.8rem;
}

.disguise-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.disguise-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.disguise-option input {
  display: none;
}

.disguise-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid transparent;
  transition: 0.2s;
}

.disguise-option input:checked + .disguise-icon {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

.disguise-icon.default {
  background: linear-gradient(135deg, #00e5ff, #0090ff);
  color: #000;
}

.disguise-icon.calc {
  background: #1c1c1e;
  color: #fff;
}

.disguise-icon.notes {
  background: #ffcc00;
  color: #000;
}

.disguise-icon.weather {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
}

.disguise-option span {
  font-size: 0.65rem;
  color: var(--txt3);
  text-align: center;
}

.install-note {
  font-size: 0.75rem;
  color: var(--txt3);
  text-align: center;
  margin-top: 0.8rem;
}

@media (min-width: 500px) {
  .install-prompt {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    max-width: 340px;
  }
}

/* ============ USSD ACTION BUTTONS ============ */
.ussd-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--cyan);
  color: var(--bg) !important;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.5rem;
  transition: 0.2s;
}

.ussd-action-btn:hover {
  background: var(--green);
  transform: scale(1.05);
}

.ussd-action-btn i {
  font-size: 0.7rem;
}

/* Device settings action buttons */
.device-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--purple);
  color: #fff !important;
  border: none;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}

.device-action-btn:hover {
  background: var(--cyan);
  transform: scale(1.05);
}

.device-action-btn i {
  font-size: 0.7rem;
}

.device-action-btn.small {
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
}

.device-action-btn.small i {
  font-size: 0.6rem;
}

/* Action button dans les commandes */
.cmd-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cmd-action .ussd-action-btn {
  margin-left: 0;
}

/* Mobile only visibility */
.mobile-only {
  display: none;
}

@media (max-width: 860px) {
  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }
}

/* Info button pour explications */
.info-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--bg4);
  border: 1px solid var(--brd);
  border-radius: 50%;
  color: var(--txt3);
  font-size: 0.7rem;
  cursor: pointer;
  transition: 0.2s;
  margin-left: 0.5rem;
}

.info-help-btn:hover {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
}

/* Checklist item avec action */
.chk-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  padding-left: 2rem;
}

.chk-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--cyan);
  border-radius: 15px;
  font-size: 0.7rem;
  text-decoration: none;
  transition: 0.2s;
}

.chk-action-btn:hover {
  background: var(--cyan);
  color: var(--bg);
}

/* Small USSD button for checklist */
.ussd-action-btn.ussd-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  margin-left: 0.3rem;
}

.ussd-action-btn.ussd-small i {
  font-size: 0.6rem;
}

/* Checklist item layout adjustment for buttons */
.chk-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.chk-item .info-help-btn,
.chk-item .ussd-action-btn,
.chk-item .device-action-btn {
  flex-shrink: 0;
}

/* Device action button in checklist - smaller */
.chk-item .device-action-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  margin-left: auto;
}

.chk-item .device-action-btn i {
  font-size: 0.6rem;
}

/* On small screens, action buttons wrap to new line */
@media (max-width: 480px) {
  .chk-item .device-action-btn {
    margin-left: 0;
    margin-top: 0.3rem;
    order: 10;
    width: calc(100% - 32px);
    justify-content: center;
  }
}

/* ============ LEGAL PAGES ============ */
.legal-page {
  max-width: 800px;
}

.legal-section {
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--rl);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.legal-section h2 {
  font-family: var(--head);
  font-size: 1.2rem;
  color: var(--cyan);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-section h2 i {
  font-size: 1rem;
}

.legal-section p {
  color: var(--txt2);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

.legal-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.legal-section ul li {
  color: var(--txt2);
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--brd);
}

.legal-section ul li:last-child {
  border-bottom: none;
}

.legal-section ul li strong {
  color: var(--txt);
}

.legal-section a {
  color: var(--cyan);
}

.legal-section .alert {
  margin-top: 1rem;
}

.legal-section .btn-sm {
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

/* ============ TUTORIAL OVERLAY ============ */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 16, 0.95);
  backdrop-filter: blur(20px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.tutorial-overlay.show {
  display: flex;
}

.tutorial-container {
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--rl);
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeUp 0.4s ease;
}

.tutorial-header {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--brd);
}

.tutorial-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--bg);
}

.tutorial-header h1 {
  font-family: var(--head);
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
  color: var(--txt);
}

.tutorial-subtitle {
  color: var(--txt3);
  font-size: 0.9rem;
}

.tutorial-content {
  padding: 1.5rem;
}

.tutorial-intro {
  text-align: center;
  color: var(--txt2);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tutorial-section {
  margin-bottom: 1.5rem;
}

.tutorial-section h3 {
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tutorial-methods {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.tutorial-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg3);
  padding: 0.8rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--brd);
}

.method-icon {
  width: 40px;
  height: 40px;
  background: var(--bg4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--cyan);
  flex-shrink: 0;
}

.method-text {
  display: flex;
  flex-direction: column;
}

.method-text strong {
  color: var(--txt);
  font-size: 0.9rem;
}

.method-text span {
  color: var(--txt3);
  font-size: 0.8rem;
}

.tutorial-demo {
  text-align: center;
  margin-top: 1.5rem;
}

.demo-phone {
  width: 140px;
  height: 200px;
  margin: 0 auto;
  background: #1a1a1a;
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.demo-calc {
  background: #000;
  border-radius: 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.demo-display {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  font-size: 2rem;
  font-weight: 300;
  color: #fff;
  font-family: -apple-system, sans-serif;
}

.demo-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
}

.demo-buttons span {
  background: #333;
  color: #fff;
  padding: 8px;
  border-radius: 50%;
  font-size: 0.7rem;
  text-align: center;
}

.demo-buttons .demo-ac {
  background: #a5a5a5;
  color: #000;
}

.demo-buttons .demo-op {
  background: #ff9f0a;
}

.demo-caption {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--txt3);
}

.tutorial-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--brd);
}

.tutorial-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--txt2);
}

.tutorial-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
  cursor: pointer;
}

/* ============ DASHBOARD ============ */
.dashboard-score {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--rl);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.score-circle {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.score-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-circle .score-bg {
  fill: none;
  stroke: var(--brd);
  stroke-width: 8;
}

.score-circle .score-progress {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}

.score-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-value span {
  font-family: var(--head);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--txt);
}

.score-value small {
  font-size: 0.9rem;
  color: var(--txt3);
}

.score-info h3 {
  font-family: var(--head);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.score-info p {
  color: var(--txt2);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Score colors */
.dashboard-score.score-excellent .score-progress { stroke: var(--green); }
.dashboard-score.score-excellent .score-info h3 { color: var(--green); }

.dashboard-score.score-good .score-progress { stroke: var(--cyan); }
.dashboard-score.score-good .score-info h3 { color: var(--cyan); }

.dashboard-score.score-medium .score-progress { stroke: var(--orange); }
.dashboard-score.score-medium .score-info h3 { color: var(--orange); }

.dashboard-score.score-low .score-progress { stroke: var(--red); }
.dashboard-score.score-low .score-info h3 { color: var(--red); }

.dashboard-score.score-unknown .score-progress { stroke: var(--txt3); }
.dashboard-score.score-unknown .score-info h3 { color: var(--txt3); }

/* Dashboard actions */
.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 0.8rem;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  color: var(--txt2);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}

.dash-action:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.dash-action i {
  font-size: 1.5rem;
  color: var(--cyan);
}

.dash-action.dash-action-urgent {
  background: rgba(255, 77, 77, 0.1);
  border-color: rgba(255, 77, 77, 0.3);
}

.dash-action.dash-action-urgent i {
  color: var(--red);
}

.dash-action.dash-action-urgent:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Dashboard sections */
.dashboard-section {
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--rl);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.dashboard-section h3 {
  font-family: var(--head);
  font-size: 1rem;
  color: var(--cyan);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Checklist progress in dashboard */
.checklist-progress {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.progress-total {
  font-size: 0.85rem;
  color: var(--txt2);
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--brd);
  margin-bottom: 0.5rem;
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.progress-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.progress-item-title {
  color: var(--txt2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-item-title i {
  font-size: 0.75rem;
}

.progress-item-value {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--txt3);
}

.progress-item-bar {
  height: 4px;
  background: var(--brd);
  border-radius: 2px;
  overflow: hidden;
}

.progress-item-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Last diagnostic card */
.diag-result-card {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--r);
  padding: 1.2rem;
}

.diag-result-card.level-critical {
  background: rgba(255, 77, 77, 0.1);
  border-color: rgba(255, 77, 77, 0.3);
}

.diag-result-card.level-high {
  background: rgba(255, 136, 0, 0.1);
  border-color: rgba(255, 136, 0, 0.3);
}

.diag-result-card.level-medium {
  background: rgba(255, 204, 0, 0.1);
  border-color: rgba(255, 204, 0, 0.3);
}

.diag-result-card.level-low {
  background: rgba(0, 230, 118, 0.1);
  border-color: rgba(0, 230, 118, 0.3);
}

.diag-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.diag-device {
  font-size: 0.85rem;
  color: var(--txt2);
  text-transform: capitalize;
}

.diag-date {
  font-size: 0.75rem;
  color: var(--txt3);
}

.diag-result-score {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin-bottom: 0.3rem;
}

.diag-result-score .score-number {
  font-family: var(--head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--txt);
}

.diag-result-score .score-label {
  font-size: 1rem;
  color: var(--txt3);
}

.diag-result-level {
  font-size: 0.9rem;
  color: var(--txt2);
  margin-bottom: 1rem;
}

.diag-result-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.no-diagnostic {
  text-align: center;
  padding: 1.5rem;
}

.no-diagnostic i {
  font-size: 2rem;
  color: var(--txt3);
  margin-bottom: 0.8rem;
}

.no-diagnostic p {
  color: var(--txt2);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Recommendations */
.recommendations {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.recommendation-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid var(--brd);
  border-radius: var(--r);
}

.rec-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.rec-content p {
  color: var(--txt2);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.rec-action {
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.rec-action:hover {
  text-decoration: underline;
}

.rec-action i {
  font-size: 0.65rem;
}

/* Dashboard share */
.dashboard-share {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(187, 134, 252, 0.05));
  border: 1px solid var(--brd);
  border-radius: var(--rl);
}

.dashboard-share p {
  color: var(--txt2);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* ============ SHARE MODAL ============ */
.share-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: var(--r);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}

.share-btn:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.share-btn i {
  font-size: 1rem;
}

.share-whatsapp { background: #25D366; }
.share-telegram { background: #0088cc; }
.share-facebook { background: #1877F2; }
.share-twitter { background: #1DA1F2; }
.share-email { background: var(--purple); }
.share-copy { background: var(--bg); border: 1px solid var(--brd); color: var(--txt2); }
.share-copy:hover { border-color: var(--cyan); color: var(--cyan); }

/* Page share button (floating) */
.page-share-btn {
  position: fixed;
  bottom: 90px;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(187, 134, 252, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: 0.2s;
  z-index: 90;
}

.page-share-btn:hover {
  transform: scale(1.1);
  background: var(--cyan);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.4);
}

/* Responsive dashboard */
@media (max-width: 768px) {
  .dashboard-score {
    flex-direction: column;
    text-align: center;
  }

  .score-circle {
    width: 120px;
    height: 120px;
  }

  .score-value span {
    font-size: 2rem;
  }

  .dashboard-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .share-options {
    grid-template-columns: 1fr;
  }

  .dashboard-score {
    padding: 1.5rem;
  }

  .score-circle {
    width: 100px;
    height: 100px;
  }

  .score-value span {
    font-size: 1.8rem;
  }
}

/* Diagnostic export/share section */
.diag-export-share {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--brd);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.diag-export-share .btn {
  flex: 1;
  min-width: 140px;
}

/* Page share section */
.page-share {
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  background: var(--bg2);
  border: 1px solid var(--brd);
  border-radius: var(--rl);
}

.page-share p {
  color: var(--txt2);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
