/* ==============================================================================
   JobRadar PRO – The Honest Job Board Design System
   ============================================================================== */

:root {
  --bg-deep: #070a13;
  --bg-surface: #0e1424;
  --bg-surface-elevated: #151e34;
  --bg-surface-hover: #1c2742;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  --border-emerald: rgba(16, 185, 129, 0.35);
  --border-crimson: rgba(239, 68, 68, 0.35);

  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;

  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.12);
  --cyan: #06b6d4;
  --cyan-bg: rgba(6, 182, 212, 0.12);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.12);
  --crimson: #ef4444;
  --crimson-bg: rgba(239, 68, 68, 0.12);
  --violet: #8b5cf6;
  --violet-bg: rgba(139, 92, 246, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow-emerald: 0 0 25px rgba(16, 185, 129, 0.2);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  padding-bottom: 60px;
}

.app-layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

/* ==============================================================================
   Topbar & Brand
   ============================================================================== */
.topbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow-emerald);
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.5px;
}

.badge-pro {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #000000;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-sub);
}

.shield-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--border-emerald);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: #6ee7b7;
}

.live-pulse {
  width: 8px;
  height: 8px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Profile Chip Selector */
.target-profile-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
  scrollbar-width: none;
}

.target-profile-bar::-webkit-scrollbar {
  display: none;
}

.profile-chip {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.profile-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.profile-chip.active {
  background: var(--emerald-bg);
  border-color: var(--emerald);
  color: #6ee7b7;
}

/* Navigation Tabs */
.nav-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.nav-tab {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-tab.active {
  background: var(--bg-surface-elevated);
  color: #ffffff;
  border: 1px solid var(--border-highlight);
}

.counter-badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

/* ==============================================================================
   Search Hero & Filter Pills (Anti-Bullshit Cockpit)
   ============================================================================== */
.search-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.search-inputs-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 650px) {
  .search-inputs-grid {
    grid-template-columns: 1fr;
  }
}

.input-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  pointer-events: none;
}

.hero-input {
  width: 100%;
  background: #080c16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 42px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.hero-input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Filter Pills */
.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--emerald-bg);
  border-color: var(--emerald);
  color: #6ee7b7;
}

.pill-check {
  font-size: 12px;
  font-weight: 800;
}

/* Results Meta */
.results-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 6px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.btn-text:hover { color: var(--text-main); }

/* ==============================================================================
   Job Card Design (Ehrliche Stellenanzeige)
   ============================================================================== */
.job-feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.job-entry-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.job-entry-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.job-entry-card.scam-warning {
  border-color: var(--crimson);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.06) 0%, var(--bg-surface) 100%);
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.employer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.employer-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.badge-direkt {
  background: var(--emerald-bg);
  border: 1px solid var(--emerald);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.badge-zeitarbeit {
  background: var(--amber-bg);
  border: 1px solid var(--amber);
  color: #fcd34d;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.job-card-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
}

.serioes-score-box {
  text-align: right;
  flex-shrink: 0;
}

.score-badge {
  font-size: 16px;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.score-badge.grade-a {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--emerald);
  color: #34d399;
}

.score-badge.grade-warnung {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--crimson);
  color: #f87171;
  animation: pulse 1s infinite;
}

.score-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Key Metrics Box (Gehalt, Ort, Zeit) */
.metrics-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 14px 0;
  font-size: 13px;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-sub);
}

.metric-item strong {
  color: #ffffff;
}

.salary-tag-top {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  margin-left: 4px;
}

/* Bullshit Decoder Box */
.bullshit-decoder-box {
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid var(--violet);
  padding: 12px 14px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 14px;
}

.decoder-title {
  font-size: 11px;
  font-weight: 800;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.decoder-quote {
  font-size: 12px;
  color: var(--text-sub);
  font-style: italic;
  margin-bottom: 4px;
}

.decoder-real {
  font-size: 13px;
  color: #ffffff;
  font-weight: 600;
}

/* Flags Checklist */
.flags-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 12px;
}

.flag-green {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #a7f3d0;
}

.flag-red {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #fca5a5;
  font-weight: 600;
}

/* Card Actions */
.card-bottom-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: #000000;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-highlight);
}

/* ==============================================================================
   Scanner Panel (Tab 2)
   ============================================================================== */
.card-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.panel-header {
  margin-bottom: 20px;
}

.panel-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.panel-sub {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

.scanner-textarea {
  width: 100%;
  height: 170px;
  background: #080c16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  resize: vertical;
}

.scanner-textarea:focus {
  border-color: var(--emerald);
}

.btn-scanner-submit {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #000000;
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-scanner-submit:hover {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* Comparison Grid (Tab 3) */
.deficit-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

@media (max-width: 650px) {
  .deficit-comparison-grid {
    grid-template-columns: 1fr;
  }
}

.comparison-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.comp-icon.bad {
  font-size: 22px;
  margin-bottom: 6px;
}

.comp-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.comp-bad {
  background: rgba(239, 68, 68, 0.08);
  border-left: 2px solid var(--crimson);
  padding: 8px 12px;
  font-size: 12px;
  color: #fca5a5;
  margin-bottom: 8px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.comp-good {
  background: rgba(16, 185, 129, 0.08);
  border-left: 2px solid var(--emerald);
  padding: 8px 12px;
  font-size: 12px;
  color: #6ee7b7;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Modal */
.modal-layer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-layer.active {
  display: flex;
}

.modal-box {
  background: #0f1629;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.modal-x {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

/* Toast */
.toast-box {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0e172a;
  border: 1px solid var(--border-emerald);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.25s ease;
  z-index: 1000;
  opacity: 0;
}

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

.hidden {
  display: none !important;
}

/* ==============================================================================
   Advanced General Filter Panel Styling
   ============================================================================== */

.toggle-advanced-btn {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.toggle-advanced-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--violet);
}

.badge-mini {
  background: var(--violet);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.advanced-filters-panel {
  background: #080c16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 14px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.advanced-filters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 768px) {
  .advanced-filters-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .advanced-filters-grid {
    grid-template-columns: 1fr;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: 0.3px;
}

.filter-select {
  background: #0e1424;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-main);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.advanced-filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.benefit-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px 0;
}

.benefit-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
