/* =====================================================
   INTERNSHIP & PLACEMENT TRACKER — STYLESHEET
   Author: AI Assistant
   Description: Complete responsive styles with dark mode,
                animations, and professional UI design.
===================================================== */

/* ===== CSS CUSTOM PROPERTIES (DESIGN TOKENS) ===== */
:root {
  /* Brand Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --primary-glow: rgba(99, 102, 241, 0.15);

  /* Status Colors */
  --applied-color: #f59e0b;
  --applied-bg: #fffbeb;
  --applied-border: #fcd34d;
  --interview-color: #3b82f6;
  --interview-bg: #eff6ff;
  --interview-border: #93c5fd;
  --rejected-color: #ef4444;
  --rejected-bg: #fef2f2;
  --rejected-border: #fca5a5;
  --selected-color: #10b981;
  --selected-bg: #ecfdf5;
  --selected-border: #6ee7b7;

  /* Neutral Palette */
  --bg-primary: #f0f2ff;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8f9ff;
  --bg-card: #ffffff;
  --text-primary: #1e1b4b;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.12);
  --shadow-hover: 0 20px 40px -10px rgba(99,102,241,0.18);

  /* Typography */
  --font-family: 'Inter', sans-serif;

  /* Spacing & Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Navbar height */
  --navbar-height: 68px;
}

/* ===== DARK MODE OVERRIDES ===== */
[data-theme="dark"] {
  --bg-primary: #0f0e1a;
  --bg-secondary: #1a1928;
  --bg-tertiary: #16152a;
  --bg-card: #1e1d30;
  --text-primary: #f0f0ff;
  --text-secondary: #a0a0c0;
  --text-muted: #6b6b90;
  --border-color: #2e2d4a;
  --border-light: #252440;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.6);
  --shadow-hover: 0 20px 40px -10px rgba(99,102,241,0.25);
  --applied-bg: #2d2510;
  --interview-bg: #0d1f3a;
  --rejected-bg: #2a0f0f;
  --selected-bg: #0d2620;
  --primary-glow: rgba(99, 102, 241, 0.25);
}

/* ===== GLOBAL RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition-slow), color var(--transition-slow);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Gradient background blob effect */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--transition-slow);
}
body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16,185,129,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ===== UTILITY CLASSES ===== */
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: var(--radius-full);
}

/* =====================================================
   NAVIGATION BAR
===================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-slow), border-color var(--transition-slow);
}

[data-theme="dark"] .navbar {
  background: rgba(26, 25, 40, 0.88);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-icon {
  font-size: 1.4rem;
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-light));
}

.nav-title {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-nav:hover, .btn-nav.active {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary-light);
}
.btn-nav.active {
  font-weight: 600;
}

.btn-add-nav {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.btn-add-nav:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #7c3aed 100%);
  box-shadow: 0 6px 18px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

.dark-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.dark-toggle:hover {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary-light);
  transform: rotate(20deg);
}

/* =====================================================
   HERO SECTION
===================================================== */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 64px 48px;
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(139,92,246,0.04) 50%, transparent 100%);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: 0;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(99,102,241,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  flex: 1;
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 60%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 13px 26px;
  font-size: 0.95rem;
}

/* Hero Illustration Cards */
.hero-illustration {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.hero-card-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.preview-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base);
}
.preview-card:hover { transform: scale(1.05); }
.preview-card.applied { background: var(--applied-bg); color: var(--applied-color); border: 1px solid var(--applied-border); }
.preview-card.interview { background: var(--interview-bg); color: var(--interview-color); border: 1px solid var(--interview-border); }
.preview-card.selected { background: var(--selected-bg); color: var(--selected-color); border: 1px solid var(--selected-border); }
.preview-card.rejected { background: var(--rejected-bg); color: var(--rejected-color); border: 1px solid var(--rejected-border); }

/* =====================================================
   BUTTONS
===================================================== */
.btn-primary, .btn-outline, .btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99,102,241,0.4);
  background: linear-gradient(135deg, var(--primary-dark) 0%, #7c3aed 100%);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
}
.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary-light);
  color: var(--primary);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239,68,68,0.4);
}

/* =====================================================
   MAIN CONTAINER & SECTIONS
===================================================== */
.main-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 32px;
  position: relative;
  z-index: 1;
}

