/* Home, Prospecting, Profile and login screens (Steel Blue). The Coach chat keeps app.css. */
:root {
  --h-bg: #1B2433; --h-card: #243044; --h-card2: #2C3A52; --h-line: #34435E;
  --h-blue: #3B82F6; --h-steel: #6E9BD1; --h-sky: #BFDCFF;
  --h-fg: #EEF3FA; --h-muted: #9AA8BD; --h-coral: #FF7A59; --h-green: #4ADE80;
}
body.inHub #app { display: none; }
body:not(.inHub) #hub { display: none; }
#hub, #auth { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; color: var(--h-fg); }
#hub { height: 100dvh; display: flex; flex-direction: column; }
.hScreen { flex: 1; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 14px) 18px 24px; -webkit-overflow-scrolling: touch; }
.hScreen[hidden] { display: none; }
.hScreen h1 { font-size: 32px; font-weight: 800; letter-spacing: -.5px; margin: 0; }
.hScreen h2 { font-size: 26px; font-weight: 700; margin: 0; }
.hScreen h3 { font-size: 16px; font-weight: 700; margin: 0; }
.hMuted { color: var(--h-muted); font-size: 14px; }
.hRow { display: flex; align-items: center; gap: 12px; }
.hBetween { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hCard { background: var(--h-card); border: 1px solid rgba(255,255,255,.04); border-radius: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.hBtn { background: var(--h-blue); color: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: 15px; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.hBtn:active { transform: scale(.97); }
.hBtn.ghost { background: transparent; border: 1px solid var(--h-line); color: var(--h-fg); }
.hBtn.wide { width: 100%; padding: 14px; }
.hBtn.danger { background: transparent; border: 1px solid rgba(255,122,89,.4); color: var(--h-coral); }
.hBtn[disabled] { opacity: .5; }
.hLink { color: var(--h-steel); font-weight: 600; font-size: 14px; }
.hAvatar { width: 46px; height: 46px; border-radius: 50%; background: #3A4E6E; color: var(--h-sky); display: grid; place-items: center; font-weight: 700; flex: none; }
.hBar { height: 6px; border-radius: 3px; background: var(--h-line); overflow: hidden; }
.hBar > i { display: block; height: 100%; background: var(--h-blue); border-radius: 3px; }
.hPill { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #34435E; color: var(--h-sky); }
.hPill.coral { background: rgba(255,122,89,.15); color: var(--h-coral); }
.hPill.green { background: rgba(74,222,128,.13); color: var(--h-green); }
.hEmpty { text-align: center; color: var(--h-muted); padding: 26px 16px; font-size: 15px; }
.hBack { color: var(--h-steel); font-weight: 600; font-size: 15px; padding: 4px 0; }
.hScreen input, .hScreen textarea, .hScreen select, .hSheet input, .hSheet textarea, .hSheet select, #auth input {
  font: inherit; color: var(--h-fg); background: var(--h-card2); border: 1px solid var(--h-line); border-radius: 12px; padding: 12px; width: 100%; outline: none; }
.hScreen textarea, .hSheet textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
.hScreen input:focus, .hScreen textarea:focus, .hSheet input:focus, .hSheet textarea:focus, #auth input:focus { border-color: var(--h-steel); }
.hLabel { display: block; font-size: 13px; color: var(--h-muted); margin: 14px 0 6px; }

/* Home */
.hMic { display: flex; align-items: center; gap: 8px; color: var(--h-steel); font-weight: 600; font-size: 15px; }
.hMic span { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--h-steel); display: grid; place-items: center; }
.hMic svg { width: 20px; height: 20px; }
.hStats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 22px; }
.hStat { padding: 14px 12px; position: relative; text-align: left; color: var(--h-fg); }
.hStat .ic { width: 38px; height: 38px; border-radius: 50%; background: #2F3E58; display: grid; place-items: center; color: var(--h-steel); margin-bottom: 8px; }
.hStat .ic svg { width: 20px; height: 20px; }
.hStat b { display: block; font-size: 30px; line-height: 1.1; margin-top: 4px; }
.hStat .badge { position: absolute; top: 10px; right: 10px; background: var(--h-coral); color: #fff; border-radius: 50%; min-width: 22px; height: 22px; font-size: 12px; display: grid; place-items: center; font-weight: 700; padding: 0 4px; }
.hLead { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--h-line); text-align: left; width: 100%; color: inherit; }
.hLead:last-child { border-bottom: 0; }
.hLead .info { flex: 1; min-width: 0; }
.hLead .info .hMuted { font-size: 13px; margin: 2px 0 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Prospecting */
.hSeg { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0 14px; scrollbar-width: none; }
.hSeg::-webkit-scrollbar { display: none; }
.hSeg button { padding: 8px 13px; border-radius: 20px; background: var(--h-card); font-size: 13px; white-space: nowrap; color: var(--h-muted); }
.hSeg button.on { background: var(--h-blue); color: #fff; }
.hPCard { padding: 14px; margin-bottom: 10px; }
.hRing { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; border: 3px solid var(--h-steel); color: var(--h-steel); }
.hActs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.hActs a, .hActs button { background: var(--h-card2); border-radius: 10px; padding: 9px 4px; font-size: 13px; color: var(--h-sky); text-align: center; text-decoration: none; }

/* Lead page */
.hTimeline { position: relative; height: 8px; border-radius: 4px; background: var(--h-line); margin: 16px 0 6px; }
.hTimeline i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--h-steel); border-radius: 4px; }
.hTimeline em { position: absolute; top: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--h-coral); transform: translateX(-50%); border: 3px solid var(--h-card); }
.hAct { display: flex; gap: 12px; padding: 10px 0; font-size: 14px; border-bottom: 1px solid var(--h-line); }
.hAct:last-child { border-bottom: 0; }
.hAct span { width: 10px; height: 10px; border-radius: 50%; background: var(--h-steel); margin-top: 6px; flex: none; }
.hGrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.hGrid2 .full { grid-column: 1 / -1; }
.hStages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hStages button { padding: 9px 2px; border-radius: 10px; background: var(--h-card2); color: var(--h-muted); font-size: 13px; }
.hStages button.on { background: var(--h-blue); color: #fff; }

/* Video library */
.hVid { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid transparent; width: 100%; text-align: left; color: inherit; }
.hVid.sel { border-color: var(--h-blue); background: rgba(59,130,246,.1); }
.hThumb { width: 76px; height: 48px; border-radius: 9px; background: linear-gradient(135deg, #3B82F6, #243044); display: grid; place-items: center; flex: none; overflow: hidden; color: #fff; }
.hThumb img { width: 100%; height: 100%; object-fit: cover; }
.hVid .del { color: var(--h-muted); font-size: 22px; padding: 0 6px; }

/* Tab bar: four equal slots */
.hTabs { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; background: #161E2B; border-top: 1px solid var(--h-line); padding: 8px 0 calc(env(safe-area-inset-bottom) + 8px); }
.hTab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--h-muted); }
.hTab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hTab.on { color: var(--h-steel); }

/* Bottom sheets */
.hShade { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
.hSheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 760px; margin: 0 auto; background: #202B3D; border-radius: 24px 24px 0 0; padding: 14px 18px calc(env(safe-area-inset-bottom) + 22px); z-index: 41; max-height: 90dvh; overflow-y: auto; color: var(--h-fg); animation: hUp .3s cubic-bezier(.2,.8,.2,1); }
.hSheet h2 { font-size: 22px; margin: 0 0 4px; }
.hGrab { width: 40px; height: 5px; border-radius: 3px; background: var(--h-line); margin: 0 auto 14px; }
.hLinkBox { background: var(--h-card2); border: 1px dashed var(--h-steel); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--h-sky); word-break: break-all; }
@keyframes hUp { from { transform: translateY(100%); } }

/* Login */
#auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 30px 24px calc(env(safe-area-inset-bottom) + 30px); max-width: 440px; }
#auth h1 { font-size: 40px; font-weight: 800; margin: 0; letter-spacing: -.5px; }
#auth .tabsAuth { display: grid; grid-template-columns: 1fr 1fr; background: var(--h-card); border-radius: 12px; padding: 4px; margin: 26px 0 6px; }
#auth .tabsAuth button { padding: 10px; border-radius: 9px; color: var(--h-muted); font-weight: 600; }
#auth .tabsAuth button.on { background: var(--h-blue); color: #fff; }
#auth .err { color: var(--h-coral); font-size: 14px; min-height: 20px; margin-top: 10px; }

/* Chat: Home button, lead and send cards */
.homeBtn { height: 44px; padding: 0 16px 0 10px; border-radius: 22px; background: var(--surface2); display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 15px; color: var(--fg); flex: none; }
.homeBtn svg { width: 20px; height: 20px; }
.homeBtn:active { transform: scale(.96); }
.widget.leadW, .widget.sendW { background: var(--h-card); border-radius: 16px; padding: 14px; margin-top: 10px; }
.leadW .hRow b, .sendW b { font-size: 16px; }
.sendW .msgBox { background: var(--h-card2); border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.sendW .btns { display: flex; gap: 8px; }
.sendW .btns > * { flex: 1; }
.hSendSum { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 12px 6px; margin-bottom: 10px; }
.hSendSum b { display: block; font-size: 22px; }
.hSendSum span { font-size: 12px; }
.hConsent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--h-bg); border: 1px solid var(--h-line); font-size: 13.5px; line-height: 1.4; color: var(--h-fg); cursor: pointer; }
.hConsent input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--h-blue); }
.hBtn:disabled { opacity: .45; }
