/* Final screen composition. Operational layout, data and integrations are owned
   by existing modules; these rules only refine presentation and touch targets. */
@media screen {
  body {
    --ink:var(--crm-text);--muted:var(--crm-muted);--line:var(--crm-line);
    --green:var(--crm-gold);--central-black:var(--crm-bg);--central-charcoal:var(--crm-card);
    --central-gold:var(--crm-gold);--central-champagne:var(--crm-beige);--central-paper:var(--crm-card);
    background:var(--crm-bg);color:var(--crm-text);color-scheme:dark;
    font-family:"Malgun Gothic","Apple SD Gothic Neo",system-ui,sans-serif;
    font-variant-numeric:tabular-nums;line-height:1.6;
  }
  body .workspace,body:is(.home-active,.full-org-active) .workspace,body:has(#orgView:not([hidden])) .workspace { background:var(--crm-bg); }
  body .app-nav { background:var(--crm-bg);border-color:var(--crm-line-soft); }
  body .app-nav .brand-name { color:var(--crm-text);letter-spacing:1.8px; }
  body .app-nav :is(.brand small,.nav-caption,.motto-label) { color:var(--crm-muted); }
  body .app-nav nav button { color:var(--crm-muted);gap:10px;min-height:44px;border-radius:var(--crm-control-radius);font-size:13px;line-height:1.45; }
  body .app-nav nav button span { color:inherit; }
  body .app-nav nav button:hover { background:var(--crm-card);color:var(--crm-text); }
  body .app-nav nav button.active { background:var(--crm-gold-soft);color:var(--crm-text);border-color:var(--crm-gold-line);box-shadow:inset 2px 0 var(--crm-gold);animation:none; }
  body .app-nav nav button.active span { color:var(--crm-gold); }
  body .app-nav :is(.nav-note,.nav-note p,.nav-bottom>div) { color:var(--crm-muted);border-color:var(--crm-line-soft); }
  body .app-nav .nav-note b { color:var(--crm-beige); }
  body .workspace>.app-topbar { background:var(--crm-card);border-color:var(--crm-line-soft);box-shadow:none; }
  body :is(.topbar-central b,.topbar-brand b,.topbar-brand b span) { color:var(--crm-text); }
  body .compact-toolbar h1 { color:var(--crm-text);letter-spacing:-.7px; }
  body :is(.compact-toolbar>p,.workspace>footer,.developer-credit,.brand-quote) { color:var(--crm-muted); }
  body .compact-toolbar .eyebrow { color:var(--crm-beige); }
  body .stats .stat { background:var(--crm-card);border-color:var(--crm-line);box-shadow:none;color:var(--crm-muted);border-radius:var(--crm-radius); }
  body .stats .stat:nth-child(2) { background:var(--crm-navy); }
  body .stats .stat strong { color:var(--crm-text); }
  body .stats .stat:first-child strong { color:var(--crm-gold); }
  body .stats .stat i { color:var(--crm-muted); }
  body .stats .stat span { color:var(--crm-muted) !important; }
  body #goalsView #monthlyGoals .goal-incentive>span { color:var(--crm-beige); }
  body #tableView .table-heading { background:var(--crm-card);border-color:var(--crm-line); }
  body #tableView .table-heading :is(b,strong) { color:var(--crm-text); }
  body #tableView .table-heading span { color:var(--crm-muted); }
  body #tableView #resultCount { background:var(--crm-raised);color:var(--crm-muted); }
  body :is(.target-unified-heading,.recruit-heading,.collection-heading,.med-head,.inc-heading,.sit-heading) { background:var(--crm-navy);border-color:var(--crm-line);box-shadow:none;border-radius:var(--crm-radius); }
  body :is(.target-unified-heading,.recruit-heading,.collection-heading,.med-head,.inc-heading,.sit-heading) h2 { color:var(--crm-text); }
  body :is(.target-unified-heading,.recruit-heading,.collection-heading,.med-head,.inc-heading,.sit-heading) p { color:var(--crm-muted); }
  body :is(dialog,.workspace) :is(button.primary,button.db-primary,button.inc-primary,button.ca-primary),
  body :is(#add,#fullOrgAdd,#hbNoticeAdd):not(:disabled),body #fullOrgView .fog-head-actions .fog-add:not(:disabled) {
    background:var(--crm-gold) !important;color:var(--crm-bg) !important;border-color:var(--crm-gold) !important;box-shadow:none !important;
  }
  body :is(dialog,.workspace,.nav-bottom,#centralAccessGate) button:disabled {
    background:var(--crm-raised) !important;color:var(--crm-muted) !important;border-color:var(--crm-line) !important;box-shadow:none !important;opacity:1;
  }
  body :is(button,input,select,textarea) { font-family:inherit; }
  body :is(button,a):focus-visible { outline:2px solid var(--crm-gold);outline-offset:3px; }
  body :is(dialog,#centralMobileMenu) { border-color:var(--crm-line);box-shadow:var(--crm-shadow); }
  body dialog::backdrop { background:var(--crm-overlay);backdrop-filter:blur(3px); }
  body #centralMobileMenu { background:var(--crm-bg); }
  body #centralMobileMenuToggle { background:var(--crm-card);color:var(--crm-text);border-color:var(--crm-line); }
  body #centralMobileMenu :is(h2,.cmm-title) { color:var(--crm-text); }
  body #centralMobileMenu .cmm-item { background:var(--crm-card);color:var(--crm-text);border-color:var(--crm-line); }
  body #centralMobileMenu .cmm-item[aria-current="page"],body #centralMobileMenu .cmm-item.active { background:var(--crm-navy);color:var(--crm-gold);border-color:var(--crm-gold-line); }
  body #customerTable tbody tr:hover :is(td,.name-cell),body #customerTable tr[aria-selected="true"] td { background:var(--crm-navy); }
  body #customerTable :is(td.status-red,td.status-red .status-label,td.status-red .name-link) { color:var(--crm-danger-text); }
  body #customerTable :is(td.status-yellow,td.status-yellow .status-label) { color:var(--crm-gold); }
  body #customerTable td.status-yellow,body #customerTable td.name-cell.status-yellow { background:var(--crm-gold-soft) !important; }
  body #customerTable td.status-yellow .name-link { background:transparent !important;color:var(--crm-gold) !important; }
  body #customerTable td.status-red,body #customerTable td.name-cell.status-red { background:var(--crm-danger-bg) !important; }
  body #customerTable td.status-red .name-link { background:transparent !important;color:var(--crm-danger-text) !important; }
  body #customerTable .memo { color:var(--crm-muted); }
  body #customerTable .mini-btn { background:var(--crm-raised);color:var(--crm-text);border-color:var(--crm-line); }
  body #customerTable .mini-btn.target-add { background:var(--crm-navy) !important;color:var(--crm-beige) !important;border-color:var(--crm-gold-line) !important; }
  body #collectionView .collection-entry:not(.settled) .collection-money { color:var(--crm-danger-text) !important; }
  body #collectionView .collection-entry.settled .collection-money { color:var(--crm-success-text) !important; }
  body :is(#customerTable,#record) :is(.badge-green,.ta-toggle.done) { background:var(--crm-success-bg);color:var(--crm-success-text);border-color:var(--crm-success); }
  body :is(#customerTable,#record) :is(.badge-neutral,.ta-toggle:not(.done)) { background:var(--crm-raised);color:var(--crm-muted);border-color:var(--crm-line); }
  body :is(#customerTable,#record) .keyman-badge { background:var(--crm-gold-soft);color:var(--crm-gold);border-color:var(--crm-gold-line); }
  body #mapView .customer.active { background:var(--crm-navy); }
  body #mapView .customer b { color:var(--crm-text); }
  body #mapView .pin span { color:var(--crm-bg); }
  body #mapView .list-head h3 { color:var(--crm-text); }
  body #mapView #mapstatus { color:var(--crm-muted); }
  body #mapView nav .selected { background:var(--crm-navy);color:var(--crm-gold); }
  /* Remove decorative light trails, stars and neon. The small emblem retains a
     slow opacity change controlled by the existing screen-effects button. */
  body .workspace::before,body .app-nav::after,body .app-topbar::after,
  body :is(.target-unified-heading,.recruit-heading,.collection-heading,.med-head,.inc-heading,.sit-heading)::after,
  body :is(#homeBoard,#orgView,#fullOrgView,#activityPerformanceView) .crm-scene::before,
  body :is(#homeBoard,#orgView,#fullOrgView,#activityPerformanceView) .crm-scene::after,
  body .crm-scene-visual::before,body .crm-scene-visual::after,
  body .crm-orbit,body .crm-spark,
  body #homeBoard :is(.hb-period,.hb-rank-card,.hb-honors,.hb-kmi)::before,
  body #homeBoard :is(.hb-rank-card,.hb-honors,.hb-kmi)::after,
  body #homeBoard .hb-rank-row::after,
  body #fullOrgView .fog-board::after,body #fullOrgView .fog-card::before { display:none; }
  body :is(#homeBoard,#orgView,#fullOrgView,#activityPerformanceView) .crm-scene-visual { width:136px;height:136px;right:28px;transform:translateY(-50%);opacity:.85; }
  body .crm-emblem { inset:10%;border-radius:22px;border:1px solid var(--crm-gold-line);background:var(--crm-card);color:var(--crm-text);box-shadow:none;transform:none;animation:none; }
  body .crm-emblem-mark { color:var(--crm-gold);font-size:58px;letter-spacing:-2px;text-shadow:none; }
  body .crm-emblem-word { color:var(--crm-muted);font-size:8px;letter-spacing:2px; }
  body.crm-motion-on .crm-emblem { animation:crm-premium-breathe 10s ease-in-out infinite alternate; }
  body.crm-motion-off .crm-emblem { animation:none; }
  body #homeBoard .hb-crown,body #fullOrgView .fog-port { animation:none !important;filter:none;box-shadow:none; }
  body #fullOrgView :is(.fog-wire-shadow,.fog-current-aura) { display:none; }
  body #fullOrgView .fog-scroll.fog-map { animation:none !important;background:var(--crm-bg); }
  body #homeBoard .hb-crown { color:var(--crm-gold); }
  body #homeBoard .hb-period-badge.hb-live::before { background:var(--crm-success);box-shadow:none; }
  body #orgView .org-heading { min-height:190px;padding:26px 28px 52px;gap:14px; }
  body #orgView .org-heading h2 { font-size:36px;letter-spacing:-1px;margin:8px 0; }
  body #homeBoard .hb-heading.crm-scene { min-height:176px;padding:26px 30px 50px; }
  body #homeBoard .hb-heading.crm-scene h2 { font-size:34px;letter-spacing:-1px;line-height:1.25;margin:10px 0 0; }
  body :is(#homeBoard,#orgView,#fullOrgView,#activityPerformanceView) .crm-motion-toggle { min-height:36px;right:20px;bottom:12px; }
  @keyframes crm-premium-breathe { from{opacity:.7}to{opacity:1} }
}
@media screen and (max-width:650px) {
  body :is(#homeBoard,#orgView,#fullOrgView,#activityPerformanceView) .crm-scene-visual { display:none; }
  body :is(#orgView .org-heading>div:first-child,#orgView .org-heading-actions,#fullOrgView .fog-board-head>div:first-child,#fullOrgView .fog-head-actions) { max-width:100%; }
  body #orgView .org-heading { padding:20px 18px 58px;min-height:180px; }
  body #orgView .org-heading h2 { font-size:28px; }
  body #homeBoard .hb-heading.crm-scene { min-height:156px;padding:20px 18px 52px; }
  body #homeBoard .hb-heading.crm-scene h2 { font-size:28px; }
  body :is(.actions,dialog,.nav-bottom) button { min-height:44px; }
  body :is(dialog,.workspace) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { font-size:16px; }
}
@media screen and (prefers-reduced-motion:reduce) {
  body.crm-motion-on .crm-emblem { animation:none; }
  body #fullOrgView :is(.fog-current,.fog-current-core,.fog-current-aura) { animation:none; }
  body :is(#homeBoard,#orgView,#fullOrgView,#activityPerformanceView).crm-showcase-enter { animation:none; }
}
