* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: #E8E8ED;
  color: #1c1c1e;
  min-height: 100vh;
}
.header {
  background: linear-gradient(135deg, #007AFF, #5856D6);
  color: white;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header h1 { font-size: 18px; }
.header .user-info { font-size: 13px; opacity: 0.9; display: flex; gap: 12px; align-items: center; }
.header button {
  background: rgba(255,255,255,0.2); color: white; border: none;
  padding: 6px 16px; border-radius: 16px; cursor: pointer; font-size: 12px;
}
.container { padding: 24px 32px; max-width: 1400px; margin: 0 auto; }
.card {
  background: white; border-radius: 20px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06); margin-bottom: 20px;
}
.btn {
  border: none; border-radius: 20px; font-weight: bold; font-size: 14px;
  padding: 10px 24px; cursor: pointer; transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: linear-gradient(135deg, #007AFF, #5856D6); color: white; }
.btn-success { background: linear-gradient(135deg, #34C759, #30B350); color: white; }
.btn-warning { background: linear-gradient(135deg, #FF9500, #FF6B00); color: white; }
.btn-danger { background: linear-gradient(135deg, #FF3B30, #FF2D55); color: white; }
.btn-secondary { background: #E5E5EA; color: #1c1c1e; }
.upload-area {
  border: 2px dashed #007AFF; border-radius: 16px; padding: 40px;
  text-align: center; cursor: pointer; transition: all 0.3s;
  background: rgba(0,122,255,0.03);
}
.upload-area:hover { background: rgba(0,122,255,0.06); }
.upload-area.dragover { background: rgba(0,122,255,0.1); border-color: #007AFF; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .btn { padding: 12px 24px; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: white; border-radius: 12px; overflow: hidden;
}
.data-table th {
  background: #f8f9fa; color: #636366; padding: 12px 10px;
  font-weight: 600; text-align: left; border-bottom: 2px solid #E5E5EA;
  position: sticky; top: 0;
}
.data-table td {
  padding: 10px; border-bottom: 1px solid #E5E5EA;
}
.data-table tr:hover { background: #f8f9fa; }
.data-table .calc-cell { background: #F0F5FF; color: #0040C1; }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
  background: white; border-radius: 24px; padding: 32px;
  max-width: 90vw; max-height: 90vh; overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h2 { font-size: 20px; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: #8E8E93; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: #636366; margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  border: 1px solid #E5E5EA; font-size: 14px;
}
.form-group input:focus { outline: none; border-color: #007AFF; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid #E5E5EA; }
.tab {
  padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent;
  font-weight: 600; color: #8E8E93; font-size: 14px;
}
.tab.active { color: #007AFF; border-bottom-color: #007AFF; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.seckill-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, rgba(175,82,222,0.1), rgba(255,45,85,0.1));
  border: 1px solid rgba(175,82,222,0.2); border-radius: 12px;
  padding: 12px 20px; margin: 4px;
}
.status-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; background: white; border-radius: 12px;
  font-size: 14px; color: #636366; margin-bottom: 16px;
}
.alert {
  padding: 12px 16px; border-radius: 12px; margin-bottom: 16px;
}
.alert-success { background: rgba(52,199,89,0.1); color: #34C759; border: 1px solid rgba(52,199,89,0.2); }
.alert-error { background: rgba(255,59,48,0.1); color: #FF3B30; border: 1px solid rgba(255,59,48,0.2); }
.grid { display: grid; gap: 16px; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .grid-cols-2, .grid-cols-3 { grid-template-columns: 1fr; }
  .container { padding: 16px; }
  .header { padding: 12px 16px; flex-direction: column; gap: 8px; }
}
.login-container {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #0f0f0f;
}
.login-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px; padding: 48px 40px; width: 420px; text-align: center;
}
.login-card h1 { color: white; font-size: 24px; margin-bottom: 8px; }
.login-card .subtitle { color: rgba(255,255,255,0.45); font-size: 14px; margin-bottom: 32px; }
.login-card input {
  width: 100%; padding: 14px 18px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.08);
  color: white; font-size: 15px; margin-bottom: 16px;
}
.login-card input:focus { outline: none; border-color: #007AFF; background: rgba(255,255,255,0.12); }
.login-card .btn {
  width: 100%; padding: 16px; border-radius: 24px; font-size: 16px;
  background: linear-gradient(135deg, #007AFF, #5856D6); color: white;
}
#app { display: none; }
#app.active { display: block; }
.table-container { overflow-x: auto; max-height: 60vh; overflow-y: auto; }
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.badge-admin { background: rgba(0,122,255,0.1); color: #007AFF; }
.badge-manager { background: rgba(175,82,222,0.1); color: #AF52DE; }
.badge-user { background: rgba(52,199,89,0.1); color: #34C759; }
