/* ══════════════════════════════════════════════════════════════════════════
   TICHY — AI Cybersecurity Guide
   Design System & Global Styles
   ══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
  --bg-primary:    #07090F;
  --bg-secondary:  #0B0F18;
  --bg-card:       #0F1520;
  --bg-card-hover: #141C28;
  --bg-input:      #0A1018;
  --bg-code:       #0D1117;

  --cyan:          #00C8F0;
  --cyan-dim:      #00C8F040;
  --green:         #00D68A;
  --red:           #FF4B6A;
  --orange:        #FFB020;
  --purple:        #A78BFA;

  --text-primary:  #EEF2F6;
  --text-secondary:#8A9BB0;
  --text-dim:      #3A5060;

  --border:        #1A2E3A;
  --border-light:  #243848;

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --shadow-cyan:   0 0 20px rgba(0,200,240,0.15);

  --font-body:     'Outfit', -apple-system, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --sidebar-w:     260px;
  --topbar-h:      56px;
  --right-w:       300px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--font-body); border: none; }
input, textarea { font-family: var(--font-body); }
img { max-width: 100%; }
::selection { background: var(--cyan); color: var(--bg-primary); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Utility Classes ────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-orange { color: var(--orange); }
.text-dim { color: var(--text-dim); }
.text-secondary { color: var(--text-secondary); }
.mono { font-family: var(--font-mono); }
.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Landing Nav ────────────────────────────────────────────────────────── */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 32px;
  background: rgba(7,9,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.landing-nav .logo {
  font-size: 1.4rem; font-weight: 800; letter-spacing: 3px; color: var(--text-primary);
}
.landing-nav .logo span { color: var(--cyan); }
.landing-nav-links { display: flex; gap: 28px; align-items: center; }
.landing-nav-links a {
  color: var(--text-secondary); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.5px; transition: color 0.2s;
}
.landing-nav-links a:hover { color: var(--cyan); text-decoration: none; }
.btn-nav {
  background: var(--cyan); color: var(--bg-primary); padding: 8px 20px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-nav:hover { background: #00DAF8; text-decoration: none; transform: translateY(-1px); }

/* ── Landing Hero ───────────────────────────────────────────────────────── */
.landing-hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(0,200,240,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0,214,138,0.04) 0%, transparent 50%),
    var(--bg-primary);
}
.hero-content { max-width: 720px; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  background: var(--cyan-dim); color: var(--cyan);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800;
  line-height: 1.1; margin-bottom: 20px;
}
.hero-title .accent { color: var(--cyan); }
.hero-subtitle {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 540px; margin: 0 auto 36px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--cyan); color: var(--bg-primary); padding: 14px 32px;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 0.95rem;
  transition: all 0.25s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: #00DAF8; transform: translateY(-2px); box-shadow: var(--shadow-cyan); text-decoration: none; }
.btn-secondary {
  background: transparent; color: var(--text-primary); padding: 14px 32px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--border); transition: all 0.25s;
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }
.hero-quote {
  margin-top: 48px; font-style: italic; color: var(--text-dim);
  font-size: 0.85rem;
}

/* ── Landing Stats ──────────────────────────────────────────────────────── */
.landing-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  max-width: 800px; margin: -40px auto 0; position: relative; z-index: 2;
  background: var(--border);
}
.stat-card {
  background: var(--bg-secondary); padding: 32px 24px; text-align: center;
}
.stat-num { font-size: 2rem; font-weight: 800; color: var(--cyan); }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }

/* ── Landing Sections ───────────────────────────────────────────────────── */
.landing-section {
  padding: 100px 24px;
}
.landing-section:nth-child(even) { background: var(--bg-secondary); }
.section-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase; color: var(--cyan);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700;
  margin-bottom: 16px; line-height: 1.2;
}
.section-subtitle {
  font-size: 1rem; color: var(--text-secondary);
  max-width: 560px; line-height: 1.7;
}

/* ── Journey Steps ──────────────────────────────────────────────────────── */
.journey-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px; margin-top: 48px; background: var(--border);
}
.journey-step {
  background: var(--bg-card); padding: 32px 24px;
  transition: background 0.2s;
}
.journey-step:hover { background: var(--bg-card-hover); }
.journey-num {
  font-size: 0.7rem; font-weight: 700; color: var(--cyan);
  letter-spacing: 2px; margin-bottom: 12px;
}
.journey-step h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.journey-step p { font-size: 0.85rem; color: var(--text-secondary); }

