﻿:root {
  --bg: #f6f2ea;
  --card: #fffaf2;
  --ink: #33251b;
  --muted: #7a6b5d;
  --brand: #9b3f1f;
  --brand-dark: #6f2b16;
  --line: #eadcc8;
  --ok: #1f7a3b;
  font-family: Inter, Segoe UI, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #ffe0bc 0, transparent 34rem),
    linear-gradient(135deg, #f6f2ea, #ede2d2);
}

body.worker {
  display: grid;
  place-items: center;
  padding: 1rem;
}

.card, .panel {
  background: rgba(255, 250, 242, .94);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 60px rgba(77, 47, 21, .12);
}

.card {
  width: min(100%, 480px);
  padding: 1.4rem;
}

.shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 1rem;
}

.brand {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  font-size: .78rem;
}

h1, h2, h3 { margin: .35rem 0 .8rem; line-height: 1.1; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: 1.25rem; }

.muted { color: var(--muted); }
.message { min-height: 1.4rem; color: #a53322; font-weight: 700; }
.message.ok { color: var(--ok); }

label {
  display: grid;
  gap: .35rem;
  margin: .8rem 0;
  font-weight: 700;
}

input, select, button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: .85rem .95rem;
  font: inherit;
}

button {
  cursor: pointer;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

button.primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: 0;
}

button.small {
  width: auto;
  padding: .45rem .7rem;
  border-radius: 10px;
}

button:disabled { opacity: .5; cursor: not-allowed; }

.checkline {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.checkline input {
  width: auto;
}

.next {
  margin: 1rem 0;
  padding: 1rem;
  background: #fff3dd;
  border: 1px solid #f0cf9d;
  border-radius: 16px;
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.adminLink {
  display: inline-block;
  margin-top: 1rem;
  color: var(--brand-dark);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel {
  padding: 1rem;
  overflow: auto;
}

.panel.wide { grid-column: 1 / -1; }

.branch {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: white;
}

.branch img {
  width: 170px;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}

.row {
  display: flex;
  align-items: end;
  gap: .75rem;
  flex-wrap: wrap;
}

.row > * { flex: 1 1 170px; }

.stack { max-width: 520px; }

.inputRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
}

.inputRow button {
  width: auto;
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 14px;
  overflow: hidden;
}

th, td {
  padding: .75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: #f7ead8;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { align-items: stretch; flex-direction: column; }
}
