:root {
  --navy: #0b1c32;
  --navy-2: #142f53;
  --navy-3: #1e426f;
  --gold: #d2aa61;
  --gold-strong: #b88937;
  --gold-soft: #f7efdF;
  --canvas: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #172033;
  --muted: #687386;
  --border: #e2e6ec;
  --success: #2e7d55;
  --success-bg: #eaf6ef;
  --warning: #9a6817;
  --warning-bg: #fff5df;
  --danger: #b33a3a;
  --danger-bg: #fff0f0;
  --info: #28679a;
  --info-bg: #eaf4fb;
  --shadow: 0 8px 28px rgba(20, 35, 58, .08);
  --shadow-lg: 0 24px 70px rgba(7, 21, 40, .2);
  --radius: 12px;
  --sidebar: 260px;
  color-scheme: light;
  font-family: "Red Hat Display", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); font-size: 15px; line-height: 1.45; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); font-weight: 700; line-height: 1.15; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.boot-loader {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  min-height: 100dvh;
  color: #fff;
  background:
    radial-gradient(circle at 70% 20%, rgba(210, 170, 97, .22), transparent 34%),
    linear-gradient(140deg, var(--navy), #102a4b 58%, #173e6c);
}
.loader-brand { width: min(280px, 72vw); padding: 22px 26px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); }
.loader-ring { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
.boot-loader p { margin: 0; color: rgba(255,255,255,.78); }
@keyframes spin { to { transform: rotate(360deg); } }

.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background:
    linear-gradient(105deg, rgba(11,28,50,.91), rgba(17,49,85,.8)),
    radial-gradient(circle at 80% 10%, rgba(210,170,97,.38), transparent 34%),
    var(--navy);
}
.login-card { width: min(440px, 100%); padding: 36px; border: 1px solid rgba(255,255,255,.65); border-radius: 18px; background: rgba(255,255,255,.98); box-shadow: var(--shadow-lg); }
.login-brand { width: 230px; margin-bottom: 32px; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--gold-strong); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #f1d69e; }
.login-card h1 { margin-bottom: 10px; font-size: 30px; }
.login-card > p { margin-bottom: 26px; color: var(--muted); }
form label { display: grid; gap: 7px; margin-bottom: 18px; color: #3f4a5c; font-weight: 700; }
form label > span { font-size: 13px; }
input, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd5de;
  border-radius: 9px;
  outline: none;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus, select:focus { border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(210,170,97,.2); }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.field-icon { position: absolute; top: 50%; right: 5px; display: grid; width: 40px; height: 40px; place-items: center; border: 0; background: transparent; transform: translateY(-50%); }
.form-error { margin: -4px 0 16px; padding: 10px 12px; border-radius: 8px; color: var(--danger); background: var(--danger-bg); font-size: 13px; }
.login-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.login-note i { color: var(--gold-strong); font-size: 19px; }

.button, .icon-button, .text-button {
  border: 0;
  border-radius: 9px;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s;
}
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; font-weight: 750; }
.button:hover { transform: translateY(-1px); }
.button:disabled, .icon-button:disabled { cursor: wait; opacity: .64; transform: none; }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--navy-2), var(--navy-3)); box-shadow: 0 8px 18px rgba(20,47,83,.18); }
.button.primary:hover { box-shadow: 0 10px 24px rgba(20,47,83,.24); }
.button.secondary { border: 1px solid var(--border); color: var(--navy-2); background: #fff; }
.button.danger { border: 1px solid #f2c6c6; color: var(--danger); background: var(--danger-bg); }
.button.wide { width: 100%; }
.button.is-loading span { opacity: .7; }
.button.is-loading i { animation: spin .7s linear infinite; }
.icon-button { display: inline-grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); color: #4d586a; background: #fff; box-shadow: 0 4px 12px rgba(26,38,56,.06); font-size: 20px; }
.icon-button:hover { color: var(--navy); border-color: #c7ced8; background: #fafbfd; }
.text-button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 0; color: var(--navy-2); background: transparent; font-weight: 800; }

.app-shell { min-height: 100dvh; }
.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 10% 12%, rgba(210,170,97,.18), transparent 26%),
    linear-gradient(180deg, #0a1a2e, #0d2644);
  box-shadow: 10px 0 34px rgba(10,25,45,.12);
}
.sidebar-brand { min-height: 92px; display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-tile { display: grid; min-height: 58px; place-items: center; padding: 10px 12px; border-radius: 11px; background: #fff; box-shadow: 0 7px 22px rgba(0,0,0,.18); }
.sidebar-close { display: none; margin-left: auto; color: #fff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }
.sidebar-nav { display: flex; flex: 1; flex-direction: column; gap: 5px; padding: 24px 13px; overflow-y: auto; }
.sidebar-nav > small { margin: 8px 12px 5px; color: rgba(255,255,255,.47); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.nav-item { display: grid; min-height: 46px; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-radius: 9px; color: rgba(255,255,255,.72); background: transparent; text-align: left; }
.nav-item i { font-size: 19px; }
.nav-item span { font-weight: 650; }
.nav-item b { display: grid; min-width: 23px; height: 23px; place-items: center; padding: 0 6px; border-radius: 99px; color: rgba(255,255,255,.78); background: rgba(255,255,255,.1); font-size: 10px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(210,170,97,.24), rgba(255,255,255,.08)); box-shadow: inset 3px 0 0 var(--gold); }
.nav-item.active b { color: var(--navy); background: var(--gold); }
.sidebar-footer { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 10px; padding: 17px 18px max(17px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.1); }
.admin-avatar { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; color: var(--navy); background: var(--gold); font-weight: 850; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 13px; }
.sidebar-footer small { color: rgba(255,255,255,.5); font-size: 10px; }
.sidebar-backdrop { position: fixed; z-index: 45; inset: 0; border: 0; background: rgba(6,16,29,.56); backdrop-filter: blur(2px); }

.workspace { min-height: 100dvh; margin-left: var(--sidebar); }
.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(218,223,231,.8);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
}
.topbar-heading { display: flex; align-items: center; gap: 13px; min-width: 0; }
.topbar-heading small { display: block; margin-bottom: 1px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.topbar-heading h1 { margin: 0; font-size: 20px; }
.menu-button { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.sync-status { display: inline-flex; min-height: 34px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 700; }
.sync-status i { width: 7px; height: 7px; border-radius: 50%; background: #aab2bf; }
.sync-status.live i { background: var(--success); box-shadow: 0 0 0 4px rgba(46,125,85,.12); }
.sync-status.loading i { border: 2px solid #d6dae0; border-top-color: var(--gold-strong); background: transparent; animation: spin .7s linear infinite; }

.content { width: min(1640px, 100%); margin: 0 auto; padding: 24px 28px 44px; }
.view { display: none; }
.view.active { display: block; animation: viewIn .18s ease-out; }
@keyframes viewIn { from { opacity: .45; transform: translateY(3px); } }
.hero-card { position: relative; display: flex; min-height: 210px; align-items: flex-end; justify-content: space-between; gap: 24px; overflow: hidden; padding: 34px; border-radius: 16px; color: #fff; background: linear-gradient(120deg, rgba(9,27,49,.98), rgba(20,56,96,.94)); box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; width: 330px; height: 330px; right: -80px; top: -150px; border: 64px solid rgba(210,170,97,.13); border-radius: 50%; }
.hero-card > * { position: relative; z-index: 1; }
.hero-card h2 { max-width: 700px; margin: 0 0 12px; color: #fff; font-size: clamp(27px, 3vw, 42px); }
.hero-card p { max-width: 720px; margin: 0; color: rgba(255,255,255,.7); }
.hero-date { display: flex; min-width: 170px; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.15); border-radius: 11px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.hero-date i { color: var(--gold); font-size: 23px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; margin: 20px 0; }
.stat-card { position: relative; display: grid; min-height: 116px; grid-template-columns: 52px 1fr; align-items: center; gap: 14px; overflow: hidden; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 12px; color: var(--navy-2); background: var(--gold-soft); font-size: 24px; }
.stat-card:nth-child(2) .stat-icon { color: var(--info); background: var(--info-bg); }
.stat-card:nth-child(3) .stat-icon { color: var(--warning); background: var(--warning-bg); }
.stat-card:nth-child(4) .stat-icon { color: var(--success); background: var(--success-bg); }
.stat-card small, .stat-card strong, .stat-card span { display: block; }
.stat-card small { color: var(--muted); font-size: 11px; font-weight: 700; }
.stat-card strong { margin: 2px 0; color: var(--navy); font-size: 28px; line-height: 1; }
.stat-card span { color: #9199a6; font-size: 10px; }

.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(320px,.75fr); gap: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 24px; border-bottom: 1px solid var(--border); }
.card-head.compact { padding-bottom: 18px; }
.card-head h2 { margin: 0 0 5px; font-size: 20px; }
.card-head p { margin: 0; color: var(--muted); font-size: 12px; }
.next-access-list { display: grid; }
.next-access-item { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.next-access-item:last-child { border-bottom: 0; }
.next-date { display: grid; width: 58px; min-height: 54px; place-items: center; align-content: center; border-radius: 10px; color: var(--navy); background: var(--gold-soft); }
.next-date strong, .next-date small { display: block; line-height: 1; }
.next-date strong { font-size: 20px; }
.next-date small { margin-top: 5px; color: var(--gold-strong); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.next-copy strong, .next-copy span { display: block; }
.next-copy strong { margin-bottom: 3px; }
.next-copy span { color: var(--muted); font-size: 11px; }
.next-meta { text-align: right; }
.next-meta strong, .next-meta small { display: block; }
.next-meta strong { color: var(--navy-2); font-size: 13px; }
.next-meta small { color: var(--muted); font-size: 10px; }
.integration-summary { overflow: hidden; padding-bottom: 20px; }
.provider-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; margin: 16px 20px 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }
.provider-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 10px; font-size: 20px; }
.provider-row strong, .provider-row small { display: block; }
.provider-row small { color: var(--muted); font-size: 10px; }
.provider-row b { font-size: 10px; }
.provider-row.success .provider-icon, .provider-row.success b { color: var(--success); }
.provider-row.success .provider-icon { background: var(--success-bg); }
.provider-row.warning .provider-icon, .provider-row.warning b { color: var(--warning); }
.provider-row.warning .provider-icon { background: var(--warning-bg); }
.provider-notice { display: flex; align-items: flex-start; gap: 10px; margin: 16px 20px; padding: 13px; border: 1px solid #edd9ae; border-radius: 9px; color: #6e5935; background: #fffaf0; font-size: 11px; }
.provider-notice.large { max-width: 820px; margin: 0 0 20px; padding: 16px; font-size: 13px; }
.provider-notice i { flex: 0 0 auto; color: var(--warning); font-size: 19px; }
.provider-notice p { margin: 0; }
.integration-summary > .button { width: calc(100% - 40px); margin: 0 20px; }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding: 9px 2px; }
.page-intro h2 { margin: 0 0 7px; font-size: 30px; }
.page-intro p { margin: 0; color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding: 14px; }
.toolbar select { max-width: 220px; }
.search-field { position: relative; display: block; width: min(520px, 100%); margin: 0; }
.search-field i { position: absolute; top: 50%; left: 14px; color: #8992a0; font-size: 18px; transform: translateY(-50%); }
.search-field input { padding-left: 42px; }
.chip-group { display: flex; align-items: center; gap: 7px; }
.filter-chip { min-height: 36px; padding: 0 13px; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 800; }
.filter-chip.active { color: #fff; border-color: var(--navy-2); background: var(--navy-2); }

.lock-table-shell { overflow-x: auto; padding: 0; }
.lock-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.lock-table th { padding: 11px 10px; color: var(--muted); background: var(--surface-2); text-align: left; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.lock-table td { height: 64px; padding: 9px 10px; border-top: 1px solid var(--border); vertical-align: middle; font-size: 10px; }
.lock-table tbody tr:hover { background: #fbfcfe; }
.lock-table th:first-child, .lock-table td:first-child { padding-left: 15px; }
.lock-table th:last-child, .lock-table td:last-child { padding-right: 15px; }
.lock-table td:first-child { width: 145px; }
.lock-table td:nth-child(2) { width: 130px; }
.lock-table td:nth-child(3) { width: 140px; }
.lock-table td:nth-child(4), .lock-table td:nth-child(5) { width: 92px; }
.lock-table td:nth-child(6), .lock-table td:nth-child(7) { width: 108px; }
.lock-table td:nth-child(8) { width: 76px; }
.cell-primary, .cell-secondary { display: block; }
.cell-primary { color: var(--ink); font-size: 11px; }
.cell-secondary { max-width: 145px; margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.lock-table td:first-child .status-badge { min-height: 20px; margin-top: 4px; padding: 0 6px; font-size: 7px; }
.cell-muted { color: var(--muted); font-size: 9px; }
.date-cell { color: var(--navy-2); font-size: 9px; font-weight: 750; white-space: nowrap; }
.passcode-inline { display: inline-flex; align-items: center; gap: 5px; }
.passcode-inline code, .detail-emergency-code code { color: var(--navy); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 850; letter-spacing: .04em; }
.mini-icon-button { display: inline-grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--border); border-radius: 7px; color: var(--navy-2); background: #fff; }
.battery-inline { white-space: nowrap; }
.settings-cell { width: 48px; text-align: right; }
.settings-cell .icon-button { width: 34px; height: 34px; }
.status-badge { display: inline-flex; min-height: 27px; align-items: center; gap: 6px; padding: 0 9px; border-radius: 99px; font-size: 9px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.status-badge.success { color: var(--success); background: var(--success-bg); }
.status-badge.warning { color: var(--warning); background: var(--warning-bg); }
.status-badge.danger { color: var(--danger); background: var(--danger-bg); }
.status-badge.neutral { color: var(--muted); background: #f0f2f5; }
.status-badge.info { color: var(--info); background: var(--info-bg); }
.stay-stack { display: grid; gap: 10px; }
.stay-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.stay-item strong, .stay-item span, .stay-item small { display: block; }
.stay-item strong { margin-bottom: 2px; font-size: 13px; }
.stay-item span { color: var(--muted); font-size: 10px; }
.stay-dates { color: var(--navy-2); text-align: right; font-size: 11px; font-weight: 800; }
.stay-dates small { color: var(--muted); font-weight: 600; }
.code-rail { margin-top: 11px; padding: 13px; border: 1px solid #e8d4aa; border-radius: 10px; background: #fffaf0; }
.code-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.code-rail-head strong { color: #5c4930; font-size: 11px; }
.code-digits { display: flex; gap: 5px; }
.code-digits b { display: grid; width: 30px; height: 38px; place-items: center; border: 1px solid #dbc089; border-radius: 7px; color: var(--navy); background: #fff; font-size: 17px; }
.code-digits.long b { flex: 1 1 24px; min-width: 22px; max-width: 30px; }
.code-validity { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; color: #76684f; font-size: 9px; }
.code-progress { display: flex; align-items: center; gap: 7px; margin-top: 9px; padding: 8px 10px; border-radius: 8px; color: #755719; background: #fff0c9; font-size: 10px; font-weight: 750; }
.code-progress i { font-size: 14px; }
.code-progress.overtime { color: var(--danger); background: var(--danger-bg); }
.code-timing { display: grid; gap: 3px; margin: 7px 0; font-size: 11px; line-height: 1.45; white-space: normal; }
.code-timing > span { color: var(--muted); }
.code-timing > strong { color: var(--ink); font-weight: 650; }
.fallback-warning { display: flex; align-items: center; gap: 7px; margin-top: 9px; padding: 8px 10px; border: 1px solid #f2c4bd; border-radius: 8px; color: var(--danger); background: var(--danger-bg); font-size: 9px; font-weight: 800; }
.fallback-warning i { font-size: 14px; }
.code-actions { display: flex; gap: 7px; margin-top: 11px; }
.code-actions .button { min-height: 36px; padding: 0 12px; font-size: 10px; }
.generate-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.generate-row .button { min-height: 37px; font-size: 10px; }
.empty-state { display: grid; min-height: 170px; place-items: center; align-content: center; gap: 8px; padding: 30px; color: var(--muted); text-align: center; }
.empty-state i { color: #b4bbc6; font-size: 30px; }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 0; font-size: 12px; }

.code-list { display: grid; gap: 12px; }
.reservation-table-shell { overflow-x: auto; padding: 0; }
.reservation-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.reservation-table th { padding: 11px 12px; color: var(--muted); background: var(--surface-2); text-align: left; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.reservation-table th:nth-child(5), .reservation-table th:nth-child(6), .reservation-table td:nth-child(5), .reservation-table td:nth-child(6) { text-align: center; }
.reservation-table td { height: 60px; padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: middle; font-size: 10px; }
.reservation-table tbody tr:hover { background: #fbfcfe; }
.reservation-table th:first-child, .reservation-table td:first-child { padding-left: 16px; }
.reservation-table th:last-child, .reservation-table td:last-child { padding-right: 16px; }
.reservation-table td:nth-child(1) { width: 90px; }
.reservation-table td:nth-child(2) { min-width: 170px; }
.reservation-table td:nth-child(3), .reservation-table td:nth-child(4) { width: 125px; }
.reservation-table td:nth-child(5), .reservation-table td:nth-child(6) { width: 76px; }
.reservation-table td:nth-child(7), .reservation-table td:nth-child(8) { width: 112px; }
.reservation-date { display: inline-flex; align-items: center; gap: 6px; color: var(--navy-2); font-size: 9px; font-weight: 750; white-space: nowrap; }
.reservation-date i { color: #b58427; font-size: 14px; }
.reservation-slots { display: inline-grid; min-width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--navy); background: var(--gold-soft); font-size: 12px; font-weight: 900; }
.reservation-state { display: inline-grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; font-size: 17px; }
.reservation-state.success { color: var(--success); background: var(--success-bg); }
.reservation-state.warning { color: var(--warning); background: var(--warning-bg); }
.reservation-state.danger { color: var(--danger); background: var(--danger-bg); }
.reservation-state.neutral { color: var(--muted); background: #f0f2f5; }
.reservation-row-action { width: 100%; min-height: 34px; padding: 0 10px; font-size: 9px; white-space: nowrap; }

.payment-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.payment-mode-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 20px; padding: 19px 20px; border-left: 4px solid var(--warning); }
.payment-mode-card.is-production { border-left-color: var(--danger); }
.payment-mode-card.is-ready { border-left-color: var(--success); }
.payment-mode-copy { display: flex; align-items: center; gap: 15px; min-width: 0; }
.payment-mode-copy h3, .payment-mode-copy p { margin: 0; }
.payment-mode-copy h3 { color: var(--navy); font-size: 15px; }
.payment-mode-copy p { margin-top: 4px; color: var(--muted); font-size: 10px; }
.payment-mode-actions { display: flex; flex: none; gap: 9px; }
#payment-mode-warning { margin-bottom: 18px; }
.payment-summary-card { display: grid; min-height: 112px; grid-template-columns: 46px 1fr; align-items: center; gap: 13px; padding: 18px; }
.payment-summary-card > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 11px; color: var(--navy-2); background: var(--info-bg); font-size: 21px; }
.payment-summary-card.success > span { color: var(--success); background: var(--success-bg); }
.payment-summary-card.warning > span { color: var(--warning); background: var(--warning-bg); }
.payment-summary-card.danger > span { color: var(--danger); background: var(--danger-bg); }
.payment-summary-card small, .payment-summary-card strong, .payment-summary-card p { display: block; margin: 0; }
.payment-summary-card small { color: var(--muted); font-size: 10px; font-weight: 750; }
.payment-summary-card strong { margin: 1px 0; color: var(--navy); font-size: 25px; line-height: 1.1; }
.payment-summary-card p { color: var(--muted); font-size: 9px; }
.payment-ledger-notice { max-width: none !important; }
.payment-ledger-notice strong { margin-left: 4px; color: var(--navy-2); }
.payment-ledger-error { border-color: #f2c6c6; color: var(--danger); background: var(--danger-bg); }
.payment-ledger-error i { color: var(--danger); }
body.rm-admin .payment-toolbar { align-items: end; flex-direction: row; justify-content: flex-start; }
.payment-toolbar .search-field { width: min(520px, 100%); flex: 1 1 auto; }
.payment-toolbar .compact-select { display: grid; width: 180px; flex: none; gap: 4px; margin: 0; color: var(--muted); font-size: 9px; font-weight: 800; }
.payment-toolbar .compact-select span { padding-left: 2px; }
.payment-toolbar .compact-select select { min-height: 42px; }
.payment-table-shell { overflow-x: auto; padding: 0; }
.payment-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.payment-table th { padding: 11px 12px; color: var(--muted); background: var(--surface-2); text-align: left; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.payment-table td { height: 67px; padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; font-size: 10px; }
.payment-table tbody tr:hover { background: #fbfcfe; }
.payment-table th:first-child, .payment-table td:first-child { padding-left: 16px; }
.payment-table th:last-child, .payment-table td:last-child { padding-right: 16px; }
.payment-table .date-cell strong, .payment-table .date-cell small,
.payment-guest strong, .payment-guest small, .payment-stay strong, .payment-stay small { display: block; }
.payment-table .date-cell small, .payment-guest small, .payment-stay small { max-width: 190px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.payment-guest { min-width: 180px; }
.payment-stay { min-width: 145px; }
.payment-amount strong { color: var(--navy); font-size: 12px; white-space: nowrap; }
.payment-method { display: inline-flex; align-items: center; gap: 7px; color: var(--navy-2); font-weight: 750; white-space: nowrap; }
.payment-method i { color: var(--gold-strong); font-size: 16px; }
.payment-status-stack { display: grid; justify-items: start; gap: 4px; }
.payment-status-stack small { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.payment-reference code { display: inline-block; max-width: 130px; overflow: hidden; color: var(--navy-2); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.payment-return { max-width: 220px; color: var(--muted); }
.payment-return span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.code-card { display: grid; grid-template-columns: minmax(140px,.6fr) minmax(200px,1.2fr) minmax(260px,1.5fr) auto; align-items: center; gap: 18px; padding: 17px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 4px 16px rgba(20,35,58,.05); }
.code-card-identity strong, .code-card-identity span { display: block; }
.code-card-identity strong { color: var(--navy); font-size: 18px; }
.code-card-identity span { color: var(--muted); font-size: 10px; }
.code-card .code-digits b { flex: 1 1 25px; min-width: 23px; max-width: 32px; height: 40px; }
.code-window { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.code-window strong { display: block; color: var(--ink); font-size: 11px; }
.code-card-actions { display: flex; gap: 7px; }
.code-card.revoked { opacity: .58; }
.fallback-settings { display: grid; grid-template-columns: minmax(220px,1fr) auto; align-items: end; gap: 12px; margin: 14px 0; padding: 16px; }
.fallback-settings label span, .fallback-settings label small { display: block; }
.fallback-settings label span { margin-bottom: 7px; color: var(--navy); font-size: 11px; font-weight: 850; }
.fallback-settings label small { margin-top: 6px; color: var(--muted); font-size: 9px; }
.fallback-settings input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); background: #fff; }

.integration-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.integration-card { position: relative; overflow: hidden; padding: 25px; }
.integration-card::before { content: ""; position: absolute; width: 160px; height: 160px; right: -70px; top: -70px; border-radius: 50%; background: var(--surface-2); }
.integration-logo { position: relative; display: grid; width: 56px; height: 56px; place-items: center; margin-bottom: 18px; border-radius: 13px; color: var(--navy-2); background: var(--gold-soft); font-size: 26px; }
.integration-card > .status-badge { position: absolute; z-index: 2; top: 24px; right: 24px; }
.integration-card h3 { margin-bottom: 8px; font-size: 24px; }
.integration-card > p { min-height: 43px; color: var(--muted); }
.integration-card dl { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin: 20px 0 0; }
.integration-card dl div { padding: 13px; border-radius: 9px; background: var(--surface-2); }
.integration-card dt { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.integration-card dd { margin: 3px 0 0; color: var(--navy); font-weight: 800; }
.integration-next { display: grid; gap: 3px; margin-top: 13px; padding: 13px; border: 1px solid #edd9ae; border-radius: 9px; color: #6e5935; background: #fffaf0; font-size: 11px; }

.modal { position: fixed; z-index: 100; inset: 0; display: grid; align-items: center; justify-items: center; overflow-y: auto; padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); background: rgba(6,18,34,.62); backdrop-filter: blur(5px); }
.modal-card { width: min(620px, 100%); max-height: calc(100dvh - max(48px, env(safe-area-inset-top) + env(safe-area-inset-bottom))); overflow: auto; border: 1px solid rgba(255,255,255,.55); border-radius: 15px; background: #fff; box-shadow: var(--shadow-lg); }
.lock-modal-card { width: min(820px, 100%); }
.compact-modal-card { width: min(520px, 100%); }
.confirm-row { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 8px; color: var(--ink); background: var(--surface-2); font-size: 10px; font-weight: 750; }
.confirm-row input { width: 17px; height: 17px; accent-color: var(--navy); }
.modal-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.modal-head h2 { margin: 0; font-size: 23px; }
.modal-body { padding: 22px; }
.modal-body label small { color: var(--muted); font-size: 10px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.modal-body .provider-notice { margin: 2px 0 0; }
.lock-modal-summary { margin-bottom: 20px; }
.lock-detail-panel { display: grid; gap: 13px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.lock-detail-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.lock-detail-grid > div { min-height: 69px; padding: 10px; border-radius: 9px; background: #fff; }
.lock-detail-grid small, .lock-detail-grid strong, .lock-detail-grid span { display: block; }
.lock-detail-grid small, .lock-detail-codes > div > small { margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.lock-detail-grid strong { color: var(--navy); font-size: 12px; }
.lock-detail-grid span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.lock-detail-codes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.lock-detail-codes > div { padding: 12px; border-radius: 9px; background: #fff; }
.lock-detail-codes .code-rail { margin-top: 0; }
.detail-emergency-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-emergency-code > div { display: flex; gap: 6px; }

.bridge-notice { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; margin-bottom: 18px; padding: 16px; }
.bridge-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; color: var(--warning); background: var(--warning-bg); font-size: 23px; }
.bridge-notice.online .bridge-icon { color: var(--success); background: var(--success-bg); }
.bridge-notice strong, .bridge-notice p { display: block; margin: 0; }
.bridge-notice p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.portaria-device-list { display: flex; flex-wrap: wrap; gap: 9px; margin: -8px 0 18px; }
.portaria-device { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: #fff; box-shadow: 0 4px 14px rgba(11,28,50,.05); font-size: 10px; font-weight: 800; }
.portaria-device i { color: var(--danger); font-size: 16px; }
.portaria-device.online i { color: var(--success); }
.face-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.face-card { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.face-avatar { display: grid; width: 72px; height: 72px; place-items: center; grid-row: span 2; overflow: hidden; border-radius: 12px; color: var(--navy-2); background: var(--gold-soft); font-size: 28px; }
.face-avatar img { width: 100%; height: 100%; object-fit: cover; }
.face-identity { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 10px; }
.face-identity strong, .face-identity span { display: block; }
.face-identity strong { color: var(--navy); font-size: 16px; }
.face-identity > div > span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.face-credentials { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.credential-chip { display: inline-flex; min-height: 28px; align-items: center; gap: 5px; padding: 0 9px; border-radius: 999px; color: var(--navy-2); background: #eef5ff; font-size: 9px; font-weight: 800; }
.credential-pin { display: inline-flex; align-items: center; gap: 7px; padding: 5px 7px 5px 10px; border: 1px solid #bfd1ea; border-radius: 9px; color: var(--navy); background: #f7fbff; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.credential-pin button { display: grid; width: 27px; height: 27px; padding: 0; place-items: center; border: 0; border-radius: 7px; color: var(--navy-2); background: #e8f1ff; cursor: pointer; }
.face-window { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 18px 1fr; align-items: center; gap: 8px; padding: 10px; border-radius: 9px; background: var(--surface-2); }
.face-window > span { display: grid; grid-template-columns: 18px 1fr; column-gap: 4px; align-items: center; }
.face-window > span > i { grid-row: span 2; color: var(--navy-2); }
.face-window small, .face-window strong { display: block; }
.face-window small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.face-window strong { font-size: 10px; }
.face-window > i { color: #9aa2ae; }
.face-message { grid-column: 1 / 3; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.face-message i { color: var(--navy-2); font-size: 17px; }
.face-actions { display: flex; justify-content: flex-end; gap: 7px; }
.face-actions .button { min-height: 36px; padding: 0 12px; font-size: 10px; }
.reservation-action { display: grid; gap: 6px; }
.reservation-action .face-action { color: var(--navy-2); border: 1px solid #bfd1ea; background: #eef5ff; }
.reservation-action .checkin-action { color: #6f5621; border: 1px solid #e4cb91; background: #fff8e8; }
.reservation-action .whatsapp-link-action { color: #176c42; border: 1px solid #a8d9bf; background: #eefaf3; }
.reservation-action > .status-badge { justify-self: center; }
.checkin-card-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.checkin-card-actions .button { min-width: 0; padding-right: 11px; padding-left: 11px; }
.checkin-card-actions .checkin-action { width: auto; }
.checkin-card-actions .button:disabled { opacity: .55; cursor: wait; }
.checkin-modal-card { width: min(760px, 100%); }
.checkin-reservation-summary { position: relative; display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: center; gap: 15px; margin-bottom: 17px; padding: 14px; overflow: hidden; border-radius: 12px; color: #fff; background: linear-gradient(125deg,var(--navy),var(--navy-3)); }
.checkin-summary-photo { display: grid; width: 90px; height: 72px; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 10px; color: var(--gold); background: rgba(255,255,255,.08); font-weight: 850; }
.checkin-summary-photo img { width: 100%; height: 100%; object-fit: cover; }
.checkin-reservation-summary .eyebrow { color: var(--gold); }
.checkin-reservation-summary strong, .checkin-reservation-summary small { display: block; }
.checkin-reservation-summary strong { margin: 3px 0; color: #fff; font-size: 19px; }
.checkin-reservation-summary small { color: rgba(255,255,255,.72); font-size: 10px; }
.checkin-settings-card { display: grid; grid-template-columns: minmax(0,1fr) 120px; align-items: end; gap: 18px; margin-bottom: 14px; padding: 15px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
.checkin-settings-card h3, .checkin-people-heading h3 { margin: 2px 0 4px; font-size: 16px; }
.checkin-settings-card p { margin: 0; color: var(--muted); font-size: 10px; }
.checkin-settings-card label { margin: 0; }
.checkin-settings-card label span { display: block; margin-bottom: 6px; color: var(--navy); font-size: 10px; font-weight: 800; }
.checkin-settings-card input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; color: var(--navy); background: #fff; font-size: 16px; font-weight: 800; }
.checkin-capacity-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.checkin-capacity-summary span { padding: 6px 9px; border-radius: 999px; color: #536276; background: #fff; font-size: 9px; }
.checkin-capacity-summary b { color: var(--navy); }
.default-slots-intro { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; padding: 15px; border: 1px solid #ead6a3; border-radius: 11px; background: #fff8e8; }
.default-slots-intro > i { display: grid; flex: 0 0 42px; height: 42px; place-items: center; border-radius: 10px; color: #7a5b20; background: #f4dda5; font-size: 21px; }
.default-slots-intro strong, .default-slots-intro p { display: block; margin: 0; }
.default-slots-intro p { margin-top: 3px; color: var(--muted); font-size: 10px; }
#checkin-default-form > label > span { display: block; margin-bottom: 7px; color: var(--navy); font-size: 11px; font-weight: 850; }
#checkin-default-visitor-slots { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9px; color: var(--navy); background: #fff; font-size: 18px; font-weight: 850; }
.checkin-link-panel, .checkin-people-panel { margin-top: 14px; padding: 15px; border: 1px solid #c8d9ed; border-radius: 11px; background: #f5f9ff; }
.checkin-link-heading, .checkin-people-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkin-link-heading strong { display: block; margin-top: 2px; color: var(--navy); }
.checkin-link-field { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 13px; }
.checkin-link-field input { min-width: 0; height: 43px; padding: 0 11px; border: 1px solid #bfd1e7; border-radius: 8px; color: var(--ink); background: #fff; font-size: 10px; }
.checkin-link-field .button { min-height: 43px; }
.checkin-link-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #dce6f1; }
.checkin-link-actions .button { min-height: 36px; padding: 0 11px; font-size: 9px; }
.checkin-people-list { display: grid; gap: 9px; margin-top: 13px; }
.checkin-person { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.checkin-person-avatar { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 10px; color: var(--navy-2); background: var(--gold-soft); font-weight: 850; }
.checkin-person-copy strong, .checkin-person-copy span, .checkin-person-copy small { display: block; }
.checkin-person-copy strong { color: var(--navy); font-size: 12px; }
.checkin-person-copy span, .checkin-person-copy small { color: var(--muted); font-size: 8px; }
.checkin-person-files { display: flex; flex-wrap: wrap; gap: 6px; }
.checkin-person-files .button { min-height: 34px; padding: 0 9px; text-decoration: none; font-size: 9px; }
.compact-person > .status-badge { justify-self: end; }
.checkin-info-code { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; padding: 14px 15px; border: 1px solid #ead6a3; border-radius: 11px; background: #fff8e8; }
.checkin-info-code-main { flex: 1; min-width: 0; }
.checkin-info-code .eyebrow, .checkin-info-code-main > strong { display: block; }
.checkin-info-code-main > strong { margin-top: 4px; color: var(--navy); }
.checkin-info-code-value { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.checkin-info-code-value code { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 12px; border: 1px solid #dfc981; border-radius: 9px; background: #fff; color: var(--navy); font-family: "Red Hat Display", sans-serif; font-size: 20px; font-weight: 850; letter-spacing: .08em; line-height: 1; }
.checkin-info-code-value .button { min-height: 38px; margin: 0; }
.checkin-info-empty { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 16px; border-radius: 9px; color: var(--muted); background: #fff; font-size: 10px; }
.checkin-info-empty i { color: var(--navy-2); font-size: 20px; }
.checkin-info-actions { justify-content: space-between; }
#checkin-form .checkin-link-panel { margin: 0 0 14px; }
#checkin-copy-link { min-height: 36px; }
.access-kind { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0 0 18px; padding: 0; border: 0; }
.access-kind legend { grid-column: 1 / -1; margin-bottom: 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
.access-kind > label { position: relative; margin: 0; cursor: pointer; }
.access-kind input { position: absolute; opacity: 0; pointer-events: none; }
.access-kind label > span { display: grid; min-height: 100px; grid-template-columns: 32px 1fr; grid-template-rows: auto 1fr; align-items: center; gap: 2px 9px; padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
.access-kind label i { grid-row: span 2; color: var(--navy-2); font-size: 25px; }
.access-kind label b, .access-kind label small { display: block; }
.access-kind label small { color: var(--muted); font-size: 9px; font-weight: 500; }
.access-kind input:checked + span { border-color: var(--navy-2); background: #eef5ff; box-shadow: 0 0 0 2px rgba(20,56,96,.08); }
.credential-heading { display: grid; gap: 3px; margin-top: 2px; }
.credential-heading strong { color: var(--ink); font-size: 12px; }
.credential-heading small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.face-photo-field > span small, .pin-field > span small { color: var(--muted); font-size: 9px; font-weight: 600; }
.form-grid label > span small { color: var(--muted); font-size: 9px; font-weight: 600; }
.form-hint { display: flex; align-items: flex-start; gap: 6px; margin-top: -6px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.form-hint i { flex: 0 0 auto; color: var(--navy-2); font-size: 15px; }
.pin-input { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.pin-input .button { min-width: 100px; }
.face-photo-picker { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
.face-photo-preview { display: grid; width: 96px; height: 96px; place-items: center; overflow: hidden; border-radius: 12px; color: var(--navy-2); background: var(--gold-soft); font-size: 34px; }
.face-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.face-photo-picker input { padding: 9px; background: #fff; }

.account-table-shell { overflow-x: auto; padding: 0; }
.account-table { width: 100%; min-width: 1040px; border-collapse: collapse; }
.account-table th { padding: 11px 12px; color: var(--muted); background: var(--surface-2); text-align: left; font-size: 8px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.account-table td { height: 67px; padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; font-size: 10px; }
.account-table tbody tr:hover { background: #fbfcfe; }
.account-table th:first-child, .account-table td:first-child { padding-left: 16px; }
.account-table th:last-child, .account-table td:last-child { padding-right: 16px; text-align: right; }
.account-identity { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.account-identity > div, .account-identity strong, .account-identity small { display: block; min-width: 0; }
.account-identity strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-identity small { margin-top: 4px; }
.account-identity .status-badge { min-height: 18px; padding: 3px 6px; font-size: 7px; }
.account-initials { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--navy); background: var(--gold-soft); font-size: 10px; font-weight: 900; }
.account-contact { display: block; max-width: 220px; overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.account-booking-total { display: block; color: var(--navy); font-size: 15px; }
.account-last-stay { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.account-media-state { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 9px; font-weight: 800; white-space: nowrap; }
.account-media-state.success { color: #18734b; background: #e9f7f0; }
.account-media-state.info { color: #205b91; background: #eaf3fc; }
.account-notice-error { color: #8c2f2f; border-color: #ecc7c7; background: #fff5f5; }
.account-modal-card { width: min(760px, 100%); }
.account-profile-head { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.account-profile-head > div:last-child { display: grid; gap: 4px; min-width: 0; }
.account-profile-head strong { overflow: hidden; color: var(--navy); font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.account-profile-head span { color: var(--muted); font-size: 10px; }
.account-face-preview { display: grid; flex: 0 0 auto; width: 104px; height: 104px; place-items: center; overflow: hidden; border-radius: 14px; color: var(--navy-2); background: var(--gold-soft); font-size: 36px; }
.account-face-preview img { width: 100%; height: 100%; object-fit: cover; }
.account-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.account-facts > div { min-height: 66px; padding: 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.account-facts small, .account-facts strong { display: block; }
.account-facts small { margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.account-facts strong { color: var(--navy); font-size: 11px; }
.account-protected-files { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.account-protected-files > div { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.account-protected-files > div > i { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; border-radius: 9px; color: var(--navy-2); background: #fff; font-size: 18px; }
.account-protected-files span { display: grid; flex: 1; gap: 3px; min-width: 0; }
.account-protected-files strong { color: var(--ink); font-size: 10px; }
.account-protected-files small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.backup-page-intro { margin-bottom: 14px; }
.recovery-status-card { display: grid; min-height: 132px; grid-template-columns: 62px minmax(0,1fr) auto; align-items: center; gap: 18px; margin-bottom: 14px; padding: 23px; border-left: 4px solid #d1a23f; }
.recovery-status-card.verified { border-left-color: #27966a; }
.recovery-status-card.failed { border-left-color: #b84d4d; }
.recovery-status-icon { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 15px; color: #8d6719; background: #fff3d5; font-size: 29px; }
.recovery-status-card.verified .recovery-status-icon { color: #18734b; background: #e9f7f0; }
.recovery-status-card.failed .recovery-status-icon { color: #9d3030; background: #fff0f0; }
.recovery-status-copy { min-width: 0; }
.recovery-status-copy h3 { margin: 5px 0 7px; font-size: 20px; }
.recovery-status-copy p { margin: 0; color: var(--muted); line-height: 1.55; }
.recovery-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.recovery-metric { display: grid; min-height: 96px; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 12px; padding: 16px; }
.recovery-metric > i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: var(--navy-2); background: var(--gold-soft); font-size: 21px; }
.recovery-metric small, .recovery-metric strong { display: block; }
.recovery-metric small { margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.recovery-metric strong { color: var(--navy); font-size: 12px; line-height: 1.35; }
.recovery-two-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 14px 0; }
.recovery-scope-card, .recovery-command-card { padding: 21px; }
.recovery-scope-card.covered { border-top: 3px solid #27966a; }
.recovery-scope-card.limited { border-top: 3px solid #d1a23f; }
.recovery-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.recovery-card-heading > span { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: var(--navy-2); background: var(--gold-soft); font-size: 20px; }
.recovery-card-heading h3 { margin: 3px 0 0; font-size: 16px; }
.recovery-check-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.recovery-check-list li { position: relative; padding-left: 22px; color: var(--ink); font-size: 11px; line-height: 1.55; }
.recovery-check-list li::before { position: absolute; top: 7px; left: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); content: ""; }
.recovery-runbook { margin: 14px 0; overflow: hidden; }
.recovery-steps { display: grid; margin: 0; padding: 2px 24px 24px; list-style: none; }
.recovery-steps li { position: relative; display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 14px; padding: 0 0 22px; }
.recovery-steps li:last-child { padding-bottom: 0; }
.recovery-steps li:not(:last-child)::after { position: absolute; top: 40px; bottom: 0; left: 19px; width: 2px; background: #eadfca; content: ""; }
.recovery-steps li > span { position: relative; z-index: 1; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #dbc089; border-radius: 50%; color: var(--navy); background: #fff9ed; font-size: 12px; font-weight: 900; }
.recovery-steps strong { display: block; margin: 2px 0 5px; color: var(--navy); font-size: 13px; }
.recovery-steps p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.recovery-command-grid { align-items: stretch; }
.recovery-command-card { display: flex; flex-direction: column; }
.recovery-command-card > p { min-height: 48px; margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.recovery-command { display: grid; grid-template-columns: minmax(0,1fr) 32px; align-items: start; gap: 8px; margin-top: auto; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #f7f8fb; }
.recovery-command code { overflow-wrap: anywhere; color: var(--navy-2); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; line-height: 1.55; }
.recovery-final-checks { margin-top: 14px; overflow: hidden; }
.recovery-check-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 0 24px 24px; }
.recovery-check-grid span { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding: 11px; border-radius: 9px; color: var(--ink); background: var(--surface-2); font-size: 10px; line-height: 1.45; }
.recovery-check-grid i { flex: 0 0 auto; color: var(--gold-deep); font-size: 15px; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); max-width: min(430px, calc(100vw - 28px)); padding: 13px 17px; border-radius: 10px; color: #fff; background: var(--navy); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity .2s, transform .2s; font-weight: 700; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #9d3030; }

@media (max-width: 1180px) {
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close, .menu-button { display: inline-grid; }
  .workspace { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
  .topbar { min-height: calc(66px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; color: #fff; border-bottom-color: rgba(255,255,255,.12); background: linear-gradient(110deg, var(--navy), var(--navy-3)); }
  .topbar-heading small { color: rgba(255,255,255,.55); }
  .topbar-heading h1 { color: #fff; font-size: 18px; }
  .topbar .icon-button { color: #fff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); box-shadow: none; }
  .sync-status { display: none; }
  .content { padding: 17px 13px 34px; }
  .hero-card { min-height: 230px; align-items: flex-start; flex-direction: column; justify-content: flex-end; padding: 24px; }
  .hero-card h2 { font-size: 29px; }
  .hero-date { min-width: 0; align-self: flex-start; padding: 10px 12px; }
  .stats-grid { gap: 10px; }
  .stat-card { min-height: 104px; grid-template-columns: 43px 1fr; gap: 10px; padding: 13px; }
  .stat-icon { width: 43px; height: 43px; font-size: 21px; }
  .stat-card strong { font-size: 24px; }
  .stat-card small { font-size: 10px; }
  .card-head { padding: 19px; }
  .next-access-item { grid-template-columns: 50px 1fr; padding: 14px 18px; }
  .next-date { width: 50px; min-height: 50px; }
  .next-meta { grid-column: 2; text-align: left; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-intro .button { width: 100%; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar select { max-width: none; }
  .chip-group { overflow-x: auto; padding-bottom: 2px; }
  .filter-chip { flex: 0 0 auto; }
  .integration-grid { grid-template-columns: 1fr; }
  .recovery-metrics { grid-template-columns: 1fr 1fr; }
  .recovery-two-column { grid-template-columns: 1fr; }
  .face-list { grid-template-columns: 1fr; }
  .lock-table { min-width: 940px; }
  .lock-table td { height: 58px; padding-top: 7px; padding-bottom: 7px; }
  .reservation-table { min-width: 820px; }
  .payment-summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .payment-mode-card { align-items: stretch; flex-direction: column; }
  .payment-mode-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .payment-summary-card { min-height: 104px; grid-template-columns: 40px 1fr; gap: 10px; padding: 14px; }
  .payment-summary-card > span { width: 40px; height: 40px; font-size: 18px; }
  .payment-summary-card strong { font-size: 22px; }
  body.rm-admin .payment-toolbar { align-items: stretch; flex-direction: column; }
  .payment-toolbar .search-field, .payment-toolbar .compact-select { width: 100%; }
  .payment-table { min-width: 1040px; }
  .account-table { min-width: 960px; }
  .account-protected-files { grid-template-columns: 1fr; }
  .reservation-card { grid-template-columns: 62px 1fr; gap: 12px; }
  .reservation-photo { width: 62px; height: 58px; }
  .reservation-period, .reservation-action { grid-column: 1 / -1; }
  .reservation-action { min-width: 0; }
  .checkin-settings-card { grid-template-columns: 1fr 100px; }
  .code-card { grid-template-columns: 1fr; gap: 13px; }
  .code-card .code-digits b { flex: 1; width: auto; }
  .code-card-actions .button { flex: 1; }
  .fallback-settings { grid-template-columns: 1fr; }
  .modal { align-items: start; padding-top: max(72px, calc(env(safe-area-inset-top) + 20px)); }
  .modal-card { max-height: calc(100dvh - max(96px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 40px)); }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .lock-detail-grid, .lock-detail-codes { grid-template-columns: 1fr 1fr; }
  .detail-emergency-code { align-items: flex-start; flex-direction: column; }
  .bridge-notice { grid-template-columns: 44px 1fr; }
  .bridge-notice > .status-badge { grid-column: 2; justify-self: start; }
  .face-card { grid-template-columns: 62px minmax(0,1fr); }
  .face-avatar { width: 62px; height: 62px; }
  .face-identity { flex-direction: column; }
  .face-window, .face-message, .face-actions { grid-column: 1 / -1; }
  .face-credentials { grid-column: 1 / -1; }
  .face-actions .button { flex: 1; }
  .checkin-person { grid-template-columns: 40px minmax(0,1fr); }
  .checkin-person-files { grid-column: 1 / -1; }
  .checkin-person-files .button { flex: 1; }
}

@media (max-width: 480px) {
  .login-card { padding: 28px 22px; }
  .login-brand { width: 210px; }
  .topbar-heading small { display: none; }
  .topbar-actions { gap: 6px; }
  .topbar .icon-button { width: 40px; height: 40px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { display: block; min-height: 116px; }
  .stat-icon { margin-bottom: 10px; }
  .stat-card span { display: none; }
  .lock-body { padding: 14px; }
  .stay-item { grid-template-columns: 1fr; }
  .stay-dates { text-align: left; }
  .code-digits b { flex: 1; width: auto; }
  .code-validity { align-items: flex-start; flex-direction: column; }
  .modal-head, .modal-body { padding-left: 17px; padding-right: 17px; }
  .access-kind { grid-template-columns: 1fr; }
  .access-kind label > span { min-height: 84px; }
  .face-photo-picker { grid-template-columns: 78px 1fr; }
  .face-photo-preview { width: 78px; height: 78px; }
  .account-profile-head { align-items: flex-start; }
  .account-face-preview { width: 76px; height: 76px; }
  .account-facts { grid-template-columns: 1fr; }
  .recovery-status-card { grid-template-columns: 52px minmax(0,1fr); padding: 18px; }
  .recovery-status-icon { width: 52px; height: 52px; font-size: 24px; }
  .recovery-status-card > .status-badge { grid-column: 2; justify-self: start; }
  .recovery-check-grid { grid-template-columns: 1fr; padding-right: 17px; padding-left: 17px; }
  .recovery-steps { padding-right: 17px; padding-left: 17px; }
  .checkin-settings-card, .checkin-link-field { grid-template-columns: 1fr; }
  .checkin-link-field .button { width: 100%; }
  .checkin-link-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .checkin-info-code { align-items: stretch; flex-direction: column; }
  .checkin-info-code .button { width: 100%; }
  .checkin-info-code-value { align-items: stretch; flex-direction: column; }
  .checkin-info-code-value code { justify-content: center; }
  .checkin-info-actions { display: grid; grid-template-columns: 1fr; }
  .recovery-metrics { grid-template-columns: 1fr; }
}

/* Owner: compact seven-column payment ledger, 17 Oct 2026. */

.payment-table.payment-clean{min-width:960px;table-layout:fixed}
.payment-clean th,.payment-clean td{padding:16px 18px;line-height:1.5}
.payment-clean th:nth-child(1){width:13%}.payment-clean th:nth-child(2){width:21%}.payment-clean th:nth-child(3){width:17%}.payment-clean th:nth-child(4){width:12%}.payment-clean th:nth-child(5){width:8%}.payment-clean th:nth-child(6){width:17%}.payment-clean th:nth-child(7){width:12%}
.payment-clean .payment-guest small,.payment-clean .payment-stay small{max-width:none}
.payment-clean .status-badge{font-weight:600;text-transform:none;letter-spacing:0;line-height:1.4}
.payment-clean td:last-child .button{min-width:0;padding:9px 12px;box-shadow:none}
/* Owner: compact automatic-review rules; display only, 22 Oct 2026. */
.review-rule-table{min-width:860px;table-layout:fixed}
.review-rule-table .review-name-col{width:20%}.review-rule-table .review-state-col{width:18%}.review-rule-table .review-when-col{width:25%}.review-rule-table .review-properties-col{width:12%}.review-rule-table .review-upcoming-col{width:10%}.review-rule-table .review-updated-col{width:10%}.review-rule-table .review-edit-col{width:5%}
.review-rule-table td:nth-child(n){width:auto}
.review-rule-table .review-rule-state{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.review-rule-table .review-rule-state .reservation-row-action{width:auto;min-height:30px;padding:0 10px;box-shadow:none}
.review-rule-table .lock-device-label{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.review-rule-table .date-cell{white-space:normal;line-height:1.5}


/* Review preparation-cleaning attribution: explicit stay link, compact alongside dates. */
body.rm-admin .analytics-review-entry > .analytics-review-stay-meta{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 14px}
body.rm-admin .analytics-review-cleaning{font-weight:600;color:#526174;font-variant-numeric:tabular-nums}

/* AV (22 Oct 2026): the check-in person slot shows the 3D avatar or the check-in face photo at the same size, cover-fitted. */
.checkin-person-avatar.has-image { display: block; overflow: hidden; padding: 0; } /* block: a grid auto row made height:100% resolve to auto */
.checkin-person-avatar.has-image img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* PORT-search (23 Oct 2026): Portaria · atividades server search (date range, status line, unit under the name, Carregar mais). */
body.rm-admin .activity-toolbar { flex-wrap: wrap; }
body.rm-admin .activity-toolbar .search-field { flex: 1 1 300px; }
body.rm-admin .activity-toolbar .activity-date input { min-height: 42px; width: 150px; }
body.rm-admin .activity-search-status { margin: -8px 0 12px; color: var(--muted, #6b7280); font-size: 13px; }
body.rm-admin .activity-search-status.is-error { color: #b42318; font-weight: 600; }
body.rm-admin .activity-unit { display: block; margin-top: 2px; color: var(--muted, #6b7280); font-size: 12px; font-weight: 600; }
body.rm-admin .activity-load-more { display: flex; justify-content: center; margin: 12px 0 22px; }
body.rm-admin .activity-load-more .button[hidden] { display: none; }
@media (max-width: 780px) {
  body.rm-admin .activity-toolbar .search-field { flex: 0 0 auto; width: 100%; }
  body.rm-admin .activity-toolbar .activity-date input { width: auto; flex: 1 1 auto; min-width: 0; }
  body.rm-admin .activity-load-more .button { width: 100%; }
}