/* ── Feature Grid ───────────────────────────────────────────────────────── */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 48px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 28px;
  transition: all 0.25s;
}
.feature-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.feature-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--cyan-dim); display: flex; align-items: center;
  justify-content: center; margin-bottom: 16px; font-size: 1.2rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Waitlist Form ──────────────────────────────────────────────────────── */
.waitlist-section { text-align: center; }
.waitlist-form {
  display: flex; gap: 12px; max-width: 480px; margin: 32px auto 0;
  flex-wrap: wrap; justify-content: center;
}
.waitlist-form input {
  flex: 1; min-width: 240px; padding: 14px 18px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 0.9rem; outline: none; transition: border-color 0.2s;
}
.waitlist-form input:focus { border-color: var(--cyan); }
.waitlist-form input::placeholder { color: var(--text-dim); }
.waitlist-msg {
  margin-top: 12px; font-size: 0.85rem; text-align: center;
}
.waitlist-msg.success { color: var(--green); }
.waitlist-msg.error { color: var(--red); }

/* ── Landing Footer ─────────────────────────────────────────────────────── */
.landing-footer {
  padding: 32px 24px; text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-dim);
}

/* ══════════════════════════════════════════════════════════════════════════
   AUTH SCREENS
   ══════════════════════════════════════════════════════════════════════════ */
.auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(0,200,240,0.05) 0%, transparent 60%),
    var(--bg-primary);
  padding: 24px;
}
.auth-box {
  width: 100%; max-width: 420px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 40px 36px; box-shadow: var(--shadow);
}
.auth-logo {
  text-align: center; font-size: 1.6rem; font-weight: 800;
  letter-spacing: 4px; margin-bottom: 8px;
}
.auth-logo span { color: var(--cyan); }
.auth-tagline {
  text-align: center; font-size: 0.75rem; color: var(--text-dim);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 32px;
}
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 10px; text-align: center; font-size: 0.85rem;
  font-weight: 600; color: var(--text-dim); background: none;
  border-bottom: 2px solid transparent; transition: all 0.2s;
}
.auth-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.auth-tab:hover { color: var(--text-secondary); }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px;
}
.form-group input {
  width: 100%; padding: 12px 14px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.9rem; outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--cyan); }
.btn-auth {
  width: 100%; padding: 14px; background: var(--cyan);
  color: var(--bg-primary); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 700; transition: all 0.2s;
  margin-top: 8px;
}
.btn-auth:hover { background: #00DAF8; }
.btn-auth:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-error {
  background: rgba(255,75,106,0.1); border: 1px solid rgba(255,75,106,0.3);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px;
  font-size: 0.85rem; color: var(--red);
}
.auth-switch {
  text-align: center; margin-top: 20px; font-size: 0.85rem;
  color: var(--text-secondary);
}
.auth-switch a { color: var(--cyan); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════════════
   APP LAYOUT (3-column)
   ══════════════════════════════════════════════════════════════════════════ */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--right-w);
  grid-template-rows: var(--topbar-h) 1fr;
  height: 100vh; overflow: hidden;
}

