/* PALUX Archive 181 — dashboard theme contrast and shared theme-token repair.
   This file changes presentation only. It does not alter company data, permissions,
   messaging, schedules, functions, Firestore rules, or Storage rules. */

/* Older PALUX modules use these shared design tokens. Point them at the active
   PALUX theme so no component falls back to a hard-coded white surface. */
:root{
  --border:var(--line);
  --surface:var(--panel);
  --surface-2:#f8fafc;
  --card:var(--panel);
  --soft:#f7f9fc;
  --navy:var(--text);
}

body.dark,
body[data-theme="dark"]{
  color-scheme:dark;
  --border:#334155;
  --surface:#171f2b;
  --surface-2:#202a38;
  --card:#171f2b;
  --soft:#202a38;
  --navy:#edf1f6;
}

/* Dashboard surfaces and controls must follow the selected theme. */
body.dark .topbar,
body[data-theme="dark"] .topbar,
body.dark .dashboard-kpi-button>.card,
body[data-theme="dark"] .dashboard-kpi-button>.card,
body.dark .content>.card,
body[data-theme="dark"] .content>.card,
body.dark .grid>.card,
body[data-theme="dark"] .grid>.card{
  background:var(--panel);
  color:var(--text);
  border-color:var(--line);
}

body.dark .palux-live-clock,
body[data-theme="dark"] .palux-live-clock{
  background:var(--panel);
  color:var(--text);
  border-color:var(--line);
  box-shadow:none;
}

