/* ============================================================
   MemoryBooth — shared portal theme
   ============================================================
   Palette sampled from the booth itself: the curtain's folds give the reds,
   the lacquer cabinet gives the neutrals. Nobody else arrives at these
   values, because nobody else has this booth.

   These are OPERATOR tools, not guest-facing surfaces, so this is the booth's
   language turned down: bone panels, hairline seams, square corners, and red
   reserved for the thing you actually want pressed. Density matters more than
   drama when you're checking a booking on a phone at a venue.

   Drop-in replacement for each page's <style> block:
       <link rel="stylesheet" href="/theme.css">
   Existing class names are preserved, so the markup doesn't change.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&family=Archivo:wght@400;500;600&display=swap');

:root {
  /* Curtain, darkest fold to lit face */
  --fold:    #2C0000;
  --shadow:  #540003;
  --velvet:  #8C0004;
  --curtain: #B0000C;
  --signal:  #D91424;

  /* Cabinet. Cool and faintly lilac, not cream - the contrast between cool
     shell and hot curtain is the whole look. */
  --bone:  #EDE9E6;
  --panel: #D6CECC;
  --edge:  #BEB2B1;
  --seam:  #A69B98;
  --ink:   #141010;
  --dim:   #6B5D5A;

  --ok:   #2F855A;
  --warn: #B7791F;

  --head: 'Jost', system-ui, sans-serif;
  --body: 'Archivo', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--body);
  background: var(--bone);
  color: var(--ink);
  margin: 0;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--fold);
  color: var(--bone);
  border-bottom: none;
}
header h1 {
  font-family: var(--head);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.01em;
  margin: 0;
}
header button {
  background: rgba(237, 233, 230, .12);
  color: var(--bone);
  border: 1px solid rgba(237, 233, 230, .3);
  padding: 8px 15px;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--head);
  font-weight: 500;
  font-size: 14px;
}
header button:hover { background: rgba(237, 233, 230, .2); }

/* ---------- tabs ---------- */
.tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--seam);
  overflow-x: auto;
}
.tab-btn {
  background: transparent;
  color: var(--dim);
  border: none;
  border-bottom: 3px solid transparent;
  padding: 13px 18px;
  border-radius: 0;
  cursor: pointer;
  font-family: var(--head);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--ink); }
/* Underline rather than a raised chip: it survives wrapping on a phone,
   which the old tab shape didn't. */
.tab-btn.active {
  background: var(--bone);
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--curtain);
}
.tab-content { display: none; padding: 26px 24px; max-width: 940px; margin: 0 auto; }
.tab-content.active { display: block; }

/* ---------- type ---------- */
h2 {
  font-family: var(--head);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--seam);
  padding-bottom: 8px;
  margin-top: 30px;
}
h3 { font-family: var(--head); font-weight: 600; font-size: 15px; }

/* ---------- fields ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--dim);
  font-family: var(--head);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.field input[type=text],
.field input[type=number],
.field input[type=email],
.field input[type=tel],
.field input[type=date],
.field input[type=time],
.field input[type=password],
.field textarea,
.field select,
input[type=text], input[type=number], input[type=email],
input[type=tel], input[type=date], input[type=time], input[type=password],
textarea, select {
  width: 100%;
  padding: 10px;
  border-radius: 2px;
  border: 1px solid var(--edge);
  background: #fff;
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--curtain);
  box-shadow: 0 0 0 2px rgba(176, 0, 12, .12);
}
.field.checkbox { display: flex; align-items: center; gap: 9px; }
.field.checkbox label {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
input[type=checkbox] { accent-color: var(--curtain); width: 17px; height: 17px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- buttons ---------- */
/* Square corners and a hard shadow that compresses on press - the same
   tactility as the booth's own buttons, which is the one bit of the booth
   language worth keeping in an admin tool. */
.btn {
  background: var(--curtain);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 2px;
  font-family: var(--head);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 3px 0 var(--fold);
  transition: transform .06s ease, box-shadow .06s ease;
}
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--seam);
  box-shadow: none;
}
.btn.secondary:active { background: var(--panel); transform: none; }
.btn.danger { background: var(--fold); box-shadow: 0 3px 0 #1a0000; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.save-msg {
  color: var(--ok);
  font-family: var(--head);
  font-weight: 600;
  font-size: 14px;
  margin-left: 12px;
  display: none;
}

/* ---------- print design editor ---------- */
.design-layout { display: flex; gap: 24px; flex-wrap: wrap; }
.canvas-wrap {
  background: var(--fold);
  border-radius: 0;
  padding: 12px;
  /* Curtain behind the page, exactly as the booth's own editor does it. */
  background-image: repeating-linear-gradient(94deg,
    #2C0000 0, #4A0206 18px, #7E0409 30px, #4A0206 46px, #2C0000 64px);
}
#designCanvas {
  position: relative;
  width: 320px;
  height: 480px;
  background: #fff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.slot-box {
  position: absolute;
  background: rgba(176, 0, 12, .34);
  border: 2px solid rgba(255, 255, 255, .9);
  color: #fff;
  font-family: var(--head);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: move;
  font-size: 13px;
  user-select: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.slot-fields { margin-top: 14px; }
.slot-row {
  display: grid;
  grid-template-columns: 70px 1fr 1fr 1fr 1fr 40px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.slot-row input { padding: 6px; font-size: 13px; }
.slot-row button {
  background: var(--fold);
  color: #fff;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  padding: 6px;
}

/* ---------- stickers ---------- */
.sticker-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.sticker-item {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 0;
  padding: 9px;
  text-align: center;
  width: 112px;
}
.sticker-item img { width: 90px; height: 90px; object-fit: contain; }
.sticker-item button {
  margin-top: 7px;
  width: 100%;
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--edge);
  border-radius: 2px;
  padding: 5px;
  cursor: pointer;
  font-family: var(--head);
  font-size: 12px;
}
.sticker-item button:hover { background: var(--fold); color: #fff; border-color: var(--fold); }

/* ---------- tables, cards, status ---------- */
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--edge); }
th {
  text-align: left;
  font-family: var(--head);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 11px 12px;
  border-bottom: 1px solid var(--seam);
  background: var(--panel);
}
td { padding: 11px 12px; border-bottom: 1px solid var(--edge); font-size: 14px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(214, 206, 204, .35); }

.card, .panel-box {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 0;
  padding: 18px;
  margin-bottom: 16px;
}

.pill {
  display: inline-block;
  font-family: var(--head);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
  background: var(--panel);
  color: var(--dim);
}
.pill.ok    { background: rgba(47, 133, 90, .14);  color: var(--ok); }
.pill.warn  { background: rgba(183, 121, 31, .16); color: var(--warn); }
.pill.error { background: rgba(176, 0, 12, .12);   color: var(--curtain); }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--panel) 0%, var(--bone) 60%);
}
.login-box {
  background: #fff;
  border: 1px solid var(--edge);
  padding: 34px;
  width: 100%;
  max-width: 360px;
}
.login-box h1 {
  font-family: var(--head);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.login-box p { color: var(--dim); font-size: 14px; margin: 0 0 22px; }
.login-box .btn { width: 100%; margin-top: 16px; }

.muted { color: var(--dim); font-size: 13px; }
hr { border: none; border-top: 1px solid var(--seam); margin: 24px 0; }
a { color: var(--curtain); }
