/* ===================================================================
   JobSpy Alerts — Design System & Stylesheet
   Full Responsive Layout with Dark & Light Theme Support
   - Dark Theme: #0F172A (Slate 900) & #1E293B
   - Light Theme: #F8FAFC (Slate 50) & #FFFFFF
   - Primary: #10B981 (Dark Mode) / #059669 (Light Mode)
   - Typography: 'Inter', sans-serif
   =================================================================== */

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

/* ─────────────────────────────────────────────
   CSS Variables: Dark Theme (Default)
   ───────────────────────────────────────────── */
:root, [data-theme="dark"] {
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-glow: rgba(16, 185, 129, 0.2);
  --primary-subtle: rgba(16, 185, 129, 0.12);
  
  --bg-primary: #0F172A;
  --bg-surface: #1E293B;
  --bg-surface-hover: #243248;
  --bg-card: rgba(30, 41, 59, 0.85);
  
  --sidebar-bg: #0C1322;
  --tag-box-bg: #0F172A;
  --checkbox-bg: #0F172A;
  --select-bg: #0F172A;
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --border: #334155;
  --border-light: rgba(255, 255, 255, 0.08);
  
  --accent: #38BDF8;
  --telegram: #0088CC;
  --telegram-hover: #0077B5;
  --danger: #EF4444;
  --warning: #F59E0B;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* ─────────────────────────────────────────────
   CSS Variables: Light Theme
   ───────────────────────────────────────────── */
[data-theme="light"] {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-glow: rgba(5, 150, 105, 0.15);
  --primary-subtle: rgba(5, 150, 105, 0.1);
  
  --bg-primary: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #F1F5F9;
  --bg-card: #FFFFFF;
  
  --sidebar-bg: #FFFFFF;
  --tag-box-bg: #F8FAFC;
  --checkbox-bg: #F8FAFC;
  --select-bg: #FFFFFF;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  
  --border: #E2E8F0;
  --border-light: rgba(0, 0, 0, 0.05);
  
  --accent: #0284C7;
  --telegram: #0088CC;
  --telegram-hover: #0077B5;
  --danger: #EF4444;
  --warning: #D97706;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

:root {
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─────────────────────────────────────────────
   Brand & Logo
   ───────────────────────────────────────────── */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--primary-subtle);
  border: 1px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  flex-shrink: 0;
}

.brand-text {
  font-weight: 700;
}
.brand-text span {
  color: var(--primary);
  margin-left: 0.25rem;
}

.badge-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-hover);
  color: var(--text-secondary);
}

/* ─────────────────────────────────────────────
   Theme Toggle Button
   ───────────────────────────────────────────── */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--primary);
  transform: rotate(15deg);
}

/* ─────────────────────────────────────────────
   Buttons
   ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
}
[data-theme="dark"] .btn-primary {
  color: #0F172A;
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.btn-telegram {
  background: #0088CC;
  color: #FFFFFF;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.35);
}
.btn-telegram:hover {
  background: #0099E6;
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.5);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────
   Mobile Top Bar (Shown <= 900px)
   ───────────────────────────────────────────── */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.mobile-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1040;
}

/* ─────────────────────────────────────────────
   App Layout: Left Sidebar + Main Content
   ───────────────────────────────────────────── */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

.sidebar-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.nav-link:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--primary-subtle);
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

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

.sidebar-footer .nav-link {
  color: var(--danger);
}
.sidebar-footer .nav-link:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Main Dashboard Area */
.main-wrapper {
  flex: 1;
  padding: 2rem 2.5rem;
  max-width: 1400px;
  overflow-y: auto;
  min-width: 0;
}

/* Header Greeting Bar */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.dash-greeting h1 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.dash-greeting p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Active Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.status-pill.active {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.status-pill.paused {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--warning);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-pill.active .status-dot {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}
.status-pill.paused .status-dot {
  background: var(--warning);
}

/* ─────────────────────────────────────────────
   Metric / Stat Cards (4 in row)
   ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.stat-info .stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  font-weight: 500;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.green {
  background: var(--primary-subtle);
  color: var(--primary);
}

.stat-icon.blue {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
}

.stat-icon.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #C084FC;
}

.stat-icon.orange {
  background: rgba(249, 115, 22, 0.15);
  color: #FB923C;
}

/* ─────────────────────────────────────────────
   Main Content Grid: 2 Columns
   ───────────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: start;
}

.card-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s ease;
}
.panel-link:hover {
  color: var(--primary);
}

/* ─────────────────────────────────────────────
   Recent Job Alerts List
   ───────────────────────────────────────────── */
.job-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.job-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.15s ease;
}

.job-card:hover {
  border-color: var(--primary);
  background: var(--bg-surface-hover);
  transform: translateY(-1px);
}

