/* ═══════════════════════════════════════════════════
   SKIN A — CLEAN & MINIMAL
   Light, airy, pastel accents, 2-column card grid
   ═══════════════════════════════════════════════════ */

/* ── CSS Variables (skin tokens) ── */
:root {
  --bg:              #fafafa;
  --bg-card:         #ffffff;
  --bg-input:        #f5f5f5;
  --bg-nav:          #ffffff;
  --bg-header:       #ffffff;
  --bg-auth:         #fafafa;
  --text:            #1a1a1a;
  --text-secondary:  #888888;
  --text-muted:      #bbbbbb;
  --border:          #f0f0f0;
  --border-input:    #e0e0e0;
  --accent:          #1a1a1a;
  --accent-soft:     #f0f0f0;
  --badge-bg:        #FF3B30;
  --badge-text:      #ffffff;
  --success:         #2E7D32;
  --success-bg:      #E8F5E9;
  --warning:         #E65100;
  --warning-bg:      #FFF3E0;
  --info-bg:         #E3F2FD;
  --info-text:       #1565C0;
  --danger:          #D32F2F;
  --danger-bg:       #FFEBEE;
  --nav-active:      #1a1a1a;
  --nav-inactive:    #aaaaaa;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.06);
  --shadow-md:       0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:       0 8px 24px rgba(0,0,0,.1);
  --radius-sm:       10px;
  --radius-md:       14px;
  --radius-lg:       18px;
  --radius-xl:       22px;
  --font:            'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Base ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; -webkit-text-size-adjust:100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── AUTH SCREEN ── */
.screen { display:none; min-height:100vh; min-height:100dvh; }
.screen.active { display:flex; }
#authScreen {
  background: var(--bg-auth);
  align-items:center;
  justify-content:center;
  padding:24px;
}
.auth-container { width:100%; max-width:380px; }
.auth-logo { text-align:center; margin-bottom:32px; }
.auth-logo-icon {
  width:64px; height:64px; border-radius:18px;
  background:var(--accent); color:#fff;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:28px; font-weight:700; margin-bottom:12px;
}
.auth-logo h1 { font-size:28px; font-weight:700; color:var(--text); }
.auth-logo p { font-size:14px; color:var(--text-secondary); margin-top:2px; }

.auth-tabs { display:flex; gap:4px; background:var(--bg-input); border-radius:var(--radius-md); padding:4px; margin-bottom:24px; }
.auth-tab {
  flex:1; padding:10px; border:none; border-radius:var(--radius-sm);
  background:transparent; color:var(--text-secondary); font-size:14px;
  font-weight:600; cursor:pointer; font-family:var(--font);
  transition:all .2s;
}
.auth-tab.active { background:var(--bg-card); color:var(--text); box-shadow:var(--shadow-sm); }

.auth-hint {
  background:var(--bg-input); border-radius:var(--radius-md);
  padding:14px 16px; font-size:13px; color:var(--text-secondary);
  line-height:1.5; margin-bottom:20px;
}
.auth-hint strong { color:var(--text); }
.auth-hint em { color:var(--accent); font-style:normal; font-weight:600; }

.auth-error {
  background:var(--danger-bg); color:var(--danger); border-radius:var(--radius-sm);
  padding:10px 14px; font-size:13px; margin-bottom:14px; display:none;
}
.auth-error.show { display:block; }

/* ── FORMS ── */
.form-group { margin-bottom:16px; }
.form-group label { display:block; font-size:12px; font-weight:600; color:var(--text-secondary); margin-bottom:6px; text-transform:uppercase; letter-spacing:.5px; }
.form-group input,
.form-group select,
.form-group textarea {
  width:100%; padding:12px 14px; border:1px solid var(--border-input);
  border-radius:var(--radius-sm); font-size:15px; font-family:var(--font);
  background:var(--bg-card); color:var(--text); transition:border .2s;
  appearance:none; -webkit-appearance:none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline:none; border-color:var(--accent); }
.form-group textarea { resize:vertical; min-height:100px; }
.form-group select { background-image:url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 14px center; padding-right:36px; }
.form-row { display:flex; gap:12px; }
.form-row .form-group { flex:1; }

/* ── BUTTONS ── */
.btn-primary {
  display:block; width:auto; padding:14px 24px; border:none;
  border-radius:var(--radius-md); background:var(--accent); color:#fff;
  font-size:15px; font-weight:600; font-family:var(--font); cursor:pointer;
  transition:opacity .15s; text-align:center;
}
.btn-primary:active { opacity:.85; }
.btn-full { width:100%; }
.btn-text { background:none; border:none; color:var(--accent); font-size:13px; font-weight:600; cursor:pointer; font-family:var(--font); padding:8px; }
.btn-secondary {
  display:inline-block; padding:10px 18px; border:1px solid var(--border-input);
  border-radius:var(--radius-sm); background:var(--bg-card); color:var(--text);
  font-size:13px; font-weight:600; cursor:pointer; font-family:var(--font);
}

