:root {
  --cream: #faf6ef;
  --white: #ffffff;
  --beige: #efe4d2;
  --beige-line: #e5d8c0;
  --gold: #b8925a;
  --gold-deep: #8a6a3a;
  --gold-soft: #f3e6d1;
  --ink: #3a2f22;
  --muted: #8c7d69;
  --green: #4c7a52;
  --red: #b0483f;
  --amber: #b5872f;
  --shadow: 0 16px 36px rgba(90, 65, 30, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

a { color: var(--gold-deep); }

.shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(175deg, #fffdf9, var(--beige));
  border-right: 1px solid var(--beige-line);
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--beige-line);
  margin-bottom: 18px;
}

.mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--gold-deep);
  font-family: "Playfair Display", serif;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid var(--beige-line);
  box-shadow: var(--shadow);
}

.brand strong {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 17px;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 4px;
}

.back-link:hover { color: var(--gold-deep); }

.side-note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.main {
  padding: 32px 40px 56px;
  max-width: 1120px;
}

.topbar {
  margin-bottom: 24px;
}

.topbar h1 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 6px;
}

.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.card {
  background: var(--white);
  border: 1px solid var(--beige-line);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.card .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}

.card .value {
  font-family: "Playfair Display", serif;
  font-size: 26px;
  font-weight: 600;
}

.card .value.gold { color: var(--gold-deep); }

.panel {
  background: var(--white);
  border: 1px solid var(--beige-line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.panel h2 {
  font-family: "Playfair Display", serif;
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--beige-line);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 146, 90, 0.15);
}

textarea { resize: vertical; min-height: 60px; }

.button {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.button:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.button:active { transform: translateY(1px); }

.button.ghost {
  background: transparent;
  color: var(--gold-deep);
}

.button.ghost:hover { background: var(--gold-soft); }

.button.danger {
  background: transparent;
  border-color: var(--beige-line);
  color: var(--red);
}
.button.danger:hover { background: #fbeceb; border-color: var(--red); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--beige-line);
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td { border-bottom: none; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill.pending { background: #fbeed8; color: var(--amber); }
.pill.progress { background: #e6eef0; color: #3d6b74; }
.pill.ready { background: #e8f0e6; color: var(--green); }
.pill.done { background: #e8f0e6; color: var(--green); }
.pill.cancelled { background: #fbeceb; color: var(--red); }

.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 18px 0;
  text-align: center;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  padding: 2px 4px;
}

.row-actions button:hover { color: var(--gold-deep); }
.row-actions button.del:hover { color: var(--red); }

.storage-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 20px;
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 24px 18px 40px; }
}
