/* ============================================
   Ciudadano App — Design System
   Ciudad Juárez · 2026
   ============================================ */

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

/* ── CSS Variables ── */
:root {
  --font: 'Outfit', -apple-system, sans-serif;
  --primary: #F97316;
  --primary-light: #FB923C;
  --primary-dark: #EA580C;
  --accent: #F59E0B;
  --accent-light: #FBBF24;
  --success: #22C55E;
  --danger: #EF4444;
  --warning: #EAB308;
  --info: #3B82F6;

  --bg: #0F172A;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-solid: #1E293B;
  --bg-input: rgba(51, 65, 85, 0.5);
  --bg-surface: rgba(15, 23, 42, 0.95);
  --text: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(148, 163, 184, 0.15);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #F97316, #EA580C);
  --gradient-accent: linear-gradient(135deg, #F59E0B, #EF4444);
  --gradient-cool: linear-gradient(135deg, #06B6D4, #3B82F6);
  --gradient-hero: linear-gradient(135deg, #F59E0B, #F97316, #EF4444);
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-solid: #FFFFFF;
  --bg-input: #F1F5F9;
  --bg-surface: rgba(255, 255, 255, 0.95);
  --text: #1E293B;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: rgba(226, 232, 240, 0.8);
  --glass: rgba(255, 255, 255, 0.5);
  --glass-strong: rgba(255, 255, 255, 0.7);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .bg-mesh {
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(249, 115, 22, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 70%, rgba(234, 88, 12, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 90%, rgba(251, 146, 60, 0.03) 0%, transparent 70%);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; }
button { cursor: pointer; font-family: var(--font); border: none; }
input, textarea, select { font-family: var(--font); }
img { max-width: 100%; display: block; }

/* ── Animated Background ── */
.bg-mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(249, 115, 22, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 70%, rgba(234, 88, 12, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 90%, rgba(251, 146, 60, 0.06) 0%, transparent 70%);
}

/* ── App Layout ── */
.app-shell { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; }

.app-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 12px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.app-header .logo { display: flex; align-items: center; gap: 10px; }
.app-header .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
}
.app-header .logo-text { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }
.app-header .logo-text span { color: var(--primary-light); }
.app-header .header-actions { display: flex; gap: 8px; align-items: center; }

.app-content {
  flex: 1; padding: 0 16px 100px; max-width: 600px; width: 100%; margin: 0 auto;
}

@media (min-width: 768px) {
  .app-content { max-width: 720px; padding: 0 24px 40px; }
}
@media (min-width: 1024px) {
  .app-content { max-width: 900px; }
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 16px; padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 16px; border-radius: 12px;
  background: none; color: var(--text-muted);
  font-size: 10px; font-weight: 500;
  transition: var(--transition);
}
.nav-item svg { width: 22px; height: 22px; transition: var(--transition); }
.nav-item.active { color: var(--primary-light); }
.nav-item.active svg { transform: scale(1.1); }
.nav-item:hover { color: var(--text); background: var(--glass); }

.nav-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
  transform: translateY(-12px);
  transition: var(--transition);
}
.nav-fab svg { width: 24px; height: 24px; color: #fff; }
.nav-fab:hover { transform: translateY(-16px); box-shadow: 0 6px 28px rgba(249, 115, 22, 0.5); }

@media (min-width: 768px) {
  .bottom-nav { display: none; }
}

/* ── SPA View Management ── */
.view { display: none; animation: fadeSlideIn 0.4s ease; }
.view.active { display: block; }

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

/* ── Cards ── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}
.card:hover { border-color: rgba(249, 115, 22, 0.3); box-shadow: var(--shadow); }

.card-glass {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  transition: var(--transition);
  border: none; outline: none;
}
.btn-primary { background: linear-gradient(135deg, #F97316, #EA580C); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4); }
.btn-secondary { background: var(--glass-strong); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--glass); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 8px 16px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-icon {
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: var(--glass); color: var(--text); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--glass-strong); }
.btn-icon svg { width: 18px; height: 18px; }

.btn-full { width: 100%; }

/* ── Form Elements ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 16px;
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
}
.form-input:focus { outline: none; border-color: #F97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }
.form-input::placeholder { color: var(--text-muted); }

/* ── Section Headers ── */
.section-title {
  font-size: 20px; font-weight: 700; margin: 24px 0 16px;
  letter-spacing: -0.5px;
}
.section-subtitle { color: var(--text-secondary); font-size: 14px; margin-top: -8px; margin-bottom: 16px; }

/* ── Chips / Tags ── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  background: var(--glass); color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.chip.active, .chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.tag {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  color: #fff;
}

/* ── Scrollable Row ── */
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; -ms-overflow-style: none; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }

/* ── Search Bar ── */
.search-bar {
  position: relative; margin: 16px 0;
}
.search-bar svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); }
.search-bar input { padding-left: 42px; }

/* ── Loading ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--glass-strong) 50%, var(--bg-card) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 14px 20px; border-radius: var(--radius-sm);
  background: var(--bg-card-solid); color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 500;
  animation: slideInRight 0.3s ease;
  max-width: 360px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── Login View ── */
.login-wrapper {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(ellipse 600px 400px at 30% 20%, rgba(249, 115, 22, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 70% 80%, rgba(234, 88, 12, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 500px 400px at 50% 50%, rgba(251, 146, 60, 0.06) 0%, transparent 70%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(249, 115, 22, 0.12);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 16px 48px rgba(249, 115, 22, 0.08), var(--shadow-lg);
  animation: fadeScaleIn 0.5s ease;
}
@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.login-logo {
  width: 140px; height: auto;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  background: #fff;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.10);
}
.login-logo img {
  width: 100%; height: auto; display: block;
}
.login-title {
  text-align: center; font-size: 24px; font-weight: 800; margin-bottom: 6px;
  background: linear-gradient(135deg, #F97316, #EA580C);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-subtitle { text-align: center; color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; font-weight: 500; }

.auth-toggle { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-secondary); }
.auth-toggle a { color: #F97316; font-weight: 600; cursor: pointer; }
.auth-toggle a:hover { text-decoration: underline; color: #EA580C; }

/* ── Dashboard ── */
.greeting { font-size: 28px; font-weight: 800; margin: 20px 0 4px; letter-spacing: -0.5px; }
.greeting-sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }

.weather-card {
  background: var(--gradient-cool);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  position: relative; overflow: hidden;
}
.weather-card::after {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.weather-temp { font-size: 56px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.weather-condition { font-size: 16px; font-weight: 500; opacity: 0.9; margin-top: 4px; }
.weather-details { display: flex; gap: 20px; margin-top: 16px; font-size: 13px; opacity: 0.8; }
.weather-icon { font-size: 48px; position: absolute; top: 20px; right: 20px; z-index: 1; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.info-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.info-card .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.info-card .value { font-size: 24px; font-weight: 700; }
.info-card .sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ── Section Header Row ── */
.section-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 24px 0 16px;
}
.section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px;
  background: rgba(34, 197, 94, 0.12); color: var(--success);
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  animation: pulseDot 1.5s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ── Crossings Grid ── */
.crossings-grid {
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
@media (min-width: 480px) {
  .crossings-grid { grid-template-columns: 1fr 1fr; }
}

.crossing-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeSlideIn 0.4s ease both;
}
.crossing-card:nth-child(1) { animation-delay: 0s; }
.crossing-card:nth-child(2) { animation-delay: 0.08s; }
.crossing-card:nth-child(3) { animation-delay: 0.16s; }
.crossing-card:nth-child(4) { animation-delay: 0.24s; }
.crossing-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.crossing-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.crossing-card.status-green::before { background: linear-gradient(90deg, #22C55E, #4ADE80); }
.crossing-card.status-yellow::before { background: linear-gradient(90deg, #EAB308, #FBBF24); }
.crossing-card.status-red::before { background: linear-gradient(90deg, #EF4444, #F87171); }
.crossing-card.status-gray::before { background: linear-gradient(90deg, #64748B, #94A3B8); }

.crossing-card-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.crossing-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 18px;
}
.crossing-icon.icon-green { background: rgba(34, 197, 94, 0.12); color: var(--success); }
.crossing-icon.icon-yellow { background: rgba(234, 179, 8, 0.12); color: var(--warning); }
.crossing-icon.icon-red { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.crossing-icon.icon-gray { background: rgba(100, 116, 139, 0.12); color: var(--text-muted); }

.crossing-name {
  font-size: 15px; font-weight: 600; line-height: 1.3; flex: 1;
}
.crossing-status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.4px;
}
.crossing-status-badge.badge-green { background: rgba(34, 197, 94, 0.12); color: #4ADE80; }
.crossing-status-badge.badge-yellow { background: rgba(234, 179, 8, 0.12); color: #FBBF24; }
.crossing-status-badge.badge-red { background: rgba(239, 68, 68, 0.12); color: #F87171; }
.crossing-status-badge.badge-gray { background: rgba(100, 116, 139, 0.12); color: var(--text-muted); }

.crossing-stats {
  display: flex; align-items: center; justify-content: space-between;
}
.crossing-wait {
  display: flex; flex-direction: column;
}
.crossing-wait-value {
  font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1;
}
.crossing-wait-value.wait-green { color: var(--success); }
.crossing-wait-value.wait-yellow { color: var(--warning); }
.crossing-wait-value.wait-red { color: var(--danger); }
.crossing-wait-value.wait-gray { color: var(--text-muted); }
.crossing-wait-label {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  text-transform: uppercase; letter-spacing: 0.3px;
}

/* Legacy dot (for summary card) */
.crossing-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.news-card {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: var(--transition);
}
.news-card:hover { opacity: 0.8; }
.news-card:last-child { border-bottom: none; }
.news-img { width: 80px; height: 60px; border-radius: var(--radius-xs); object-fit: cover; flex-shrink: 0; }
.news-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.news-meta { display: flex; gap: 10px; align-items: center; font-size: 11px; color: var(--text-muted); }

.poll-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.poll-question { font-size: 16px; font-weight: 600; margin-bottom: 16px; line-height: 1.4; }
.poll-actions { display: flex; gap: 12px; }
.poll-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  background: var(--glass); color: var(--text);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.poll-btn:hover { transform: translateY(-2px); }
.poll-btn.like:hover, .poll-btn.like.voted { background: rgba(34, 197, 94, 0.15); border-color: var(--success); color: var(--success); }
.poll-btn.dislike:hover, .poll-btn.dislike.voted { background: rgba(239, 68, 68, 0.15); border-color: var(--danger); color: var(--danger); }
.poll-count { font-size: 12px; color: var(--text-muted); }

/* ── Events View ── */
.calendar-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px 0;
  -ms-overflow-style: none; scrollbar-width: none;
}
.calendar-strip::-webkit-scrollbar { display: none; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--border);
  cursor: pointer; transition: var(--transition); min-width: 52px;
  font-size: 12px; color: var(--text-secondary);
}
.cal-day .day-num { font-size: 18px; font-weight: 700; color: var(--text); }
.cal-day.active { background: var(--gradient-primary); border-color: var(--primary); color: #fff; }
.cal-day.active .day-num { color: #fff; }
.cal-day:hover { border-color: var(--primary-light); }
.cal-day .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

.event-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition); cursor: pointer;
  margin-bottom: 12px;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-card-img { width: 100%; height: 160px; object-fit: cover; }
.event-card-body { padding: 16px; }
.event-card-category { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary-light); margin-bottom: 6px; }
.event-card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.event-card-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary); }
.event-card-meta svg { width: 14px; height: 14px; }
.event-card-meta span { display: flex; align-items: center; gap: 4px; }

.event-card.featured { border-color: rgba(245, 158, 11, 0.3); }
.event-card.featured::before {
  content: '⭐ Destacado';
  display: block; padding: 6px 16px;
  background: var(--gradient-hero);
  font-size: 11px; font-weight: 700; color: #fff;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── Jobs View ── */
.job-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: var(--transition); cursor: pointer;
  margin-bottom: 12px;
}
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.job-card.featured { border-color: rgba(249, 115, 22, 0.3); }
.job-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.job-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.job-title { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.job-company { font-size: 13px; color: var(--text-secondary); }
.job-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.job-tag {
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 500;
  background: var(--glass); color: var(--text-secondary);
}

/* ── Assistant View ── */
.chat-container { display: flex; flex-direction: column; height: calc(100dvh - 160px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 0; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble {
  max-width: 85%; padding: 14px 18px;
  border-radius: 18px; font-size: 14px; line-height: 1.5;
  animation: fadeSlideIn 0.3s ease;
}
.chat-bubble.bot {
  background: var(--bg-card); border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  background: var(--gradient-primary); color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-input-bar {
  display: flex; gap: 8px; padding: 12px 0;
  border-top: 1px solid var(--border);
}
.chat-input-bar input { flex: 1; }
.chat-suggestions { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0; }

/* ── Hero View ── */
.hero-banner {
  border-radius: var(--radius);
  overflow: hidden; position: relative;
  margin: 16px 0;
}
.hero-banner img { width: 100%; height: 280px; object-fit: cover; }
.hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
}
.hero-name { font-size: 24px; font-weight: 800; }
.hero-desc { font-size: 14px; opacity: 0.9; margin-top: 4px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.hero-stat {
  text-align: center; padding: 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}
.hero-stat .stat-val { font-size: 24px; font-weight: 800; color: var(--primary-light); }
.hero-stat .stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

.candidate-card {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  transition: var(--transition);
}
.candidate-card:hover { border-color: var(--primary-light); }
.candidate-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--glass); }
.candidate-info { flex: 1; }
.candidate-name { font-size: 15px; font-weight: 600; }
.candidate-desc { font-size: 12px; color: var(--text-secondary); }

/* ── License View ── */
.license-card {
  background: var(--gradient-primary);
  border-radius: 20px;
  padding: 32px 24px;
  color: #fff;
  position: relative; overflow: hidden;
  margin: 24px 0;
}
.license-card::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.license-card::after {
  content: ''; position: absolute; bottom: -30px; left: -30px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.license-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; position: relative; z-index: 1; }
.license-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }
.license-status { padding: 4px 12px; border-radius: 20px; background: rgba(34, 197, 94, 0.3); font-size: 11px; font-weight: 600; }
.license-body { position: relative; z-index: 1; }
.license-name { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.license-id { font-size: 14px; opacity: 0.8; letter-spacing: 1px; margin-bottom: 20px; }
.license-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.license-detail .detail-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.6; }
.license-detail .detail-value { font-size: 14px; font-weight: 600; }

.license-actions { display: flex; gap: 12px; margin: 16px 0; justify-content: center; }
.license-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); font-size: 12px; font-weight: 500;
  transition: var(--transition); flex: 1;
}
.license-action-btn svg { width: 24px; height: 24px; color: var(--primary-light); }
.license-action-btn:hover { border-color: var(--primary-light); transform: translateY(-2px); }

/* ── Profile View ── */
.profile-header {
  text-align: center; padding: 32px 0;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: #fff;
  margin: 0 auto 16px;
}
.profile-name { font-size: 22px; font-weight: 700; }
.profile-email { font-size: 14px; color: var(--text-secondary); }

.settings-group { margin: 20px 0; }
.settings-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; padding-left: 4px; }
.settings-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px;
  cursor: pointer; transition: var(--transition);
}
.settings-item:hover { border-color: var(--primary-light); }
.settings-item svg { width: 20px; height: 20px; color: var(--primary-light); flex-shrink: 0; }
.settings-item .settings-label { flex: 1; font-size: 14px; font-weight: 500; }
.settings-item .settings-value { font-size: 13px; color: var(--text-muted); }

/* ── Toggle Switch ── */
.toggle {
  position: relative; width: 44px; height: 24px;
  background: var(--border); border-radius: 12px;
  cursor: pointer; transition: var(--transition);
}
.toggle.active { background: var(--primary); }
.toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: var(--transition);
}
.toggle.active::after { transform: translateX(20px); }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.3; }
.empty-state p { font-size: 16px; font-weight: 500; }

/* ── Modal / Overlay ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn 0.2s ease;
}
.modal-content {
  background: var(--bg-card-solid); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 500px;
  max-height: 80vh; overflow-y: auto;
  padding: 24px; animation: fadeScaleIn 0.3s ease;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Staggered Animations ── */
.stagger > * { animation: fadeSlideIn 0.4s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.05s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }
.stagger > *:nth-child(6) { animation-delay: 0.25s; }
.stagger > *:nth-child(7) { animation-delay: 0.3s; }
.stagger > *:nth-child(8) { animation-delay: 0.35s; }

/* ── Utility ── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ── Pulse ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.pulse { animation: pulse 2s infinite; }

/* ── Entity Card ── */
.entity-card-main {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.entity-card-top {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.entity-logo {
  width: 110px;
  height: 110px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.entity-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 115, 22, 0.08);
  color: var(--primary);
}

.entity-header-info {
  flex: 1;
  min-width: 220px;
}

.entity-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.entity-badge {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.entity-badge-category {
  background: rgba(249, 115, 22, 0.1);
  color: var(--primary);
}

.entity-badge-status {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.entity-name {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.entity-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
  margin: 0;
}

.entity-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.entity-detail-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: var(--bg-input);
  border-radius: 12px;
  transition: background .2s;
}

.entity-detail-icon {
  color: var(--primary);
  padding-top: 2px;
  flex-shrink: 0;
}

.entity-detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.entity-detail-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin-top: 2px;
}

.social-link {
  display: flex;
  padding: 6px;
  border-radius: 8px;
  transition: transform .2s;
}
.social-link:hover { transform: translateY(-2px); }
.social-fb { color: #1877F2; background: rgba(24,119,242,0.1); }
.social-ig { color: #E1306C; background: rgba(225,48,108,0.1); }
.social-web { color: var(--text-secondary); background: var(--glass-strong); }
