/* The owner's page: desktop first, plain and dense. */
body.admin { background: var(--paper); }
.admin-bar { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-4) var(--space-5); background: var(--ink); color: var(--paper); }
.admin-brand { display: flex; align-items: center; gap: var(--space-3); color: var(--paper); text-decoration: none; font-weight: 700; font-size: 20px; }
.admin-brand:hover { color: var(--paper); }
.admin-brand svg { width: 28px; height: 28px; }
.admin-main { max-width: 1240px; margin: 0 auto; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-5); }
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-3); }
.admin-tile { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); border: var(--border) solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin-tile b { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; }
.admin-tile-signal { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.admin-tile-signal .eyebrow { color: var(--warn); }
.admin .green { color: var(--green); }
.admin-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-5); align-items: start; }
.admin-card { padding: var(--space-4); border: var(--border) solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; overflow-x: auto; }
.admin-card h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.admin-list .spread { padding: var(--space-2) 0; border-bottom: 1px solid var(--line-soft); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: var(--space-1-5) var(--space-2); border-bottom: 1px solid var(--line); }
.admin-table td { padding: var(--space-3) var(--space-2); border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.admin-table .num { text-align: right; }
.admin-grid-even { grid-template-columns: 1fr 1.3fr; }
.admin-card > .spread { flex-wrap: wrap; row-gap: var(--space-1-5); }
.admin-card h2 .small { font-family: var(--font-text); font-weight: 400; }
.admin-table .actions { white-space: nowrap; }
.admin-table td .pill { margin-left: var(--space-1-5); vertical-align: 1px; }
/* Change seats: one link until it's opened, then a stepper, Save and Cancel on one line. */
.seats-edit { margin-top: var(--space-2); }
.seats-edit > summary { list-style: none; cursor: pointer; display: inline; }
.seats-edit > summary::-webkit-details-marker { display: none; }
.seats-edit[open] > summary { display: none; }
.seats-form { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: stretch; height: 40px; border: var(--border) solid var(--line); border-radius: var(--pill); background: var(--surface); overflow: hidden; }
.stepper button { width: 38px; border: 0; background: none; font-size: 20px; font-weight: 700; line-height: 1; color: var(--ink); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .stepper button:hover { background: var(--line-soft); } }
.stepper input { width: 3.2em; border: 0; border-inline: 1px solid var(--line-soft); text-align: center; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; background: none; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus-visible, .stepper button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.seats-form .btn-small { min-height: 40px; padding: 0 var(--space-4); }
.admin-table .actions form { display: inline; }
.admin-table .actions form + form::before, .admin-table .actions span + form::before { content: " · "; color: var(--muted); }
/* An invite link has three actions: one under the other, so the table keeps inside its card. */
.admin-table .actions-stack { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.admin-table .actions-stack form + form::before, .admin-table .actions-stack span + form::before { content: none; }
.admin-search { display: flex; align-items: center; gap: var(--space-3); }
.admin-search input[type="search"] { -webkit-appearance: none; appearance: none; width: 240px; max-width: 100%; min-height: 40px; padding: var(--space-2) var(--space-3); border: var(--border) solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 16px; }
.admin-search input[type="search"]:focus-visible { outline: none; border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }
.admin-search button, .admin-search a { display: inline-flex; align-items: center; min-height: 40px; }
a.chip-ink, a.chip-ink:hover { color: var(--paper); }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }
/* On a narrow screen the long tables scroll inside their card instead of squeezing every column. */
@media (max-width: 700px) { .admin-table-wide { min-width: 640px; } }

/* Give access: the segmented control picks which form shows, no script needed. */
.admin-access:has(input[name="access_how"][value="grant"]:checked) .access-link,
.admin-access:not(:has(input[name="access_how"][value="grant"]:checked)) .access-grant { display: none; }
/* The line for the invite email only matters once "Email them" is ticked. */
.access-grant:not(:has(#email_them:checked)) .access-message { display: none; }
