*{box-sizing:border-box;margin:0;padding:0}
html,body{overscroll-behavior:none}
/* overflow-x:hidden on html only — putting it on body too creates a nested
   scroll container that traps wheel events on body's content (body has no
   overflowing content of its own, so wheel hits a "scroll container" with
   nothing to scroll and stops there). The right-side scrollbar still works
   because it drives html's scroll directly. Symptom: page scrolls via
   scrollbar drag but not via mousewheel/trackpad over the content area. */
html{background:#0f172a;overflow-x:hidden}
/* Dedicated dark column behind the sidebar — guaranteed to paint to the visible
   viewport's bottom on every device. body's background-attachment:fixed gradient
   sometimes paints against ios safari's layout viewport (not visual), leaving a
   white gap below the sidebar when its --vv-height lags. This pseudo is itself
   position:fixed with bottom:0 + height:var(--vv-height) so it tracks the
   visualViewport directly. Width follows --sb-width (collapsed/hidden states). */
body::before{content:'';position:fixed;left:0;top:0;bottom:0;width:var(--sb-width);background:#0f172a;z-index:0;pointer-events:none}
body{font-family:'DM Sans',sans-serif;background:linear-gradient(to right,#0f172a 0,#0f172a var(--sb-width),#f1f5f9 var(--sb-width),#f1f5f9 100%) fixed;color:#1a1a2e;min-height:100vh;min-height:100dvh;padding-top:calc(var(--header-h, calc(var(--sb-top) + env(safe-area-inset-top, 0px))) + var(--dealbar-h, 0px))}
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}
input[type=number]{-moz-appearance:textfield}
::selection{background:#2196F3;color:#fff}
.header{background:#0f172a;border-bottom:1px solid #334155;padding:12px 16px 12px 0;padding-top:calc(12px + env(safe-area-inset-top, 0px));position:fixed;top:var(--vv-top, 0px);left:0;right:0;z-index:100;box-shadow:0 1px 3px rgba(0,0,0,0.3)}
.header-row{max-width:none;margin:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#dealBar{position:fixed;top:calc(var(--vv-top, 0px) + var(--header-h, 60px) - 1px);left:calc(var(--sb-width) - 1px);right:0;z-index:95;background:#0f172a;border-top:1px solid #334155;border-left:1px solid #334155;border-bottom:2px solid #DC2626;padding:var(--db-pad-y,12px) var(--db-pad-x,16px);overflow:hidden;transition:left .18s ease}
.brand{flex-shrink:0;display:flex;align-items:center;font-size:22px;font-weight:800;letter-spacing:-0.02em;white-space:nowrap;gap:6px}
.brand-logo{width:60px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.brand-logo img{height:36px;border-radius:4px;display:block}
.brand .b{color:#38BDF8}.brand .r{color:#EF4444}
.controls{flex:1;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.hdr-icon-btn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:1px solid #374151;color:#fff;cursor:pointer;padding:0;position:relative;-webkit-tap-highlight-color:transparent;transition:transform .15s,border-color .15s;flex-shrink:0}
.hdr-icon-btn:hover{transform:scale(1.05);border-color:#38BDF8}
.user-menu{position:relative}
#userAvatarBtn{display:none;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:2px solid #374151;background:#1a1a2e;color:#fff;font-family:'DM Sans';font-size:13px;font-weight:700;cursor:pointer;padding:0;overflow:hidden;-webkit-tap-highlight-color:transparent;transition:border-color .15s,transform .15s}
#userAvatarBtn:hover{border-color:#38BDF8;transform:scale(1.05)}
#userAvatarBtn img{width:100%;height:100%;object-fit:cover;display:block}
#userMenuDropdown{position:absolute;top:calc(100% + 8px);right:0;min-width:180px;background:#0f172a;border:1px solid #334155;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,0.5);padding:6px;z-index:200;flex-direction:column;gap:2px}
#userMenuDropdown[style*="block"]{display:flex !important}
#userMenuDropdown button{background:transparent;border:0;color:#cbd5e1;font-family:'DM Sans';font-size:13px;font-weight:600;text-align:left;padding:9px 12px;border-radius:6px;cursor:pointer;display:flex;align-items:center;gap:10px;transition:background .15s,color .15s;white-space:nowrap}
#userMenuDropdown button:hover{background:rgba(255,255,255,0.05);color:#fff}
#userMenuDropdown button svg{flex-shrink:0;color:#94a3b8}
#userMenuDropdown button:hover svg{color:#38BDF8}
.mkt-row{display:flex;gap:3px}
.mkt-btn{font-family:'DM Sans';font-size:10px;font-weight:700;letter-spacing:0.04em;background:transparent;color:#6b7280;border:1px solid #e5e7eb;border-radius:5px;padding:6px 10px;cursor:pointer}
.mkt-btn.active{background:#EF4444;color:#fff;border-color:#EF4444}
.admin-btn{font-family:'DM Sans';font-size:14px;background:transparent;border:1px solid #e5e7eb;border-radius:5px;padding:5px 10px;cursor:pointer;color:#6b7280}
.admin-btn.on{font-size:11px;font-weight:700;background:rgba(239,68,68,0.1);color:#ef4444;border-color:rgba(239,68,68,0.3)}
.role-selector{display:flex;gap:4px}
@keyframes pulse{0%,100%{opacity:0.6}50%{opacity:1}}
@keyframes progressSlide{0%{width:5%;margin-left:0}50%{width:40%;margin-left:30%}100%{width:5%;margin-left:95%}}
@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
@keyframes redFlagPulse{0%,100%{border-color:rgba(239,68,68,0.4);box-shadow:0 0 8px rgba(239,68,68,0.15)}50%{border-color:rgba(239,68,68,0.9);box-shadow:0 0 16px rgba(239,68,68,0.35)}}
.red-flag{border:2px solid rgba(239,68,68,0.6);animation:redFlagPulse 1.5s ease-in-out infinite;border-radius:10px;padding:14px 18px;background:rgba(239,68,68,0.04)}
.approved-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:6px;background:rgba(22,163,106,0.1);border:1px solid rgba(22,163,106,0.25);color:#16a34a;font-size:12px;font-weight:700}
.rejected-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:6px;background:rgba(239,68,68,0.08);border:1px solid rgba(239,68,68,0.2);color:#ef4444;font-size:12px;font-weight:700}
.admin-prompt{max-width:1000px;margin:8px auto 0;display:flex;gap:6px}
.admin-prompt input{font-family:'DM Sans';font-size:13px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:5px;color:#1a1a2e;padding:7px 12px;width:200px;outline:none}
.admin-prompt button{font-family:'DM Sans';font-size:14px;background:#EF4444;color:#fff;border:none;border-radius:5px;padding:7px 14px;cursor:pointer}
.tab-row{display:flex;gap:4px;flex-wrap:wrap;padding:4px 8px}
.tab{font-family:'DM Sans';font-size:13px;font-weight:700;background:#0EA5E9;color:#fff;border:2px solid #0EA5E9;border-radius:10px;padding:10px 18px;cursor:pointer;transition:all .2s;min-width:fit-content;text-transform:uppercase;letter-spacing:0.02em}
.tab.active{background:#0284C7;color:#fff;border-color:#0284C7;box-shadow:0 2px 8px rgba(14,165,233,0.3)}
:root{--sb-width:180px;--sb-top:60px}
body.sb-collapsed{--sb-width:60px}
body.sb-hidden{--sb-width:0px}
.app-layout{max-width:none;margin:0;padding-left:var(--sb-width);transition:padding-left .18s ease;display:flex;gap:0}
.sidebar{display:flex;flex-direction:column;position:fixed;left:0;top:0;bottom:0;width:var(--sb-width);background:#0f172a;border-right:1px solid #334155;z-index:90;overflow:hidden;transition:width .18s ease;padding-top:var(--header-h, calc(var(--sb-top) + env(safe-area-inset-top, 0px)));padding-bottom:env(safe-area-inset-bottom, 0px);touch-action:none;overscroll-behavior:contain}
body.bb-visible .sidebar{bottom:calc(64px + env(safe-area-inset-bottom, 0px))}
body.sb-hidden .sidebar{display:none}
.sidebar-top{padding:12px 8px;border-bottom:1px solid #334155;display:flex;flex-direction:column;align-items:center;gap:10px;flex-shrink:0}
.sb-home-btn{background:#DC2626;color:#fff;border:none;border-radius:10px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px rgba(220,38,38,0.3);transition:transform .15s,background .15s}
.sb-home-btn:hover{background:#b91c1c;transform:scale(1.05)}
.sidebar-mid{flex:1;overflow-y:auto;overflow-x:hidden;padding:8px 0;min-height:0;touch-action:pan-y;overscroll-behavior:contain}
.sidebar-mid::-webkit-scrollbar{width:3px;height:0}.sidebar-mid::-webkit-scrollbar-thumb{background:#334155;border-radius:3px}
.sidebar.collapsed{overflow:visible}
.sidebar.collapsed .sidebar-mid{overflow:visible;touch-action:none}
.sidebar-bottom{padding:8px;border-top:1px solid #334155;flex-shrink:0}
.sidebar .tab-row{flex-direction:column;flex-wrap:nowrap;padding:0;gap:3px}
.sidebar .tab{background:transparent;color:#cbd5e1;border:0;text-align:left;padding:9px 12px 9px 20px;font-size:12px;font-weight:700;border-radius:0;display:flex;align-items:center;gap:10px;cursor:pointer;text-transform:none;letter-spacing:normal;transition:background .15s,color .15s}
.sidebar .tab:hover{background:rgba(255,255,255,0.05);color:#fff}
.sidebar .tab.active{background:transparent;color:#38BDF8;border-color:transparent}
.sidebar .tab.sb-cat.active{color:#fff;background:transparent}
.sidebar .tab.sb-cat.active .sb-ic{color:#38BDF8}
.sidebar .tab .sb-ic{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:15px;line-height:1;color:#cbd5e1}
.sidebar .tab .sb-ic svg{width:18px;height:18px;display:block}
.sidebar .tab:hover .sb-ic{color:#fff}
.sidebar .tab .sb-lbl{overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1;white-space:nowrap}
.sb-grouplbl{font-size:9px;font-weight:800;color:#64748b;letter-spacing:0.1em;padding:10px 12px 4px 20px;text-transform:uppercase}
.sb-chev{margin-left:auto;font-size:11px;color:#64748b;line-height:1}
.sb-divider{height:1px;background:#334155;margin:6px 0 8px}
.sidebar .tab.sb-home:not(.active) .sb-ic{color:#FACC15}
.sb-cat-wrap{position:relative}
.sb-sublist{display:none;flex-direction:column;gap:1px;padding:2px 0 4px 0;border-left:1px solid #334155;margin:0 0 4px 22px}
.sb-sublist.expanded{display:flex}
.sb-flyout-title{display:none}
.sidebar .tab.sb-subitem{padding:6px 8px 6px 10px;font-size:11px;font-weight:500;color:#94a3b8;background:transparent;border-color:transparent;border-radius:0;display:flex;align-items:center;gap:6px}
.sidebar .tab.sb-subitem:hover{color:#fff;background:rgba(255,255,255,0.04)}
.sidebar .tab.sb-subitem.active{background:rgba(56,189,248,0.10);color:#38BDF8;border-color:rgba(56,189,248,0.25)}
.sb-empty{padding:6px 10px;font-size:11px;color:#64748b;font-style:italic}
.sb-bookmark{margin-left:auto;padding:2px 4px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;color:#94a3b8;border-radius:4px;line-height:1;transition:opacity .12s,color .12s,background .12s}
.sb-bookmark:hover{color:#38BDF8;background:rgba(56,189,248,0.12)}
.sb-subitem:hover .sb-bookmark{opacity:1}
.sb-bookmark.sb-bookmarked{opacity:1;color:#38BDF8}
.sidebar.collapsed .sb-chev{display:none}
/* Collapsed flyout: position:fixed so it can vertically center on the cat icon
   and escape sidebar bounds. Top/left are set by _positionSbFlyout in JS;
   left:calc(var(--sb-width) + 8px) is just a safe fallback before JS runs. */
.sidebar.collapsed .sb-sublist{display:none;position:fixed;top:var(--sb-top);left:calc(var(--sb-width) + 8px);min-width:220px;max-width:280px;background:#0f172a;border:1px solid #334155;border-radius:10px;padding:10px 8px;box-shadow:0 8px 24px rgba(0,0,0,0.5);z-index:200;margin:0;overflow-y:auto;overscroll-behavior:contain}
.sidebar.collapsed .sb-sublist::-webkit-scrollbar{width:4px;height:0}
.sidebar.collapsed .sb-sublist::-webkit-scrollbar-thumb{background:#334155;border-radius:3px}
/* Hover bridge across the sidebar→menu gap. position:fixed (not absolute) so
   (a) the menu's overflow-y:auto can't scroll it away with the content, and
   (b) JS can size it to cover the *union* of the icon row + menu row — without
   that, when the menu gets clamped to the viewport edge it ends up vertically
   offset from the icon and a horizontal slice across the icon row has no
   bridge, so cursor leaving the icon at that row drops :hover. */
.sidebar.collapsed .sb-sublist::before{content:'';position:fixed;left:var(--sb-bridge-left,0);top:var(--sb-bridge-top,0);width:var(--sb-bridge-w,0);height:var(--sb-bridge-h,0);z-index:200}
/* Hover-open only on real-pointer devices. On touch, :hover sticks after tap
   and would re-show the flyout the JS just closed via _toggleSbCat. */
@media (hover: hover) and (pointer: fine){
  .sidebar.collapsed .sb-cat-wrap:hover .sb-sublist{display:flex;flex-direction:column}
}
.sidebar.collapsed .sb-cat-wrap.sb-flyout-pinned .sb-sublist{display:flex;flex-direction:column}
.sidebar.collapsed .sb-flyout-title{display:block;font-size:13px;font-weight:800;color:#fff;padding:4px 10px 8px;border-bottom:1px solid #334155;margin-bottom:6px;letter-spacing:0.02em}
.sidebar.collapsed .sb-sublist .tab.sb-subitem{padding:7px 10px;font-size:12px}
/* Flyout subitem labels — sidebar.collapsed hides .sb-lbl globally; re-show inside the flyout so menu text isn't blank */
.sidebar.collapsed .sb-sublist .sb-lbl{display:inline-block;color:#cbd5e1;white-space:nowrap}
.sidebar.collapsed .sb-sublist .tab.sb-subitem.active .sb-lbl{color:#38BDF8}
/* Only one flyout open at a time: when one is pinned, suppress hover-opens on other categories (real-pointer only) */
@media (hover: hover) and (pointer: fine){
  .sidebar.collapsed:has(.sb-cat-wrap.sb-flyout-pinned) .sb-cat-wrap:not(.sb-flyout-pinned):hover .sb-sublist{display:none !important}
}
.sb-toggle{cursor:pointer;width:100%;padding:8px 10px;background:transparent;border:1px solid #334155;color:#94a3b8;font-family:'DM Sans',sans-serif;font-size:11px;font-weight:700;display:flex;align-items:center;gap:8px;border-radius:8px;letter-spacing:0.04em;justify-content:center}
.sb-toggle:hover{background:rgba(255,255,255,0.05);color:#fff}
.sb-toggle-icon{display:inline-block;width:14px;text-align:center;font-size:14px;line-height:1}
.sidebar:not(.collapsed) .sb-toggle-icon::before{content:"\00ab"}
.sidebar.collapsed .sb-toggle-icon::before{content:"\00bb"}
.sidebar.collapsed .sb-lbl,.sidebar.collapsed .sb-grouplbl,.sidebar.collapsed .sb-toggle-text,.sidebar.collapsed .sb-back-text,.sidebar.collapsed .sb-subnav{display:none}
.sidebar.collapsed .tab{align-items:center !important;width:100% !important;box-sizing:border-box !important}
.sidebar.collapsed .tab .sb-ic{margin:0 !important}
.sb-cat-wrap{position:relative;width:100%;display:block}
.sidebar.collapsed .sb-home-btn{width:36px;height:36px}
.sidebar.collapsed .sb-primary{border-bottom:0;padding-bottom:0}
.main{flex:1;min-width:0;padding:16px 16px calc(60px + env(safe-area-inset-bottom, 0px));max-width:1200px;margin:0 auto;width:100%}
.mobile-tabs{display:none !important}
@media(max-width:767px){.mobile-tab-dropdown{display:block;width:100%;padding:10px 14px;font-size:13px;font-weight:700;font-family:'DM Sans',sans-serif;background:#fff;color:#1a1a2e;border:1px solid #e5e7eb;border-radius:8px;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%236b7280' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}}
/* Deal banner mobile compaction — overrides inline styles set in app-main.js */
@media(max-width:767px){
  #dealBar{padding:6px 10px !important}
  #dealBar > div{gap:6px !important}
  #dealBar > div > div:first-child > div:first-child{font-size:13px !important;line-height:1.15 !important;margin-bottom:2px !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #dealBar > div > div:first-child > div:nth-child(2){gap:5px !important}
  #dealBar > div > div:first-child > div:nth-child(2) > span{font-size:9px !important;padding:1px 5px !important}
  #dealBar button{font-size:10px !important;padding:4px 8px !important}
}
/* ────────── Unified tile system ──────────
   Cap is 3 columns. Drops to 2 then 1 as available width shrinks. Both the
   legacy .home-tile-grid and the new .kc-tile-grid get identical behavior, so
   the home page (3 → 2) pattern replicates across every page that adopts the
   class. Font sizes inside tiles are clamped to a minimum of 12pt (16px). */
:root { --tile-cols: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { :root { --tile-cols: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { :root { --tile-cols: minmax(0, 1fr); } }
/* iPhone with expanded sidebar: drop further since the content area is ~213px */
@media (max-width: 767px) {
  body:not(.sb-collapsed):not(.sb-hidden) { --tile-cols: minmax(0, 1fr); }
}

.home-tile-grid, .kc-tile-grid {
  display: grid !important;
  grid-template-columns: var(--tile-cols) !important;
  gap: clamp(8px, 1.5vw, 12px) !important;
}

/* Tile padding scales with viewport so tiles don't waste space on mobile */
.home-tile-grid > div, .home-tile-grid > a,
.kc-tile-grid > div, .kc-tile-grid > a {
  padding: clamp(10px, 2vw, 24px) clamp(8px, 1.5vw, 16px) !important;
}

/* Tile content fonts — minimum 12pt (16px) on labels; scaled to viewport */
.home-tile-grid div[style*="font-size:16px"],
.kc-tile-grid div[style*="font-size:16px"] { font-size: clamp(16px, 2.5vw, 18px) !important; }
.home-tile-grid div[style*="font-size:15px"],
.kc-tile-grid div[style*="font-size:15px"] { font-size: clamp(16px, 2.4vw, 18px) !important; }
.home-tile-grid div[style*="font-size:14px"],
.kc-tile-grid div[style*="font-size:14px"] { font-size: clamp(16px, 2.4vw, 18px) !important; }
.home-tile-grid div[style*="font-size:13px"],
.kc-tile-grid div[style*="font-size:13px"] { font-size: clamp(16px, 2.2vw, 17px) !important; }
.home-tile-grid div[style*="font-size:11px"],
.kc-tile-grid div[style*="font-size:11px"] { font-size: clamp(13px, 1.8vw, 14px) !important; }
.home-tile-grid div[style*="font-size:32px"],
.kc-tile-grid div[style*="font-size:32px"] { font-size: clamp(28px, 5vw, 36px) !important; }
.home-tile-grid div[style*="font-size:28px"],
.kc-tile-grid div[style*="font-size:28px"] { font-size: clamp(24px, 4vw, 32px) !important; }

/* Generic responsive drop for non-tile multi-col grids on iPhone with expanded
   sidebar — keeps form layouts usable in the 213px content area. Tile grids are
   excluded because they're already handled above by --tile-cols. */
@media(max-width:767px){
  body:not(.sb-collapsed):not(.sb-hidden) [style*="grid-template-columns:repeat(2,minmax"]:not(.home-tile-grid):not(.kc-tile-grid){
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body:not(.sb-collapsed):not(.sb-hidden) [style*="grid-template-columns:repeat(3,minmax"]:not(.home-tile-grid):not(.kc-tile-grid){
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
.card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:20px;margin-bottom:14px;box-shadow:0 1px 3px rgba(0,0,0,0.04)}
.card-title{font-size:16px;font-weight:700;color:#1a1a2e;margin-bottom:14px}
.label{font-size:10px;font-weight:700;color:#6b7280;text-transform:uppercase;letter-spacing:0.06em;margin-bottom:4px;display:block}
.text-input{font-family:'DM Sans';font-size:13px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;color:#1a1a2e;padding:8px 10px;width:100%;outline:none}
.textarea-input{font-family:'DM Sans';font-size:13px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;color:#1a1a2e;padding:8px 10px;width:100%;outline:none;resize:vertical;min-height:60px}
.num-input{font-family:'IBM Plex Mono';font-size:14px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;color:#38BDF8;padding:8px 10px;width:100px;text-align:left;outline:none}
.prop-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.span2{grid-column:span 2}
.lead-row{display:flex;gap:4px}
.lead-btn{font-family:'DM Sans';font-size:11px;font-weight:700;background:#f9fafb;border:1px solid #e5e7eb;border-radius:5px;color:#6b7280;padding:8px 12px;cursor:pointer;flex:1}
.lead-btn.self{background:rgba(220,38,38,0.08);border-color:#DC2626;color:#DC2626}
.lead-btn.co{background:rgba(239,68,68,0.08);border-color:#EF4444;color:#EF4444}
.pkg-row{display:flex;gap:12px;margin-bottom:16px}
.pkg-btn{flex:1;background:#f9fafb;border:2px solid #38BDF8;border-radius:10px;padding:16px;cursor:pointer;text-align:center}
.pkg-btn.sel-blue{background:#f0f9ff;border-color:#38BDF8;box-shadow:0 0 0 2px #38BDF8}
.pkg-btn.sel-red{background:#f0f9ff;border-color:#38BDF8;box-shadow:0 0 0 2px #38BDF8}
.pkg-btn.sel-metal{background:#f0f9ff;border-color:#38BDF8;box-shadow:0 0 0 2px #38BDF8}
.pkg-name-blue{color:#38BDF8;font-weight:700;font-size:15px}
.pkg-name-red{color:#38BDF8;font-weight:700;font-size:15px}
.pkg-item-num{font-size:24px;font-weight:800;color:#1a1a2e;font-family:'IBM Plex Mono';margin:6px 0}
.meas-grid{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.meas-block{flex:1;min-width:120px}
.sq-breakdown{background:#f9fafb;border-radius:8px;padding:12px 16px;margin-bottom:0;border:1px solid #e5e7eb}
.sq-bk-row{display:flex;justify-content:space-between;padding:4px 0;font-size:12px;color:#6b7280;font-family:'IBM Plex Mono'}
.base-row{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:16px 0 0;border-top:1px solid #e5e7eb}
.sq-big{font-size:28px;font-weight:800;color:#DC2626;font-family:'IBM Plex Mono'}
.sell-input{font-family:'IBM Plex Mono';font-size:20px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;color:#16a34a;padding:8px 10px;width:120px;text-align:left;outline:none}
.section-head{font-size:11px;font-weight:800;color:#6b7280;letter-spacing:0.06em;margin:16px 0 8px;padding-left:10px;border-left:3px solid}
.line-row{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid #e5e7eb;flex-wrap:wrap}
.item-num{font-family:'IBM Plex Mono';font-size:11px;font-weight:600;color:#0EA5E9;background:rgba(14,165,233,0.06);border-radius:4px;padding:4px 8px;min-width:72px;text-align:center}
.line-label{flex:1;font-size:13px;color:#4b5563;min-width:120px}
.line-qty{font-family:'IBM Plex Mono';font-size:13px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:5px;color:#1a1a2e;padding:6px 8px;width:56px;text-align:left;outline:none}
.auto-qty{font-family:'IBM Plex Mono';font-size:13px;background:rgba(14,165,233,0.06);border:1px solid rgba(14,165,233,0.25);border-radius:5px;color:#38BDF8;padding:6px 8px;width:56px;text-align:left;font-weight:600}
.auto-tag{font-size:8px;font-weight:700;color:#38BDF8;margin-left:4px;vertical-align:super}
.line-unit{font-size:10px;font-weight:700;color:#6b7280;width:40px}
.line-at{font-size:12px;color:#9ca3af}
.line-dollar{font-size:12px;color:#6b7280}
.line-sell{font-family:'IBM Plex Mono';font-size:13px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:5px;color:#16a34a;padding:6px 8px;width:80px;text-align:left;outline:none}
.line-total{font-family:'IBM Plex Mono';font-size:13px;color:#6b7280;width:90px;text-align:right}
.admin-cost{font-family:'IBM Plex Mono';font-size:11px;color:#ef4444;width:100px;text-align:right}
.comm-grid{display:flex;gap:24px;flex-wrap:wrap}
.comm-line{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #e5e7eb;font-size:14px;font-family:'IBM Plex Mono'}
.comm-box{background:linear-gradient(135deg,rgba(220,38,38,0.06),rgba(14,165,233,0.04));border:1px solid rgba(220,38,38,0.15);border-radius:14px;padding:32px 40px;text-align:center;min-width:260px;display:flex;flex-direction:column;align-items:center;justify-content:center}
.divider{height:1px;background:#e2e4e9;margin:8px 0}
.draw-row{display:flex;gap:10px;flex-wrap:wrap}
.draw-card{flex:1;min-width:160px;border:2px solid #e5e7eb;border-radius:10px;padding:16px;text-align:center}
.draw-badge{color:#fff;padding:6px 14px;border-radius:5px;font-weight:700;font-size:13px;display:inline-block;margin-bottom:8px}
.summary-line{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #e5e7eb;font-size:14px;font-family:'IBM Plex Mono'}
.admin-box{margin-top:20px;padding:16px;background:rgba(239,68,68,0.05);border-radius:10px;border:1px solid rgba(239,68,68,0.15)}
.profit-box{margin-top:12px;padding:16px;background:rgba(56,189,248,0.05);border-radius:10px;border:1px solid rgba(56,189,248,0.15)}
.wo-header{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:16px;padding-bottom:16px;border-bottom:1px solid #e5e7eb;margin-bottom:16px}
.wo-row{display:flex;justify-content:space-between;padding:6px 10px;font-size:13px;font-family:'IBM Plex Mono';border-bottom:1px solid #e5e7eb}
.wo-row:nth-child(odd){background:#f9fafb}
.wo-item{color:#4b5563}.wo-val{color:#1a1a2e;font-weight:600;min-width:60px;text-align:right}
.wo-val.auto{color:#38BDF8}.wo-val.manual{color:#DC2626}
.wo-section{font-size:11px;font-weight:800;color:#6b7280;letter-spacing:0.06em;padding:12px 10px 6px;text-transform:uppercase}
.wo-brand{font-size:11px;font-weight:700;padding:6px 12px;border-radius:5px;display:inline-block;margin:8px 0}
.wo-brand.tamko{background:rgba(14,165,233,0.08);color:#38BDF8;border:1px solid rgba(14,165,233,0.2)}
.wo-brand.shop{background:rgba(220,38,38,0.06);color:#DC2626;border:1px solid rgba(220,38,38,0.15)}
.wo-manual-input{font-family:'IBM Plex Mono';font-size:13px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:4px;color:#DC2626;padding:4px 8px;width:60px;text-align:left;outline:none}
.wo-notes{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:14px;margin-top:12px}
.wo-notes-title{font-size:11px;font-weight:800;color:#6b7280;letter-spacing:0.06em;margin-bottom:8px;text-transform:uppercase}
.wo-cost{font-size:10px;color:#ef4444;padding:0 10px 4px;font-family:'IBM Plex Mono'}
.footer{text-align:center;font-size:11px;color:#9ca3af;padding:20px 0;border-top:1px solid #e5e7eb}
.hidden{display:none}
.cps-table{width:100%;border-collapse:collapse;font-family:'IBM Plex Mono';font-size:13px}
.cps-table th{font-family:'DM Sans';font-size:10px;font-weight:800;color:#6b7280;text-transform:uppercase;letter-spacing:0.06em;padding:8px 10px;text-align:left;border-bottom:2px solid #e5e7eb}
.cps-table th.r{text-align:right}
.cps-table td{padding:7px 10px;border-bottom:1px solid #e5e7eb;color:#4b5563}
.cps-table tr:nth-child(odd){background:#f9fafb}
.cps-table td.r{text-align:right;color:#1a1a2e;font-weight:600}
.cps-table td.proj{text-align:right;color:#38BDF8}
.cps-table td.act{text-align:right;color:#16a34a;font-weight:700}
.cps-table td.var-pos{text-align:right;color:#16a34a;font-size:11px}
.cps-table td.var-neg{text-align:right;color:#ef4444;font-size:11px}
.cps-table td.var-zero{text-align:right;color:#9ca3af;font-size:11px}
.cps-input{font-family:'IBM Plex Mono';font-size:13px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:4px;color:#16a34a;padding:5px 8px;width:60px;text-align:left;outline:none}
.cps-total-row td{border-top:2px solid #e5e7eb;font-weight:800;font-size:15px}
.sign-block{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:20px;flex:1;min-width:260px}
.sign-block.signed{border-color:rgba(56,189,248,0.4);background:rgba(56,189,248,0.04)}
.sign-title{font-size:11px;font-weight:800;color:#6b7280;text-transform:uppercase;letter-spacing:0.08em;margin-bottom:12px}
.sign-input{font-family:'DM Sans';font-size:14px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;color:#1a1a2e;padding:10px 12px;width:100%;outline:none;margin-bottom:8px}
.sign-input:disabled{opacity:0.5}
.sign-stamp{font-size:12px;color:#16a34a;font-family:'IBM Plex Mono';padding:8px 0}
.lock-btn{font-family:'DM Sans';font-size:13px;font-weight:700;border:none;border-radius:8px;padding:10px 20px;cursor:pointer;width:100%;margin-top:8px}
@media(max-width:768px){#presentOverlay [style*="grid-template-columns: 1fr 1fr 1fr"],#presentOverlay [style*="grid-template-columns:1fr 1fr 1fr"]{display:flex!important;flex-direction:column!important;gap:16px!important}#presentOverlay [style*="transform:scale(1.03)"]{transform:none!important}}
.rgb-day-bar{display:flex;gap:4px;margin-bottom:14px}
.rgb-day{flex:1;text-align:center;padding:10px 2px;border-radius:8px;font-size:12px;font-weight:800;font-family:'DM Sans';letter-spacing:0.02em;color:#6b7280;cursor:pointer;border:1px solid #e5e7eb;background:#fff;transition:all .15s}
.rgb-day.active{background:#DC2626;color:#fff;border-color:#DC2626;box-shadow:0 2px 8px rgba(220,38,38,0.25)}
.rgb-day .rgb-day-pts{display:block;font-size:10px;font-weight:700;margin-top:2px;opacity:0.8;font-family:'IBM Plex Mono'}
.rgb-tile-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}
.rgb-tile{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:12px 8px 10px;cursor:pointer;text-align:center;transition:all .15s;position:relative;overflow:hidden;user-select:none;-webkit-user-select:none;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center}
.rgb-tile:hover{border-color:#d1d5db;background:#f9fafb}
.rgb-tile:active{transform:scale(0.95)}
.rgb-tile.has-count{border-color:#DC2626;background:rgba(220,38,38,0.06)}

.rgb-tile .t-name{font-size:11px;font-weight:700;color:#1a1a2e;line-height:1.2}
.rgb-tile .t-pts{font-size:9px;color:#9ca3af;font-family:'IBM Plex Mono';margin-top:3px}
.rgb-tile.has-count .t-name{color:#DC2626}
.rgb-tile .t-count{position:absolute;top:4px;right:6px;background:#DC2626;color:#fff;font-size:9px;font-weight:800;font-family:'IBM Plex Mono';width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.rgb-tile .t-earned{position:absolute;bottom:4px;right:8px;font-size:9px;font-weight:800;color:#38BDF8;font-family:'IBM Plex Mono'}
.rgb-tile .t-auto{position:absolute;top:4px;left:4px;font-size:7px;font-weight:800;color:#38BDF8;background:rgba(56,189,248,0.12);padding:1px 4px;border-radius:3px;letter-spacing:0.04em}
.rgb-tile.auto-tile{opacity:0.6;cursor:default}
.rgb-cat-header{font-size:9px;font-weight:800;color:#9ca3af;letter-spacing:0.1em;text-transform:uppercase;padding:10px 0 4px;grid-column:1/-1}
@media(max-width:599px){.rgb-tile-grid{grid-template-columns:1fr 1fr 1fr}}
/* Scanner (Roof Intelligence) */
.sc-search{display:flex;gap:8px;margin-bottom:12px}
.sc-search input{flex:1;padding:14px 16px;font-size:15px;background:#fff;border:1px solid #e5e7eb;border-radius:10px;color:#1a1a2e;outline:none;font-family:inherit}
.sc-search input:focus{border-color:#DC2626}
.sc-search button{padding:14px 28px;font-size:15px;font-weight:700;background:linear-gradient(135deg,#DC2626,#B91C1C);color:#fff;border:none;border-radius:10px;cursor:pointer;white-space:nowrap;font-family:inherit}
.sc-search button:disabled{background:#d1d5db;color:#6b7280;cursor:wait}
.sc-prog{margin-top:8px}.sc-prog-text{font-size:12px;color:#DC2626;margin-bottom:6px}
.sc-prog-bar{width:100%;height:3px;background:#e2e4e9;border-radius:2px;overflow:hidden}
.sc-prog-fill{height:100%;background:linear-gradient(90deg,#DC2626,#EF4444);transition:width 1s linear}
.sc-error{background:#fef2f2;border:1px solid #fecaca;border-radius:10px;padding:16px;margin:16px 0}
.sc-error-text{font-size:14px;color:#dc2626}
.sc-report-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px;flex-wrap:wrap;gap:12px}
.sc-report-address{font-size:20px;font-weight:700;color:#1a1a2e}
.sc-report-meta{font-size:12px;color:#6b7280;margin-top:4px}
.sc-lead-badge{padding:8px 20px;border-radius:8px;font-weight:800;font-size:18px;letter-spacing:1px}
.sc-images{display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap}
.sc-images img{width:100%;border-radius:10px;border:1px solid #e5e7eb}
.sc-img-label{font-size:10px;color:#6b7280;margin-top:4px;text-align:center}
.sc-stats{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}
.sc-stat{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:14px 16px;flex:1;min-width:130px}
.sc-stat-label{font-size:11px;color:#6b7280;text-transform:uppercase;letter-spacing:1px;margin-bottom:4px}
.sc-stat-value{font-size:26px;font-weight:700;color:#1a1a2e}
.sc-stat-sub{font-size:12px;color:#6b7280;margin-top:2px}
.sc-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:20px;margin-bottom:20px}
.sc-card-title{font-size:13px;color:#6b7280;text-transform:uppercase;letter-spacing:1px;margin-bottom:12px;font-weight:700}
.sc-cond-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.sc-urgency-badge{font-size:12px;padding:4px 10px;border-radius:6px;color:#fff;font-weight:600}
.sc-cond-body{display:flex;gap:20px;flex-wrap:wrap;margin-bottom:16px}
.sc-cond-score{font-size:36px;font-weight:800;color:#1a1a2e}.sc-cond-score span{font-size:16px;color:#6b7280}
.sc-cond-label{font-size:13px;color:#6b7280}
.sc-cond-details{flex:1;min-width:200px}
.sc-cond-bar{width:100%;height:8px;background:#e2e4e9;border-radius:4px;overflow:hidden;margin-bottom:8px}
.sc-cond-bar-fill{height:100%;border-radius:4px;transition:width 1s ease}
.sc-detail-grid{display:flex;gap:16px;flex-wrap:wrap}
.sc-detail-item label{font-size:11px;color:#6b7280;display:block}.sc-detail-item span{font-size:15px;font-weight:600;color:#1a1a2e}
.sc-indicator{padding:8px 12px;border-radius:8px;margin-bottom:6px}
.sc-indicator-text{font-size:13px;color:#1a1a2e}.sc-indicator-severity{font-size:10px;margin-top:2px;text-transform:uppercase}
.sc-indicator-notes{font-size:12px;color:#6b7280;margin-top:12px;font-style:italic}
.sc-structure{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;background:#f9fafb;border-radius:8px;border:1px solid #e5e7eb;margin-bottom:6px}
.sc-structure-name{font-size:14px;font-weight:600;color:#1a1a2e}.sc-structure-meta{font-size:11px;color:#6b7280}
.sc-structure-area{font-size:16px;font-weight:700;color:#DC2626;text-align:right}.sc-structure-sq{font-size:11px;color:#6b7280}
.sc-material-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid #e5e7eb}
.sc-material-name{font-size:13px;color:#4b5563}.sc-material-qty{font-size:13px;font-weight:600;color:#1a1a2e}
.sc-material-conf{font-size:10px;padding:2px 6px;border-radius:4px;color:#fff;margin-left:10px}
.sc-lead-row{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #e5e7eb}
.sc-lead-key{font-size:13px;color:#6b7280;text-transform:capitalize}.sc-lead-val{font-size:13px;color:#1a1a2e}
.sc-crosscheck{background:#f0f9ff;border:1px solid #bae6fd;border-radius:10px;padding:14px;font-size:12px;color:#6b7280;margin-bottom:20px}
.sc-crosscheck strong{color:#1a1a2e}
.sc-empty{text-align:center;padding:60px 20px;color:#9ca3af}.sc-empty-icon{font-size:48px;margin-bottom:16px}
.sc-empty-title{font-size:18px;font-weight:600;margin-bottom:8px;color:#6b7280}.sc-empty-desc{font-size:13px;max-width:400px;margin:0 auto;line-height:1.6}
.sc-pitch-grid{display:flex;gap:20px;flex-wrap:wrap}
.sc-pitch-item label{font-size:11px;color:#6b7280;display:block}.sc-pitch-item span{font-size:18px;font-weight:700;color:#1a1a2e}
/* Roof Sketch Annotation */
.sk-overlay{position:fixed;inset:0;z-index:8000;background:#0a0a12;display:flex;flex-direction:column;font-family:DM Sans,sans-serif}
.sk-header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#111118;border-bottom:1px solid #1e1e2e;flex-shrink:0}
.sk-title{font-size:13px;font-weight:800;color:#38BDF8;letter-spacing:0.08em;text-transform:uppercase}
.sk-close{font-size:13px;font-weight:600;color:#6b7280;background:none;border:1px solid #2a2a3a;border-radius:8px;padding:6px 14px;cursor:pointer;font-family:inherit}
.sk-close:hover{color:#fff;border-color:#555}
.sk-body{flex:1;display:flex;flex-direction:column;overflow:hidden;position:relative}
.sk-canvas-wrap{position:relative;flex:1;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#0a0a12}
.sk-canvas-wrap canvas{position:absolute;top:0;left:0;cursor:crosshair;touch-action:none}
.sk-canvas-wrap img{display:block;max-width:100%;max-height:100%}
.sk-toolbar{display:flex;gap:6px;padding:8px 10px;background:#111118;border-top:1px solid #1e1e2e;overflow-x:auto;flex-shrink:0;align-items:center;-webkit-overflow-scrolling:touch}
.sk-tool{padding:8px 12px;border-radius:8px;font-size:11px;font-weight:700;border:1.5px solid #2a2a3a;background:#16161f;color:#9ca3af;cursor:pointer;white-space:nowrap;font-family:inherit;transition:all .15s;display:flex;align-items:center;gap:5px}
.sk-tool.active{border-color:var(--tc);color:#fff;background:color-mix(in srgb,var(--tc) 15%,#16161f);box-shadow:0 0 12px color-mix(in srgb,var(--tc) 30%,transparent)}
.sk-tool .sk-dot{width:8px;height:8px;border-radius:50%;background:var(--tc);flex-shrink:0}
.sk-sep{width:1px;height:24px;background:#2a2a3a;flex-shrink:0;margin:0 2px}
.sk-summary{padding:8px 12px;background:#111118;border-top:1px solid #1e1e2e;flex-shrink:0;overflow-x:auto}
.sk-sum-grid{display:flex;gap:8px;min-width:max-content}
.sk-sum-item{display:flex;align-items:center;gap:6px;padding:5px 10px;border-radius:6px;background:#16161f;border:1px solid #1e1e2e}
.sk-sum-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}
.sk-sum-label{font-size:10px;color:#6b7280;font-weight:600}
.sk-sum-val{font-size:13px;font-weight:800;color:#fff;font-family:IBM Plex Mono,monospace}
.sk-undo{padding:8px 12px;border-radius:8px;font-size:11px;font-weight:700;border:1.5px solid #2a2a3a;background:#16161f;color:#ef4444;cursor:pointer;font-family:inherit}
/* Training Tour */
#tourOverlay{display:none;position:fixed;inset:0;z-index:10000}
#tourOverlay.active{display:block}
.tour-backdrop{position:fixed;inset:0;background:rgba(0,0,0,0.7);z-index:10000}
.tour-spotlight-top,.tour-spotlight-bottom,.tour-spotlight-left,.tour-spotlight-right{position:fixed;background:rgba(0,0,0,0.7);z-index:10001}
.tour-ring{position:fixed;z-index:10002;border:3px solid #DC2626;border-radius:12px;box-shadow:0 0 0 4px rgba(220,38,38,0.3),0 0 20px rgba(220,38,38,0.2);pointer-events:none;transition:all .4s ease}
.tour-card{position:fixed;z-index:10003;background:#111;border-radius:16px;padding:24px;max-width:380px;width:calc(100vw - 32px);box-shadow:0 20px 60px rgba(0,0,0,0.4);transition:all .3s ease;animation:tourCardIn .3s ease}
@keyframes tourCardIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
.tour-card-step{font-size:10px;font-weight:800;color:#DC2626;text-transform:uppercase;letter-spacing:0.1em;margin-bottom:6px}
.tour-card-title{font-size:18px;font-weight:800;color:#e5e7eb;margin-bottom:8px}
.tour-card-desc{font-size:13px;color:#d1d5db;line-height:1.5;margin-bottom:10px}
.tour-card-hint{font-size:11px;color:#DC2626;background:rgba(220,38,38,0.06);border:1px solid rgba(220,38,38,0.15);border-radius:8px;padding:8px 12px;line-height:1.4;margin-bottom:14px}
.tour-dots{display:flex;gap:5px;justify-content:center;margin-bottom:14px}
.tour-dot{width:8px;height:8px;border-radius:50%;background:#e2e4e9;transition:all .2s}
.tour-dot.active{background:#DC2626;transform:scale(1.3)}
.tour-dot.done{background:#38BDF8}
.tour-btns{display:flex;gap:8px;justify-content:space-between;align-items:center}
.tour-btn{font-family:'DM Sans';font-size:13px;font-weight:700;padding:10px 20px;border-radius:8px;cursor:pointer;border:none;transition:all .15s}
.tour-btn.primary{background:#DC2626;color:#fff}
.tour-btn.primary:active{background:#b91c1c}
.tour-btn.secondary{background:#111;color:#d1d5db}
.tour-btn.skip{background:none;color:#9ca3af;font-size:12px;padding:8px 12px}
/* Next Steps Widget */
.ns-widget{background:#111;border:2px solid #222;border-radius:14px;margin-bottom:10px;overflow:hidden;transition:all .2s}
.ns-header{display:flex;align-items:center;gap:10px;padding:10px 14px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.ns-header:active{background:#111}
.ns-progress-bar{flex:1;height:5px;background:#e2e4e9;border-radius:3px;overflow:hidden}
.ns-progress-fill{height:100%;background:linear-gradient(90deg,#DC2626,#F59E0B);border-radius:3px;transition:width .5s ease}
.ns-body{padding:0 14px 10px}
.ns-step{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid #222;transition:all .2s}
.ns-step:last-child{border-bottom:none}
.ns-step.current{background:rgba(220,38,38,0.03);margin:0 -14px;padding:6px 14px;border-radius:8px;border-bottom-color:transparent}
.ns-step.done-row{opacity:0.55;padding:3px 0}
.ns-step.future{opacity:0.4}
.ns-circle{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;flex-shrink:0;font-family:'IBM Plex Mono'}
.ns-circle.done{background:#16a34a;color:#fff}
.ns-circle.active{background:#DC2626;color:#fff;box-shadow:0 0 0 3px rgba(220,38,38,0.15)}
.ns-circle.pending{background:#e2e4e9;color:#9ca3af}
.ns-info{flex:1;min-width:0}
.ns-title{font-size:12px;font-weight:700;color:#1a1a2e}
.ns-title.done{text-decoration:line-through;color:#9ca3af;font-size:11px}
.ns-desc{font-size:11px;color:#6b7280;margin-top:1px}
.ns-go{font-family:'DM Sans';font-size:11px;font-weight:800;padding:5px 12px;border-radius:6px;border:none;background:#DC2626;color:#fff;cursor:pointer;white-space:nowrap;flex-shrink:0;align-self:center}
.ns-go:active{background:#b91c1c}
.ns-complete{padding:10px 14px;background:rgba(22,163,106,0.08);border-radius:8px;text-align:center;font-size:12px;font-weight:700;color:#16a34a;border:1px solid rgba(22,163,106,0.2)}
.ns-tip{font-size:11px;color:#F59E0B;margin-top:4px;line-height:1.4;font-style:italic}
.ns-learn{font-size:10px;color:#38BDF8;cursor:pointer;text-decoration:underline;margin-top:3px;display:inline-block;font-weight:600}
/* ── My Jobs View (dark theme) ── */
.jobs-wrap{max-width:600px;margin:0 auto}
.jobs-filter-tabs{display:flex;gap:6px;margin-bottom:14px;flex-wrap:wrap}
.jobs-filter-tabs button{font-family:'DM Sans';font-size:12px;font-weight:600;padding:6px 14px;border-radius:20px;border:1.5px solid #333;background:#1a1a1a;color:#9ca3af;cursor:pointer;transition:all .15s}
.jobs-filter-tabs button.active{background:#38BDF8;color:#fff;border-color:#38BDF8;font-weight:800}
.jobs-sum-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:16px}
.jobs-sum-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:10px 8px;text-align:center}
.jobs-sum-card .num{font-size:20px;font-weight:800;color:#1a1a2e}
.jobs-sum-card .lbl{font-size:10px;font-weight:600;color:#6b7280;margin-top:2px;text-transform:uppercase;letter-spacing:.03em}
.jobs-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:16px;margin-bottom:10px;cursor:pointer;transition:box-shadow .15s,border-color .15s}
.jobs-card:hover{border-color:#38BDF8;box-shadow:0 4px 16px rgba(56,189,248,.15)}
.jobs-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.jobs-card-top .name{font-size:18px;font-weight:800;color:#1a1a2e;flex:1;min-width:0;line-height:1.3}
.jobs-stage{font-size:12px;font-weight:700;padding:5px 12px;border-radius:12px;white-space:nowrap;cursor:pointer;user-select:none;flex-shrink:0}
.jobs-stage-pre{background:#92400E;color:#FEF3C7}
.jobs-stage-active{background:#1E40AF;color:#DBEAFE}
.jobs-stage-collections{background:#9D174D;color:#FCE7F3}
.jobs-stage-won{background:#065F46;color:#D1FAE5}
.jobs-stage-lost{background:#991B1B;color:#FEE2E2}
.jobs-stage.locked{opacity:.55;cursor:default}
.jobs-address{font-size:14px;color:#6b7280;margin-bottom:6px}
.jobs-meta{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:#6b7280;margin-bottom:10px}
.jobs-meta span{display:inline-flex;align-items:center;gap:4px}
.jobs-actions{display:flex;gap:6px}
.jobs-actions button{font-family:'DM Sans';font-size:11px;font-weight:700;padding:6px 12px;border-radius:8px;border:none;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:opacity .15s}
.jobs-actions button:active{opacity:.7}
.jobs-act-call{background:#065F46;color:#D1FAE5}
.jobs-act-dir{background:#1E40AF;color:#DBEAFE}
.jobs-act-note{background:#5B21B6;color:#EDE9FE}
.jobs-sp{display:none;position:fixed;z-index:1200;background:#0a0a0f;border:2px solid #222;border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.4);padding:6px;min-width:180px;max-height:340px;overflow-y:auto}
.jobs-sp .sp-item{font-family:'DM Sans';font-size:12px;font-weight:600;padding:8px 12px;border-radius:8px;cursor:pointer;color:#d1d5db;display:flex;align-items:center;gap:6px}
.jobs-sp .sp-item:hover{background:#111}
.jobs-sp .sp-item.current{color:#38BDF8;font-weight:800}
.jobs-sp .sp-item.disabled{opacity:.4;cursor:default;pointer-events:none}
.jobs-modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:1300;align-items:center;justify-content:center}
.jobs-modal-overlay.show{display:flex}
.jobs-modal-box{background:#0a0a0f;border:1px solid #222;border-radius:14px;padding:20px;width:90%;max-width:420px;box-shadow:0 12px 40px rgba(0,0,0,.4)}
.jobs-modal-box h3{font-size:16px;font-weight:800;color:#fff;margin:0 0 12px}
.jobs-modal-box textarea{font-family:'DM Sans';font-size:13px;width:100%;min-height:100px;padding:10px;border-radius:8px;border:1.5px solid #222;background:#111;color:#fff;outline:none;resize:vertical;box-sizing:border-box}
.jobs-modal-box textarea:focus{border-color:#38BDF8}
.jobs-modal-box .btn-row{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}
.jobs-modal-box .btn-cancel{font-family:'DM Sans';font-size:13px;font-weight:600;padding:8px 16px;border-radius:8px;border:1px solid #222;background:#111;color:#9ca3af;cursor:pointer}
.jobs-modal-box .btn-save{font-family:'DM Sans';font-size:13px;font-weight:700;padding:8px 16px;border-radius:8px;border:none;background:#38BDF8;color:#fff;cursor:pointer}
.jobs-modal-box .msg-err{color:#ef4444;font-size:12px;margin-top:6px;display:none}
.jobs-modal-box .msg-ok{color:#4ade80;font-size:12px;margin-top:6px;display:none}
@media(max-width:480px){.jobs-sum-grid{grid-template-columns:repeat(2,1fr)}}
/* ═══ GLOBAL LIGHT THEME ═══ */
body{background:#f1f5f9!important;color:#1a1a2e!important}
#homeEl,#mainContent,.main{background:#f1f5f9!important}
.card{background:#fff!important;border-color:#e5e7eb!important}
.card-title{color:#1a1a2e!important}
.sidebar{border-right-color:#e5e7eb!important}
.tab{background:#0EA5E9!important;color:#fff!important;border-color:#0EA5E9!important}
.tab.active{background:#0284C7!important;color:#fff!important;border-color:#0284C7!important;box-shadow:0 2px 8px rgba(14,165,233,0.3)}
.sidebar .tab{background:transparent!important;border-color:transparent!important;color:#cbd5e1!important;box-shadow:none!important}
.sidebar .tab:hover{background:rgba(255,255,255,0.06)!important;color:#fff!important}
.sidebar .tab.active{background:transparent!important;color:#fff!important;box-shadow:none!important}
.sidebar .tab.active .sb-ic{color:#38BDF8!important}
.sidebar .tab.sb-subitem.active{color:#38BDF8!important}
.text-input,.textarea-input,.sign-input{background:#f9fafb!important;border-color:#e5e7eb!important;color:#1a1a2e!important}
.num-input{background:#f9fafb!important;border-color:#e5e7eb!important;color:#38BDF8!important}
.sell-input{background:#f9fafb!important;border-color:#e5e7eb!important;color:#16a34a!important}
.line-qty{background:#f9fafb!important;border-color:#e5e7eb!important;color:#1a1a2e!important}
.line-sell{background:#f9fafb!important;border-color:#e5e7eb!important;color:#16a34a!important}
.wo-manual-input{background:#f9fafb!important;border-color:#e5e7eb!important;color:#DC2626!important}
.cps-input{background:#f9fafb!important;border-color:#e5e7eb!important;color:#16a34a!important}
.text-input:focus,.textarea-input:focus,.num-input:focus,.sell-input:focus,.line-qty:focus,.line-sell:focus,.sign-input:focus{border-color:#38BDF8!important}
.label{color:#6b7280!important}
.lead-btn{background:#f9fafb!important;border-color:#e5e7eb!important;color:#6b7280!important}
.lead-btn.self{background:rgba(220,38,38,0.06)!important;border-color:#DC2626!important;color:#DC2626!important}
.lead-btn.co{background:rgba(239,68,68,0.06)!important;border-color:#EF4444!important;color:#EF4444!important}
.sq-breakdown{background:#f9fafb!important;border-color:#e5e7eb!important}
.sq-bk-row{color:#6b7280!important}
.base-row{border-top-color:#e5e7eb!important}
.section-head{color:#6b7280!important}
.line-row{border-bottom-color:#e5e7eb!important}
.line-label{color:#4b5563!important}
.line-unit{color:#6b7280!important}
.line-at{color:#6b7280!important}
.line-dollar{color:#6b7280!important}
.line-total{color:#6b7280!important}
.auto-qty{background:rgba(14,165,233,0.06)!important;border-color:rgba(14,165,233,0.25)!important}
.divider{background:#e5e7eb!important}
.summary-line{border-bottom-color:#e5e7eb!important;color:#4b5563!important}
.comm-line{border-bottom-color:#e5e7eb!important;color:#4b5563!important}
.comm-box{background:linear-gradient(135deg,rgba(220,38,38,0.04),rgba(14,165,233,0.03))!important;border-color:rgba(220,38,38,0.15)!important}
.draw-card{border-color:#e5e7eb!important;background:#fff!important}
.admin-box{background:rgba(239,68,68,0.04)!important;border-color:rgba(239,68,68,0.15)!important}
.profit-box{background:rgba(56,189,248,0.04)!important;border-color:rgba(56,189,248,0.15)!important}
.sign-block{background:#fff!important;border-color:#e5e7eb!important}
.sign-block.signed{border-color:rgba(56,189,248,0.4)!important;background:rgba(56,189,248,0.04)!important}
.sign-title{color:#6b7280!important}
.wo-header{border-bottom-color:#e5e7eb!important}
.wo-row{border-bottom-color:#e5e7eb!important}
.wo-row:nth-child(odd){background:#f9fafb!important}
.wo-item{color:#4b5563!important}
.wo-val{color:#1a1a2e!important}
.wo-section{color:#6b7280!important}
.wo-notes{background:#fff!important;border-color:#e5e7eb!important}
.wo-notes-title{color:#6b7280!important}
.wo-brand.tamko{background:rgba(14,165,233,0.08)!important}
.wo-brand.shop{background:rgba(220,38,38,0.06)!important}
.cps-table th{border-bottom-color:#e5e7eb!important;color:#6b7280!important}
.cps-table td{border-bottom-color:#e5e7eb!important;color:#4b5563!important}
.cps-table tr:nth-child(odd){background:#f9fafb!important}
.cps-table td.r{color:#1a1a2e!important}
.cps-total-row td{border-top-color:#e5e7eb!important}
.ns-widget{background:#fff!important;border-color:#e5e7eb!important}
.ns-header:active{background:#f1f5f9!important}
.ns-progress-bar{background:#e5e7eb!important}
.ns-step{border-bottom-color:#e5e7eb!important}
.ns-step.current{background:rgba(220,38,38,0.04)!important}
.ns-title{color:#1a1a2e!important}
.ns-title.done{color:#9ca3af!important}
.ns-desc{color:#6b7280!important}
.ns-circle.pending{background:#e5e7eb!important;color:#9ca3af!important}
.ns-complete{background:rgba(22,163,106,0.08)!important;border-color:rgba(22,163,106,0.2)!important}
.sc-search input{background:#f9fafb!important;border-color:#e5e7eb!important;color:#1a1a2e!important}
.sc-stat{background:#fff!important;border-color:#e5e7eb!important}
.sc-stat-value{color:#1a1a2e!important}
.sc-card{background:#fff!important;border-color:#e5e7eb!important}
.sc-report-address{color:#1a1a2e!important}
.sc-structure{background:#f9fafb!important;border-color:#e5e7eb!important}
.sc-structure-name{color:#1a1a2e!important}
.sc-crosscheck{background:rgba(56,189,248,0.06)!important;border-color:rgba(56,189,248,0.15)!important}
.sc-crosscheck strong{color:#1a1a2e!important}
.sc-error{background:rgba(239,68,68,0.06)!important;border-color:rgba(239,68,68,0.2)!important}
.sc-detail-item span{color:#1a1a2e!important}
.sc-pitch-item span{color:#1a1a2e!important}
.sc-cond-score{color:#1a1a2e!important}
.sc-material-name{color:#4b5563!important}
.sc-material-qty{color:#1a1a2e!important}
.sc-material-row{border-bottom-color:#e5e7eb!important}
.sc-lead-row{border-bottom-color:#e5e7eb!important}
.sc-lead-val{color:#1a1a2e!important}
.sc-prog-bar{background:#e5e7eb!important}
.sc-empty-title{color:#9ca3af!important}
.admin-prompt input{background:#f9fafb!important;border-color:#e5e7eb!important;color:#1a1a2e!important}
.mkt-btn{border-color:#e5e7eb!important;color:#6b7280!important}
.admin-btn{border-color:#e5e7eb!important;color:#6b7280!important}
.red-flag{background:rgba(239,68,68,0.04)!important}
.footer{border-top-color:#e5e7eb!important;color:#6b7280!important}
/* Broad input/select/textarea light override inside main content */
.main input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="color"]),
.main select,.main textarea{background:#f9fafb!important;border-color:#e5e7eb!important;color:#1a1a2e!important}
.main select option{background:#fff;color:#1a1a2e}
.prop-grid select{background:#f9fafb!important;color:#1a1a2e!important}
#custOverlay>*,#contractOverlay>*,#proposalOnsiteOverlay>*,#cameraOverlay>*,#presentOverlay>*,#insUpgradeOverlay>*,#sketchOverlay>*,#tourOverlay>*{pointer-events:auto}
.bp-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#0a1628;z-index:9999;display:flex;flex-direction:column;overflow:auto;pointer-events:auto}
.bp-toolbar{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:#0d1b30;border-bottom:1px solid #1e3a5f;flex-shrink:0}
.bp-toolbar-title{font-size:13px;font-weight:800;color:#38bdf8;letter-spacing:0.12em;text-transform:uppercase;font-family:IBM Plex Mono}
.bp-toolbar-addr{font-size:11px;color:#64748b;margin-top:2px}
.bp-toolbar-btn{padding:8px 16px;border-radius:8px;border:1px solid #1e3a5f;background:transparent;color:#94a3b8;font-size:12px;font-weight:600;cursor:pointer;font-family:DM Sans}
.bp-toolbar-btn:hover{background:#1e3a5f;color:#e2e8f0}
.bp-toolbar-btn-primary{background:#0ea5e9;border-color:#0ea5e9;color:#fff}
.bp-toolbar-btn-primary:hover{background:#0284c7}
.bp-canvas-wrap{flex:1;display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto}
.bp-canvas-wrap canvas{max-width:100%;max-height:100%;border-radius:8px;box-shadow:0 0 40px rgba(14,165,233,0.15)}
/* GPS Tracker */
.gps-marker{background:transparent!important;border:none!important}
.leaflet-popup-content-wrapper{border-radius:10px!important;box-shadow:0 4px 16px rgba(0,0,0,0.15)!important}
.leaflet-popup-content{margin:12px 16px!important}