.job-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.job-platform-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.job-platform-icon.linkedin {
  background: #0077B5;
  color: #FFFFFF;
}
.job-platform-icon.indeed {
  background: #003A9B;
  color: #FFFFFF;
}
.job-platform-icon.glassdoor {
  background: #0CAA41;
  color: #FFFFFF;
}
.job-platform-icon.ziprecruiter {
  background: #5B9B27;
  color: #FFFFFF;
}
.job-platform-icon.default {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.job-details {
  min-width: 0;
}
.job-details h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-hover);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.job-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-view-job {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-view-job:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* ─────────────────────────────────────────────
   Search Preferences Panel
   ───────────────────────────────────────────── */
.form-section {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Tag Cloud Manager */
.tag-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  background: var(--tag-box-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.65rem;
  min-height: 44px;
}

.tag-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-subtle);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

.tag-chip-remove {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1;
}
.tag-chip-remove:hover {
  color: var(--danger);
}

.tag-inline-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.825rem;
  flex: 1;
  min-width: 120px;
}
.tag-inline-input::placeholder {
  color: var(--text-muted);
}

/* Platform Checkboxes */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.platform-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--checkbox-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.platform-checkbox input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.platform-checkbox:hover {
  border-color: var(--primary);
}

/* Styled Select */
.styled-select {
  width: 100%;
  background: var(--select-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.styled-select:focus {
  border-color: var(--primary);
}

/* Toggle Switch (iOS Style) */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.switch-label-wrap h5 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.switch-label-wrap p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #94A3B8;
  transition: .2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ─────────────────────────────────────────────
   Telegram Connection Card
   ───────────────────────────────────────────── */
.telegram-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.tg-circle-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 136, 204, 0.12);
  color: #0088CC;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.tg-circle-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.telegram-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.telegram-box p.subtitle {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.tg-steps {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  background: var(--bg-surface-hover);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.tg-step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tg-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0088CC;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   Landing Page
   ───────────────────────────────────────────── */
.landing-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
  gap: 1.5rem;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.landing-nav-links a:hover {
  color: var(--text-primary);
}

.hero-section {
  max-width: 1300px;
  margin: 1.5rem auto 3rem;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

.hero-content h1 {
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-content h1 span.highlight {
  color: var(--primary);
  display: block;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Smartphone Mockup */
.phone-mockup-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 320px;
  background: #0B1120;
  border: 4px solid #334155;
  border-radius: 36px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px var(--primary-glow);
  overflow: hidden;
  padding: 1.25rem 1rem;
  position: relative;
  color: #F8FAFC;
}

.phone-notch {
  width: 90px;
  height: 18px;
  background: #334155;
  border-radius: 10px;
  margin: 0 auto 1.25rem;
}

.tg-phone-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.tg-bot-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0088CC;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 0.75rem;
}

.tg-bubble {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 1rem;
  font-size: 0.8rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tg-bubble-badge {
  font-weight: 700;
  color: #10B981;
  margin-bottom: 0.5rem;
}

.tg-bubble-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.2rem;
}

.tg-bubble-loc {
  color: #94A3B8;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.tg-bubble-platform {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  color: #38BDF8;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.tg-bubble-body {
  color: #94A3B8;
  font-size: 0.75rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.tg-bubble-btn {
  display: block;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-weight: 600;
  padding: 0.4rem;
  border-radius: 8px;
  text-decoration: none;
}

.floating-badge {
  position: absolute;
  top: -15px;
  right: -15px;
  background: #0088CC;
  color: #FFFFFF;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 136, 204, 0.6);
}

/* ─────────────────────────────────────────────
   Sign In Page
   ───────────────────────────────────────────── */
.login-page-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 1.5rem;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2.25rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.login-card p.subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 1.5rem 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.divider span {
  padding: 0 0.75rem;
}

/* ─────────────────────────────────────────────
   Interactive Demo Modal & Simulator
   ───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.demo-modal-card {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px var(--primary-glow);
  padding: 2rem 2.25rem;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .demo-modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  color: #FFFFFF;
  background: var(--danger);
  border-color: var(--danger);
}

.demo-header {
  margin-bottom: 2rem;
  padding-right: 2.5rem;
}

.demo-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.demo-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.sim-control-panel {
  background: var(--tag-box-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.sim-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1.25rem;
}

.preset-chip {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.775rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-chip:hover, .preset-chip.active {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

.sim-console {
  background: #080C14;
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.775rem;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1rem;
  color: #94A3B8;
}

.console-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 0.2s ease;
}
.console-line.success { color: #34D399; }
.console-line.accent { color: #38BDF8; }

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

.phone-shake {
  animation: phoneAlertBounce 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes phoneAlertBounce {
  10%, 90% { transform: translate3d(-1px, 0, 0) scale(1.02); }
  20%, 80% { transform: translate3d(2px, 0, 0) scale(1.02); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0) scale(1.02); }
  40%, 60% { transform: translate3d(3px, 0, 0) scale(1.02); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--primary);
  color: var(--text-primary);
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  animation: slideIn 0.3s ease-out;
}

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

/* ─────────────────────────────────────────────
   Responsive Design (Desktop, Tablet, Mobile)
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .demo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .mobile-topbar {
    display: flex;
  }
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1050;
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
  }
  .sidebar-backdrop.active {
    display: block;
  }
  .main-wrapper {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 640px) {
  .landing-navbar {
    padding: 1rem;
  }
  .landing-nav-links {
    display: none;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .platform-grid {
    grid-template-columns: 1fr;
  }
  .job-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .job-meta {
    width: 100%;
    justify-content: space-between;
  }
  .demo-modal-card {
    padding: 1.5rem 1rem;
  }
}
