/* Application-only styles. Landing page styles in index.html are untouched. */
.app-shell, #appView, .app-layout { min-width: 0; }
button, input, select, textarea { font: inherit; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--brand, #0f9d58); outline-offset: 2px; }

/* Dashboard */
.dashboard-page { width: 100%; max-width: 1500px; margin: 0 auto; padding: 2px 0 36px; color: var(--text); }
.dashboard-page .dash-header { display:flex; align-items:flex-end; justify-content:space-between; gap:22px; flex-wrap:wrap; margin:0 0 24px; }
.dashboard-page .dash-heading { min-width:240px; }
.dashboard-page .dash-eyebrow, .dashboard-page .dash-section-label { display:block; color:var(--text-faint); font-size:10px; font-weight:800; letter-spacing:.13em; line-height:1.5; }
.dashboard-page .dash-heading h2 { margin:5px 0 3px; color:var(--text); font-size:25px; line-height:1.25; font-weight:750; letter-spacing:-.04em; }
.dashboard-page .dash-heading p { color:var(--text-dim); font-size:13px; }
.dashboard-page .dash-heading-divider { padding:0 7px; color:var(--text-faint); }
.dashboard-page .dash-header-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.dashboard-page .dash-date-indicator { display:flex; align-items:center; gap:8px; padding:9px 12px; border:1px solid var(--line); border-radius:9px; background:var(--bg-elev); color:var(--text-dim); font-size:12px; font-weight:600; }
.dashboard-page .dash-date-dot { width:7px; height:7px; border-radius:50%; background:var(--ok); box-shadow:0 0 0 3px var(--ok-soft); }
.dashboard-page .dash-header-actions .btn { min-height:36px; padding:8px 13px; border-radius:8px; font-size:12px; font-weight:700; }
.dashboard-page .dash-header-actions .btn-ghost { border:1px solid var(--line); background:var(--bg-elev); color:var(--text-dim); }
.dashboard-page .dash-header-actions .btn-primary { background:var(--brand); color:#fff; }
.dashboard-page .dash-overview { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(270px,1fr); overflow:hidden; margin-bottom:30px; border:1px solid var(--line); border-radius:16px; background:var(--bg-elev); box-shadow:var(--shadow); }
.dashboard-page .dash-overview-main { min-width:0; padding:23px 25px 18px; background:linear-gradient(120deg,var(--bg-elev),var(--bg-elev-2)); }
.dashboard-page .dash-overview-content { display:flex; align-items:center; gap:25px; padding:19px 0 21px; }
.dashboard-page .dash-overview-number { display:flex; align-items:center; gap:12px; min-width:120px; }
.dashboard-page .dash-overview-number strong { color:var(--brand); font-size:62px; line-height:1; letter-spacing:-.07em; }
.dashboard-page .dash-overview-number span { color:var(--text-faint); font-size:10px; line-height:1.45; font-weight:800; letter-spacing:.1em; }
.dashboard-page .dash-overview-description h3 { margin:0 0 4px; font-size:18px; font-weight:750; letter-spacing:-.025em; }
.dashboard-page .dash-overview-description p { color:var(--text-dim); font-size:12px; }
.dashboard-page .dash-rate { display:flex; align-items:baseline; gap:7px; margin-top:12px; }
.dashboard-page .dash-rate strong { color:var(--brand); font-size:23px; }
.dashboard-page .dash-rate span { color:var(--text-dim); font-size:11px; }
.dashboard-page .dash-overview-footer { display:flex; flex-wrap:wrap; gap:8px 20px; padding-top:13px; border-top:1px solid var(--line); color:var(--text-dim); font-size:11px; }
.dashboard-page .dash-overview-footer span:before { content:""; display:inline-block; width:6px; height:6px; margin:0 7px 1px 0; border-radius:50%; background:var(--brand); }
.dashboard-page .dash-overview-side { display:grid; grid-template-columns:1fr 1fr; align-content:center; gap:0; padding:12px 18px; border-left:1px solid var(--line); }
.dashboard-page .dash-mini-stat { display:flex; align-items:center; gap:11px; min-width:0; padding:15px 8px; }
.dashboard-page .dash-mini-stat:nth-child(odd) { border-right:1px solid var(--line); }
.dashboard-page .dash-mini-stat:nth-child(-n+2) { border-bottom:1px solid var(--line); }
.dashboard-page .dash-mini-icon { display:grid; flex:0 0 34px; width:34px; height:34px; place-items:center; border-radius:10px; background:var(--brand-soft); color:var(--brand); font-size:16px; font-weight:800; }
.dashboard-page .dash-mini-stat strong { display:block; font-size:21px; line-height:1.15; }
.dashboard-page .dash-mini-stat span:last-child { display:block; margin-top:3px; color:var(--text-faint); font-size:10px; }
.dashboard-page .dash-section { margin:0 0 30px; }
.dashboard-page .dash-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:14px; }
.dashboard-page .dash-section-heading h3 { margin:4px 0 3px; font-size:17px; font-weight:750; letter-spacing:-.025em; }
.dashboard-page .dash-section-heading p { color:var(--text-dim); font-size:12px; }
.dashboard-page .dash-section-count { padding:6px 10px; border:1px solid var(--line); border-radius:20px; background:var(--bg-elev); color:var(--text-dim); font-size:10px; font-weight:700; white-space:nowrap; }
.dashboard-page .dash-presence-layout { display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:14px; }
.dashboard-page .dash-presence-main { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.dashboard-page .dash-presence-group { min-width:0; padding:15px; border:1px solid var(--line); border-radius:12px; background:var(--bg-elev); }
.dashboard-page .dash-presence-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.dashboard-page .dash-presence-heading strong { display:block; font-size:12px; }
.dashboard-page .dash-presence-heading div > span { display:block; margin-top:3px; color:var(--text-faint); font-size:10px; }
.dashboard-page .dash-presence-count { display:grid; flex:0 0 27px; width:27px; height:27px; place-items:center; border-radius:8px; background:var(--bg-elev-2); font-size:11px; font-weight:800; }
.dashboard-page .dash-presence-onsite .dash-presence-count { background:var(--ok-soft); color:var(--ok); }
.dashboard-page .dash-presence-late .dash-presence-count, .dashboard-page .dash-presence-absent .dash-presence-count { background:var(--danger-soft); color:var(--danger); }
.dashboard-page .dash-person-list { display:flex; flex-wrap:wrap; gap:7px; margin-top:13px; }
.dashboard-page .dash-person { display:flex; align-items:center; gap:6px; max-width:100%; padding:4px 8px 4px 4px; border:1px solid var(--line); border-radius:20px; background:var(--bg-elev-2); }
.dashboard-page .dash-person-avatar { display:grid; flex:0 0 24px; width:24px; height:24px; place-items:center; border-radius:50%; background:var(--brand-soft); color:var(--brand); font-size:9px; font-weight:800; }
.dashboard-page .dash-person-name { overflow:hidden; color:var(--text-dim); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-page .dash-no-people { color:var(--text-faint); font-size:10px; }
.dashboard-page .dash-presence-summary { padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--bg-elev); }
.dashboard-page .dash-summary-caption { display:block; margin-bottom:8px; color:var(--text-faint); font-size:9px; font-weight:800; letter-spacing:.12em; }
.dashboard-page .dash-summary-item { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:11px 0; border-bottom:1px solid var(--line); }
.dashboard-page .dash-summary-item strong { font-size:19px; }
.dashboard-page .dash-summary-item span { color:var(--text-dim); font-size:10px; text-align:right; }
.dashboard-page .dash-summary-note { margin-top:13px; padding:10px; border-radius:8px; background:var(--warn-soft); color:var(--text-dim); font-size:10px; line-height:1.5; }
.dashboard-page .dash-two-column { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.dashboard-page .dash-panel, .dashboard-page .dash-alerts-panel { min-width:0; padding:17px; border:1px solid var(--line); border-radius:12px; background:var(--bg-elev); }
.dashboard-page .dash-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:13px; border-bottom:1px solid var(--line); }
.dashboard-page .dash-panel-heading h3 { font-size:13px; font-weight:750; }
.dashboard-page .dash-panel-heading div > span { display:block; margin-top:3px; color:var(--text-faint); font-size:10px; }
.dashboard-page .dash-panel-number { color:var(--text-faint); font-size:9px; font-weight:800; letter-spacing:.08em; }
.dashboard-page .dash-timeline { padding-top:7px; }
.dashboard-page .dash-timeline-item { display:grid; grid-template-columns:12px 48px minmax(0,1fr); align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.dashboard-page .dash-timeline-item:last-child { border-bottom:0; }
.dashboard-page .dash-timeline-marker { width:8px; height:8px; border:2px solid var(--brand); border-radius:50%; background:var(--bg-elev); box-shadow:0 0 0 3px var(--brand-soft); }
.dashboard-page .dash-timeline-item.is-late .dash-timeline-marker { border-color:var(--warn); box-shadow:0 0 0 3px var(--warn-soft); }
.dashboard-page .dash-timeline-time { color:var(--text-dim); font-family:var(--mono); font-size:10px; }
.dashboard-page .dash-timeline-person strong, .dashboard-page .dash-activity-details strong { display:block; font-size:11px; }
.dashboard-page .dash-timeline-person span, .dashboard-page .dash-activity-details > span { display:block; margin-top:2px; color:var(--text-faint); font-size:10px; }
.dashboard-page .dash-activity-feed { padding-top:5px; }
.dashboard-page .dash-activity-item { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.dashboard-page .dash-activity-item:last-child { border-bottom:0; }
.dashboard-page .dash-activity-icon { display:grid; flex:0 0 30px; width:30px; height:30px; place-items:center; border-radius:9px; background:var(--brand-soft); color:var(--brand); font-weight:800; }
.dashboard-page .dash-activity-danger { background:var(--danger-soft); color:var(--danger); }
.dashboard-page .dash-activity-details { flex:1; min-width:0; }
.dashboard-page .dash-activity-badge { margin-top:4px; font-size:10px; }
.dashboard-page .dash-activity-time { color:var(--text-faint); font-family:var(--mono); font-size:10px; white-space:nowrap; }
.dashboard-page .dash-alerts-panel { padding:4px 16px; }
.dashboard-page .dash-alert-item { display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); }
.dashboard-page .dash-alert-item:last-child { border-bottom:0; }
.dashboard-page .dash-alert-symbol { display:grid; flex:0 0 30px; width:30px; height:30px; place-items:center; border-radius:9px; background:var(--warn-soft); color:var(--warn); font-weight:800; }
.dashboard-page .dash-alert-content { flex:1; min-width:0; }
.dashboard-page .dash-alert-content strong { display:block; font-size:11px; }
.dashboard-page .dash-alert-meta { display:flex; flex-wrap:wrap; gap:9px; margin-top:4px; color:var(--text-faint); font-size:10px; }
.dashboard-page .dash-alert-time { color:var(--text-faint); font-family:var(--mono); font-size:10px; }
.dashboard-page .dash-view-all { color:var(--brand); font-size:11px; font-weight:700; white-space:nowrap; }
.dashboard-page .dash-empty { padding:22px 10px; color:var(--text-faint); font-size:11px; text-align:center; }

@media (max-width:1100px) {
  .dashboard-page .dash-overview { grid-template-columns:1fr; }
  .dashboard-page .dash-overview-side { border-top:1px solid var(--line); border-left:0; }
}
@media (max-width:760px) {
  .dashboard-page .dash-presence-layout, .dashboard-page .dash-two-column { grid-template-columns:1fr; }
  .dashboard-page .dash-presence-main { grid-template-columns:1fr; }
  .dashboard-page .dash-heading h2 { font-size:21px; }
  .dashboard-page .dash-overview-content { align-items:flex-start; gap:15px; }
  .dashboard-page .dash-overview-number strong { font-size:48px; }
}
@media (max-width:480px) {
  .dashboard-page .dash-overview-main { padding:17px; }
  .dashboard-page .dash-overview-side { padding:7px; }
  .dashboard-page .dash-mini-stat { padding:12px 5px; gap:7px; }
  .dashboard-page .dash-mini-icon { flex-basis:29px; width:29px; height:29px; }
  .dashboard-page .dash-overview-footer { display:grid; gap:7px; }
  .dashboard-page .dash-section-heading { align-items:flex-start; }
}

@media print {
  .sidebar, .topbar, .no-print, button { display:none !important; }
  body { background:#fff !important; color:#111 !important; }
  main, .page-content { width:100% !important; margin:0 !important; padding:0 !important; }
}


.qr-box {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.qr-visual {
  width: 196px;
  height: 196px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.qr-visual img,
.qr-visual svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* ============ SHULENI-INSPIRED M3 EXPRESSIVE POLISH ============ */
[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #0e0e0e;
  --bg-elev-2: #161616;
  --bg-input: #141414;
  --line: #242424;
  --line-strong: #363636;
}

.card,
.login-card {
  border-radius: 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn {
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0f9d58 0%, #0284c7 100%);
  box-shadow: 0 6px 18px rgba(15, 157, 88, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0b8043 0%, #0369a1 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 157, 88, 0.34);
}

.nav-item {
  border-radius: 999px;
  padding: 10px 14px;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(15, 157, 88, 0.14), rgba(2, 132, 199, 0.10));
  font-weight: 700;
}

.nav-item.active::before {
  display: none;
}

.kpi,
.stat-card {
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

.input,
select.input,
textarea.input {
  border-radius: 8px;
}

/* ==========================================================================
   LANDING PAGE & QUIET-CHROME LOGIN (expo.dev + awwwards.com inspired)
   ========================================================================== */
.landing-wrap {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}
[data-theme="dark"] .landing-wrap,
[data-theme="dark"] .login-wrap {
  --bg: #0a0a0c;
  --bg-elev: #121216;
  --bg-elev-2: #18181d;
  --line: #232329;
  --line-strong: #32323b;
  --text: #f4f4f6;
  --text-dim: #a1a1aa;
  --text-faint: #71717a;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .landing-nav {
  background: rgba(10, 10, 12, 0.85);
}
.landing-nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.landing-brand-dot {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}
.landing-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.landing-links a {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
}
.landing-links a:hover {
  color: var(--text);
}

.landing-hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 24px 56px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  margin-bottom: 20px;
}
.hero-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.hero-title {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 52ch;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.preview-frame {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .preview-frame {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.preview-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-elev-2);
}
.preview-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ok);
  background: var(--ok-soft);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.preview-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.preview-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-size: 13px;
}
.preview-row-name {
  font-weight: 600;
}
.preview-row-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.preview-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.preview-pill.ok { background: var(--ok-soft); color: var(--ok); }
.preview-pill.warn { background: var(--warn-soft); color: var(--warn); }
.preview-pill.dim { background: var(--bg-elev-2); color: var(--text-dim); }

.landing-section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 64px;
  width: 100%;
}
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cap-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.cap-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.cap-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.cap-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

.landing-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  color: var(--text-faint);
  font-size: 12px;
}
.landing-foot-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Quiet-Chrome Login Override */
.login-wrap {
  background-color: var(--bg) !important;
  background-image: none !important;
}
.login-right-quiet {
  background: var(--bg-elev-2);
  border-left: 1px solid var(--line);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.role-note {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
}
.role-note strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.role-note span {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.back-link:hover { color: var(--text); }

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: 1fr; padding: 40px 20px; }
  .cap-grid { grid-template-columns: 1fr; }
  .login-right-quiet { display: none; }
  .landing-links a.hide-sm { display: none; }
}

.qr-box {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.qr-visual {
  width: 184px;
  height: 184px;
  flex: none;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.qr-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