/* ── RADIO / CHECKBOX ── */
.radio-row { display:flex; gap:8px; }
.radio-card {
  flex:1; display:flex; align-items:center; justify-content:center; gap:6px;
  padding:12px; border:1px solid var(--border-input); border-radius:var(--radius-sm);
  cursor:pointer; font-size:14px; font-weight:500; transition:all .15s;
}
.radio-card input { display:none; }
.radio-card:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
.checkbox-row { display:flex; align-items:center; gap:10px; font-size:14px; cursor:pointer; }
.checkbox-row input { width:18px; height:18px; accent-color:var(--accent); }

/* ── TOP BAR ── */
#topBar {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 20px; background:var(--bg-header); position:sticky;
  top:0; z-index:50; border-bottom:1px solid var(--border);
  min-height:56px;
}
.top-left { display:flex; align-items:center; gap:8px; }
.top-title { font-size:18px; font-weight:700; color:var(--text); }
.top-right { display:flex; align-items:center; gap:8px; }
.top-icon-btn {
  width:40px; height:40px; border:none; border-radius:var(--radius-sm);
  background:transparent; display:flex; align-items:center; justify-content:center;
  cursor:pointer; color:var(--text); position:relative;
}
.notif-btn .badge {
  position:absolute; top:4px; right:4px; min-width:18px; height:18px;
  border-radius:9px; background:var(--badge-bg); color:var(--badge-text);
  font-size:10px; font-weight:700; display:flex; align-items:center;
  justify-content:center; padding:0 4px;
}

/* ── PAGE CONTAINER ── */
#pageContainer { padding:0 0 90px; }
.page { padding:20px; display:none; }
.page.active { display:block; }
.page-header { margin-bottom:20px; }
.page-header h2 { font-size:22px; font-weight:700; color:var(--text); display:inline; vertical-align:middle; }
.page-icon { font-size:24px; margin-right:8px; vertical-align:middle; }
.section-label {
  font-size:11px; font-weight:600; text-transform:uppercase;
  letter-spacing:1px; color:var(--text-muted); padding:0 20px;
  margin-bottom:12px;
}
.page .section-label { padding:0; margin-top:20px; margin-bottom:12px; }

/* ── DASHBOARD ── */
.dash-greeting { padding:0 20px 16px; }
.dash-hello { display:block; font-size:14px; color:var(--text-secondary); }
.dash-name { display:block; font-size:26px; font-weight:700; color:var(--text); }