/* ── Top Bar ────────────────────────────────────────────────────────────── */
.topbar {
  grid-column: 1 / -1; grid-row: 1;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.topbar-logo {
  font-size: 1.1rem; font-weight: 800; letter-spacing: 3px;
}
.topbar-logo span { color: var(--cyan); }
.topbar-mode {
  font-size: 0.8rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.topbar-mode .mode-badge {
  background: var(--cyan-dim); color: var(--cyan);
  padding: 4px 10px; border-radius: 12px; font-weight: 600;
  font-size: 0.75rem; letter-spacing: 0.5px;
}
.topbar-user {
  display: flex; align-items: center; gap: 12px;
}
.topbar-user .user-name { font-size: 0.85rem; color: var(--text-secondary); }
.btn-logout {
  background: none; color: var(--text-dim); font-size: 0.8rem;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ── Left Sidebar ───────────────────────────────────────────────────────── */
.sidebar-left {
  grid-column: 1; grid-row: 2;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-section-label {
  font-size: 0.65rem; font-weight: 700; color: var(--text-dim);
  letter-spacing: 2px; text-transform: uppercase;
  padding: 12px 12px 6px; margin-top: 4px;
}
.mode-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: none; color: var(--text-secondary);
  font-size: 0.85rem; font-weight: 500; width: 100%;
  text-align: left; transition: all 0.15s;
}
.mode-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.mode-btn.active { background: var(--cyan-dim); color: var(--cyan); font-weight: 600; }
.mode-btn .mode-icon { font-size: 1rem; width: 24px; text-align: center; }

/* Security Score Ring */
.score-ring-container {
  padding: 20px; text-align: center; margin-top: auto;
  border-top: 1px solid var(--border);
}
.score-ring {
  width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.score-ring::before {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  background: var(--bg-secondary);
}
.score-num {
  position: relative; z-index: 1;
  font-size: 1.6rem; font-weight: 800;
}
.score-label { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 1px; }

/* Session list */
.session-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: none; color: var(--text-secondary);
  font-size: 0.8rem; width: 100%; text-align: left;
  transition: all 0.15s; border: none; cursor: pointer;
}
.session-item:hover { background: var(--bg-card); color: var(--text-primary); }
.session-item.active { background: var(--bg-card); color: var(--cyan); }
.session-item .session-icon { font-size: 0.75rem; opacity: 0.5; }

.btn-new-session {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--cyan-dim); color: var(--cyan);
  font-size: 0.85rem; font-weight: 600; width: 100%;
  text-align: left; transition: all 0.15s; border: none;
}
.btn-new-session:hover { background: rgba(0,200,240,0.2); }

/* ── Main Chat Area ─────────────────────────────────────────────────────── */
.main-area {
  grid-column: 2; grid-row: 2;
  display: flex; flex-direction: column;
  background: var(--bg-primary);
  overflow: hidden;
}

/* Welcome Screen */
.welcome-screen {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 24px;
}
.welcome-title {
  font-size: 1.8rem; font-weight: 700; margin-bottom: 8px;
}
.welcome-subtitle {
  font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 36px;
}
.welcome-cards {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; max-width: 520px; width: 100%;
}
.welcome-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px;
  cursor: pointer; transition: all 0.2s; text-align: left;
}
.welcome-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.welcome-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.welcome-card p { font-size: 0.75rem; color: var(--text-secondary); }

/* Chat Messages */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.message { display: flex; gap: 12px; max-width: 85%; animation: fadeIn 0.3s ease; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.message.assistant { align-self: flex-start; }
.msg-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}
.message.user .msg-avatar { background: var(--border); color: var(--text-secondary); }
.message.assistant .msg-avatar { background: var(--cyan-dim); color: var(--cyan); }
.msg-content {
  padding: 14px 18px; border-radius: var(--radius-md);
  font-size: 0.9rem; line-height: 1.65;
}
.message.user .msg-content {
  background: var(--cyan); color: var(--bg-primary);
  border-bottom-right-radius: 4px;
}
.message.assistant .msg-content {
  background: var(--bg-card); border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* Risk cards in messages */
.risk-card {
  margin: 8px 0; padding: 10px 14px; border-radius: var(--radius-sm);
  border-left: 3px solid; display: flex; align-items: center; gap: 10px;
}
.risk-card.critical { border-color: var(--red); background: rgba(255,75,106,0.08); }
.risk-card.high { border-color: var(--orange); background: rgba(255,176,32,0.08); }
.risk-card.medium { border-color: var(--cyan); background: rgba(0,200,240,0.08); }
.risk-card.low { border-color: var(--green); background: rgba(0,214,138,0.08); }
.risk-badge {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 1px;
  padding: 2px 8px; border-radius: 3px;
}
.risk-card.critical .risk-badge { background: var(--red); color: #fff; }
.risk-card.high .risk-badge { background: var(--orange); color: var(--bg-primary); }
.risk-card.medium .risk-badge { background: var(--cyan); color: var(--bg-primary); }
.risk-card.low .risk-badge { background: var(--green); color: var(--bg-primary); }
.risk-text { font-size: 0.85rem; }

/* Checklist items */
.checklist-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; font-size: 0.85rem;
}
.ci-icon { font-size: 1rem; }

/* Code blocks in messages */
.msg-content pre {
  background: var(--bg-code); padding: 12px 16px;
  border-radius: var(--radius-sm); margin: 8px 0; overflow-x: auto;
}
.msg-content code {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--green);
}
.msg-content h2, .msg-content h3 {
  font-size: 1rem; font-weight: 700; margin: 12px 0 6px;
  color: var(--cyan);
}
.msg-content strong { color: var(--text-primary); }
.msg-content .list-item {
  display: flex; gap: 8px; padding: 2px 0;
}
.msg-content .li-num { color: var(--cyan); font-weight: 700; }
.msg-content .spacer { height: 8px; }

/* Typing indicator */
.typing-indicator {
  display: flex; gap: 4px; padding: 14px 18px; align-items: center;
}
.typing-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  animation: blink 1.4s infinite both;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Chat Input */
.chat-input-area {
  padding: 16px 24px; border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.quick-prompts {
  display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.quick-prompt {
  padding: 6px 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text-secondary); font-size: 0.78rem;
  transition: all 0.15s; cursor: pointer;
}
.quick-prompt:hover { border-color: var(--cyan); color: var(--cyan); }
.chat-input-row {
  display: flex; gap: 10px; align-items: flex-end;
}
.chat-input {
  flex: 1; padding: 12px 16px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-primary); font-size: 0.9rem; resize: none;
  outline: none; min-height: 44px; max-height: 120px;
  transition: border-color 0.2s; line-height: 1.4;
}
.chat-input:focus { border-color: var(--cyan); }
.chat-input::placeholder { color: var(--text-dim); }
.btn-send {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--cyan); color: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: all 0.2s; flex-shrink: 0;
}
.btn-send:hover { background: #00DAF8; transform: scale(1.05); }
.btn-send:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

/* ── Right Sidebar ──────────────────────────────────────────────────────── */
.sidebar-right {
  grid-column: 3; grid-row: 2;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  padding: 16px;
  overflow-y: auto;
}
.right-section {
  margin-bottom: 20px;
}
.right-section-title {
  font-size: 0.65rem; font-weight: 700; color: var(--text-dim);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px;
}

/* Company Profile Card */
.company-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px;
}
.company-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.company-meta { font-size: 0.8rem; color: var(--text-secondary); }
.company-meta span { display: block; padding: 2px 0; }
.btn-edit-company {
  margin-top: 10px; padding: 6px 14px; background: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.78rem; width: 100%;
  transition: all 0.2s;
}
.btn-edit-company:hover { border-color: var(--cyan); color: var(--cyan); }

