/* ============================================================================
   css/entrance.css — ENTRANCE_CODES_V1 (2026-11-14, roadmap 332-beds24-auto-actions-routines-map-20261114.md §347.7)
   Check-in → Tools → Entrance: the building entrance code of each hotel. js/entrance.js writes it.
   HIDDEN AS THE CSS DEFAULT (Rocket Loader runs scripts after first paint): the tab shows only once the script adds
   html.ent-see, which it does only when /api/server/entrance answers success for this account. WHO is decided on the
   server (lib/entranceAccess.js; open to staff since 2026-11-20, ENTRANCE_STAFF_ON_V1), so who sees it needs no
   change in this file. Buttons reuse the Schedule pane's .nt-btn / .nt-link.
   ENTRANCE_UI_V2 (2026-11-14, operator: "the UI UX is so bad"): one tile per CODE (the hotels sharing it as chips)
   instead of one card per hotel, and a change panel of hotel pills + code box + Now/Later switch + automatic guest
   check. Its own field styles on purpose: .nt-field forces every input to 100% width (that made the checkboxes huge).
   Only base.css tokens (--gray-600 does not exist there).
   ============================================================================ */

.fu-subtab[data-fsub="entrance"] { display: none; }
html.ent-see .fu-subtab[data-fsub="entrance"] { display: block; }

.ent-wrap { display: flex; flex-direction: column; gap: 14px; }
.ent-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Courier New', monospace; font-variant-numeric: tabular-nums; }

/* ── head ── */
.ent-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ent-head-text { flex: 1 1 300px; min-width: 0; }
.ent-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--navy-800); }
.ent-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--gray-500); line-height: 1.5; }
.ent-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: 3px 10px; background: var(--info-bg); color: var(--info-fg);
}

/* ── one tile per code ── */
.ent-tiles { display: flex; flex-direction: column; gap: 10px; }
.ent-tile {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 20px;
}
.ent-codebox {
  min-width: 132px; text-align: center; padding: 10px 14px; border-radius: 12px;
  background: var(--gray-50); border: 1px solid var(--gray-200);
}
.ent-codebox .ent-mono { display: block; font-size: 30px; font-weight: 700; letter-spacing: .22em; color: var(--navy-900); line-height: 1.15; padding-left: .22em; }
.ent-codebox small { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-600); }
.ent-tile-main { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.ent-brand { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-600); }
.ent-brand span { color: var(--gray-400); font-weight: 600; letter-spacing: .04em; }
.ent-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ent-chip {
  font-size: 12.5px; font-weight: 600; color: var(--navy-800); background: #eef2f8; border: 1px solid #dbe3ef;
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.ent-meta { font-size: 12px; color: var(--gray-500); }
.ent-tile .nt-btn { min-height: 38px; padding: 0 16px; font-size: 13px; }
.ent-sched {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px;
  color: var(--warning-fg); background: var(--warning-bg); border: 1px solid #f6d58a; border-radius: 10px; padding: 8px 12px;
}
.ent-sched b.ent-mono { font-size: 14px; letter-spacing: .15em; }
.ent-sched .nt-btn { min-height: 30px; margin-left: auto; }

.ent-nocode { margin: 0; font-size: 12px; color: var(--gray-500); line-height: 1.6; }
.ent-nocode b { color: var(--gray-700); font-weight: 600; }

/* ── the change panel ── */
.ent-panel {
  background: var(--white); border: 1px solid var(--gray-200); border-top: 3px solid var(--navy-800);
  border-radius: 14px; box-shadow: var(--shadow-md); padding: 18px 20px; display: flex; flex-direction: column; gap: 18px;
}
.ent-panel-head { display: flex; align-items: center; gap: 10px; }
.ent-panel-head h3 { margin: 0; flex: 1; font-size: 16px; color: var(--navy-800); }
.ent-close {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--gray-200); background: var(--white);
  color: var(--gray-500); font-size: 18px; line-height: 1; cursor: pointer;
}
.ent-close:hover { border-color: var(--gray-400); color: var(--gray-700); }
.ent-step { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ent-label { display: flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 700; color: var(--gray-700); }
.ent-label .ent-links { font-weight: 400; display: inline-flex; gap: 2px; align-items: baseline; }
.ent-label .nt-link { padding: 0 4px; font-size: 12px; }
.ent-sub-brand { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-400); margin-top: 2px; }
.ent-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ent-pill {
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--gray-700); background: var(--white);
  border: 1px solid #cbd5e1; border-radius: 999px; padding: 0 14px 0 10px; min-height: 38px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; transition: background var(--transition-fast), border-color var(--transition-fast);
}
.ent-pill:hover { border-color: var(--navy-700); }
.ent-pill i {
  width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #cbd5e1; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 10px; color: transparent;
}
.ent-pill.on { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }
.ent-pill.on i { border-color: var(--white); background: var(--white); color: var(--navy-800); }
.ent-pill:focus-visible, .ent-seg button:focus-visible, .ent-code-in:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }

.ent-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px 24px; align-items: start; }
.ent-code-in {
  width: 100%; max-width: 240px; box-sizing: border-box; min-height: 54px; padding: 0 14px;
  border: 1px solid #cbd5e1; border-radius: 12px; background: var(--white); color: var(--navy-900);
  font-size: 26px; font-weight: 700; letter-spacing: .3em; text-align: center;
}
.ent-code-in::placeholder { color: var(--gray-200); letter-spacing: .3em; }
.ent-help { font-size: 12px; color: var(--gray-500); }

.ent-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--gray-100); border-radius: 10px; align-self: flex-start; }
.ent-seg button {
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--gray-500); background: transparent;
  border: 0; border-radius: 8px; padding: 0 16px; min-height: 36px; cursor: pointer;
}
.ent-seg button.on { background: var(--white); color: var(--navy-800); box-shadow: var(--shadow-sm); }
.ent-later { display: flex; flex-wrap: wrap; gap: 8px; }
.ent-later input {
  font-family: inherit; font-size: 14px; color: #1f2937; background: var(--white); box-sizing: border-box;
  border: 1px solid #cbd5e1; border-radius: 10px; padding: 0 10px; min-height: 42px;
}
.ent-later input[type="date"] { width: 170px; }
.ent-later input[type="time"] { width: 120px; }

.ent-impact {
  border-radius: 12px; padding: 10px 14px; font-size: 13px; line-height: 1.5;
  background: var(--gray-50); border: 1px solid var(--gray-200); color: var(--gray-700);
}
.ent-impact.warn { background: var(--warning-bg); border-color: #f6d58a; color: var(--warning-fg); }
.ent-impact.ok { background: var(--success-bg); border-color: #a7f3d0; color: var(--success-fg); }
.ent-impact summary { cursor: pointer; font-weight: 700; }
.ent-impact ul { margin: 8px 0 2px; padding-left: 18px; font-size: 12.5px; }
.ent-impact li { margin: 2px 0; }
.ent-impact p { margin: 4px 0 0; font-size: 12px; }

.ent-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--gray-100); padding-top: 14px; }
.ent-actions .nt-btn { min-height: 44px; padding: 0 20px; font-size: 14px; }

/* ── after a save: who to tell ── */
.ent-told { position: relative; }
.ent-told .ent-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; font-size: 15px; background: transparent; border-color: transparent; }

/* ── history ── */
.ent-hist { font-size: 12.5px; background: var(--white); border: 1px solid var(--gray-200); border-radius: 12px; padding: 10px 14px; }
.ent-hist summary { cursor: pointer; font-weight: 700; color: var(--navy-800); }
.ent-hist-scroll { overflow-x: auto; }
.ent-hist table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.ent-hist th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); font-weight: 700; }
.ent-hist th, .ent-hist td { padding: 6px 8px; border-bottom: 1px solid var(--gray-100); white-space: nowrap; }
.ent-hist td.ent-c { letter-spacing: .15em; font-weight: 700; color: var(--navy-900); }
.ent-hist tr.ent-x td { color: var(--gray-400); text-decoration: line-through; }

@media (max-width: 640px) {
  .ent-tile { grid-template-columns: auto minmax(0, 1fr); padding: 14px; gap: 10px 14px; }
  .ent-tile > .nt-btn { grid-column: 1 / -1; justify-content: center; }
  .ent-codebox { min-width: 104px; padding: 8px 10px; }
  .ent-codebox .ent-mono { font-size: 24px; }
  .ent-row { grid-template-columns: minmax(0, 1fr); }
  .ent-code-in { max-width: none; }
  .ent-panel { padding: 16px 14px; }
  .ent-actions .nt-btn { flex: 1; justify-content: center; }
}