body.dark .palux-launch-control,
body[data-theme="dark"] .palux-launch-control{
  background:linear-gradient(145deg,#171f2b,#151c27);
  border-color:rgba(226,190,92,.34);
}

body.dark .palux-launch-control-grid button,
body[data-theme="dark"] .palux-launch-control-grid button{
  background:var(--surface-2);
  color:var(--text);
  border-color:var(--border);
  box-shadow:none;
}

body.dark .palux-launch-control-grid button:hover,
body.dark .palux-launch-control-grid button:focus-visible,
body[data-theme="dark"] .palux-launch-control-grid button:hover,
body[data-theme="dark"] .palux-launch-control-grid button:focus-visible{
  background:#263244;
  border-color:rgba(226,190,92,.75);
}

body.dark .quick-card,
body[data-theme="dark"] .quick-card{
  background:var(--surface-2);
  color:var(--text);
  border-color:var(--border);
}

body.dark .quick-card:hover,
body.dark .quick-card:focus-visible,
body[data-theme="dark"] .quick-card:hover,
body[data-theme="dark"] .quick-card:focus-visible{
  background:#263244;
  border-color:rgba(226,190,92,.7);
}

body.dark .secondary-btn,
body[data-theme="dark"] .secondary-btn,
body.dark .icon-btn,
body[data-theme="dark"] .icon-btn{
  background:var(--surface-2);
  color:var(--text);
  border-color:var(--border);
}

body.dark .secondary-btn:hover,
body.dark .icon-btn:hover,
body[data-theme="dark"] .secondary-btn:hover,
body[data-theme="dark"] .icon-btn:hover{
  background:#2a3749;
  border-color:rgba(226,190,92,.62);
}

body.dark .palux-launch-control-head h3,
body.dark .palux-launch-control-grid strong,
body.dark .card-head h3,
body.dark .card-head strong,
body.dark .quick-card h4,
body.dark .activity p,
body.dark .metric-line span,
body.dark .metric-line strong,
body.dark .palux-live-clock strong,
body.dark .topbar h1,
body.dark .user-chip strong,
body[data-theme="dark"] .palux-launch-control-head h3,
body[data-theme="dark"] .palux-launch-control-grid strong,
body[data-theme="dark"] .card-head h3,
body[data-theme="dark"] .card-head strong,
body[data-theme="dark"] .quick-card h4,
body[data-theme="dark"] .activity p,
body[data-theme="dark"] .metric-line span,
body[data-theme="dark"] .metric-line strong,
body[data-theme="dark"] .palux-live-clock strong,
body[data-theme="dark"] .topbar h1,
body[data-theme="dark"] .user-chip strong{
  color:var(--text);
}

body.dark .palux-launch-control-head p,
body.dark .palux-launch-control-grid small,
body.dark .palux-launch-control-grid span,
body.dark .card-head p,
body.dark .quick-card p,
body.dark .activity small,
body.dark .palux-live-clock small,
body.dark .topbar p,
body[data-theme="dark"] .palux-launch-control-head p,
body[data-theme="dark"] .palux-launch-control-grid small,
body[data-theme="dark"] .palux-launch-control-grid span,
body[data-theme="dark"] .card-head p,
body[data-theme="dark"] .quick-card p,
body[data-theme="dark"] .activity small,
body[data-theme="dark"] .palux-live-clock small,
body[data-theme="dark"] .topbar p{
  color:var(--muted);
}

body.dark .progress,
body[data-theme="dark"] .progress{
  background:#2b3748;
}

body.dark .activity,
body[data-theme="dark"] .activity,
body.dark .chart,
body[data-theme="dark"] .chart{
  border-color:var(--line);
}

body.dark .palux-empty-workspace-banner,
body[data-theme="dark"] .palux-empty-workspace-banner{
  background:linear-gradient(135deg,rgba(201,162,77,.16),rgba(23,31,43,.98));
  color:var(--text);
}

/* Light theme remains intentionally bright and high contrast. */
body:not(.dark) .palux-live-clock{
  background:var(--panel);
  color:var(--text);
}
body:not(.dark) .palux-launch-control-grid button{
  background:var(--surface-2);
  color:var(--text);
  border-color:var(--line);
}
body:not(.dark) .quick-card{
  background:var(--panel);
  color:var(--text);
}

/* PALUX 275 — Professional Onboarding + Orientation */
.onboarding-count-pill{min-width:42px;height:42px;padding:0 14px;border-radius:999px;background:#fff6da;color:#8a6500;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:18px}
.onboarding-orientation-list{display:grid;gap:12px;margin-top:14px}
.onboarding-orientation-card{display:grid;grid-template-columns:minmax(190px,1.1fr) minmax(190px,1fr) auto;gap:18px;align-items:center;padding:18px;border:1px solid var(--border,#e5e7eb);border-radius:18px;background:var(--card,#fff)}
.onboarding-orientation-time,.onboarding-orientation-person{display:flex;flex-direction:column;gap:5px}.onboarding-orientation-time strong,.onboarding-orientation-person strong{font-size:16px}.onboarding-orientation-time small,.onboarding-orientation-person span{color:var(--muted,#667085)}
.onboarding-orientation-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.onboarding-orientation-actions .primary-btn,.onboarding-orientation-actions .secondary-btn{width:auto;margin:0;white-space:nowrap}
.onboarding-orientation-panel{border:1px solid var(--border,#e5e7eb);border-radius:18px;padding:16px;background:rgba(248,250,252,.7)}
.onboarding-orientation-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:14px}.onboarding-orientation-head>div{display:flex;flex-direction:column;gap:4px}.onboarding-orientation-head small{color:var(--muted,#667085);line-height:1.4}
.onboarding-orientation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.onboarding-orientation-grid label{display:block;font-size:12px;font-weight:700;color:var(--muted,#667085);margin-bottom:6px}.onboarding-orientation-grid input,.onboarding-orientation-grid select{width:100%}
@media(max-width:720px){.onboarding-orientation-card{grid-template-columns:1fr;gap:12px}.onboarding-orientation-actions{width:100%}.onboarding-orientation-actions .primary-btn,.onboarding-orientation-actions .secondary-btn{flex:1;min-width:105px}.onboarding-orientation-grid{grid-template-columns:1fr}.onboarding-orientation-head{flex-direction:column}.onboarding-orientation-board .card-head{align-items:flex-start}}