.section {
  animation: fadeIn 0.4s ease;
}

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

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title i {
  color: var(--primary);
  font-size: 1.2rem;
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =====================================================
   DASHBOARD — SUMMARY CARDS
===================================================== */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.summary-card.total::before { background: linear-gradient(90deg, var(--primary), #8b5cf6); }
.summary-card.interview::before { background: linear-gradient(90deg, var(--interview-color), #60a5fa); }
.summary-card.rejected::before { background: linear-gradient(90deg, var(--rejected-color), #f87171); }
.summary-card.selected::before { background: linear-gradient(90deg, var(--selected-color), #34d399); }
.summary-card.success-rate::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.summary-card.total .summary-icon { background: rgba(99,102,241,0.12); color: var(--primary); }
.summary-card.interview .summary-icon { background: rgba(59,130,246,0.12); color: var(--interview-color); }
.summary-card.rejected .summary-icon { background: rgba(239,68,68,0.12); color: var(--rejected-color); }
.summary-card.selected .summary-icon { background: rgba(16,185,129,0.12); color: var(--selected-color); }
.summary-card.success-rate .summary-icon { background: rgba(245,158,11,0.12); color: var(--applied-color); }

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.summary-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.summary-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* =====================================================
   DASHBOARD — CHARTS
===================================================== */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: box-shadow var(--transition-base);
}
.chart-card:hover { box-shadow: var(--shadow-lg); }

.chart-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-title i { color: var(--primary); }

.chart-wrapper {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-wrapper canvas {
  max-height: 100%;
}

.chart-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  display: none;
  padding: 40px 0;
}

/* ===== RECENT APPLICATIONS ===== */
.recent-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
  gap: 12px;
}
.recent-item:hover {
  background: var(--bg-secondary);
  transform: translateX(4px);
  border-color: var(--primary-light);
}

.recent-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.recent-company-initial {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.recent-info { min-width: 0; }
.recent-company {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =====================================================
   APPLICATIONS SECTION — CONTROLS
===================================================== */
.controls-bar {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

.search-wrapper input {
  width: 100%;
  padding: 11px 42px 11px 40px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}
.search-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.search-wrapper input::placeholder { color: var(--text-muted); }

.clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.8rem;
  transition: color var(--transition-fast);
}
.clear-search:hover { color: var(--rejected-color); }

.filter-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-controls select {
  padding: 10px 32px 10px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
  transition: all var(--transition-fast);
}
.filter-controls select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.view-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}
.view-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(99,102,241,0.3);
}
.view-btn:not(.active):hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Results Info */
.results-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  min-height: 18px;
}

/* =====================================================
   APPLICATIONS — CARD VIEW
===================================================== */
.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: cardIn 0.35s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.app-card-top {
  height: 5px;
  flex-shrink: 0;
}
.app-card.status-Applied .app-card-top { background: linear-gradient(90deg, var(--applied-color), #fbbf24); }
.app-card.status-Interview .app-card-top { background: linear-gradient(90deg, var(--interview-color), #60a5fa); }
.app-card.status-Rejected .app-card-top { background: linear-gradient(90deg, var(--rejected-color), #f87171); }
.app-card.status-Selected .app-card-top { background: linear-gradient(90deg, var(--selected-color), #34d399); }

.app-card-body {
  padding: 20px;
  flex: 1;
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.company-logo {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(99,102,241,0.3);
}

.company-details { flex: 1; min-width: 0; }

.company-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-name {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status Badge */
.status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.status-badge.Applied { background: var(--applied-bg); color: var(--applied-color); border-color: var(--applied-border); }
.status-badge.Interview { background: var(--interview-bg); color: var(--interview-color); border-color: var(--interview-border); }
.status-badge.Rejected { background: var(--rejected-bg); color: var(--rejected-color); border-color: var(--rejected-border); }
.status-badge.Selected { background: var(--selected-bg); color: var(--selected-color); border-color: var(--selected-border); }

/* Card Meta Info */
.app-card-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.meta-item i {
  width: 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Notes */
.app-notes {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
  border-left: 3px solid var(--primary-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Actions */
.app-card-actions {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  background: var(--bg-tertiary);
}

.btn-edit, .btn-delete {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-edit {
  background: rgba(99,102,241,0.08);
  color: var(--primary);
  border-color: rgba(99,102,241,0.2);
}
.btn-edit:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-delete {
  background: rgba(239,68,68,0.08);
  color: var(--rejected-color);
  border-color: rgba(239,68,68,0.2);
}
.btn-delete:hover {
  background: var(--rejected-color);
  color: white;
  border-color: var(--rejected-color);
  transform: translateY(-1px);
}

/* =====================================================
   APPLICATIONS — TABLE VIEW
===================================================== */
.table-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  animation: fadeIn 0.3s ease;
}

.applications-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.applications-table thead th {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.applications-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}
.applications-table tbody tr:last-child { border-bottom: none; }
.applications-table tbody tr:hover { background: var(--bg-tertiary); }

.applications-table tbody td {
  padding: 14px 18px;
  font-size: 0.875rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.table-company {
  font-weight: 600;
  color: var(--text-primary);
}
.table-role { color: var(--text-secondary); }

.table-actions {
  display: flex;
  gap: 6px;
}

.table-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}
.table-btn.edit:hover { background: var(--primary); color: white; border-color: var(--primary); }
.table-btn.delete:hover { background: var(--rejected-color); color: white; border-color: var(--rejected-color); }

/* =====================================================
   EMPTY STATE
===================================================== */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
  animation: fadeIn 0.4s ease;
}
.empty-state.small { padding: 32px 24px; }

.empty-state i {
  font-size: 3.5rem;
  color: var(--border-color);
  margin-bottom: 16px;
  display: block;
}
.empty-state.small i { font-size: 2rem; }

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.875rem;
  margin-bottom: 20px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================
   MODAL
===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--transition-base);
  scrollbar-width: thin;
}
.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title i { color: var(--primary); }

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
}
.modal-close:hover {
  background: var(--rejected-bg);
  color: var(--rejected-color);
  border-color: var(--rejected-border);
}

/* =====================================================
   FORM
===================================================== */
.application-form {
  padding: 24px 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-label i { color: var(--primary); font-size: 0.8rem; }
.required { color: var(--rejected-color); }

.form-input, .form-textarea {
  padding: 11px 14px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
  width: 100%;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input.error, .form-textarea.error {
  border-color: var(--rejected-color);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }

.form-textarea { resize: vertical; min-height: 80px; }

/* Error Messages */
.error-msg {
  font-size: 0.75rem;
  color: var(--rejected-color);
  display: none;
  align-items: center;
  gap: 4px;
}
.error-msg.visible { display: flex; }

/* Status Options (Radio) */
.status-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.status-option {
  position: relative;
  cursor: pointer;
}

.status-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.status-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-tertiary);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-align: center;
}
.status-option:hover span { border-color: var(--primary-light); }

.status-option.applied input:checked ~ span {
  background: var(--applied-bg);
  color: var(--applied-color);
  border-color: var(--applied-color);
  font-weight: 600;
}
.status-option.interview input:checked ~ span {
  background: var(--interview-bg);
  color: var(--interview-color);
  border-color: var(--interview-color);
  font-weight: 600;
}
.status-option.rejected input:checked ~ span {
  background: var(--rejected-bg);
  color: var(--rejected-color);
  border-color: var(--rejected-color);
  font-weight: 600;
}
.status-option.selected input:checked ~ span {
  background: var(--selected-bg);
  color: var(--selected-color);
  border-color: var(--selected-color);
  font-weight: 600;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* =====================================================
   CONFIRM MODAL
===================================================== */
.confirm-modal {
  max-width: 400px;
  padding: 36px 28px;
  text-align: center;
}

.confirm-icon {
  font-size: 2.5rem;
  color: var(--applied-color);
  margin-bottom: 16px;
}

.confirm-modal h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.confirm-modal p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* =====================================================
   TOAST NOTIFICATION
===================================================== */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 14px 20px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(80px);
  opacity: 0;
  transition: all var(--transition-base);
  max-width: 320px;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { background: var(--selected-color); color: white; }
.toast.error { background: var(--rejected-color); color: white; }
.toast.info { background: var(--primary); color: white; }
.toast.warning { background: var(--applied-color); color: white; }

/* =====================================================
   SCROLL TO TOP
===================================================== */
.scroll-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  pointer-events: none;
  font-size: 0.875rem;
  z-index: 900;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* =====================================================
   RESPONSIVE — TABLET (max-width: 1024px)
===================================================== */
@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .hero-section {
    padding: 48px 32px;
  }
  .hero-illustration {
    display: none;
  }
}

/* =====================================================
   RESPONSIVE — MOBILE (max-width: 768px)
===================================================== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
  }
  .nav-title {
    font-size: 0.9rem;
  }
  .btn-nav span {
    display: none;
  }
  .btn-nav {
    padding: 8px 12px;
  }

  .hero-section {
    padding: 36px 20px;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
  }

  .main-container {
    padding: 24px 16px;
  }

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

  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width {
    grid-column: 1;
  }

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

  .applications-grid {
    grid-template-columns: 1fr;
  }

  .controls-bar {
    flex-direction: column;
  }
  .search-wrapper {
    width: 100%;
  }
  .filter-controls {
    width: 100%;
    justify-content: space-between;
  }
  .filter-controls select {
    flex: 1;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-actions {
    flex-direction: column-reverse;
  }
  .form-actions .btn-primary,
  .form-actions .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: unset;
  }

  .modal-card {
    max-height: 95vh;
  }
  .application-form {
    padding: 18px 18px;
  }
  .modal-header {
    padding: 18px 18px 14px;
  }

  .chart-wrapper { height: 220px; }
}

/* =====================================================
   RESPONSIVE — SMALL MOBILE (max-width: 480px)
===================================================== */
@media (max-width: 480px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .nav-brand .nav-title {
    font-size: 0.8rem;
  }
}

/* =====================================================
   ACCESSIBILITY — FOCUS STYLES
===================================================== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
