:root {
  --bg: #f5efe4;
  --panel: rgba(255, 252, 245, 0.9);
  --line: rgba(108, 79, 50, 0.16);
  --text: #2d2418;
  --muted: #74644d;
  --accent: #d96c3d;
  --danger: #a84435;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SUIT", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(217, 108, 61, 0.22), transparent 30%), linear-gradient(135deg, #f7f2e8, #efe0cb);
}

.admin-shell { width: min(1180px, calc(100% - 28px)); margin: 34px auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 30px; box-shadow: 0 24px 70px rgba(87, 55, 20, 0.14); }
.login-panel { max-width: 520px; margin: 10vh auto; }
.eyebrow { margin: 0 0 10px; color: #aa4f29; font-weight: 800; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); }
.intro { color: var(--muted); line-height: 1.6; }
form { display: grid; gap: 10px; margin-top: 26px; }
label { font-weight: 700; }
input { border: 1px solid var(--line); border-radius: 14px; padding: 14px; font: inherit; background: #fffaf0; }
button { border: 0; border-radius: 13px; padding: 12px 16px; font: inherit; font-weight: 700; cursor: pointer; background: var(--accent); color: white; }
.records-header { display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: end; }
button.secondary { background: #fffaf0; color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--danger); }
.message { min-height: 1.4em; color: var(--muted); }
.message.error { color: var(--danger); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 850px; background: #fffaf0; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; }
th { background: #f3e5d5; font-size: .9rem; }
td:nth-child(2), td:nth-child(3) { white-space: pre-wrap; min-width: 260px; }
td:last-child { color: var(--muted); font-size: .8rem; max-width: 170px; overflow-wrap: anywhere; }
.empty { text-align: center; color: var(--muted); }

@media (max-width: 700px) {
  .admin-shell { width: min(100% - 16px, 100%); margin: 8px auto; }
  .panel { padding: 22px 16px; border-radius: 20px; }
  .records-header { align-items: start; flex-direction: column; }
  .actions { justify-content: start; }
}
