:root {
  color-scheme: dark;
  background: #020617;
  color: #e2e8f0;
  font-family: Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #020617;
  color: #e2e8f0;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

button, input, select {
  font: inherit;
}

body {
  line-height: 1.5;
}

button {
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #08122b;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.subtitle {
  margin: 0;
  color: #60a5fa;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1, h2, h3 {
  margin: 0;
}

h1 {
  font-size: 1.9rem;
}

.content {
  flex: 1;
  padding: 20px;
}

.footer {
  padding: 14px 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.92);
}

.card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 28px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title h2 {
  font-size: 1.45rem;
}

.big-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 28px;
  background: #60a5fa;
  color: #020617;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 20px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 10px 30px rgba(96, 165, 250, 0.18);
}

.big-button.secondary {
  background: #1e293b;
  color: #e2e8f0;
}

.big-button:hover {
  opacity: 0.95;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-compact {
  padding: 14px;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: #94a3b8;
}

.input,
.select,
.textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  padding: 14px 16px;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 2px solid rgba(96, 165, 250, 0.45);
}

.product-button,
.category-button,
.action-button,
.control-button {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  padding: 18px;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.product-button:hover,
.category-button:hover,
.action-button:hover,
.control-button:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(30, 41, 59, 0.95);
}

.product-button strong,
.category-button strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.product-button small,
.category-button small,
.card-note {
  color: #94a3b8;
}

.section-grid {
  display: grid;
  gap: 16px;
}

.summary-line,
.order-row,
.history-row,
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.order-row:last-child,
.history-row:last-child,
.settings-row:last-child {
  border-bottom: none;
}

.small-button {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  padding: 10px 14px;
  min-width: 48px;
  min-height: 48px;
  font-weight: 700;
}

.small-button.positive {
  background: #10b981;
}

.small-button.negative {
  background: #ef4444;
}

.small-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.flex {
  display: flex;
  align-items: center;
}

.gap-2 {
  gap: 12px;
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .section-grid {
    grid-template-columns: 1fr;
  }
}
