:root {
  --bg: #0b1020;
  --panel: rgba(255, 255, 255, 0.06);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.12);
  --accent: #7c5cff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: radial-gradient(1100px 600px at 20% 0%, rgba(124, 92, 255, 0.35), transparent),
              radial-gradient(900px 500px at 90% 10%, rgba(12, 210, 255, 0.18), transparent),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.nav-menu {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.nav-menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--text);
}

.nav-menu a.active {
  color: var(--accent);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.header h1 {
  margin: 0;
  font-size: 40px;
  letter-spacing: 0.4px;
}

.subhead {
  margin: 8px 0 0;
  color: var(--muted);
}

/* Stats Dashboard */
.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.stat-card.status-applied { border-color: rgba(59, 130, 246, 0.4); }
.stat-card.status-interview { border-color: rgba(245, 158, 11, 0.4); }
.stat-card.status-offer { border-color: rgba(16, 185, 129, 0.4); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.status-applied .stat-value { color: #60a5fa; }
.status-interview .stat-value { color: var(--warning); }
.status-offer .stat-value { color: var(--success); }

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

/* Panel */
.panel {
  margin-top: 24px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

/* Tracker Header */
.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.add-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.add-btn:hover {
  background: #6a4aee;
  transform: translateY(-1px);
}

/* Filters */
.tracker-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Applications List */
.applications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.empty-state p {
  margin: 0 0 20px;
  color: var(--muted);
}

.empty-text {
  text-align: center;
  color: var(--muted);
  padding: 20px;
}

/* Application Card */
.app-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
}

.app-card:hover {
  border-color: var(--accent);
}

.app-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.app-status-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.app-info {
  flex: 1;
}

.app-company {
  margin: 0 0 4px;
  font-size: 16px;
}

.app-position {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.app-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.app-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
}

.app-date, .app-salary {
  font-size: 12px;
  color: var(--muted);
}

.status-applied { border-left: 3px solid #60a5fa; }
.status-phone { border-left: 3px solid #a78bfa; }
.status-technical { border-left: 3px solid #f472b6; }
.status-onsite { border-left: 3px solid #f59e0b; }
.status-offer { border-left: 3px solid var(--success); }
.status-accepted { border-left: 3px solid #10b981; }
.status-rejected { border-left: 3px solid var(--danger); }
.status-withdrawn { border-left: 3px solid #6b7280; }

.app-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Upcoming */
.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upcoming-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.upcoming-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.upcoming-day {
  font-weight: 600;
  font-size: 14px;
}

.upcoming-time {
  font-size: 12px;
  color: var(--muted);
}

.upcoming-info {
  flex: 1;
}

.upcoming-info h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.upcoming-info p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Two Column */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.two-col .panel {
  margin-top: 0;
}

/* Response Stats */
.response-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.response-item {
  display: grid;
  grid-template-columns: 1fr 100px 50px;
  align-items: center;
  gap: 12px;
}

.response-label {
  font-size: 14px;
  color: var(--muted);
}

.response-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.response-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
}

.response-pct {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

/* Followup List */
.followup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.followup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
}

.followup-info {
  flex: 1;
}

.followup-info h4 {
  margin: 0 0 2px;
  font-size: 14px;
}

.followup-info p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.followup-days {
  font-size: 12px;
  color: var(--danger);
  font-weight: 500;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.modal-content h2 {
  margin: 0 0 24px;
  padding-right: 40px;
}

/* Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field span {
  font-size: 12px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  outline: none;
  font-size: 14px;
  font-family: inherit;
}

.field textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-primary {
  background: var(--accent);
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary:hover {
  background: #6a4aee;
}

@media (max-width: 860px) {
  .stats-dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .two-col {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .app-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .app-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .tracker-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
}