* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Tahoma', 'MS Sans Serif', Geneva, sans-serif;
  background: #c0c0c0;
  color: #000;
  padding: 8px;
  font-size: 14px;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFElEQVQIW2NkYPj/n4EBC4b/////AAZ3A0YV+vFlAAAAAElFTkSuQmCC');
  background-repeat: repeat;
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto 8px;
  padding: 6px 12px;
  background: #dfdfdf;
  border: 2px outset #ffffff;
  box-shadow: inset -1px -1px #404040, inset 1px 1px #ffffff;
  font-size: 13px;
  font-weight: bold;
  color: #000;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  font-size: 1.2rem;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #008000;
}

.live-badge span {
  font-weight: normal;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: normal;
}

.traffic-storm {
  background: #c0c0c0;
  border: 2px inset #ffffff;
  padding: 2px 10px;
  color: #800000;
  font-weight: bold;
  display: none;
  align-items: center;
  gap: 4px;
}

.storm-dot {
  width: 8px;
  height: 8px;
  background: #800000;
  border-radius: 50%;
  animation: pulse 0.9s infinite;
}

.dashboard {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 12px;
}

.card {
  background: #c0c0c0;
  border: 2px outset #ffffff;
  box-shadow: inset -1px -1px #404040, inset 1px 1px #ffffff;
  padding: 16px;
  font-size: 14px;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #000080;
  text-shadow: 1px 1px 0 #ffffff;
}

h2, h3 {
  margin-bottom: 12px;
  color: #000080;
  font-weight: bold;
}

p {
  line-height: 1.5;
  color: #000;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 18px 0;
}

button {
  padding: 6px 8px;
  border: 2px outset #dfdfdf;
  background: #c0c0c0;
  color: #000;
  cursor: pointer;
  font-family: 'Tahoma', 'MS Sans Serif', sans-serif;
  font-size: 13px;
  font-weight: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: inset -1px -1px #404040, inset 1px 1px #ffffff;
  transition: none;
  border-radius: 0;
}

button:hover {
  background: #d4d4d4;
}

button:active {
  border-style: inset;
  box-shadow: inset 1px 1px #404040, inset -1px -1px #ffffff;
}

.traffic-section {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.traffic-box {
  background: #c0c0c0;
  border: 2px inset #ffffff;
  padding: 14px;
  font-size: 13px;
}

.api-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.api-item {
  background: #ffffff;
  padding: 6px 10px;
  border: 1px solid #808080;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 1px 1px #ffffff, inset -1px -1px #808080;
}

.api-item .rpm {
  color: #000080;
  font-weight: bold;
  background: #e0e0e0;
  padding: 1px 6px;
  border: 1px solid #808080;
}

.metrics-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 8px 0;
}

.progress-bar-bg {
  background: #ffffff;
  border: 1px solid #808080;
  height: 10px;
  margin-top: 6px;
  box-shadow: inset 1px 1px #404040, inset -1px -1px #ffffff;
  width: 100%;
}

.progress-fill {
  background: #000080;
  height: 100%;
  width: 0%;
}

.file-upload-zone {
  margin-top: 18px;
  background: #ffffff;
  border: 2px inset #808080;
  padding: 10px;
  color: #000;
  font-family: 'Tahoma', sans-serif;
}

.file-upload-area {
  border: 2px dashed #808080;
  background: #e0e0e0;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  color: #404040;
  margin-bottom: 10px;
}

.file-list {
  list-style: none;
  max-height: 140px;
  overflow-y: auto;
  font-size: 12px;
  background: #ffffff;
  border: 1px solid #808080;
  padding: 4px;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted #c0c0c0;
  padding: 2px 4px;
}

.fake-progress {
  width: 100%;
  height: 12px;
  background: #c0c0c0;
  border: 1px solid #808080;
  margin-top: 6px;
  box-shadow: inset 1px 1px #404040, inset -1px -1px #ffffff;
}

.fake-progress-fill {
  height: 100%;
  width: 0%;
  background: #008000;
}

#uploadStatus {
  font-size: 11px;
  font-style: italic;
}

.load-test-panel {
  margin-top: 18px;
  background: #c0c0c0;
  border: 2px inset #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.load-test-label {
  font-weight: bold;
}

.progress-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: bold;
}

.live-log {
  background: #000000;
  color: #00ff00;
  border: 2px inset #808080;
  padding: 10px;
  margin-top: 18px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: inset 0 0 8px #00ff00;
}

.log-entry {
  margin-bottom: 4px;
  border-bottom: 1px solid #008000;
  padding-bottom: 2px;
}

.feed-item {
  padding: 8px 0;
  border-bottom: 1px solid #808080;
  font-size: 12px;
}

.mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}

.status-grid {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.status-box {
  padding: 6px 10px;
  border: 2px inset #ffffff;
  background: #c0c0c0;
  font-weight: bold;
  font-size: 12px;
}

.toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}

.toast {
  background: #ffff00;
  color: #000;
  padding: 8px 16px;
  border: 2px outset #ffffff;
  font-weight: bold;
  font-size: 12px;
  box-shadow: 2px 2px 0 #404040;
  animation: slideIn 0.3s ease;
  max-width: 300px;
}

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 1100px) {
  .dashboard { grid-template-columns: 1fr; }
  .api-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  body { padding: 4px; }
  .topbar { padding: 4px 8px; }
  .actions-grid { grid-template-columns: 1fr 1fr; }
}