/* =====================================================
   PropDesk Marketing Demo — styles
   Mirrors the portal at app.willowpa.com (skin-a.css)
   so the demo reads as a real app.
   ===================================================== */

/* ── Design tokens (lifted from portal/css/skin-a.css) ── */
:root {
  --bg:              #fafafa;
  --bg-card:         #ffffff;
  --bg-input:        #f5f5f5;
  --bg-nav:          #ffffff;
  --bg-header:       #ffffff;
  --text:            #1a1a1a;
  --text-secondary:  #888888;
  --text-muted:      #bbbbbb;
  --border:          #f0f0f0;
  --border-input:    #e0e0e0;
  --accent:          #1a1a1a;
  --accent-soft:     #f0f0f0;
  --brand:           #1a2874;
  --brand-light:     #2d4494;
  --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;
  --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;
  --font:            'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Base ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Demo frame: phone-like centered viewport so it can sit inside the marketing page ── */
.demo-frame {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.screen { display: none; }
.screen.active { display: block; }

/* ═══════════════════════════════════════════════════
   REGISTRATION GATE
   ═══════════════════════════════════════════════════ */
#screenRegister {
  background: #fff;
  min-height: 100vh;
  padding: 32px 24px;
}
.reg-header { text-align: center; margin-bottom: 28px; }
.reg-logo {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; margin-bottom: 12px;
}
.reg-title { font-size: 22px; font-weight: 700; color: var(--text); }
.reg-sub { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }

.reg-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.form-group { margin-bottom: 14px; }
.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 {
  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);
}
.form-group input:focus { outline: none; border-color: var(--brand); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.btn-primary {
  display: block; width: 100%; padding: 14px;
  background: var(--brand); color: #fff; border: none;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; cursor: pointer;
  font-family: var(--font);
}
.btn-primary:hover { background: var(--brand-light); }
.btn-secondary {
  display: block; width: 100%; padding: 12px;
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: var(--font); margin-top: 10px;
}

.reg-note {
  background: var(--info-bg); color: var(--info-text);
  border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px;
  margin-bottom: 14px;
}
.reg-note strong { font-weight: 700; }
.reg-otp-display {
  background: #fff8e1; border: 1px dashed #f59e0b;
  border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 14px;
  text-align: center;
}
.reg-otp-display .label {
  font-size: 11px; font-weight: 600; color: #92400e;
  text-transform: uppercase; letter-spacing: .5px;
}
.reg-otp-display .code {
  font-size: 24px; font-weight: 700; color: var(--brand);
  letter-spacing: 4px; margin-top: 4px;
}

/* ═══════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════ */
#topBar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.top-left  { display: flex; align-items: center; gap: 8px; }
.top-right { display: flex; align-items: center; gap: 6px; }
.top-title { font-size: 17px; font-weight: 700; color: var(--text); }
/* Close (X) button — distinct red on hover */
.close-btn:hover { background: var(--danger-bg); color: var(--danger); }

/* ── Persona tabs (replaces the old dropdown switcher) ── */
#personaTabs {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px 12px;
  position: sticky; top: 60px; z-index: 49;
}
.persona-hint {
  font-size: 11px; color: var(--text-secondary);
  text-align: center; margin-bottom: 8px;
  font-weight: 600; letter-spacing: .2px;
}
.persona-tab-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
}
.persona-tab {
  background: var(--bg-input); color: var(--text-secondary);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  font-family: var(--font);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: all .18s;
}
.persona-tab:hover { background: var(--accent-soft); color: var(--text); }
.persona-tab .ptab-icon  { font-size: 18px; line-height: 1; }
.persona-tab .ptab-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.persona-tab.active {
  background: var(--brand); color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 10px rgba(26,40,116,0.25);
}
.persona-tab.active:hover { background: var(--brand-light); color: #fff; }

/* Subtle pulse on inactive tabs to hint they're interactive.
   Plays 3 times on initial load and every persona switch (the .active class
   churns), then settles. Inactive ones invite the next click. */
@keyframes tab-hint-pulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(26,40,116,0); }
  50%      { transform: scale(1.03); box-shadow: 0 0 0 3px rgba(26,40,116,0.10); }
}
.persona-tab:not(.active) {
  animation: tab-hint-pulse 1.6s ease-in-out 3;
}
.top-icon-btn {
  background: transparent; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); position: relative;
}
.top-icon-btn:hover { background: var(--accent-soft); }

