/* ============================================================
   Organizer page — same card-table palette, but plain and dense.
   This is a workbench, not a showpiece.
   ============================================================ */

:root {
  --felt:      #164034;
  --felt-deep: #0E2A22;
  --stock:     #F6F1E4;
  --stock-2:   #E8E0C9;
  --stock-3:   #C9BFA4;
  --ink:       #1B1A16;
  --ink-soft:  #5C584E;
  --suit:      #B23A2E;
  --brass:     #9A7526;
  --line:      #DAD2BC;

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body:    'Newsreader', Georgia, serif;
  --util:    'Space Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--stock-2);
}

.shell {
  max-width: 74rem;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 5rem;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -.03em;
}

h2 {
  margin: 0 0 .5rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}

h3 {
  margin: 2rem 0 .75rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.01em;
}

.eyebrow {
  margin: 0 0 .25rem;
  font-family: var(--util);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brass);
}

.muted { color: var(--ink-soft); font-size: .92rem; }
.mt { margin-top: .9rem; }

a { color: var(--suit); text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--suit); outline-offset: 2px; }


/* ---- Sign in ---------------------------------------------- */

.gate {
  max-width: 22rem;
  margin: 14vh auto 0;
  padding: 2rem;
  background: var(--stock);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
}
.gate h1 { margin-bottom: 1.4rem; }
.gate__form { display: grid; gap: .5rem; }
.gate__back { margin: 1.4rem 0 0; font-size: .85rem; }


/* ---- Header + tabs ---------------------------------------- */

.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 1.1rem;
  border-bottom: 2px solid var(--ink);
}
.bar__tools { display: flex; gap: .5rem; align-items: center; }

.tabs { display: flex; gap: .3rem; margin: 1.2rem 0 1.5rem; }

.tab {
  padding: .45rem .95rem;
  border-radius: 5px;
  font-family: var(--util);
  font-size: .78rem;
  text-decoration: none;
  color: var(--ink-soft);
  background: rgba(0, 0, 0, .04);
}
.tab.is-on { background: var(--ink); color: var(--stock); }


/* ---- Layout ------------------------------------------------ */

.cols {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 60rem) {
  .cols { grid-template-columns: 20rem minmax(0, 1fr); }
}

.stackcol { display: grid; gap: 1.25rem; }

.panel {
  padding: 1.35rem;
  background: var(--stock);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
}

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

.panel--danger { box-shadow: 0 2px 8px rgba(0, 0, 0, .07), inset 0 0 0 1px rgba(178, 58, 46, .3); }

.pill {
  padding: .18rem .6rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--stock);
  font-family: var(--util);
  font-size: .7rem;
}


/* ---- Event list -------------------------------------------- */

.events { list-style: none; margin: 0 0 .5rem; padding: 0; }

.event { border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }

.event a {
  display: grid;
  gap: .1rem;
  padding: .7rem .6rem;
  border-radius: 5px;
  text-decoration: none;
  color: var(--ink);
}
.event a:hover { background: rgba(0, 0, 0, .04); }
.event.is-on a { background: var(--ink); color: var(--stock); }

.event__title { font-family: var(--display); font-weight: 600; font-size: 1rem; }
.event__date  { font-family: var(--util); font-size: .72rem; opacity: .75; }
.event__stat  { font-family: var(--util); font-size: .68rem; opacity: .6; }


/* ---- Forms -------------------------------------------------- */

.stack { display: grid; gap: .7rem; }

.row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.row > label { flex: 1 1 8rem; }
.row--end { justify-content: flex-end; margin-top: .9rem; }

label {
  display: grid;
  gap: .22rem;
  font-family: var(--util);
  font-size: .68rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

label.check {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-transform: none;
  letter-spacing: .02em;
  font-size: .82rem;
  cursor: pointer;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select {
  width: 100%;
  padding: .5rem .6rem;
  font-family: var(--body);
  font-size: .98rem;
  color: var(--ink);
  background: #FFFDF6;
  border: 1px solid var(--line);
  border-radius: 4px;
}
input:focus,
select:focus { outline: none; border-color: var(--suit); box-shadow: 0 0 0 3px rgba(178, 58, 46, .12); }

/* Stacked inputs inside one table cell need a little air between them. */
.grid td input + input { margin-top: .3rem; }

.opt { text-transform: none; letter-spacing: .02em; opacity: .7; font-style: italic; }

.tiny { width: 5rem; text-align: center; }

.inline { display: inline; }


/* ---- Buttons ------------------------------------------------ */

.btn {
  display: inline-block;
  padding: .55rem 1.05rem;
  border: 0;
  border-radius: 5px;
  font-family: var(--display);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--ink); color: var(--stock); }
.btn--primary:hover { background: #33302a; }

.btn--quiet {
  background: transparent;
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--quiet:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-soft); }

.btn--tiny {
  padding: .3rem .65rem;
  font-size: .76rem;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--tiny:hover { color: var(--suit); box-shadow: inset 0 0 0 1px var(--suit); }

.btn--danger { background: var(--suit); color: #fff; }
.btn--danger:hover { background: #962E24; }


/* ---- Tables -------------------------------------------------- */

.grid {
  width: 100%;
  border-collapse: collapse;
  margin-top: .5rem;
  font-size: .93rem;
}

.grid th,
.grid td {
  padding: .5rem .55rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.grid thead th,
.grid tfoot th {
  font-family: var(--util);
  font-size: .66rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
}

.grid tfoot th { border-bottom: 0; border-top: 2px solid var(--ink); color: var(--ink); }

.grid .num { text-align: right; }
.grid .num input { text-align: center; }

.grid tr.is-archived { opacity: .5; }

.row-tools { display: flex; gap: .35rem; justify-content: flex-end; white-space: nowrap; }

.hint {
  display: block;
  font-family: var(--util);
  font-size: .68rem;
  color: var(--ink-soft);
  margin-top: .12rem;
}


/* ---- Flash --------------------------------------------------- */

.flash {
  margin: 0 0 1.1rem;
  padding: .7rem 1rem;
  border-radius: 5px;
  font-family: var(--util);
  font-size: .82rem;
  background: var(--ink);
  color: var(--stock);
}
.flash--bad { background: var(--suit); color: #fff; }


/* ---- Small screens ------------------------------------------- */

@media (max-width: 42rem) {
  .grid, .grid thead, .grid tbody, .grid tfoot, .grid tr, .grid th, .grid td { display: block; }
  .grid thead { display: none; }
  .grid tr { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .grid td { border: 0; padding: .2rem 0; }
  .grid .num { text-align: left; }
  .row-tools { justify-content: flex-start; margin-top: .4rem; }
}