/* Posture Gauge */
.posture-gauge {
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 12px;
}
.gauge-bar {
  height: 8px; background: var(--border); border-radius: 4px;
  overflow: hidden; margin-top: 8px;
}
.gauge-fill {
  height: 100%; border-radius: 4px; transition: width 0.6s ease;
}
.gauge-label {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 0.75rem; color: var(--text-dim);
}

/* Compliance Grid */
.compliance-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.compliance-item {
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 10px 12px; display: flex; align-items: center; gap: 8px;
}
.compliance-icon { font-size: 1rem; }
.compliance-name { font-size: 0.78rem; font-weight: 600; }
.compliance-status { font-size: 0.65rem; color: var(--text-dim); }

/* Findings List */
.findings-list { display: flex; flex-direction: column; gap: 6px; }
.finding-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--bg-card); border-radius: var(--radius-sm);
  font-size: 0.8rem;
}
.finding-severity {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.finding-severity.critical { background: var(--red); }
.finding-severity.high { background: var(--orange); }
.finding-severity.medium { background: var(--cyan); }
.finding-severity.low { background: var(--green); }

/* ── Company Setup Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; backdrop-filter: blur(4px);
}
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  max-width: 500px; width: 90%; max-height: 85vh; overflow-y: auto;
}
.modal h2 { font-size: 1.2rem; margin-bottom: 20px; }
.modal .form-group select {
  width: 100%; padding: 12px 14px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.9rem; outline: none;
}
.modal .form-group select:focus { border-color: var(--cyan); }
.modal-actions { display: flex; gap: 12px; margin-top: 24px; }
.btn-modal-primary {
  flex: 1; padding: 12px; background: var(--cyan); color: var(--bg-primary);
  border-radius: var(--radius-sm); font-weight: 700; transition: all 0.2s;
}
.btn-modal-primary:hover { background: #00DAF8; }
.btn-modal-cancel {
  padding: 12px 24px; background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-secondary); transition: all 0.2s;
}
.btn-modal-cancel:hover { border-color: var(--text-secondary); }

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .app-layout { grid-template-columns: var(--sidebar-w) 1fr; }
  .sidebar-right { display: none; }
}
@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar-left { display: none; }
  .landing-nav-links { display: none; }
  .landing-stats { grid-template-columns: 1fr; }
  .welcome-cards { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   V2 STYLES — SSO, 2FA, Corporate, Language
   ══════════════════════════════════════════════════════════════════════════ */

.sso-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 16px;
}
.sso-divider::before, .sso-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.sso-divider span {
  font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap;
}