/* Demo annotation badges (the explainer pills) */
.demo-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fef3c7; color: #92400e;
  border: 1px solid #f59e0b;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; cursor: help;
  text-transform: uppercase; letter-spacing: .5px;
  margin-left: 6px;
  vertical-align: middle;
}
.demo-badge:hover { background: #fde68a; }
.demo-badge::before { content: '⚡'; font-size: 11px; }

.demo-callout {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-left: 4px solid #f59e0b;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; color: #78350f;
  margin: 12px 16px;
}
.demo-callout strong { color: #92400e; }

/* Notification bell badge */
.bell-badge {
  position: absolute; top: 4px; right: 2px;
  min-width: 16px; height: 16px;
  background: var(--badge-bg); color: var(--badge-text);
  border-radius: 50%;
  font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ── Page container ── */
#pageContainer { padding: 16px 16px 90px; }
.page { display: none; }
.page.active { display: block; }

/* ── Dashboard ── */
.dash-greeting { padding: 4px 4px 16px; }
.dash-hello { font-size: 13px; color: var(--text-secondary); }
.dash-name { display: block; font-size: 22px; font-weight: 700; color: var(--text); margin-top: 2px; }
.dash-unit { margin-top: 4px; font-size: 13px; color: #555; }

.section-label {
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 1px;
  margin: 14px 4px 10px;
}

.dash-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.dash-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 16px 14px; box-shadow: var(--shadow-sm);
  cursor: pointer; position: relative;
  transition: transform .15s, box-shadow .15s;
}
.dash-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dash-card-icon { font-size: 28px; margin-bottom: 8px; }
.dash-card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.dash-card-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.dash-card-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--badge-bg); color: var(--badge-text);
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Detail page (slides in over dashboard) ── */
.page-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.page-icon { font-size: 26px; }
.page-header h2 { font-size: 20px; font-weight: 700; color: var(--text); }

.info-card {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.info-card h3 {
  font-size: 13px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 6px;
}
.info-card p, .info-card .info-row { font-size: 14px; color: var(--text); line-height: 1.5; }
.info-row { display: flex; justify-content: space-between; padding: 6px 0; }
.info-row .lbl { color: var(--text-secondary); }
.info-row .val { font-weight: 600; }

/* List rows (maintenance, packages, payments, etc.) */
.list-row {
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 12px;
}
.list-row .lr-icon { font-size: 22px; }
.list-row .lr-body { flex: 1; }
.list-row .lr-title { font-size: 14px; font-weight: 700; color: var(--text); }
.list-row .lr-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.list-row .lr-meta { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.lr-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.lr-tag.tag-success { background: var(--success-bg); color: var(--success); }
.lr-tag.tag-warning { background: var(--warning-bg); color: var(--warning); }
.lr-tag.tag-info    { background: var(--info-bg);    color: var(--info-text); }

/* Message bubbles */
.msg-bubble {
  max-width: 80%; padding: 10px 12px; border-radius: var(--radius-md);
  font-size: 14px; margin-bottom: 8px; line-height: 1.4;
}
.msg-bubble.from-admin {
  background: var(--accent-soft); color: var(--text);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.msg-bubble.from-tenant {
  background: var(--brand); color: #fff;
  align-self: flex-end; border-bottom-right-radius: 4px;
  margin-left: auto;
}
.msg-bubble .bubble-time {
  font-size: 11px; opacity: .7; margin-top: 4px;
}
.msg-thread {
  display: flex; flex-direction: column;
  background: var(--bg-card); border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

/* Back button row at top of detail pages */
.detail-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: none; cursor: pointer;
  font-size: 14px; color: var(--text-secondary);
  font-family: var(--font); padding: 0; margin-bottom: 8px;
}
.detail-back:hover { color: var(--text); }

/* ── Bottom nav ── */
#bottomNav {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-width: 480px; margin: 0 auto;
  background: var(--bg-nav); border-top: 1px solid var(--border);
  display: flex; padding: 6px 0;
  z-index: 50;
}
.nav-btn {
  flex: 1; background: transparent; border: none; cursor: pointer;
  padding: 8px 4px; font-family: var(--font);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-secondary); position: relative;
}
.nav-btn .nav-icon { font-size: 20px; }
.nav-btn .nav-label { font-size: 10px; font-weight: 600; }
.nav-btn.active { color: var(--text); }
.nav-btn .nav-badge {
  position: absolute; top: 4px; right: calc(50% - 18px);
  min-width: 14px; height: 14px;
  background: var(--badge-bg); color: var(--badge-text);
  border-radius: 50%;
  font-size: 9px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ── Tooltip for demo badges ── */
.tooltip {
  position: fixed; background: #1f2937; color: #fff;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 12px; max-width: 240px; line-height: 1.4;
  box-shadow: var(--shadow-lg);
  z-index: 200; pointer-events: none;
}

/* Responsive — full width on small screens, framed on larger */
@media (min-width: 600px) {
  body { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); padding: 24px 0; }
  .demo-frame {
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0,0,0,.15);
    overflow: hidden; min-height: calc(100vh - 48px);
  }
}
