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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.controls {
  padding: 25px 30px;
  background: rgba(248, 249, 250, 0.8);
  border-bottom: 1px solid #e9ecef;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #2c3e50;
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.form-group select {
  background-image: linear-gradient(45deg, transparent 50%, #3498db 50%),
    linear-gradient(135deg, #3498db 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(1em + 2px),
    calc(100% - 15px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group select:hover {
  background-color: #f8f9fa;
  border-color: #3498db;
  background-image: linear-gradient(45deg, transparent 50%, #2980b9 50%),
    linear-gradient(135deg, #2980b9 50%, transparent 50%);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3498db;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.form-group select:focus {
  background-image: linear-gradient(45deg, transparent 50%, #2980b9 50%),
    linear-gradient(135deg, #2980b9 50%, transparent 50%);
}

/* Style select options */
.form-group select option {
  background: white;
  color: #2c3e50;
  padding: 8px 12px;
  font-size: 14px;
}

.form-group select option:hover {
  background: #3498db;
  color: white;
}

.form-group select option:checked {
  background: #3498db;
  color: white;
  font-weight: 600;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 8px 12px;
  font-size: 12px;
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.filter-controls {
  display: flex;
  gap: 15px;
  align-items: end;
  margin-left: auto;
}

.table-container {
  overflow-x: auto;
  padding: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

th {
  background: linear-gradient(135deg, #34495e, #2c3e50);
  color: white;
  padding: 18px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

th:hover {
  background: linear-gradient(135deg, #2c3e50, #34495e);
}

th::after {
  content: "↕";
  position: absolute;
  right: 8px;
  opacity: 0.6;
}

td {
  padding: 15px;
  border-bottom: 1px solid #f8f9fa;
  font-size: 14px;
  transition: all 0.3s ease;
}

tr:hover {
  background: rgba(52, 152, 219, 0.05);
  transform: scale(1.01);
}

.status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-applied {
  background: #e3f2fd;
  color: #1976d2;
}

.status-interview {
  background: #fff3e0;
  color: #f57c00;
}

.status-offer {
  background: #e8f5e8;
  color: #388e3c;
}

.status-rejected {
  background: #ffebee;
  color: #d32f2f;
}

.status-withdrawn {
  background: #f3e5f5;
  color: #7b1fa2;
}

.priority {
  padding: 4px 8px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
}

.priority-high {
  background: #ffcdd2;
  color: #c62828;
}

.priority-medium {
  background: #fff3e0;
  color: #ef6c00;
}

.priority-low {
  background: #e8f5e8;
  color: #2e7d32;
}

.stats {
  padding: 20px 30px;
  background: rgba(248, 249, 250, 0.5);
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.stat-item {
  background: white;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  min-width: 120px;
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: #7f8c8d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.empty-state {
  text-align: center;
  padding: 60px 30px;
  color: #7f8c8d;
  display: none;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #95a5a6;
}

.edit-cell {
  background: #e3f2fd !important;
  border: 2px solid #2196f3;
}

.edit-cell input,
.edit-cell select {
  width: 100%;
  border: none;
  background: transparent;
  padding: 5px;
  font-size: 14px;
}

.edit-cell select {
  background-image: linear-gradient(45deg, transparent 50%, #2196f3 50%),
    linear-gradient(135deg, #2196f3 50%, transparent 50%);
  background-position: calc(100% - 10px) calc(0.5em + 2px),
    calc(100% - 5px) calc(0.5em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 25px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 4px;
}

.edit-cell select:focus {
  background-image: linear-gradient(45deg, transparent 50%, #1976d2 50%),
    linear-gradient(135deg, #1976d2 50%, transparent 50%);
  outline: none;
}

.edit-cell select option {
  background: white;
  color: #2c3e50;
  padding: 4px 8px;
}

.hidden-file-input {
  display: none;
}

/* JSON Editor Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #f1c40f;
}

.modal-body {
  padding: 30px;
}

.modal-body p {
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 1rem;
}

#jsonEditor {
  width: 100%;
  height: 400px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.3s ease;
  background: #f8f9fa;
}

#jsonEditor:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.json-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.json-actions .btn {
  min-width: 100px;
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-controls {
    margin-left: 0;
    justify-content: center;
  }
  .form-group {
    min-width: auto;
  }
  .stats {
    justify-content: center;
  }
}
