* { box-sizing: border-box; }
body { margin: 0; background: #F4F6F4; color: #111; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; line-height: 1.5; }
.topbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; background: #fff; padding: 0.75rem 1rem; border-bottom: 1px solid #ddd; }
.brand { display: flex; align-items: center; gap: 0.5rem; }
.logo { width: 32px; height: 32px; }
.app-name { font-size: 1.25rem; font-weight: 700; }
.top-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.inline-label { display: flex; gap: 0.4rem; align-items: center; font-size: 0.9rem; }
main { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.card { background: #fff; padding: 1rem; margin-bottom: 1rem; border: 1px solid #ddd; border-radius: 8px; }
h1 { font-size: 1.4rem; margin: 0 0 0.75rem; }
.form { display: flex; flex-direction: column; gap: 0.5rem; max-width: 480px; }
.form label { font-weight: 600; }
input, select, textarea { font: inherit; padding: 0.5rem; border: 1px solid #999; border-radius: 6px; background: #fff; color: #111; }
.btn { font: inherit; border: 1px solid #111; background: #fff; color: #111; border-radius: 999px; padding: 0.45rem 1rem; cursor: pointer; }
.btn.primary { background: #111; color: #fff; }
.btn.danger { border-color: #8E3B2F; color: #8E3B2F; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; }
.muted { color: #444; }
.small { font-size: 0.9rem; }
.notice { min-height: 1.5em; }
.notice.error { color: #8E3B2F; font-weight: 600; }
.sheet-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.sheet-item { font: inherit; border: 1px solid #999; background: #fff; border-radius: 999px; padding: 0.4rem 0.9rem; cursor: pointer; }
.sheet-item.active { background: #111; color: #fff; border-color: #111; }
.sheet { overflow-x: auto; }
.sheet table { border-collapse: collapse; }
.sheet th, .sheet td { border: 1px solid #ccc; padding: 0; text-align: center; }
.sheet th { background: #F4F6F4; padding: 0.35rem 0.5rem; font-size: 0.9rem; min-width: 2.5rem; }
.sheet td input { border: 0; border-radius: 0; padding: 0.4rem 0.3rem; width: 6.5rem; }
.sheet td input.selected { outline: 2px solid #2E7D3B; outline-offset: -2px; }
footer { text-align: center; padding: 1rem; color: #444; font-size: 0.9rem; }
footer a { color: #111; }
@media (max-width: 500px) {
  .sheet td input { width: 4.5rem; }
  main { padding: 0.5rem; }
}

/* FVA doors reconciliation fix (suite header pattern): no sideways scroll,
   safe-area insets, 44px touch targets, Sign out never clipped. Clean
   interior track: no animation added. */
html, body { overflow-x: clip; max-width: 100%; }
body { overflow-wrap: anywhere; }
.topbar { flex-wrap: wrap; padding-top: calc(10px + env(safe-area-inset-top)); padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
main { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
.btn, .tab, button { min-height: 44px; }
.btn.small { min-height: 44px; }
#signOutBtn, button#signOutBtn { flex-shrink: 0; }
.card, .list li, td, th { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
input, select, textarea { max-width: 100%; }
