/* Shared layout invariants for the existing hotel screens. Wide data stays in
   local scroll containers; navigation becomes a drawer on tablets and phones. */
:root { --text-secondary:#b5c1d3; --text-muted:#94a3b8; }
[data-theme="light"] { --text-secondary:#475569; --text-muted:#52617a; --success:#087f5b; --warning:#9a6700; --danger:#b42318; --glass-border:rgba(15,23,42,.16); }
.app-shell { height:100vh; height:100dvh; }
.app-shell .content { min-width:0; height:100vh; height:100dvh; }
.app-shell .main-scroll { min-width:0; min-height:0; overscroll-behavior:contain; }
.app-shell .container { min-width:0; max-width:100%; }
.app-shell .sidebar { min-height:0; }
.app-shell .sr-only { position:absolute; left:0; top:0; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0; }
.app-shell .sidebar .nav { min-height:0; }
.app-shell .sidebar-brand { min-width:0; overflow-wrap:anywhere; }
.app-shell .sidebar-brand img { max-width:90px; object-fit:contain; flex-shrink:0; }
.sidebar-close { display:none; }
.skip-link { position:fixed; top:8px; left:8px; transform:translateY(-160%); z-index:1000; padding:12px 16px; background:var(--bg-secondary); color:var(--text); border:2px solid var(--primary-light); border-radius:8px; }
.skip-link:focus { transform:translateY(0); }
.app-shell :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:3px solid var(--primary-light); outline-offset:3px; }
.app-shell #main-content:focus { outline:none; }
.app-shell .topbar-date { min-width:0; }
.app-shell .topbar-actions { flex-shrink:0; }
.app-shell .topbar #themeToggle { min-width:44px; min-height:44px; }
.app-shell :is(input,select,textarea).input { min-width:0; max-width:100%; color:var(--text) !important; background:var(--bg-secondary) !important; border-color:var(--glass-border) !important; }
.app-shell :is(input,select,textarea)[readonly] { color:var(--text-secondary) !important; }
.app-shell dialog { color:var(--text); background:var(--bg-secondary); border-color:var(--glass-border); max-width:calc(100vw - 24px); max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain; }
.app-shell dialog::backdrop { background:rgb(8 12 25 / .65); }
.app-shell :is(.grid,.form-grid,.entry-fields)>* { min-width:0; }
.app-shell :is(.page-heading,.section-heading,.actions,.pagination) { min-width:0; }
.app-shell .btn { white-space:normal; overflow-wrap:anywhere; }
.app-shell :is(.table-scroll,.table-wrap,.table-container) { min-width:0; max-width:100%; overscroll-behavior-x:contain; }
.auth-page { height:auto; min-height:100vh; min-height:100dvh; overflow:auto; display:flex; align-items:center; justify-content:center; padding:24px 12px; }
.auth-page>.card { margin-block:auto; }
.auth-page .brand { color:var(--text); overflow-wrap:anywhere; }
.auth-page .brand img { max-width:90px; object-fit:contain; }
.auth-page .auth-heading { margin:16px 0 0; font-size:1.5rem; }
.auth-page label { color:var(--text-secondary); font-weight:600; }
.auth-page :is(input,select,textarea) { min-width:0; max-width:100%; }
.auth-page :is(.input,.btn) { min-height:44px; }
.auth-page :is(a,button,input,select,textarea):focus-visible { outline:3px solid var(--primary-light); outline-offset:3px; }
[data-theme="light"] .app-shell a:hover { color:var(--primary); text-shadow:none; }
[data-theme="light"] .app-shell .topbar #themeToggle { color:var(--text); }
[data-theme="light"] .app-shell dialog :is(label,p,small) { color:var(--text-secondary); }

@media (max-width:1024px) {
  .app-shell .sidebar { width:min(300px,calc(100vw - 32px)); padding:20px; transform:translateX(-100%); transition:transform .2s ease; }
  .app-shell .sidebar.open { transform:translateX(0); }
  .app-shell .sidebar-brand { padding-right:32px; }
  .app-shell .content { margin-left:0; }
  .app-shell .mobile-menu-btn { display:flex; flex:0 0 44px; }
  .sidebar-close { display:flex; position:absolute; top:12px; right:10px; align-items:center; justify-content:center; width:44px; height:44px; padding:0; border:1px solid var(--glass-border); border-radius:8px; background:var(--bg-secondary); color:var(--text); font-size:1.6rem; cursor:pointer; }
  .app-shell .sidebar .nav a { min-height:44px; }
  .navigation-open .content { overflow:hidden; }
}
@media (max-width:600px) {
  .auth-page .input { font-size:16px; }
  .app-shell :is(.btn,.btn-small,button,summary) { min-height:44px; }
  .app-shell .topbar { min-height:64px; height:auto; padding:8px 12px; }
  .app-shell .topbar-actions { gap:6px !important; }
  .app-shell .topbar-date { font-size:.7rem; line-height:1.4; }
  .app-shell .user-menu-panel { max-width:calc(100vw - 24px); }
  .app-shell .user-menu-panel a { min-height:44px; }
  .app-shell .grid.cols-2 { grid-template-columns:minmax(0,1fr); }
  .app-shell dialog { padding:20px; width:calc(100vw - 24px); }
  .app-shell .tl-controls :is(.btn,.input) { min-height:44px; }
  .app-shell .tl-list a { display:grid; gap:4px 8px; padding:6px; margin:0; }
  .app-shell .booking-detail-grid { grid-template-columns:minmax(0,1fr) !important; }
  .app-shell .group-stats .stat-badge { padding:12px; container-type:inline-size; }
  .app-shell .group-stats .stat-badge .num { font-size:clamp(1rem,11cqw,1.35rem); overflow-wrap:anywhere; }
}
@media screen and (max-width:600px) {
  .app-shell .invoice { padding:16px; }
  .app-shell .invoice header { flex-wrap:wrap; gap:20px; }
  .app-shell .invoice header>div { min-width:0; max-width:100%; }
  .app-shell .invoice header>div>div { min-width:0; overflow-wrap:anywhere; }
  .app-shell .invoice header .right { text-align:left; }
  .app-shell .invoice .guest-info { grid-template-columns:minmax(0,1fr); padding:12px; }
  .app-shell .invoice .totals { min-width:0; width:100%; }
  .app-shell .invoice .mode-tabs { flex-wrap:wrap; max-width:100%; }
  .app-shell .invoice .mode-tab { flex:1 1 auto; padding:10px; }
  .app-shell .invoice .room-section-header { flex-wrap:wrap; gap:10px; }
  .app-shell .no-print { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) {
  .app-shell *, .app-shell *::before, .app-shell *::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}