.dash-alert {
  margin:0 20px 20px; background:var(--warning-bg); border-radius:var(--radius-md);
  padding:14px 16px; display:flex; align-items:center; gap:12px;
}
.alert-dot {
  width:10px; height:10px; background:var(--warning); border-radius:50%;
  flex-shrink:0; animation:pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── DASHBOARD CARDS ── */
.dash-cards {
  display:grid; grid-template-columns:1fr 1fr; gap:14px;
  padding:0 20px 20px;
}
.dash-card {
  background:var(--bg-card); border-radius:var(--radius-lg);
  padding:20px 16px; cursor:pointer; transition:all .15s;
  border:1px solid var(--border); position:relative;
}
.dash-card:active { transform:scale(.97); }
.dash-card-icon {
  width:48px; height:48px; border-radius:var(--radius-md);
  display:flex; align-items:center; justify-content:center;
  font-size:22px; margin-bottom:12px;
}
.dash-card-title { font-size:15px; font-weight:600; color:var(--text); margin-bottom:3px; }
.dash-card-sub { font-size:12px; color:var(--text-secondary); line-height:1.3; }
.dash-card-badge {
  position:absolute; top:12px; right:12px;
  min-width:20px; height:20px; border-radius:10px;
  background:var(--badge-bg); color:var(--badge-text);
  font-size:10px; font-weight:700; display:flex;
  align-items:center; justify-content:center; padding:0 5px;
}
.dash-card-tag {
  display:inline-block; margin-top:8px; font-size:10px; font-weight:600;
  padding:3px 8px; border-radius:6px;
}
.tag-success { background:var(--success-bg); color:var(--success); }
.tag-warning { background:var(--warning-bg); color:var(--warning); }
.tag-info    { background:var(--info-bg); color:var(--info-text); }
.tag-danger  { background:var(--danger-bg); color:var(--danger); }

/* Card icon colors (pastel backgrounds) */
.ci-checkin   { background:#E8F5E9; }
.ci-checkout  { background:#E3F2FD; }
.ci-forms     { background:#FFF3E0; }
.ci-parking   { background:#F3E5F5; }
.ci-maint     { background:#FBE9E7; }
.ci-chat      { background:#E0F7FA; }
.ci-packages  { background:#FCE4EC; }
.ci-payments  { background:#E8EAF6; }
.ci-info      { background:#F1F8E9; }
.ci-ai        { background:#EDE7F6; }

/* ── INFO CARDS ── */
.info-cards { display:flex; flex-direction:column; gap:12px; }
.info-card {
  background:var(--bg-card); border-radius:var(--radius-md);
  padding:18px; border:1px solid var(--border);
}
.info-card h3 { font-size:15px; font-weight:600; margin-bottom:8px; color:var(--text); }
.info-card p { font-size:14px; color:var(--text-secondary); line-height:1.5; }
.info-card .info-value {
  font-size:18px; font-weight:700; color:var(--text);
  padding:8px 14px; background:var(--bg-input); border-radius:var(--radius-sm);
  display:inline-block; margin-top:6px; font-family:'SF Mono',monospace;
  letter-spacing:1px; user-select:all;
}
.info-loading { text-align:center; padding:40px; color:var(--text-muted); font-size:14px; }

/* ── MAINTENANCE ── */
.maint-list { display:flex; flex-direction:column; gap:10px; }
.maint-item {
  background:var(--bg-card); border-radius:var(--radius-md);
  padding:16px; border:1px solid var(--border); cursor:pointer;
  display:flex; align-items:center; gap:14px; transition:background .15s;
}
.maint-item:active { background:var(--bg-input); }
.maint-icon { font-size:28px; flex-shrink:0; }
.maint-body { flex:1; min-width:0; }
.maint-body h4 { font-size:14px; font-weight:600; color:var(--text); margin-bottom:2px; }
.maint-body p { font-size:12px; color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.maint-status {
  font-size:10px; font-weight:600; padding:4px 10px; border-radius:6px; flex-shrink:0;
}

/* ── CHAT ── */
.chat-container { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; }
.chat-msg { max-width:80%; padding:12px 16px; border-radius:var(--radius-md); font-size:14px; line-height:1.4; }
.chat-msg.from-tenant { background:var(--accent); color:#fff; align-self:flex-end; border-bottom-right-radius:4px; }
.chat-msg.from-admin { background:var(--bg-input); color:var(--text); align-self:flex-start; border-bottom-left-radius:4px; }
.chat-msg.from-system { background:transparent; color:var(--text-muted); align-self:center; font-size:12px; text-align:center; padding:4px; }
.chat-time { font-size:10px; opacity:.6; margin-top:4px; }

/* 2026-08-16 — rendered HTML email inside a chat bubble. Marketing emails
   carry fixed 600px table layouts and full-width images, which would burst
   the bubble and scroll the whole page sideways. Everything is clamped to
   the bubble and allowed to scroll INSIDE it instead. */
.chat-html-body { max-height:340px; overflow:auto; -webkit-overflow-scrolling:touch;
  font-size:12px; line-height:1.5; }
.chat-html-body img { max-width:100%; height:auto; border-radius:6px; }
.chat-html-body table { max-width:100% !important; width:auto !important;
  border-collapse:collapse; table-layout:auto !important; }
.chat-html-body td, .chat-html-body th { max-width:100%;
  word-break:break-word; overflow-wrap:anywhere; }
/* Inbound email is always an admin-side bubble, so inherit that bubble's ink
   rather than whatever colour the sender's template hard-coded. */
.chat-html-body, .chat-html-body * { color:inherit !important;
  background-color:transparent !important; max-width:100%;
  font-family:inherit !important; }
.chat-html-body a { color:var(--accent2, #7a5c3e) !important; text-decoration:underline; }
.chat-html-body p, .chat-html-body div { margin:0 0 6px; }
.chat-html-body h1, .chat-html-body h2, .chat-html-body h3 { font-size:14px; margin:6px 0 4px; }
.chat-input-row {
  display:flex; gap:8px; padding:12px 16px;
  border-top:1px solid var(--border); background:var(--bg-card);
  position:sticky; bottom:90px;
}
.chat-input-row input {
  flex:1; padding:12px 14px; border:1px solid var(--border-input);
  border-radius:var(--radius-md); font-size:14px; font-family:var(--font);
  background:var(--bg-input);
}
.chat-input-row input:focus { outline:none; border-color:var(--accent); }
.btn-send {
  width:44px; height:44px; border:none; border-radius:var(--radius-sm);
  background:var(--accent); color:#fff; display:flex; align-items:center;
  justify-content:center; cursor:pointer; flex-shrink:0;
}

/* ── MAINT DETAIL HEADER ── */
.maint-detail-header {
  padding:16px; background:var(--bg-card); border-bottom:1px solid var(--border);
}
.maint-detail-header h3 { font-size:16px; font-weight:600; margin-bottom:4px; }
.maint-detail-header p { font-size:13px; color:var(--text-secondary); }

/* ── PHOTO GRID ── */
.photo-grid { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.photo-grid img { width:72px; height:72px; object-fit:cover; border-radius:var(--radius-sm); }
.photo-add-btn {
  display:inline-block; padding:10px 16px; border:1px dashed var(--border-input);
  border-radius:var(--radius-sm); font-size:13px; font-weight:600;
  color:var(--text-secondary); cursor:pointer; text-align:center;
}

/* ── PARKING ── */
.parking-active-card {
  background:var(--success-bg); border:1px solid #C8E6C9;
  border-radius:var(--radius-md); padding:16px; margin-bottom:16px;
}
.plan-cards { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.plan-card {
  background:var(--bg-card); border:2px solid var(--border);
  border-radius:var(--radius-md); padding:16px; cursor:pointer; transition:all .15s;
}
.plan-card.selected { border-color:var(--accent); background:var(--accent-soft); }
.plan-card h4 { font-size:15px; font-weight:600; margin-bottom:4px; }
.plan-card p { font-size:13px; color:var(--text-secondary); }
.plan-card .price { font-size:18px; font-weight:700; color:var(--accent); }

/* ── PACKAGES ── */
.pkg-section { display:flex; flex-direction:column; gap:10px; }
.pkg-card {
  background:var(--bg-card); border-radius:var(--radius-md);
  padding:16px; border:1px solid var(--border);
  display:flex; align-items:center; gap:14px;
}
.pkg-icon { font-size:28px; }
.pkg-body { flex:1; }
.pkg-body h4 { font-size:14px; font-weight:600; }
.pkg-body p { font-size:12px; color:var(--text-secondary); }

/* ── NOTIFICATIONS ── */
.notif-list { display:flex; flex-direction:column; gap:8px; }
.notif-item {
  background:var(--bg-card); border-radius:var(--radius-md);
  padding:14px 16px; border:1px solid var(--border); cursor:pointer;
}
.notif-item.unread { border-left:3px solid var(--accent); }
.notif-item h4 { font-size:14px; font-weight:600; margin-bottom:3px; }
.notif-item p { font-size:13px; color:var(--text-secondary); line-height:1.4; }
.notif-item .notif-time { font-size:11px; color:var(--text-muted); margin-top:4px; }

/* ── FORMS / AGREEMENTS ── */
.form-card {
  background:var(--bg-card); border-radius:var(--radius-md);
  padding:16px; border:1px solid var(--border); margin-bottom:10px;
  display:flex; align-items:center; gap:14px; cursor:pointer;
}
.form-card .fc-icon { font-size:28px; flex-shrink:0; }
.form-card .fc-body { flex:1; }
.form-card .fc-body h4 { font-size:14px; font-weight:600; margin-bottom:2px; }
.form-card .fc-body p { font-size:12px; color:var(--text-secondary); }
.form-card .fc-status { flex-shrink:0; }

/* ── PAYMENTS ── */
.pay-summary {
  background:var(--bg-card); border-radius:var(--radius-lg);
  padding:24px; border:1px solid var(--border); margin-bottom:16px;
  text-align:center;
}
.pay-amount { font-size:36px; font-weight:700; color:var(--text); }
.pay-label { font-size:13px; color:var(--text-secondary); margin-top:4px; }
.pay-due { font-size:14px; font-weight:600; margin-top:8px; }
.pay-methods { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.pay-method {
  background:var(--bg-card); border:2px solid var(--border);
  border-radius:var(--radius-md); padding:16px; cursor:pointer;
  display:flex; align-items:center; gap:14px; transition:all .15s;
}
.pay-method.selected { border-color:var(--accent); }
.pay-method-icon { font-size:24px; }
.pay-history { display:flex; flex-direction:column; gap:8px; }
.pay-item {
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 16px; background:var(--bg-card); border-radius:var(--radius-sm);
  border:1px solid var(--border);
}
.pay-item-left h4 { font-size:14px; font-weight:600; }
.pay-item-left p { font-size:12px; color:var(--text-secondary); }
.pay-item-right { font-weight:700; }

/* ── AI ASSISTANT ── */
#pageAi.active { display:flex !important; flex-direction:column; height:calc(100vh - 146px); }
.ai-chat { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; }
.ai-welcome { text-align:center; padding:40px 20px; }
.ai-welcome .ai-icon { font-size:48px; margin-bottom:12px; }
.ai-welcome h3 { font-size:18px; font-weight:700; margin-bottom:6px; }
.ai-welcome p { font-size:14px; color:var(--text-secondary); line-height:1.5; }
.ai-suggestions { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:16px; }
.ai-suggestion {
  padding:8px 14px; border:1px solid var(--border-input);
  border-radius:20px; font-size:12px; cursor:pointer; background:var(--bg-card);
  color:var(--text-secondary); font-family:var(--font);
}

/* ── EMPTY STATE ── */
.empty-state { text-align:center; padding:60px 20px; }
.empty-icon { font-size:48px; margin-bottom:12px; }
.empty-state h3 { font-size:18px; font-weight:600; margin-bottom:6px; color:var(--text); }
.empty-state p { font-size:14px; color:var(--text-secondary); }

/* ── BOTTOM NAV ── */
#bottomNav {
  position:fixed; bottom:0; left:0; right:0; z-index:50;
  background:var(--bg-nav); border-top:1px solid var(--border);
  display:flex; justify-content:space-around;
  padding:8px 0 max(env(safe-area-inset-bottom, 8px), 8px);
}
.nav-btn {
  display:flex; flex-direction:column; align-items:center; gap:3px;
  border:none; background:none; color:var(--nav-inactive);
  font-size:10px; font-weight:500; cursor:pointer; padding:4px 8px;
  font-family:var(--font); position:relative;
}
.nav-btn.active { color:var(--nav-active); }
.nav-btn svg { width:22px; height:22px; }
.nav-badge {
  position:absolute; top:-2px; right:0; min-width:16px; height:16px;
  border-radius:8px; background:var(--badge-bg); color:var(--badge-text);
  font-size:9px; font-weight:700; display:flex; align-items:center;
  justify-content:center; padding:0 3px;
}

/* ── TOAST ── */
.toast {
  position:fixed; bottom:100px; left:50%; transform:translateX(-50%);
  background:var(--text); color:#fff; padding:12px 24px;
  border-radius:var(--radius-md); font-size:14px; font-weight:500;
  box-shadow:var(--shadow-lg); z-index:100; opacity:0;
  transition:opacity .3s; pointer-events:none;
}
.toast.show { opacity:1; }

/* ── SKIN SWITCHER ── */
.skin-picker { display:flex; gap:8px; padding:8px 0; }
.skin-dot {
  width:32px; height:32px; border-radius:50%; border:2px solid var(--border);
  cursor:pointer; transition:all .15s;
}
.skin-dot.active { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent); }
.skin-dot[data-skin="a"] { background:linear-gradient(135deg,#fafafa,#e0e0e0); }
.skin-dot[data-skin="c"] { background:linear-gradient(135deg,#faf6f1,#c49a6c); }
.skin-dot[data-skin="e"] { background:linear-gradient(135deg,#16213e,#E94560); }

/* ── UTILITIES ── */
.hidden { display:none !important; }
.mt-8 { margin-top:8px; }
.mt-16 { margin-top:16px; }
.mb-16 { margin-bottom:16px; }
.text-center { text-align:center; }

/* ── PWA safe areas ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #bottomNav { padding-bottom:env(safe-area-inset-bottom); }
  #pageContainer { padding-bottom:calc(90px + env(safe-area-inset-bottom)); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width:0; background:transparent; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE — TABLET (768px+)
   ═══════════════════════════════════════════════════ */
@media (min-width:768px) and (not (any-pointer: coarse)) {
  /* App shell — centered container.
     `not (any-pointer: coarse)` = the device has NO touchscreen = a real desktop.
     EVERY phone/tablet has a touchscreen (any-pointer: coarse is true) — including
     Samsung S-Pen phones that lie and report pointer:fine — so they always fall
     through to the phone layout here, browser OR installed PWA, at any width. */
  #appShell {
    max-width:900px;
    margin:0 auto;
    position:relative;
    box-shadow:var(--shadow-lg);
    min-height:100vh;
    background:var(--bg);
  }
  #topBar { max-width:900px; margin:0 auto; left:0; right:0; }
  #bottomNav {
    max-width:900px;
    margin:0 auto;
    left:50%;
    transform:translateX(-50%);
    border-radius:20px 20px 0 0;
    box-shadow:0 -4px 20px rgba(0,0,0,.06);
  }

  /* Dashboard cards — 3 columns */
  .dash-cards { grid-template-columns:repeat(3, 1fr); gap:16px; padding:0 24px 24px; }
  .dash-card { padding:24px 20px; }
  .dash-card-icon { width:52px; height:52px; font-size:24px; }
  .dash-card-title { font-size:16px; }

  /* Pages — more padding */
  .page { padding:24px 32px; }
  .dash-greeting { padding:0 24px 20px; }
  .dash-alert { margin:0 24px 24px; }
  .section-label { padding:0 24px; }

  /* Info cards grid */
  .info-cards { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

  /* Maintenance list */
  .maint-list { gap:12px; }
  .maint-item { padding:18px; }

  /* Parking plans — 2 column */
  .plan-cards { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

  /* Packages — row layout */
  .pkg-section { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

  /* Notifications — wider */
  .notif-list { gap:10px; }
  .notif-item { padding:16px 20px; }

  /* Forms list */
  .form-card { padding:18px; }

  /* Payments — side by side */
  .pay-methods { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  .pay-history { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

  /* Chat — wider messages */
  .chat-msg { max-width:65%; }

  /* AI — bigger welcome */
  .ai-welcome { padding:60px 40px; }
  .ai-welcome .ai-icon { font-size:56px; }
  .ai-welcome h3 { font-size:22px; }

  /* Auth — bigger box */
  .auth-container { max-width:420px; }
  .auth-logo-icon { width:72px; height:72px; font-size:32px; }
  .auth-logo h1 { font-size:32px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — DESKTOP (1200px+)
   ═══════════════════════════════════════════════════ */
@media (min-width:1200px) and (not (any-pointer: coarse)) {
  body { background:#f0f0f0; }

  /* Desktop app shell — wider centered with elegant frame */
  #appShell {
    max-width:820px;
    margin:0 auto;
    border-left:1px solid var(--border);
    border-right:1px solid var(--border);
    box-shadow:0 0 60px rgba(0,0,0,.08);
  }
  #topBar { max-width:820px; }
  #bottomNav {
    max-width:820px;
    border-radius:0;
  }

  /* Dashboard — 2 columns (phone-like) */
  .dash-cards { grid-template-columns:repeat(2, 1fr); gap:14px; padding:0 20px 20px; }

  /* Info cards back to single col in narrow frame */
  .info-cards { grid-template-columns:1fr; }

  /* Plans back to stacked */
  .plan-cards { grid-template-columns:1fr; }
  .pkg-section { grid-template-columns:1fr; }
  .pay-methods { grid-template-columns:1fr; }
  .pay-history { grid-template-columns:1fr; }

  .page { padding:20px; }
  .dash-greeting { padding:0 20px 16px; }
  .dash-alert { margin:0 20px 20px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — WIDE DESKTOP (1400px+)
   Two-panel layout: sidebar nav + content
   ═══════════════════════════════════════════════════ */
@media (min-width:1400px) and (not (any-pointer: coarse)) {
  #appShell {
    max-width:1320px;
    display:grid;
    grid-template-columns:260px 1fr;
    grid-template-rows:auto 1fr;
  }
  #topBar {
    grid-column:1 / -1;
    max-width:1320px;
  }
  #pageContainer {
    grid-column:2;
    padding-bottom:24px !important;
    overflow-y:auto;
    max-height:calc(100vh - 56px);
  }

  /* Bottom nav becomes sidebar nav */
  #bottomNav {
    grid-column:1;
    grid-row:2;
    position:sticky;
    top:56px;
    height:calc(100vh - 56px);
    flex-direction:column;
    justify-content:flex-start;
    padding:24px 16px;
    gap:4px;
    border-top:none;
    border-right:1px solid var(--border);
    border-radius:0;
    transform:none;
    left:auto;
    right:auto;
    max-width:260px;
    box-shadow:none;
    overflow-y:auto;
  }
  .nav-btn {
    flex-direction:row;
    gap:12px;
    padding:12px 16px;
    font-size:14px;
    border-radius:var(--radius-sm);
    width:100%;
    justify-content:flex-start;
  }
  .nav-btn:hover { background:var(--bg-input); }
  .nav-btn.active { background:var(--accent-soft); }
  .nav-btn svg { width:20px; height:20px; flex-shrink:0; }
  .nav-badge { position:static; margin-left:auto; }

  /* Content area uses 3 columns for cards */
  .dash-cards { grid-template-columns:repeat(3, 1fr); gap:16px; padding:0 24px 24px; }
  .dash-card { padding:22px 18px; }

  /* Two-column layouts for content pages */
  .info-cards { grid-template-columns:1fr 1fr; }
  .plan-cards { grid-template-columns:1fr 1fr; }
  .pkg-section { grid-template-columns:1fr 1fr; }
  .pay-methods { grid-template-columns:1fr 1fr; }
  .pay-history { grid-template-columns:1fr 1fr; }

  .page { padding:24px 32px; }
  .dash-greeting { padding:0 24px 20px; }
  .dash-alert { margin:0 24px 24px; }
}

/* ═══════════════════════════════════════════════════
   HOME SERVICES — cleaning / in-unit services
   subcategory grid · service list · booking flow.
   These classes were emitted by portal/js/app.js +
   the #pageServiceBook markup but had NO styles, so
   every screen rendered as plain text (added 2026-06-26).
   ═══════════════════════════════════════════════════ */

/* ── Subcategory grid + service list (both use .hs-grid) ── */
.hs-grid {
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
  padding:0 20px 20px;
}
.hs-card {
  position:relative; background:var(--bg-card);
  border:1px solid var(--border); border-radius:var(--radius-md);
  padding:16px; cursor:pointer; box-shadow:var(--shadow-sm);
  transition:transform .12s, box-shadow .12s;
}
.hs-card:active { transform:scale(.97); }
.hs-card-icon {
  width:46px; height:46px; border-radius:var(--radius-md);
  background:var(--accent-soft);
  display:flex; align-items:center; justify-content:center;
  font-size:23px; margin-bottom:11px;
}
.hs-card-title { font-size:15px; font-weight:600; color:var(--text); line-height:1.25; margin-bottom:4px; }
.hs-card-desc { font-size:12.5px; color:var(--text-secondary); line-height:1.4; }
.hs-card-duration { margin-top:10px; font-size:12px; font-weight:600; color:var(--text-secondary); }
.hs-card-price { margin-top:8px; font-size:15px; font-weight:700; color:var(--text); }
.hs-card-badge {
  position:absolute; top:12px; right:12px;
  background:var(--warning-bg); color:var(--warning);
  font-size:10px; font-weight:700; letter-spacing:.02em;
  padding:3px 8px; border-radius:8px;
}
.hs-card-more { display:inline-block; margin-top:9px; font-size:12px; font-weight:600; color:var(--info-text); cursor:pointer; }
.hs-card-info { margin-top:8px; padding-top:8px; border-top:1px solid var(--border); font-size:12.5px; color:var(--text-secondary); line-height:1.5; }

/* ── Booking screen — hero ── */
.hsb-hero { display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.hsb-hero-icon {
  width:54px; height:54px; border-radius:var(--radius-md); flex-shrink:0;
  background:var(--accent-soft);
  display:flex; align-items:center; justify-content:center; font-size:28px;
}
.hsb-hero-info { min-width:0; }
.hsb-hero-title { font-size:19px; font-weight:700; color:var(--text); line-height:1.2; }
.hsb-hero-desc { font-size:13px; color:var(--text-secondary); line-height:1.4; margin-top:3px; }

/* ── Tabs (Book / What's Included) ── */
.hsb-tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:16px; }
.hsb-tab {
  flex:1; padding:11px 8px; border:none; background:none; cursor:pointer;
  font-family:inherit; font-size:14px; font-weight:600; color:var(--text-secondary);
  border-bottom:2px solid transparent; margin-bottom:-1px;
}
.hsb-tab.active { color:var(--text); border-bottom-color:var(--accent); }

/* ── Section card ── */
.hsb-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:16px; margin-bottom:12px;
}
.hsb-card-label { font-size:11px; font-weight:700; letter-spacing:.04em; color:var(--text-secondary); margin-bottom:10px; }

/* ── Price display ── */
.hsb-price-label { font-size:12px; font-weight:600; color:var(--text-secondary); }
.hsb-price-amount { font-size:26px; font-weight:700; color:var(--text); margin-top:2px; }
.hsb-price-breakdown { font-size:12px; color:var(--text-secondary); line-height:1.5; margin-top:6px; }

/* ── Variations (pick a size) ── */
.hs-variation-cards { display:flex; flex-direction:column; gap:10px; }
.hs-var-card {
  display:flex; align-items:center; justify-content:space-between;
  background:var(--bg-card); border:1.5px solid var(--border-input);
  border-radius:var(--radius-sm); padding:13px 16px; cursor:pointer;
  transition:border-color .12s, background .12s;
}
.hs-var-card.active { border-color:var(--accent); background:var(--accent-soft); }
.hs-var-label { font-size:14px; font-weight:600; color:var(--text); }
.hs-var-price { font-size:16px; font-weight:700; color:var(--text); }

/* ── Configurable selectors (quantity steppers) ── */
.hsb-selector-row { margin-bottom:2px; }
.hsb-sel-divider { height:1px; background:var(--border); margin:14px 0; }
.hsb-selector-header { display:flex; align-items:center; justify-content:space-between; font-size:14px; font-weight:600; color:var(--text); margin-bottom:10px; }
.hsb-selector-extra { font-size:12px; font-weight:600; color:var(--text-secondary); }
.hsb-selector-btns { display:flex; flex-wrap:wrap; gap:8px; }
.hsb-sel-btn {
  min-width:48px; padding:9px 10px; cursor:pointer; font-family:inherit;
  border:1.5px solid var(--border-input); border-radius:var(--radius-sm);
  background:var(--bg-card); color:var(--text); font-size:15px; font-weight:600;
  display:inline-flex; flex-direction:column; align-items:center; line-height:1.15;
  transition:all .12s;
}
.hsb-sel-btn.active { border-color:var(--accent); background:var(--accent); color:#fff; }
.hsb-sel-extra { font-size:9.5px; font-weight:600; opacity:.7; margin-top:1px; }

/* ── Time windows ── */
.hsb-time-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.hsb-time-card {
  border:1.5px solid var(--border-input); border-radius:var(--radius-md);
  padding:14px 10px; text-align:center; cursor:pointer; background:var(--bg-card);
  transition:all .12s;
}
.hsb-time-card.active { border-color:var(--accent); background:var(--accent-soft); }
.hsb-time-icon { font-size:22px; margin-bottom:5px; }
.hsb-time-label { font-size:13px; font-weight:600; color:var(--text); }
.hsb-time-range { font-size:11px; color:var(--text-secondary); margin-top:2px; }

/* ── Inputs ── */
.hsb-date-input, .hsb-textarea {
  width:100%; padding:11px 13px; font-family:inherit; font-size:14px;
  color:var(--text); background:var(--bg-input);
  border:1.5px solid var(--border-input); border-radius:var(--radius-sm);
}
.hsb-date-input:focus, .hsb-textarea:focus { outline:none; border-color:var(--accent); }
.hsb-textarea { resize:vertical; }

/* ── "What's included" list ── */
.hsb-incl-section { display:flex; align-items:center; gap:7px; font-size:13px; font-weight:700; color:var(--text); margin:16px 0 8px; }
.hsb-incl-section:first-child { margin-top:0; }
.hsb-incl-section-icon { font-size:15px; }
.hsb-incl-item { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:var(--text-secondary); line-height:1.5; padding:3px 0; }
.hsb-incl-check { color:var(--success); font-weight:700; flex-shrink:0; }

/* ── Disclaimer + terms ── */
.hsb-disclaimer-text { font-size:12px; color:var(--text-secondary); line-height:1.55; }
.hsb-disclaimer-text ul { margin:8px 0; padding-left:18px; }
.hsb-disclaimer-text li { margin-bottom:5px; }
.hsb-terms { display:flex; align-items:center; gap:9px; margin-top:12px; font-size:13px; font-weight:600; color:var(--text); cursor:pointer; }
.hsb-terms input { width:17px; height:17px; flex-shrink:0; cursor:pointer; }

/* ── Surcharge badge (inline with price) ── */
.hsb-surcharge-badge { display:inline-block; background:var(--warning-bg); color:var(--warning); font-size:11px; font-weight:700; padding:2px 7px; border-radius:6px; margin-left:4px; vertical-align:middle; }

/* ── Sticky bottom bar (price + book) ── */
.hsb-bottom-bar {
  position:sticky; bottom:12px; z-index:5;
  display:flex; align-items:center; gap:14px;
  padding:12px 16px; margin-top:16px;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius-lg); box-shadow:var(--shadow-md);
}
.hsb-bottom-price { flex:1; min-width:0; }
.hsb-bot-label { font-size:11px; font-weight:600; color:var(--text-secondary); }
.hsb-bot-amount { font-size:20px; font-weight:700; color:var(--text); line-height:1.1; }
.hsb-book-btn {
  flex-shrink:0; padding:13px 22px; cursor:pointer; font-family:inherit;
  border:none; border-radius:var(--radius-sm);
  background:var(--accent); color:#fff; font-size:15px; font-weight:700;
}
.hsb-book-btn:active { transform:scale(.97); }
</style>
