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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  color: #333;
  min-height: 100vh;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  color: #718096;
  font-size: 1.1rem;
}

.upload-zone {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 2px dashed #cbd5e0;
  border-radius: 1rem;
  padding: 4rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: #4facfe;
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(79, 172, 254, 0.15);
}

.upload-content {
  color: #a0aec0;
}

.upload-content svg {
  margin-bottom: 1rem;
  color: #4facfe;
}

.browse-link {
  color: #4facfe;
  font-weight: 600;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

#loading {
  text-align: center;
  margin: 4rem 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4facfe;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#dashboard {
  animation: fadeIn 0.5s ease;
}

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

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.dashboard-header h2 {
  font-size: 1.8rem;
  color: #2d3748;
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #718096;
  transition: color 0.3s ease;
}

.toggle-label.active {
  color: #4facfe;
  font-weight: 700;
}

/* Toggle Switch CSS */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e0;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 4px; bottom: 4px;
  background-color: white;
  transition: .4s;
}
input:checked + .slider { background-color: #4facfe; }
input:checked + .slider:before { transform: translateX(24px); }
.slider.round { border-radius: 26px; }
.slider.round:before { border-radius: 50%; }

.actions {
  margin-bottom: 2rem;
  display: flex;
  justify-content: flex-end;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn.primary {
  background: #4facfe;
  color: white;
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.btn.primary:hover {
  background: #00f2fe;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 242, 254, 0.5);
}

.panel {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.03);
}

.panel h3 {
  margin-bottom: 1.5rem;
  color: #2d3748;
  font-size: 1.3rem;
  border-bottom: 2px solid #edf2f7;
  padding-bottom: 0.5rem;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
}

th {
  background-color: #f7fafc;
  font-weight: 600;
  color: #4a5568;
}

tr:hover td {
  background-color: #ebf8ff;
}

td:first-child, th:first-child {
  position: sticky;
  left: 0;
  background-color: inherit;
  z-index: 1;
}
th:first-child {
  background-color: #f7fafc;
}
tr:hover td:first-child {
  background-color: #ebf8ff;
}
