body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  margin: 0;
  background: #0b0f19;
  color: #e8eefc;
  line-height: 1.5;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: #121a2b;
  border: 1px solid #22304f;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.header-card {
  background: linear-gradient(135deg, #1a2744 0%, #121a2b 100%);
  text-align: center;
}

h1 {
  margin: 0 0 4px 0;
  font-size: 28px;
  font-weight: 700;
}

h2 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.small {
  color: #a9b8d8;
  font-size: 14px;
  line-height: 1.5;
}

input[type="file"] {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #22304f;
  background: #0b1324;
  color: #e8eefc;
  font-size: 15px;
  box-sizing: border-box;
}

input[type="text"], textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #22304f;
  background: #0b1324;
  color: #e8eefc;
  font-size: 13px;
  font-family: 'SF Mono', 'Consolas', monospace;
  box-sizing: border-box;
  resize: vertical;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #2b6bff;
}

button {
  padding: 14px 24px;
  border-radius: 12px;
  border: 0;
  background: #2b6bff;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

button:hover {
  background: #1a5ae8;
}

button:active {
  transform: scale(0.98);
}

button.secondary {
  background: #233049;
  color: #a9b8d8;
}

button.secondary:hover {
  background: #2d3d5c;
  color: #fff;
}

.status-grid {
  display: grid;
  gap: 12px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #0b1324;
  border-radius: 10px;
  border: 1px solid #22304f;
  gap: 12px;
}

.status-label {
  color: #a9b8d8;
  font-size: 14px;
  white-space: nowrap;
}

.status-value {
  font-size: 14px;
  text-align: right;
}

.status-value.ok {
  color: #4CAF50;
}

.qr-container {
  background: white;
  padding: 24px;
  display: inline-block;
  border-radius: 16px;
  margin: 20px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.qr-container svg {
  display: block;
}

.apk-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #0b1324;
  border-radius: 10px;
  border: 1px solid #22304f;
  margin-bottom: 8px;
}

.history-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #0b1324;
  border-radius: 10px;
  border: 1px solid #22304f;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.history-entry:hover {
  border-color: #2b6bff;
}

/* Pincode overlay */
#pin-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: #0b0f19;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.pin-box {
  background: #121a2b;
  border: 1px solid #22304f;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 360px;
  width: 90%;
}

.pin-box h1 {
  margin-bottom: 8px;
}

.pin-box input {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #22304f;
  background: #0b1324;
  color: #e8eefc;
  font-size: 24px;
  text-align: center;
  letter-spacing: 12px;
  box-sizing: border-box;
  margin: 16px 0;
}

.pin-box input:focus {
  outline: none;
  border-color: #2b6bff;
}

.pin-box button {
  width: 100%;
}

@media (max-width: 600px) {
  .container { padding: 16px; }
  .card { padding: 20px; }
  h1 { font-size: 24px; }
  .status-item { flex-direction: column; align-items: flex-start; }
  .status-value { text-align: left; }
  .apk-entry { flex-direction: column; gap: 8px; align-items: flex-start; }
}
