/* Hive Events – shared styles */
:root {
  --bg: #f7f4ec; --card: #ffffff; --ink: #1c1a16; --muted: #6d675b; --line: #e5dfd2;
  --honey: #f5b301; --honey-ink: #1c1a16; --ok: #11823b; --err: #b3261e; --warn-bg: #fff4d1; --warn-ink: #5e4700;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14130f; --card: #1f1d18; --ink: #f2eee4; --muted: #a8a191; --line: #34312a;
    --warn-bg: #3a3012; --warn-ink: #f7dc8a; --ok: #3ccf74; --err: #ff8a80;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1, h2 { line-height: 1.2; margin: 0 0 8px; }
h1 { font-size: 24px; } h2 { font-size: 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 14px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bar { background: #000; } }
.brand { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand .logo { color: var(--honey); font-size: 22px; }
.brand .sub { font-weight: 500; opacity: .7; font-size: 15px; }
.barlink { color: var(--honey); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }

.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; min-width: 0; }
input[type="color"] { padding: 4px; height: 46px; }
textarea { resize: vertical; font-size: 15px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--honey); outline-offset: 1px; }

button, .button { font: inherit; font-weight: 700; border-radius: 10px; padding: 11px 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; text-decoration: none; }
button.primary { background: var(--honey); color: var(--honey-ink); border-color: var(--honey); }
button.ghost, .button.ghost { background: transparent; }
button.small, .small.button { padding: 7px 12px; min-height: 38px; font-size: 14px; }
button.danger { color: var(--err); }
button:disabled { opacity: .55; cursor: wait; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form .primary { width: 100%; margin-top: 4px; }

.notice { padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); margin-bottom: 16px; }
.notice.warn button { margin-left: 6px; }
.status { white-space: pre-wrap; margin: 10px 0 0; }
.status:empty { display: none; }
.status.ok { color: var(--ok); } .status.err { color: var(--err); }

.tabs { display: flex; gap: 6px; margin: 8px 0 14px; border-bottom: 1px solid var(--line); }
.tab { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; padding: 8px 10px; min-height: 40px; color: var(--muted); }
.tab.on { color: var(--ink); border-bottom-color: var(--honey); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { font-size: 13px; color: var(--muted); }

.listhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.listhead input { max-width: 260px; }
.list { margin-top: 8px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.item .who { min-width: 0; overflow-wrap: anywhere; }
.item .acts { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 560px) { .item { flex-direction: column; align-items: stretch; } .item .acts { justify-content: flex-start; } }
.item.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(245, 179, 1, .35); } to { background: transparent; } }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); vertical-align: 2px; }
.pill.ok { background: rgba(17, 130, 59, .14); color: var(--ok); }
.empty { padding: 16px 0; }

.door { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.doorqr canvas { display: block; border-radius: 10px; max-width: 100%; }
@media (max-width: 560px) { .door { grid-template-columns: 1fr; } .doorqr { justify-self: center; } }
.steps { margin: 0 0 12px; padding-left: 20px; } .steps li { margin-bottom: 6px; }
.restore { margin-top: 14px; } .restore summary { cursor: pointer; color: var(--muted); }

dialog { border: 0; border-radius: 18px; padding: 14px; max-width: min(440px, 94vw); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog img { width: 100%; height: auto; border-radius: 12px; display: block; margin-bottom: 10px; }
dialog .row button { flex: 1; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 40px; }

/* password + events */
.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack .primary { margin-top: 4px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 76px; }
.pw .reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 6px 12px; font-size: 14px; border: 0; background: transparent; color: var(--muted); }
.pw .reveal:hover { color: var(--ink); }
.barbtn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); min-height: 34px; padding: 5px 12px; font-size: 14px; }
.bar .row { flex-wrap: nowrap; }
@media (max-width: 480px) { .brand .sub { display: none; } .bar { gap: 8px; padding: 12px; } .barlink { font-size: 14px; } }

/* event card */
.event-summary h1 { overflow-wrap: anywhere; margin-top: 2px; }
.event-summary #evMeta { margin: 0; }
.evswitch { margin-top: 14px; text-overflow: ellipsis; }
.evtools { margin-top: 12px; }
/* phones: full-width search, even button rows */
@media (max-width: 560px) {
  .listhead input { max-width: none; }
  .card .row > button, .card .row > .button { flex: 1 1 auto; }
}
