/* Cross-page consistency layer: one table, row-action, status-pill and minimum-text system.
   Loaded last so it can align older page-specific styles without rewriting them. */

:root {
  --tone-success-bg:#e8f6ef; --tone-success-fg:#1f7a52;
  --tone-warning-bg:#fff3e0; --tone-warning-fg:#8f5a14;
  --tone-danger-bg:#fdeeee;  --tone-danger-fg:#b23f3a;
  --tone-muted-bg:#f1f2f6;   --tone-muted-fg:#666d7d;
  --tone-info-bg:#e8f0fc;    --tone-info-fg:#2c5b9a;
  --table-head-bg:#fafbfe;
}

/* ---------- Tables: same header, cell rhythm and full-bleed container everywhere ---------- */
:root :is(.admin-table,.workflow-table) { font-size:13px; }
:root :is(.admin-table,.workflow-table) thead th { padding-top:12px;padding-bottom:12px;background:var(--table-head-bg);color:var(--muted);font-size:12px;font-weight:650;white-space:nowrap; }
:root .workflow-table td { padding:16px; }
:root :is(.admin-table,.workflow-table) tbody tr { transition:background .12s; }
:root :is(.admin-table,.workflow-table) tbody tr:hover { background:#fcfcfe; }
:root :is(.admin-table,.workflow-table) :is(small,small.block),
:root .admin-room-cell small { font-size:12px;color:var(--muted); }
/* Search/filter cards: filters on top, table edge to edge, like the room and booking lists. */
.workflow-card:has(> .workflow-filters) { padding:0;overflow:hidden; }
.workflow-card > .workflow-filters { margin:0;padding:18px 22px;border-bottom:1px solid var(--line); }
.workflow-card:has(> .workflow-filters) .workflow-table :is(th,td):first-child { padding-left:22px; }
.workflow-card:has(> .workflow-filters) .workflow-table :is(th,td):last-child { padding-right:22px; }
.workflow-card:has(> .workflow-filters) .workflow-table tbody tr:last-child td { border-bottom:0; }
.workflow-card:has(> .workflow-filters) .workflow-table td[colspan] { padding:40px 20px;text-align:center;color:var(--muted); }

/* ---------- Row actions: neutral by default, brand for the main action, red only when destructive ---------- */
:root .admin-row-actions button,
:root .admin-link[data-remove-block] { display:inline-flex;align-items:center;justify-content:center;min-height:30px;margin:2px;padding:5px 11px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:12px;font-weight:600;line-height:1.4;box-shadow:none;filter:none;cursor:pointer;transition:background .12s,border-color .12s,color .12s; }
/* The main action is set apart by weight, not brand colour, so it never competes with the red destructive action. */
:root .admin-row-actions button:is(.admin-action-edit,[data-edit],[data-booking-edit],[data-edit-equipment],[data-employee],[data-role]) { color:var(--ink);font-weight:700; }
:root .admin-row-actions button:hover:not(:disabled) { border-color:var(--brand-border);background:var(--brand-soft);color:var(--brand-text);box-shadow:none;filter:none; }
:root .admin-row-actions button:is(.admin-action-danger,[data-archive],[data-booking-cancel]),
:root .admin-link[data-remove-block] { color:var(--tone-danger-fg); }
:root .admin-row-actions button:is(.admin-action-danger,[data-archive],[data-booking-cancel]):hover:not(:disabled),
:root .admin-link[data-remove-block]:hover { border-color:#f0cfca;background:#fff4f2;color:#a3332e; }
:root .admin-row-actions button:disabled { opacity:.4;cursor:not-allowed; }
:root .admin-row-actions button:focus-visible { outline:2px solid var(--brand-text);outline-offset:2px; }

/* ---------- Status pills: one shape, one scale, tone by meaning ---------- */
:root :is(.admin-status,.workflow-pill) { display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:600;line-height:1;white-space:nowrap; }
:root td > :is(.admin-status,.workflow-pill)::before { content:'';width:6px;height:6px;flex-shrink:0;border-radius:50%;background:currentColor; }
:root :is(.admin-status.published,.admin-status.phase-ongoing,.workflow-pill.active,.workflow-pill.tone-success) { background:var(--tone-success-bg);color:var(--tone-success-fg); }
/* Pending states use a fixed info blue so a red/pink brand never reads as an error. */
:root :is(.admin-status.phase-upcoming,.workflow-pill.tone-pending) { background:var(--tone-info-bg);color:var(--tone-info-fg); }
:root :is(.admin-status.paused,.workflow-pill.inactive,.workflow-pill.offline) { background:var(--tone-warning-bg);color:var(--tone-warning-fg); }
:root :is(.admin-status.draft,.admin-status.archived,.admin-status.phase-past,.workflow-pill.disabled,.workflow-pill.tone-muted) { background:var(--tone-muted-bg);color:var(--tone-muted-fg); }
:root .workflow-pill.tone-danger { background:var(--tone-danger-bg);color:var(--tone-danger-fg); }

/* ---------- Minimum reading size (12px) for helper and secondary text ---------- */
:root :is(.admin-help,.workflow-footnote,.admin-local-note,.editor-bottom-hint,.editor-properties-empty,.audit-record-label,.equipment-alias) { font-size:12px; }
:root :is(.editor-sample-actions button,.editor-plain-button,.editor-color-controls > button,.editor-color-controls small) { font-size:12px; }
:root :is(.editor-toolbar button,.editor-toolbar select,.editor-toolbar label,.editor-properties label) { font-size:12px; }
:root :is(.brand-field small,.brand-local-note) { font-size:12px; }
:root .menu-item-name small { font-size:12px; }

/* ---------- File inputs: styled drop area instead of the bare browser control ---------- */
:root .main-content .brand-field input[type=file] { width:100%;padding:10px;border:1px dashed var(--field-border,#dfe2eb);border-radius:10px;background:#fafbfe;color:var(--muted);font-size:12px;font-weight:400;cursor:pointer;transition:border-color .12s,background .12s; }
:root .main-content .brand-field input[type=file]:hover { border-color:var(--brand-border);background:var(--brand-soft); }
:root .main-content .brand-field input[type=file]::file-selector-button { margin-right:12px;padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-weight:650;cursor:pointer; }
:root .main-content .brand-field input[type=file]:hover::file-selector-button { border-color:var(--brand-border);color:var(--brand-text); }

/* ---------- Narrow screens: tables become labelled cards instead of clipped columns ---------- */
@media (max-width:680px) {
  :root :is(.admin-table-scroll,.workflow-table-scroll,#employee-table,#audit-table) { overflow:visible; }
  :root :is(.admin-table,.workflow-table) { display:block;min-width:0;width:100%; }
  :root :is(.admin-table,.workflow-table) thead { display:none; }
  :root :is(.admin-table,.workflow-table) tbody { display:grid;gap:0; }
  :root :is(.admin-table,.workflow-table) tbody tr { display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:16px;border-bottom:1px solid var(--line); }
  :root :is(.admin-table,.workflow-table) tbody tr:last-child { border-bottom:0; }
  /* Label sits in a fixed left gutter; everything in the cell (text, small lines, pills) stays in the value column. */
  :root :is(.admin-table,.workflow-table) tbody td { display:block;position:relative;width:auto;min-width:0;padding:0 0 0 88px !important;border:0;overflow-wrap:anywhere;line-height:1.6; }
  :root :is(.admin-table,.workflow-table) tbody td::before { content:attr(data-label);position:absolute;left:0;top:0;width:76px;color:var(--muted);font-size:12px;font-weight:600;line-height:1.8; }
  /* The first column is the record's title: full width, no label. */
  :root :is(.admin-table,.workflow-table) tbody td:first-child { padding-left:0 !important;margin-bottom:2px; }
  :root :is(.admin-table,.workflow-table) tbody td:first-child::before,
  :root :is(.admin-table,.workflow-table) tbody td:not([data-label])::before { display:none; }
  :root :is(.admin-table,.workflow-table) tbody td:not([data-label]) { padding-left:0 !important; }
  :root :is(.admin-table,.workflow-table) tbody td[colspan] { padding:24px 0 !important;text-align:center; }
  :root :is(.admin-table,.workflow-table) tbody td.admin-row-actions { display:flex;flex-wrap:wrap;gap:8px;padding:6px 0 0 !important;white-space:normal; }
  :root :is(.admin-table,.workflow-table) colgroup { display:none; }
  :root #view-admin-equipment .equipment-table { table-layout:auto;min-width:0; }
  :root :is(.admin-table,.workflow-table) tbody td.admin-row-actions::before { display:none; }
  :root .admin-row-actions button { flex:1 1 0;min-height:40px;margin:0; }
  :root :is(.admin-table,.workflow-table) td > :is(.admin-status,.workflow-pill) { justify-self:start; }
  .workflow-card > .workflow-filters { padding:14px;flex-wrap:wrap; }
  .workflow-card > .workflow-filters > input { flex:1 1 100%; }
  :root .admin-room-cell > img { width:56px;height:42px; }
}

/* Floor editor zoom: room for the "符合寬度" option. */
.editor-toolbar :is(#editor-zoom,.ui-select:has(#editor-zoom),.ui-select:has(#editor-zoom) .ui-select-trigger) { min-width:116px; }

/* ---------- B4 Summary/metric cards: one card style across pages ---------- */
:root :is(.admin-summary > div,.workflow-stats > div,.metric-card) { padding:18px 20px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 4px 14px #39335c06; }
:root :is(.admin-summary span,.workflow-stats span,.metric-card > span) { display:block;margin:0;color:var(--muted);font-size:12px;font-weight:600;letter-spacing:0; }
:root :is(.admin-summary strong,.workflow-stats strong,.metric-card > strong) { display:block;margin:8px 0 0;font-size:28px;font-weight:750;line-height:1.2;letter-spacing:-.6px;color:var(--ink); }
:root .metric-card > small { display:block;margin-top:4px;color:var(--muted);font-size:12px; }
:root :is(.admin-summary,.workflow-stats,.metric-grid) { gap:14px;margin-bottom:22px; }
@media (max-width:680px) {
  :root :is(.admin-summary > div,.workflow-stats > div,.metric-card) { padding:14px; }
  :root :is(.admin-summary strong,.workflow-stats strong,.metric-card > strong) { font-size:24px; }
  :root :is(.admin-summary,.workflow-stats,.metric-grid) { gap:8px; }
}

/* ---------- B5 Form footers: primary action bottom-right, separated by a rule ---------- */
.admin-form-footer { display:flex;justify-content:flex-end;gap:10px;margin-top:22px;padding-top:18px;border-top:1px solid var(--line); }
:root .admin-card .admin-form-footer .primary-button { margin-top:0; }
.admin-rules-grid { align-items:start; }
@media (max-width:680px) { .admin-form-footer .primary-button { flex:1; } }

/* ---------- B6 Native controls replaced with system patterns ---------- */
/* Weekday selector: toggle chips */
:root .admin-weekdays { display:flex;flex-wrap:wrap;gap:8px; }
:root .admin-weekdays legend { float:left;width:100%;margin:0 0 10px;padding:0;color:#56596e;font-size:12px;font-weight:650; }
:root .admin-weekdays label { position:relative;display:inline-grid;place-items:center;min-width:44px;height:38px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--muted);font-size:13px;font-weight:600;cursor:pointer;transition:background .12s,border-color .12s,color .12s; }
:root .admin-weekdays label:hover { border-color:var(--brand-border); }
:root .admin-weekdays label:has(input:checked) { border-color:var(--brand-fill,var(--brand-primary));background:var(--brand-fill,var(--brand-primary));color:var(--brand-fill-on,#fff); }
:root .admin-weekdays label:has(input:focus-visible) { outline:2px solid var(--brand-text);outline-offset:2px; }
:root .admin-weekdays input { position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer; }
/* Recurring-booking group: soft panel instead of a bordered fieldset, checkbox as a switch */
:root .admin-recurring { margin:18px 0 0;padding:16px;border:0;border-radius:12px;background:#f7f8fb; }
:root .admin-recurring legend { float:left;width:100%;margin:0 0 12px;padding:0;color:var(--ink);font-size:13px;font-weight:700; }
:root .admin-recurring > label:not(.admin-check) { display:grid;gap:8px;margin:14px 0 8px;color:#56596e;font-size:12px;font-weight:650; }
:root .admin-recurring > label:not(.admin-check) input { max-width:200px; }
:root .admin-recurring .admin-check { display:flex;align-items:center;gap:10px;color:var(--ink);font-size:13px;font-weight:600;cursor:pointer; }
:root .admin-recurring .admin-check input { appearance:none;-webkit-appearance:none;position:relative;flex-shrink:0;width:38px;height:22px;margin:0;border-radius:999px;background:#d6d8e1;cursor:pointer;transition:background .18s; }
:root .admin-recurring .admin-check input::after { content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #24233b40;transition:transform .18s; }
:root .admin-recurring .admin-check input:checked { background:var(--brand-fill,var(--brand-primary)); }
:root .admin-recurring .admin-check input:checked::after { transform:translateX(16px); }
:root .admin-recurring .admin-check input:focus-visible { outline:2px solid var(--brand-text);outline-offset:2px; }
/* Door-device disclosure: system chevron instead of the native triangle */
:root .p1-device-card > summary { display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer; }
:root .p1-device-card > summary::-webkit-details-marker { display:none; }
:root .p1-device-card > summary::after { content:'';width:8px;height:8px;margin-left:auto;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg) translateY(-2px);transition:transform .15s; }
:root .p1-device-card[open] > summary::after { transform:rotate(-135deg) translateY(-2px); }

/* ---------- D4 My bookings uses the full content width like other pages ---------- */
:root .mine-list { max-width:none; }

/* ---------- D3 Table pagination ---------- */
.table-pager { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 22px;border-top:1px solid var(--line);background:#fff; }
.table-pager-summary { color:var(--muted);font-size:12px; }
.table-pager-pages { display:flex;align-items:center;gap:4px; }
.table-pager button { display:grid;place-items:center;min-width:34px;height:34px;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:13px;font-weight:600;cursor:pointer; }
.table-pager button:hover:not(:disabled) { border-color:var(--brand-border);background:var(--brand-soft);color:var(--brand-text); }
.table-pager button[aria-current=page] { border-color:var(--brand-fill,var(--brand-primary));background:var(--brand-fill,var(--brand-primary));color:var(--brand-fill-on,#fff); }
.table-pager button:disabled { opacity:.35;cursor:default; }
.table-pager button:focus-visible { outline:2px solid var(--brand-text);outline-offset:2px; }
.table-pager-gap { padding:0 4px;color:var(--muted); }
@media (max-width:680px) { .table-pager { padding:14px 16px;justify-content:center; } .table-pager-summary { flex-basis:100%;text-align:center; } .table-pager button { min-width:40px;height:40px; } }
@media (max-width:680px) {
  /* Seven weekday chips share one row on narrow screens. */
  /* The floated legend takes the first line; the zero-basis chips then share the second line evenly. */
  :root .admin-weekdays { gap:6px; }
  :root .admin-weekdays label { flex:1 1 0;min-width:0;padding:0; }
}

/* ---------- Rules page: the right column holds "add a closure" and its records together ---------- */
.admin-rules-side { display:grid;gap:20px;align-content:start;min-width:0; }
.admin-rules-side > * { margin:0; }
:root .admin-block-records .admin-table { min-width:0; }
:root .admin-block-records > h3 { margin:22px 22px 12px; }

/* ---------- Page heads: description on the left, page action on the right (my bookings, analytics) ---------- */
:root .workflow-page-heading.dashboard-head { align-items:center;margin-bottom:24px; }
:root .workflow-page-heading.dashboard-head p { font-size:13px; }
:root .workflow-page-heading.p1-mobile-scan { flex-wrap:nowrap;margin-bottom:24px; }

/* ---------- Calendar: "today" sits with the period arrows, like common calendar apps ---------- */
#view-calendar .calendar-nav { display:flex;align-items:center;gap:12px;min-width:0; }
#view-calendar .calendar-today { flex-shrink:0;min-height:36px;padding:6px 14px;border-radius:10px;font-size:13px;font-weight:650; }
@media (max-width:680px) {
  #view-calendar .calendar-nav { gap:8px; }
  #view-calendar .calendar-nav .week-switcher { flex:1;min-width:0; }
  #view-calendar .calendar-today { padding:6px 12px; }
  :root .workflow-page-heading.p1-mobile-scan { flex-wrap:wrap; }
}
/* ≤700px the calendar shows its own date row with a "今天" button, so the toolbar one steps aside. */
@media (max-width:700px) { #view-calendar .calendar-nav > .calendar-today { display:none; } }
@media (max-width:680px) {
  :root .workflow-page-heading.dashboard-head { align-items:stretch; }
  :root .workflow-page-heading.dashboard-head button { width:100%;min-height:44px; }
}

/* ---------- E3 Import: the file input lives invisibly inside its button; the chosen name shows below ---------- */
:root .p1-actions label.secondary-button { position:relative;white-space:nowrap;cursor:pointer; }
:root .p1-actions label.secondary-button > input[type=file] { position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer; }
:root .p1-actions label.secondary-button:has(input:focus-visible) { outline:2px solid var(--brand-text);outline-offset:2px; }

/* ---------- E11 Booking drawer: the sticky action bar sits fully inside the screen ---------- */
:root .drawer-booking-view .modal-actions { bottom:0;padding-bottom:max(14px,env(safe-area-inset-bottom)); }

/* ---------- E6 One booking-status vocabulary and palette (details, admin list, report) ---------- */
:root :is(.status-pill.upcoming,.admin-status.pill-upcoming) { background:var(--tone-info-bg);color:var(--tone-info-fg); }
:root :is(.status-pill.waiting,.admin-status.pill-waiting,.workflow-pill.tone-warning) { background:var(--tone-warning-bg);color:var(--tone-warning-fg); }
:root :is(.status-pill.ongoing,.status-pill.checked,.admin-status.pill-ongoing,.admin-status.pill-checked) { background:var(--tone-success-bg);color:var(--tone-success-fg); }
:root :is(.status-pill.past,.admin-status.pill-past) { background:var(--tone-muted-bg);color:var(--tone-muted-fg); }

/* ---------- E4 Drawer close button matches dialog close buttons (still legible over photos) ---------- */
:root .drawer-close { width:36px;height:36px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:10px;background:#ffffffeb;color:#4d5468;font-size:22px;line-height:1;box-shadow:0 4px 14px #24233b1f;backdrop-filter:blur(6px);cursor:pointer; }
:root .drawer-close:hover { background:#fff;color:var(--ink); }

/* ---------- E7 Room-detail slots: green only means "available"; the action uses the brand; taken slots are labels ---------- */
:root #detail-slots .slot-available button { border-color:var(--brand-border);background:#fff;color:var(--brand-text);font-weight:700; }
:root #detail-slots .slot-available button:hover { border-color:var(--brand-text);background:var(--brand-soft); }
:root #detail-slots .slot-row button:disabled { min-height:0;padding:4px 2px;border-color:transparent;background:transparent;color:var(--muted);font-weight:600;cursor:default; }

/* ---------- Schedule: explain a fully closed day ---------- */
.schedule-closed-note { display:flex;align-items:center;gap:6px 12px;flex-wrap:wrap;margin:0 0 14px;padding:14px 18px;border:1px solid #f1dcc0;border-radius:12px;background:#fff8ee;color:#7a4e14;font-size:13px; }
.schedule-closed-note strong { font-size:14px; }
.schedule-closed-note span { color:#8a6230; }

/* ---------- E9 Archive blocked: affected bookings as a structured list ---------- */
.admin-dialog .admin-booking-list { list-style:none;margin:16px 27px 0;padding:0;border:1px solid var(--line);border-radius:12px;overflow:hidden; }
.admin-booking-list li { display:flex;justify-content:space-between;gap:12px;padding:12px 16px;font-size:13px; }
.admin-booking-list li + li { border-top:1px solid var(--line); }
.admin-booking-list span { color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums; }
@media (max-width:680px) { .admin-booking-list li { flex-direction:column;gap:2px; } .admin-booking-list span { white-space:normal; } }

/* ---------- E8 Role permissions: readable matrix, larger targets ---------- */
:root .permission-matrix label { font-size:13px;line-height:1.6; }
:root .permission-matrix small,:root .permission-menu small { font-size:12px; }
:root .permission-matrix input[type=checkbox] { width:18px;height:18px;accent-color:var(--brand-fill,var(--brand-text)); }
:root .permission-menu { background:#f7f8fb; }
:root .permission-menu label { font-weight:650; }
:root .permission-matrix section > div { gap:10px 22px; }
/* Long dialogs (role permissions, imports) keep their actions reachable at the bottom edge. */
:root .workflow-dialog form > .workflow-form-footer { position:sticky;bottom:-26px;z-index:2;margin:22px -26px -26px;padding:16px 26px 20px;background:#fff;border-top:1px solid var(--line); }
@media (max-width:680px) { :root .workflow-dialog form > .workflow-form-footer { bottom:-22px;margin:22px -18px -22px;padding:14px 18px 18px; } }

/* ---------- Invitation reply: the chosen answer is a settled state, not a button to press again ---------- */
:root #event-modal .invitation-actions .rsvp-chosen:disabled, :root .invitation-actions .rsvp-chosen:disabled { opacity:1;cursor:default;box-shadow:none;transform:none; }
:root #event-modal .invitation-actions .rsvp-chosen.accepted:disabled { border-color:transparent;background:var(--tone-success-bg);color:var(--tone-success-fg); }
:root #event-modal .invitation-actions .rsvp-chosen.declined:disabled { border-color:transparent;background:var(--tone-muted-bg);color:var(--tone-muted-fg); }

/* Page-heading actions: consistent gap between buttons and one shared button size across admin and report pages. */
:root .admin-page-heading > div { display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end; }
:root .workflow-page-heading.dashboard-head button { font-size:13px; }
@media (max-width:680px) {
  :root .admin-page-heading > div { flex-direction:column;align-items:stretch; }
}
:root .admin-page-heading .primary-button { border:1px solid transparent; }
:root .equipment-alert-banner .secondary-button { font-size:13px; }

/* Month view: soft filled bars derived from the admin-chosen space colour (fill + same-hue dark text); past events fade further. */
:root #month-view .month-events { gap:3px; }
:root #month-view .month-event[style] { display:flex;align-items:center;gap:5px;min-width:0;width:100%;padding:4px 8px;border:0;border-radius:6px;background:var(--space-fill,var(--space-tint));color:var(--space-deep,var(--space-ink));font-size:11px;font-weight:650;line-height:1.35;box-shadow:none;transition:filter .15s ease; }
:root #month-view .month-event[style] time { flex:none;font-size:10.5px;font-weight:800;font-variant-numeric:tabular-nums; }
:root #month-view .month-event[style] span { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
:root #month-view .month-event[style]:hover { filter:brightness(.96); }
:root #month-view .month-event[style]:focus-visible { outline:2px solid var(--space-color);outline-offset:2px; }
:root #month-view .month-event.past[style] { background:var(--space-faint,var(--space-tint));color:#6b7183;font-weight:550; }
:root #month-view .month-event.past[style] time { color:#8a8fa0; }
:root #month-view .more-events { font-size:11px;font-weight:650;padding:2px 8px; }
:root #view-calendar .month-mobile-event[style] { border:0;border-radius:4px;padding:2px 4px;background:var(--space-fill,var(--space-tint));color:var(--space-deep,var(--space-ink));font-weight:650; }

/* 「只顯示我的會議」 filter sits before the calendar hint. */
:root #view-calendar .calendar-booking-hint { display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;min-width:0; }
:root #view-calendar .calendar-mine-only { display:inline-flex;align-items:center;gap:7px;flex:none;padding:6px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-size:12px;font-weight:650;cursor:pointer;user-select:none; }
:root #view-calendar .calendar-mine-only[hidden] { display:none; }
:root #view-calendar .calendar-mine-only input { width:15px;height:15px;margin:0;accent-color:var(--brand,#6d5ce8);cursor:pointer; }
:root #view-calendar .calendar-mine-only:has(input:checked) { border-color:var(--brand-border);background:var(--brand-soft);color:var(--brand-text); }
:root #view-calendar #calendar-hint-text { min-width:0;color:var(--muted); }

/* Week / three-day timeline: same soft fill as the month view; past events fade to a faint tint with grey text. */
:root .calendar-grid .event[style] { border:0;border-radius:8px;background:var(--space-fill,var(--space-tint));color:var(--space-deep,var(--space-ink));box-shadow:0 0 0 1.5px #fff; }
:root .calendar-grid .event[style] strong { color:var(--space-deep,var(--space-ink));font-weight:700; }
:root .calendar-grid .event[style] small { color:var(--space-deep,var(--space-ink));opacity:.8; }
:root .calendar-grid .event.mine[style] strong::after { color:var(--space-deep,var(--space-ink));opacity:.7; }
:root .calendar-grid .event[style]:hover { filter:brightness(.97);box-shadow:0 0 0 1.5px #fff,0 8px 18px rgba(23,34,56,.12); }
:root .calendar-grid .event[style]:focus-visible { outline:2px solid var(--space-color);outline-offset:2px; }
:root .calendar-grid .event.past[style] { background:var(--space-faint,var(--space-tint)); }
:root .calendar-grid .event.past[style] strong { color:#5f6578;font-weight:600; }
:root .calendar-grid .event.past[style] small { color:#8a8fa0;opacity:1; }
:root .calendar-grid .event.past.mine[style] strong::after { color:#8a8fa0;opacity:1; }

/* Meetings of 30 minutes or less: title and time on one line so nothing gets clipped. */
:root .calendar-grid .event.is-short { display:flex;align-items:center;gap:6px;padding-block:4px; }
:root .calendar-grid .event.is-short strong { flex:none;max-width:62%; }
:root .calendar-grid .event.is-short small { flex:1;min-width:0;margin-top:0; }
:root #view-calendar .calendar-card[data-mobile-week-layout=timeline] .event.is-short { display:block;padding-block:3px; }
:root #view-calendar .calendar-card[data-mobile-week-layout=timeline] .event.is-short small { display:none; }
:root #view-calendar .calendar-card[data-mobile-week-layout=timeline] .event.is-short strong { max-width:none; }

/* Door panel: QR stays visible during a retained meeting for late arrivals and guests. */
:root .door-panel.attend-open .panel-qr { display:block; }

/* Arrival phone preview: visitor sign-in form. */
:root .arrival-guest-link { display:block;width:100%;margin-top:10px;padding:6px;border:0;background:none;color:var(--brand-text);font-size:12px;font-weight:650;text-decoration:underline;text-underline-offset:3px;cursor:pointer; }
:root .arrival-guest-link[hidden] { display:none; }
:root .arrival-guest-form { display:grid;gap:10px;width:100%;margin-top:4px;text-align:left; }
:root .arrival-guest-form[hidden] { display:none; }
:root .arrival-guest-form > strong { font-size:14px; }
:root .arrival-guest-form label { display:grid;gap:5px;font-size:12px;font-weight:650;color:var(--ink); }
:root .arrival-guest-form label span { margin-left:6px;color:var(--muted);font-weight:500; }
:root .arrival-guest-form label { grid-template-columns:auto 1fr; }
:root .arrival-guest-form label input { grid-column:1/-1; }
:root .arrival-guest-form input { width:100%;min-height:40px;padding:8px 11px;border:1px solid var(--line);border-radius:10px;font:inherit;font-weight:500;background:#fff; }
:root .arrival-guest-form button[type=submit] { min-height:44px;border:0;border-radius:12px;background:var(--brand,#6d5ce8);color:#fff;font-weight:750;cursor:pointer; }
:root .arrival-guest-error { margin:0;color:#b4232c;font-size:12px; }

/* Attendance list dialog. */
.attendance-dialog { width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 48px);padding:0;border:0;border-radius:18px;box-shadow:0 24px 60px rgba(23,34,56,.25);overflow:auto; }
.attendance-dialog::backdrop { background:rgba(23,34,56,.45); }
.attendance-head { display:flex;justify-content:space-between;gap:16px;padding:22px 24px 14px; }
.attendance-head h2 { margin:2px 0 4px;font-size:20px; }
.attendance-head p { margin:0;color:var(--muted);font-size:12.5px; }
.attendance-stats { display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:0 24px 16px; }
.attendance-stats div { padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fafbfc; }
.attendance-stats span { display:block;color:var(--muted);font-size:11.5px; }
.attendance-stats strong { font-size:22px; }
.attendance-stats small { font-size:13px;margin-left:1px; }
.attendance-section { padding:0 24px 14px; }
.attendance-section h3 { margin:6px 0 8px;font-size:14px; }
.attendance-section h3 small { color:var(--muted);font-weight:500;margin-left:4px; }
.attendance-table td small { display:block;color:var(--muted);font-size:11px;margin-top:2px; }
.attendance-table tr.is-absent td:first-child strong,.attendance-table tr.is-declined td:first-child strong { color:var(--muted); }
.attendance-row-action { text-align:right;white-space:nowrap; }
.attendance-row-action .text-action { font-size:12px;font-weight:650;border:0;background:none;cursor:pointer;padding:4px 6px; }
.attendance-empty { margin:0;padding:14px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);font-size:12.5px; }
.attendance-guest-form { display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;margin-top:12px; }
.attendance-guest-form label { display:grid;gap:5px;font-size:12px;font-weight:650; }
.attendance-guest-form input { min-height:40px;padding:8px 11px;border:1px solid var(--line);border-radius:10px;font:inherit;font-weight:500; }
.attendance-guest-form .secondary-button { min-height:40px;padding:8px 14px;font-size:13px; }
.attendance-error { margin:0 24px 8px;color:#b4232c;font-size:12.5px; }
.attendance-dialog > .workflow-footnote { margin:0 24px;font-size:11.5px; }
.attendance-foot { position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;padding:14px 24px;margin-top:14px;border-top:1px solid var(--line);background:#fff; }
.attendance-foot button { font-size:13px; }
@media (max-width:680px) {
  .attendance-dialog { width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0; }
  .attendance-stats { grid-template-columns:repeat(2,1fr); }
  .attendance-guest-form { grid-template-columns:1fr; }
  .attendance-foot button { flex:1; }
}
.attendance-table { table-layout:fixed;width:100%; }
.attendance-table th:nth-child(1) { width:38%; }.attendance-table th:nth-child(2) { width:20%; }.attendance-table th:nth-child(3) { width:20%; }
@media (max-width:680px) { .attendance-table th:nth-child(1) { width:40%; }.attendance-table th:nth-child(2),.attendance-table th:nth-child(3) { width:auto; } }

/* Room schedule (desktop resource grid + mobile room slots): same soft fill as the calendar. */
:root .resource-event[style] { border:0;border-radius:8px;background:var(--space-fill,var(--space-tint));color:var(--space-deep,var(--space-ink));box-shadow:0 0 0 1.5px #fff;transition:filter .15s ease,box-shadow .15s ease; }
:root .resource-event[style] strong { color:var(--space-deep,var(--space-ink));font-weight:700; }
:root .resource-event[style] small { color:var(--space-deep,var(--space-ink));opacity:.8; }
:root .resource-event[style]:hover { filter:brightness(.97);box-shadow:0 0 0 1.5px #fff,0 6px 14px rgba(23,34,56,.12); }
:root .resource-event[style]:focus-visible { outline:2px solid var(--space-color);outline-offset:2px; }
:root .resource-event.past[style] { background:var(--space-faint,var(--space-tint)); }
:root .resource-event.past[style] strong { color:#5f6578;font-weight:600; }
:root .resource-event.past[style] small { color:#8a8fa0;opacity:1; }
:root #view-calendar .mobile-room-slot.booked[style] { border-color:transparent;background:var(--space-fill,var(--space-tint));color:var(--space-deep,var(--space-ink)); }
:root #view-calendar .mobile-room-slot.booked[style] small { color:var(--space-deep,var(--space-ink));opacity:.8; }
:root #view-calendar .mobile-room-slot.booked[style]:hover { filter:brightness(.97);background:var(--space-fill,var(--space-tint));border-color:transparent; }
:root #view-calendar .mobile-room-slot.booked.past[style] { background:var(--space-faint,var(--space-tint));color:#5f6578; }
:root #view-calendar .mobile-room-slot.booked.past[style] small { color:#8a8fa0;opacity:1; }

/* ---------- Restricted spaces (group booking access) ---------- */
.access-lock-icon { width:13px;height:13px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.access-badge { display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:600;line-height:1.4;background:var(--tone-warning-bg);color:var(--tone-warning-fg); }
.access-badge.is-allowed { background:var(--tone-info-bg);color:var(--tone-info-fg); }
.room-card .access-badge { margin:2px 0 8px; }
.room-picker-option .access-badge { margin:2px 0;align-self:flex-start;justify-self:start;width:fit-content; }
.mobile-room-picker .access-badge { margin-top:6px; }
.access-notice { display:flex;gap:10px;align-items:flex-start;margin:0 0 14px;padding:12px 14px;border-radius:10px;background:var(--tone-warning-bg);color:var(--tone-warning-fg); }
.access-notice.is-allowed { background:var(--tone-info-bg);color:var(--tone-info-fg); }
.access-notice .access-lock-icon { width:16px;height:16px;margin-top:2px; }
.access-notice strong { display:block;font-size:14px; }
.access-notice span { display:block;font-size:13px;line-height:1.5;color:inherit;opacity:.9; }
.access-row-lock { display:inline-flex;margin-left:5px;vertical-align:-1px;color:var(--tone-info-fg); }
.access-row-lock.is-locked { color:var(--tone-warning-fg); }
.resource-unavailable.is-locked { background:repeating-linear-gradient(135deg,#fbf6ee 0 6px,#f3eadb 6px 12px); }
.map-room.is-locked .map-room-status { color:var(--tone-warning-fg);font-weight:600; }
/* Admin: room list column and room editor section */
.admin-access-cell .access-badge { white-space:nowrap; }
.admin-access-all { color:var(--muted); }
.admin-access-warning { margin-top:4px;color:var(--tone-danger-fg);font-weight:600; }
.space-access h3 { margin-bottom:12px; }
.space-access-cards { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
.space-access-cards label { display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border:1px solid var(--line,#e2e4ec);border-radius:10px;background:#fff;cursor:pointer;transition:border-color .12s,box-shadow .12s; }
.space-access-cards label:has(input:checked) { border-color:var(--brand-primary,#5b4fc7);box-shadow:0 0 0 1px var(--brand-primary,#5b4fc7); }
.space-access-cards input { margin-top:3px;accent-color:var(--brand-primary,#5b4fc7); }
.space-access-cards strong { display:block;font-size:14px; }
.space-access-cards small { display:block;margin-top:2px;color:var(--muted);font-size:12.5px; }
.space-access-block { margin-top:22px; }
.space-access-block h4 { margin:0 0 10px;font-size:13px;font-weight:650; }
.space-access-groups { display:flex;flex-wrap:wrap;gap:8px; }
.space-access-groups label { display:flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--line,#e2e4ec);border-radius:999px;background:#fff;cursor:pointer;font-size:14px; }
.space-access-groups label:has(input:checked) { border-color:var(--brand-primary,#5b4fc7);background:var(--brand-soft,var(--tone-info-bg)); }
.space-access-groups input { accent-color:var(--brand-primary,#5b4fc7); }
.space-access-groups small { margin-left:6px;color:var(--muted);font-size:12px; }
.space-access-groups .admin-help { margin:0; }
.space-access-hint { margin:10px 0 0;color:var(--muted);font-size:12.5px; }
.space-access-hint.is-error { color:var(--tone-danger-fg);font-weight:600; }
#space-access-impact:not(:empty) { margin-top:18px; }
@media (max-width:600px) { .space-access-cards { grid-template-columns:1fr; } }
/* Groups page */
.group-table { table-layout:fixed;width:100%; }
.group-table .group-col-name { width:28%; } .group-table .group-col-members { width:32%; } .group-table .group-col-spaces { width:24%; } .group-table .group-col-actions { width:16%; }
.group-table td small { display:block;margin-top:4px;color:var(--muted); }
.group-member-chips { display:flex;flex-wrap:wrap;gap:6px; }
.group-member-chip { display:inline-flex;align-items:center;gap:6px;padding:2px 10px 2px 2px;border-radius:999px;background:var(--tone-muted-bg);font-size:12px; }
.group-member-chip i,.group-member-option i { display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#fff;color:var(--tone-info-fg);font-style:normal;font-size:11px;font-weight:700; }
.group-member-chip.is-inactive { opacity:.6; }
.group-member-more { align-self:center;color:var(--muted);font-size:12px; }
.group-space-chip { display:inline-block;margin:0 6px 6px 0;padding:3px 10px;border-radius:999px;background:var(--tone-info-bg);color:var(--tone-info-fg);font-size:12px;font-weight:600; }
.group-empty-note { color:var(--muted);font-size:13px; }
.group-dialog { width:min(640px,calc(100vw - 32px)); }
.group-member-picker { margin-top:16px; }
.group-member-head { display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px; }
.group-member-head h3 { margin:0;font-size:15px; }
.group-member-head span { color:var(--muted);font-size:13px; }
.group-member-picker input[type=search] { width:100%; }
.group-member-list { display:grid;gap:4px;max-height:300px;margin-top:8px;overflow:auto;padding:4px;border:1px solid var(--line,#e2e4ec);border-radius:10px; }
.group-member-option { display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;cursor:pointer; }
.group-member-option:hover { background:var(--tone-muted-bg); }
.group-member-option:has(input:checked) { background:var(--tone-info-bg); }
.group-member-option i { background:var(--tone-info-bg); }
.group-member-option strong { display:block;font-size:14px; }
.group-member-option small { display:block;color:var(--muted);font-size:12px; }
@media (max-width:720px) {
  .group-table { table-layout:auto; }
}

/* ---------- Equipment repair reports ---------- */
.repair-pill { display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap; }
.repair-pill::before { content:'';width:6px;height:6px;border-radius:50%;background:currentColor; }
.repair-pill.tone-warning { background:var(--tone-warning-bg);color:var(--tone-warning-fg); }
.repair-pill.tone-info { background:var(--tone-info-bg);color:var(--tone-info-fg); }
.repair-pill.tone-success { background:var(--tone-success-bg);color:var(--tone-success-fg); }
.repair-pill.tone-muted { background:var(--tone-muted-bg);color:var(--tone-muted-fg); }
/* Report dialog */
.repair-dialog { width:min(560px,calc(100vw - 32px)); }
.repair-form { display:grid;gap:18px; }
.repair-step h3 { margin:0 0 10px;font-size:14px;font-weight:650; }
.repair-step h3 small { margin-left:4px;color:var(--muted);font-size:12px;font-weight:500; }
.repair-choices { display:flex;flex-wrap:wrap;gap:8px; }
.repair-choices button { position:relative;min-height:40px;padding:8px 16px;border:1px solid var(--line,#e2e4ec);border-radius:999px;background:#fff;color:inherit;font:inherit;font-size:14px;cursor:pointer; }
.repair-choices button:hover { border-color:var(--brand-primary,#5b4fc7); }
.repair-choices button[aria-checked="true"] { border-color:var(--brand-primary,#5b4fc7);background:var(--brand-soft,var(--tone-info-bg));color:var(--brand-text,var(--brand-primary,#5b4fc7));font-weight:650; }
.repair-choices button i { position:absolute;top:4px;right:6px;width:7px;height:7px;border-radius:50%;background:var(--tone-warning-fg); }
.repair-other { width:100%;margin-top:10px; }
.repair-step textarea { width:100%;resize:vertical; }
.repair-photo { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.repair-photo-button { cursor:pointer; }
.repair-photo figure { position:relative;margin:0; }
.repair-photo figure img { display:block;width:88px;height:66px;object-fit:cover;border-radius:8px; }
.repair-photo figure button { position:absolute;top:-8px;right:-8px;width:24px;height:24px;border:0;border-radius:50%;background:#252638;color:#fff;cursor:pointer; }
.repair-existing { padding:14px 16px;border-radius:12px;background:var(--tone-warning-bg); }
.repair-existing-head { display:flex;align-items:center;gap:8px; }
.repair-existing-head strong { font-size:14px; }
.repair-existing p { margin:8px 0 2px;font-size:14px; }
.repair-existing small { color:var(--muted);font-size:12px; }
.repair-existing-actions { display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:12px; }
.repair-done-note { color:var(--tone-success-fg);font-size:13px;font-weight:600; }
.repair-panel-note { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-radius:12px;background:var(--tone-muted-bg); }
.repair-panel-note strong { display:block;font-size:14px; }
.repair-panel-note span { color:var(--muted);font-size:12.5px; }
.repair-qr { display:grid;justify-items:center;gap:4px;flex:none;padding:8px;border:1px solid var(--line,#e2e4ec);border-radius:10px;background:#fff;color:#252638;cursor:pointer; }
.repair-qr svg { width:48px;height:48px;fill:currentColor; }
.repair-qr span { font-size:11px;color:var(--muted) !important; }
.repair-done { display:grid;justify-items:center;gap:6px;padding:18px 8px 6px;text-align:center; }
.repair-done-icon { display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:var(--tone-success-bg);color:var(--tone-success-fg);font-size:24px;font-weight:700; }
.repair-done h2 { margin:8px 0 0;font-size:20px; }
.repair-done p { margin:0;font-size:14px; }
.repair-done .repair-done-detail { margin:4px 0 14px;color:var(--muted);font-size:13px; }
.repair-confirm { margin:0;font-size:14px;line-height:1.6; }
.repair-restore { display:flex;align-items:center;gap:8px;font-size:14px; }
.repair-photo-large { display:block;max-width:100%;max-height:70vh;margin:0 auto;border-radius:10px; }
/* Room detail */
.repair-detail-list { display:grid;gap:6px;margin:12px 0 0;padding:0;list-style:none; }
.repair-detail-list li { display:flex;gap:8px;align-items:flex-start;padding:8px 10px;border-radius:8px;background:var(--tone-warning-bg);color:var(--tone-warning-fg);font-size:13px; }
.repair-detail-list i { display:grid;place-items:center;width:16px;height:16px;flex:none;margin-top:1px;border-radius:50%;background:#fff;font-size:10px;font-style:normal;font-weight:700; }
.repair-detail-list strong { margin-right:6px; }
.repair-detail-button { margin-top:10px;padding:0;font-size:13px; }
/* Arrival page and door panel */
.arrival-repair-link { margin-top:2px; }
.panel-topline-right { display:inline-flex;align-items:center;gap:14px; }
.panel-report-button { padding:7px 12px;border:1px solid rgba(255,255,255,.45);border-radius:999px;background:rgba(255,255,255,.12);color:#fff;font:inherit;font-size:13px;font-weight:600;cursor:pointer; }
.panel-report-button:hover { background:rgba(255,255,255,.22); }
/* 我的預約 › 我的回報 */
.mine-tabs,.equipment-tabs { display:flex;gap:4px;margin:0 0 18px;border-bottom:1px solid var(--line,#e2e4ec); }
.mine-tabs button,.equipment-tabs button { display:inline-flex;align-items:center;gap:6px;margin-bottom:-1px;padding:10px 14px;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font:inherit;font-size:14px;font-weight:600;cursor:pointer; }
.mine-tabs button[aria-selected="true"],.equipment-tabs button[aria-selected="true"] { border-bottom-color:var(--brand-primary,#5b4fc7);color:var(--ink,#252638); }
.mine-tabs button span:not(:empty),.equipment-tabs button span { min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--tone-warning-bg);color:var(--tone-warning-fg);font-size:12px;line-height:20px;text-align:center; }
#mine-repairs { display:grid;gap:12px; }
#mine-repairs[hidden] { display:none; }
.repair-card { padding:16px 18px;border:1px solid var(--line,#e2e4ec);border-radius:14px;background:#fff; }
.repair-card-head { display:flex;justify-content:space-between;align-items:center; }
.repair-card-head time { color:var(--muted);font-size:12px; }
.repair-card h3 { margin:10px 0 2px;font-size:16px; }
.repair-card-room { margin:0;color:var(--muted);font-size:13px; }
.repair-card-note { margin:8px 0 0;font-size:14px; }
.repair-card-result { margin:10px 0 0;padding:10px 12px;border-radius:8px;background:var(--tone-success-bg);color:var(--tone-success-fg);font-size:13px; }
.repair-card-result strong { display:block;margin-bottom:2px; }
/* 設備管理 › 報修 */
.repair-summary { margin-bottom:16px; }
.repair-filter { display:inline-flex;gap:4px;padding:4px;border-radius:10px;background:var(--tone-muted-bg); }
.repair-filter button { padding:6px 14px;border:0;border-radius:7px;background:none;color:var(--muted);font:inherit;font-size:13px;font-weight:600;cursor:pointer; }
.repair-filter button[aria-pressed="true"] { background:#fff;color:var(--ink,#252638);box-shadow:0 1px 3px rgba(23,34,56,.12); }
.repair-table-scroll { overflow-x:auto; }
.repair-table { table-layout:fixed;min-width:760px; }
.repair-table .repair-col-what { width:40%; } .repair-table .repair-col-who { width:22%; } .repair-table .repair-col-status { width:14%; } .repair-table .repair-col-actions { width:24%; }
.repair-table td small { color:var(--muted); }
.repair-thumb { display:block;margin-top:8px;padding:0;border:0;background:none;cursor:zoom-in; }
.repair-thumb img { display:block;width:64px;height:48px;object-fit:cover;border-radius:6px; }
.repair-resolution { margin-top:4px;color:var(--tone-success-fg) !important; }
.repair-handled { color:var(--muted);font-size:13px; }
.repair-alert-banner { margin-top:12px; }
@media (max-width:600px) {
  .repair-panel-note { align-items:flex-start; }
  .panel-report-button { padding:6px 10px;font-size:12px; }
}
#repair-details:not([hidden]) { display:grid;gap:18px; }
#repair-existing:empty { display:none; }
.repair-form .space-access-cards label { display:flex;flex-direction:row;align-items:flex-start;gap:10px;margin:0;text-align:left; }
.repair-form .space-access-cards label > span { flex:1;min-width:0; }
.repair-form .space-access-cards input { width:auto;margin-top:3px; }
.repair-form label.repair-restore { display:flex;flex-direction:row;align-items:center;gap:8px;margin:0;font-weight:500; }
.repair-form .repair-restore input { width:auto;margin:0; }
.equipment-chip.is-reported { position:relative; }
.equipment-chip .report-dot { display:inline-block;width:7px;height:7px;margin-left:5px;border-radius:50%;background:#d98a1c;box-shadow:0 0 0 2px #fff;vertical-align:1px; }
.repair-detail-list li .report-dot-legend { display:inline-block;width:7px;height:7px;margin-right:4px;border-radius:50%;background:#d98a1c;vertical-align:1px; }

/* 報修中: one short label per equipment, no per-report details for users. */
.report-tag { display:inline-flex;align-items:center;height:18px;margin-left:6px;padding:0 6px;border-radius:999px;background:var(--tone-warning-bg);color:var(--tone-warning-fg);font-size:11px;font-style:normal;font-weight:650;line-height:1;white-space:nowrap; }
.equipment-chip.is-reported { border-color:#f1d9b3; }
.repair-existing-head .report-tag { margin-left:0; }
.repair-existing-head strong { font-size:14px; }
.repair-existing small { display:block;margin-top:6px; }
.repair-other-line { display:flex;align-items:center;gap:6px;margin:10px 0 0;font-size:13px; }
.repair-other-line .report-tag { margin-left:0; }

/* Door panel: report button sits at the end of the footer row, away from the QR card. */
#door-panel .panel-footer { display:flex;align-items:center;gap:24px;border-top:1px solid rgba(255,255,255,.3);padding-top:22px; }
#door-panel .panel-footer .panel-schedule { flex:1;min-width:0;border-top:0;padding-top:0; }
#door-panel .panel-footer .panel-report-button { flex:none;padding:8px 16px;font-size:14px; }
#door-panel .panel-qr span small { display:block;margin-top:2px;font-size:13px;font-weight:600;opacity:.65; }
@media(max-width:680px){ #door-panel .panel-footer { flex-direction:column;align-items:flex-start;margin-top:20px; } }

/* Door panel look-up: pick a space and a day, read the schedule. */
#door-panel { position:relative; }
#door-panel .panel-footer-actions { display:flex;flex:none;gap:10px; }
.panel-rooms { position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;padding:clamp(24px,3.4vw,44px);border-radius:inherit;background:#1e2630;color:#fff; }
.panel-rooms[hidden] { display:none; }
.panel-rooms-head { display:flex;align-items:flex-start;justify-content:space-between;gap:16px; }
.panel-rooms-head h3 { margin:0;font-size:clamp(24px,2.6vw,32px);letter-spacing:-.5px; }
.panel-rooms-head p { margin:6px 0 0;font-size:14px;opacity:.6; }
.panel-rooms-close { flex:none;min-width:88px;padding:10px 18px;border:1px solid rgba(255,255,255,.35);border-radius:999px;background:rgba(255,255,255,.1);color:#fff;font:inherit;font-size:15px;font-weight:650;cursor:pointer; }
.panel-rooms-controls { display:flex;align-items:flex-end;gap:20px;flex-wrap:wrap;margin-top:20px;padding-bottom:18px;border-bottom:1px solid rgba(255,255,255,.14); }
.panel-rooms-field { display:grid;gap:6px;min-width:0;flex:0 1 340px; }
.panel-rooms-field > span { font-size:13px;opacity:.6; }
#door-panel .panel-rooms-field .ui-select-trigger { min-height:48px;padding:10px 14px;border:1px solid rgba(255,255,255,.25);border-radius:12px;background:rgba(255,255,255,.08);color:#fff;font-size:16px;font-weight:600;box-shadow:none; }
#door-panel .panel-rooms-field .ui-select-arrow { background:#fff; }
.panel-rooms-days { display:flex;gap:8px;overflow-x:auto;flex:1 1 auto;min-width:0;scrollbar-width:none; }
.panel-rooms-days button { flex:none;display:grid;justify-items:center;gap:2px;min-width:60px;padding:7px 10px;border:1px solid rgba(255,255,255,.2);border-radius:12px;background:transparent;color:#fff;font:inherit;cursor:pointer; }
.panel-rooms-days button span { font-size:12px;opacity:.7; }
.panel-rooms-days button strong { font-size:16px; }
.panel-rooms-days button.active { border-color:#fff;background:#fff;color:#1e2630; }
.panel-rooms-days button.active span { opacity:.7; }
.panel-rooms-body { flex:1;overflow:auto;margin-top:6px; }
.panel-rooms-meta { margin:14px 0 6px;font-size:14px;opacity:.65; }
.panel-rooms-full { display:inline-block;margin:6px 0 4px;padding:4px 12px;border-radius:999px;background:rgba(255,122,122,.18);color:#ffb4b4;font-size:14px;font-weight:650; }
.panel-rooms-empty { margin:24px 0;font-size:16px;opacity:.7; }
.panel-day-list { list-style:none;margin:0;padding:0; }
.panel-day-list li { display:grid;grid-template-columns:130px 1fr;align-items:center;gap:16px;padding:12px 0 12px 14px;border-bottom:1px solid rgba(255,255,255,.08);border-left:3px solid #ff7a7a; }
.panel-day-list time { font-size:16px;font-variant-numeric:tabular-nums;opacity:.85; }
.panel-day-list li > span { font-size:17px;font-weight:650; }
.panel-day-list li.is-free { border-left-color:#3ccf91; }
.panel-day-list li.is-free > span { color:#7fe6b7;font-weight:600; }
.panel-day-list li.is-paused { border-left-color:#8a94a3; }
.panel-day-list li.is-paused > span { opacity:.75; }
.panel-day-list li.is-past { opacity:.45; }
.panel-day-list small { margin-left:6px;font-size:12px;font-weight:500;opacity:.8; }
.panel-day-list .panel-private-label { margin-left:6px;padding:2px 6px;border:1px solid rgba(255,255,255,.4);border-radius:6px;font-size:11px;font-style:normal;font-weight:500; }
@media(max-width:680px){
  #door-panel .panel-footer-actions { flex-wrap:wrap; }
  .panel-rooms-field { flex-basis:100%; }
  .panel-day-list li { grid-template-columns:104px 1fr;gap:10px; }
  .panel-day-list time { font-size:14px; }
  .panel-day-list li > span { font-size:15px; }
}

/* Spacepin mark (concept C): the bouncing pin on its own, no tile; fixed colours, not the customer's theme. */
:root .brand-mark { display:inline-block;padding:0;gap:0;transform:none;border-radius:0;background:none;overflow:visible; }
:root .brand-mark svg { width:100%;height:100%;display:block;overflow:visible; }
:root .brand-mark svg *, .wordmark-i svg * { stroke:none; }
.brand-mark .mark-pin { fill:#5b45f0; }
.brand-mark .mark-cells { fill:#fff;fill-opacity:.5; }
.brand-mark .mark-lit { fill:#ffd166; }
.brand-mark .mark-shadow { fill:#ff8a65;opacity:.6; }
:root[data-sidebar-style=dark] .sidebar .brand-mark .mark-pin { fill:#8f7dff; }
:root[data-sidebar-style=brand] .sidebar .brand-mark .mark-pin { fill:#fff; }
:root[data-sidebar-style=brand] .sidebar .brand-mark .mark-cells { fill:#5b45f0;fill-opacity:.35; }
/* Product credit stays fixed even when the customer replaces the logo and name. */
.product-credit { margin:10px 0 0;padding:0 6px;font-size:10px;letter-spacing:.3px;color:var(--muted); }
.product-credit b { font-weight:700;color:inherit; }

/* Spacepin wordmark (concept C): geometric bold, "pin" in violet, a bouncing pin as the dot of the i. */
:root [data-brand-name].wordmark { overflow:visible;font-family:Futura,"Century Gothic","Avenir Next",Inter,sans-serif;font-weight:700;letter-spacing:-.03em;padding-top:.14em; }
.wordmark-pin { color:#5b45f0; }
.wordmark-i { position:relative;display:inline-block; }
.wordmark-i svg { position:absolute;left:50%;bottom:62%;width:.36em;height:.5em;transform:translateX(-40%);overflow:visible; }
.wordmark-i svg path { fill:#5b45f0; }
.wordmark-i svg rect { fill:#ffd166; }
.wordmark-i svg .wordmark-shadow { fill:#ff8a65;opacity:.6; }
:root:not([data-sidebar-style=light]) .sidebar .wordmark-pin { color:#b4aaff; }
:root:not([data-sidebar-style=light]) .sidebar .wordmark-i svg path { fill:#b4aaff; }
.door-panel .wordmark-pin { color:inherit; }
.door-panel .wordmark-i svg path { fill:currentColor; }
/* Without a tile the pin reads smaller, so give it a little more room and sit it closer to the name. */
:root .sidebar .brand-mark { width:36px;height:36px;margin-right:-4px; }
:root .login-brand .brand-mark { width:38px;height:38px;margin-right:-4px; }

/* Role editor: booking basics stay in the matrix, always checked and locked for every role. */
.permission-matrix section.is-base .permission-menu { white-space:nowrap; }
.permission-matrix section.is-base .permission-menu small { white-space:nowrap;font-size:11px;padding:1px 7px;border-radius:999px;background:#eef0f6;color:var(--muted); }
.permission-matrix section.is-base input:disabled { cursor:not-allowed; }
