*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.app-header {
  text-align: center;
  margin-bottom: 16px;
}

.app-header h1 {
  margin: 0 0 4px;
  font-size: 1.6rem;
}

.app-header p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #cbd5f5;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #4b5563;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #3b82f6;
  border-color: #3b82f6;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

@media (max-width: 640px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

.btn-primary {
  display: inline-block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.45);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #bbf7d0;
  font-size: 0.8rem;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(75, 85, 99, 0.9);
  font-size: 0.88rem;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.order-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.order-status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.status-new {
  background: rgba(59, 130, 246, 0.15);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.7);
}

.status-in_progress {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.7);
}

.status-done {
  background: rgba(22, 163, 74, 0.15);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.7);
}

.status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.7);
}

.order-body {
  color: #d1d5db;
}

.order-body p {
  margin: 2px 0;
}

.order-meta {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #9ca3af;
}

.status-text {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #93c5fd;
}

.status-text.error {
  color: #fecaca;
}

.inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-form button {
  width: auto;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.admin-actions select,
.admin-actions input {
  width: auto;
  min-width: 120px;
}

.admin-actions button {
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  background: #4b5563;
  color: #e5e7eb;
  font-size: 0.8rem;
  cursor: pointer;
}

.admin-actions button.danger {
  background: #b91c1c;
}

.admin-actions button.primary {
  background: #2563eb;
}