.sso-buttons {
  display: flex; gap: 8px;
}
.sso-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
}
.sso-btn:hover { background: var(--bg-card-hover); border-color: var(--cyan-dim); }
.sso-btn svg { flex-shrink: 0; }
.sso-google:hover { border-color: #4285F4; }
.sso-facebook:hover { border-color: #1877F2; }
.sso-x:hover { border-color: #EEF2F6; }

.twofa-icon {
  text-align: center; font-size: 2.5rem; margin-bottom: 8px;
}
#twoFAForm input {
  font-family: 'JetBrains Mono', monospace;
}

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-box {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; max-width: 500px; width: 90%; border-top: 3px solid var(--cyan);
}

.provider-tag {
  display: inline-block; padding: 4px 10px; border-radius: 4px;
  font-size: 0.75rem; font-weight: 600; color: var(--cyan);
  background: rgba(0,200,240,0.08); border: 1px solid rgba(0,200,240,0.2);
}

.corporate-info { border-radius: 8px; }
.corporate-info:hover { border-color: rgba(0,200,240,0.3) !important; }

/* ── Language selector (topbar) ─────────────────────────────────────── */
.lang-selector-mini { position: relative; }
.lang-trigger-mini {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); padding: 4px 10px; font-size: 0.75rem; cursor: pointer;
  font-weight: 600; letter-spacing: 1px;
}
.lang-trigger-mini:hover { border-color: var(--cyan-dim); }
.lang-dropdown-mini {
  position: absolute; top: 100%; right: 0; margin-top: 6px; width: 280px;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); z-index: 500; max-height: 400px;
  overflow: hidden; display: flex; flex-direction: column;
}
.lang-search-box { padding: 8px; border-bottom: 1px solid var(--border); }
.lang-search-box input {
  width: 100%; padding: 8px 10px; background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 0.8rem;
}
.lang-list { overflow-y: auto; max-height: 340px; padding: 4px 0; }
.lang-group-label {
  padding: 6px 12px; font-size: 0.7rem; color: var(--text-dim);
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}
.lang-item {
  display: flex; justify-content: space-between; width: 100%; padding: 8px 14px;
  background: none; border: none; color: var(--text); font-size: 0.85rem;
  cursor: pointer; text-align: left;
}
.lang-item:hover { background: var(--bg-card-hover); }
.lang-item.active { color: var(--cyan); }
.lang-en { font-size: 0.75rem; color: var(--text-dim); }

/* ── Settings panel ─────────────────────────────────────────────────── */
.btn-settings {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); padding: 4px 8px; cursor: pointer; font-size: 0.9rem;
}
.btn-settings:hover { border-color: var(--cyan-dim); background: var(--bg-card); }

.settings-panel {
  position: fixed; top: 0; right: 0; width: 380px; height: 100vh;
  background: var(--bg-secondary); border-left: 1px solid var(--border);
  box-shadow: -8px 0 30px rgba(0,0,0,0.4); z-index: 600; overflow-y: auto;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.settings-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.settings-header h3 { margin: 0; color: var(--text); font-size: 1.1rem; }
.settings-close {
  background: none; border: none; color: var(--text-dim); font-size: 1.2rem;
  cursor: pointer; padding: 4px 8px;
}
.settings-close:hover { color: var(--text); }

.settings-section {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.settings-label { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.settings-desc { font-size: 0.85rem; color: var(--text-dim); margin: 4px 0; line-height: 1.5; }
.settings-desc-sm { font-size: 0.75rem; color: var(--text-dim); margin: 2px 0; }
.btn-settings-action {
  margin-top: 10px; padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; color: var(--cyan); font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
}
.btn-settings-action:hover { background: var(--bg-card-hover); border-color: var(--cyan-dim); }

/* ── Topbar user area fix ───────────────────────────────────────────── */
.topbar-user { display: flex; align-items: center; gap: 10px; }

/* ── Nav language selector (landing page) ──────────────────────────── */
.nav-lang-selector { position: relative; display: inline-block; }
.nav-lang-btn {
  background: rgba(0,200,240,0.08); border: 1px solid var(--cyan-dim); border-radius: 6px;
  color: var(--cyan); padding: 6px 14px; cursor: pointer; font-size: 0.85rem;
  font-weight: 600; transition: all 0.2s; white-space: nowrap;
}
.nav-lang-btn:hover { border-color: var(--cyan); background: rgba(0,200,240,0.15); }
.nav-lang-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 8px; width: 280px;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6); z-index: 500; max-height: 400px;
  overflow: hidden; display: flex; flex-direction: column;
}
