/* Shared base styles for the Owner and Staff apps. Each app sets --brand, --brand-soft and --bg in its own app.css. */
:root {
  --text: #1F2937;
  --muted: #6B7280;
  --border: #E2E5EA;
  --white: #fff;
  --danger: #C0392B;
  --ok: #1F7A5C;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); overscroll-behavior-y: contain; -webkit-text-size-adjust: 100%; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.gate { margin: auto; width: 100%; max-width: 360px; padding: 48px 24px; text-align: center; }
.gate-logo { width: 84px; height: 84px; border-radius: 50%; margin-bottom: 14px; }
.gate h1 { font-size: 22px; margin: 0 0 22px; color: var(--brand); }
.pin-input { text-align: center; font-size: 22px; letter-spacing: .3em; margin-bottom: 14px; }

.topbar { background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); position: sticky; top: 0; z-index: 10; }
.topbar-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.topbar-title img { width: 34px; height: 34px; border-radius: 50%; }
.topbar-out { background: rgba(255, 255, 255, .18); border: 0; color: #fff; border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 500; }

.page { flex: 1; padding: 18px 16px 110px; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; display: flex; background: var(--white); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.tab { flex: 1; background: none; border: 0; padding: 13px 0 11px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tab.active { color: var(--brand); font-weight: 600; box-shadow: inset 0 3px 0 var(--brand); }

.card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 12px; font-size: 16px; }
.field { margin-bottom: 14px; }
.label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 16px; color: var(--text); outline: none; }
.input:focus { border-color: var(--brand); }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }

.btn { width: 100%; border: 0; border-radius: 12px; padding: 13px; font-size: 15.5px; font-weight: 600; background: var(--brand); color: #fff; }
.btn:disabled { background: var(--border); color: var(--muted); cursor: default; }
.btn.secondary { background: var(--white); color: var(--brand); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); }
.btn.small { width: auto; padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.row > .btn.small { flex: 0 0 auto; }
.msg { font-size: 14px; margin: 10px 0 0; min-height: 20px; color: var(--ok); font-weight: 500; text-align: center; }
.msg.error { color: var(--danger); }

.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--white); border-radius: 22px 22px 0 0; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); }
.sheet-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg); color: var(--muted); font-size: 22px; line-height: 1; }
.sheet h2 { margin: 0 0 4px; font-size: 19px; padding-right: 36px; }
.sheet .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.center-note { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 14.5px; }
