/* ═══════════════════════════════════════════════
   TENANCE — BASE STYLES
   Reset, global html/body, and shared micro-UI
   (status dot, toast, spinner, screens).
═══════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--t1);
  overflow: hidden;
}

/* ── Screen switcher ── */
.screen { display: none; width: 100%; height: 100vh; }
.screen.on { display: flex; }

/* ── Firebase status dot ── */
#fbDot {
  position: fixed; top: 10px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #cc8c33; z-index: 600;
  transition: background .4s;
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}

/* ── Toast notification ── */
.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: #1e2820;
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12px; color: var(--t1); font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  transform: translateY(80px); opacity: 0;
  transition: all .25s; z-index: 500;
  max-width: 320px; line-height: 1.5;
}
.toast.on { transform: translateY(0); opacity: 1; }

/* ── Notification panel show/hide ── */
#notif-panel.on { display: block !important; }

/* ── Notification panel items ── */
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; cursor: pointer;
  transition: background .12s; position: relative;
  border-bottom: 1px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--hover); }
.notif-item.unread { background: rgba(200,146,58,.04); }
.notif-ico {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.notif-ico svg { width: 15px; height: 15px; }
.ico-maint { background: rgba(200,146,58,.15); color: var(--gold); }
.ico-maint svg { stroke: var(--gold); }
.ico-msg { background: rgba(90,200,106,.12); color: #5ac86a; }
.ico-msg svg { stroke: #5ac86a; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 11px; font-weight: 700; color: var(--t1); line-height: 1.4; margin-bottom: 2px; }
.notif-sub { font-size: 10px; color: var(--t2); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 9px; color: var(--t3); margin-top: 3px; }
.notif-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0; margin-top: 4px;
}
.notif-empty { padding: 20px; text-align: center; font-size: 12px; color: var(--t3); }

/* ── Loading spinner ── */
.spin {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--t2);
  border-radius: 50%;
  animation: rot .7s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes livePulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.4; transform:scale(.7); } }

/* ── Loading row placeholder ── */
.loading-row {
  display: flex; align-items: center;
  color: var(--t3); font-size: 12px;
  padding: 20px 0; gap: 6px;
}

/* ── Demo mode banner ── */
.demo-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 400;
  background: #c8923a; color: #1a0e00;
  padding: 8px 20px; font-size: 12px; font-weight: 700;
  display: none; align-items: center; justify-content: center; gap: 12px;
}
.demo-banner.on { display: flex; }
.demo-banner button {
  background: rgba(0,0,0,.2); border: none;
  color: #1a0e00; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 6px; cursor: pointer;
}
