﻿:root {
  --bg: #0f1115;
  --card: #171a21;
  --ink: #f1ede7;
  --accent: #f0a04b;
  --accent-dark: #d07b2d;
  --muted: #b3ada6;
  --stroke: #2a2e38;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  background: radial-gradient(circle at top, #1b1f2a 0%, #0f1115 55%, #0b0d12 100%);
  color: var(--ink);
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.app__header h1 {
  margin: 0 0 8px;
  font-size: 2.2rem;
}

.app__header p {
  margin: 0 0 24px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--stroke);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.card h2 {
  margin-top: 0;
}

.item-row {
  display: grid;
  grid-template-columns: 120px minmax(320px, 1fr) 110px 120px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.item-row select,
.item-row input,
label input,
label select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #0f1218;
  color: var(--ink);
}

.gender-select {
  max-width: 140px;
}

.item-select {
  width: 100%;
}

.employee {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #0f1218;
}

.employee__actions {
  display: grid;
  grid-template-columns: 1fr 140px 140px;
  gap: 10px;
  align-items: center;
}

.employee__actions input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #0b0e14;
  color: var(--ink);
}

.employee__actions button {
  height: 40px;
}

.products {
  display: grid;
  gap: 12px;
}

.products__footer {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.product-gender {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: #0f1218;
  margin-bottom: 16px;
}

.product-gender h3 {
  margin-top: 0;
}

.product-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.product-controls textarea {
  min-height: 140px;
}

.product-items {
  display: grid;
  gap: 10px;
}

.product-items textarea {
  min-height: 220px;
}

button {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #1b1206;
  font-weight: 600;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
}

button.ghost {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent-dark);
}

button:hover {
  opacity: 0.9;
}

.discounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.filters {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  max-width: 520px;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.result textarea {
  resize: vertical;
}

.result .totals {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.hidden {
  display: none;
}

.error {
  color: #ff6b6b;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

th,
td {
  text-align: left;
  padding: 10px 16px;
}

thead th {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

tbody tr {
  background: #0f1218;
  border: 1px solid var(--stroke);
}

tbody td:first-child {
  border-radius: 10px 0 0 10px;
}

tbody td:last-child {
  border-radius: 0 10px 10px 0;
}

@media (max-width: 720px) {
  .item-row {
    grid-template-columns: 1fr;
  }

  .employee__actions {
    grid-template-columns: 1fr;
  }

  .product-controls {
    grid-template-columns: 1fr;
  }

  .product-items textarea {
    min-height: 200px;
  }
}
