/* ============================================================
   HeyVini UI 2026 — skin implementing the approved prototype look
   (onboarding wizard + inside app). Loads AFTER styles.css and
   ux-refresh.css and overrides them. UI only; no logic here.
   Palette: teal #0F6E63 / deep #0B564D / wash #E4EFEC,
   terra #C2562F / wash #F6E7DF, gold #E8A23D,
   bg #EDEBE8, surface #fff, surface2 #F7F5F1,
   ink #1B2426, muted #66706F, line #DCD8D2.
   ============================================================ */
:root{
  --u-teal:#0F6E63; --u-teal-deep:#0B564D; --u-wash:#E4EFEC;
  --u-terra:#C2562F; --u-terra-wash:#F6E7DF; --u-gold:#E8A23D;
  --u-bg:#EDEBE8; --u-s:#fff; --u-s2:#F7F5F1; --u-ink:#1B2426;
  --u-muted:#66706F; --u-line:#DCD8D2;
  --u-good:#2f7d61; --u-warn:#a66522; --u-danger:#a64c39;
}

/* ---------- ONBOARDING WIZARD ---------- */
#view-onboard{background:var(--u-bg);min-height:100vh;display:grid;place-items:center;padding:24px}
#view-onboard .obphone{width:min(100%,480px);min-height:740px;background:var(--u-s);border-radius:28px;box-shadow:0 24px 70px rgba(31,50,47,.14);padding:22px;display:flex;flex-direction:column}
#view-onboard .ob-top{display:flex;justify-content:space-between;align-items:center}
#view-onboard .ob-brand{display:flex;align-items:center;gap:9px;font-weight:800;color:var(--u-ink)}
#view-onboard .ob-brand img{width:36px;height:36px;border-radius:11px}
#view-onboard .ob-count{font-size:.9rem;color:var(--u-muted);font-weight:700}
#view-onboard .ob-progress{height:7px;background:var(--u-s2);border-radius:999px;overflow:hidden;margin:12px 0 26px}
#view-onboard .ob-progress span{display:block;height:100%;background:var(--u-teal);border-radius:999px;transition:width .25s}
#view-onboard .ob-screen{display:flex;flex:1;flex-direction:column}
#view-onboard .ob-screen.hidden{display:none}
#view-onboard h1{font-family:Georgia,"Times New Roman",serif;font-size:1.9rem;line-height:1.14;margin:0 0 8px;color:var(--u-ink);font-weight:600}
#view-onboard .wsub{color:var(--u-muted);line-height:1.5;margin:0 0 20px}
#view-onboard label{display:block;font-size:.92rem;font-weight:700;margin:16px 0 8px;color:var(--u-ink)}
#view-onboard .whint{font-weight:500;color:var(--u-muted);font-size:.82rem}
#view-onboard input,#view-onboard select{width:100%;border:1.5px solid var(--u-line);border-radius:14px;padding:14px;font:inherit;background:#fff;color:var(--u-ink)}
#view-onboard .wchoices{display:grid;gap:10px;margin-top:8px}
#view-onboard .wchoices.two{grid-template-columns:1fr 1fr}
#view-onboard .wchoice{border:1.5px solid var(--u-line);border-radius:16px;padding:14px 16px;background:#fff;cursor:pointer;text-align:left;font:inherit;color:var(--u-ink)}
#view-onboard .wchoice strong{display:flex;align-items:center;gap:8px;font-weight:800}
#view-onboard .wchoice small{display:block;color:var(--u-muted);margin-top:3px;line-height:1.35;font-weight:500}
#view-onboard .wchoice.sel{border-color:var(--u-teal);background:var(--u-wash)}
#view-onboard .wchoice svg{width:22px;height:22px}
#view-onboard .wchoice .wa-i{color:#25D366}#view-onboard .wchoice .tg-i{color:#229ED9}
#view-onboard .wsoft{background:var(--u-s2);border:1px solid var(--u-line);border-radius:16px;padding:13px 15px;color:var(--u-muted);font-size:.9rem;line-height:1.45;margin-top:14px}
#view-onboard .whello{background:var(--u-wash);border:1px solid #cfe0dc;border-radius:18px;padding:15px;margin-top:16px}
#view-onboard .whello .ey{font-size:.74rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:var(--u-teal-deep)}
#view-onboard .whello b{display:block;font-family:Georgia,serif;font-size:1.25rem;margin:4px 0;font-weight:600}
#view-onboard .whello span{color:var(--u-muted);font-size:.9rem}
#view-onboard .wsummary{background:var(--u-s2);border:1px solid var(--u-line);border-radius:18px;padding:15px;margin-top:16px}
#view-onboard .wsummary b{display:block;margin-bottom:5px}
#view-onboard .wsummary span{color:var(--u-muted);font-size:.9rem;line-height:1.45}
#view-onboard .wactions{margin-top:auto;padding-top:24px;display:flex;gap:10px}
#view-onboard .wactions .btn{border-radius:14px;padding:15px 18px;font-weight:800}
#view-onboard .wactions .btn-primary{flex:1;background:var(--u-teal)}
#view-onboard .wactions .btn-soft{min-width:88px;background:var(--u-s2)}
#view-onboard .wheart{width:76px;height:76px;border-radius:50%;background:var(--u-terra-wash);display:grid;place-items:center;font-size:32px;margin:0 auto 18px}
#view-onboard .wcenter{text-align:center;margin:auto 0}
#view-onboard .wcenter .wsub{max-width:370px;margin:8px auto 20px}
#view-onboard .wsep{height:1px;background:var(--u-line);margin:18px 0}
#view-onboard .wcircle{border:1px solid var(--u-line);border-radius:18px;overflow:hidden;margin:16px 0;text-align:left}
#view-onboard .wmember{display:flex;align-items:center;gap:12px;padding:13px 15px;border-bottom:1px solid var(--u-line)}
#view-onboard .wmember:last-child{border-bottom:0}
#view-onboard .wavatar{width:42px;height:42px;border-radius:50%;background:var(--u-wash);display:grid;place-items:center;font-weight:800;color:var(--u-teal-deep);flex:0 0 auto}
#view-onboard .wmember b{display:block}
#view-onboard .wmember small{color:var(--u-muted)}
#view-onboard .wtag{margin-left:auto;font-size:.74rem;font-weight:800;background:var(--u-s2);padding:6px 9px;border-radius:999px;color:var(--u-muted)}
#view-onboard .check-row{margin-top:16px}
#view-onboard .werr:empty{display:none}
#view-onboard .phone-row{display:flex;gap:8px}
#view-onboard .phone-row select{width:130px;flex:0 0 auto}
@media(max-width:600px){
  #view-onboard{padding:0;background:#fff}
  #view-onboard .obphone{width:100%;min-height:100vh;border-radius:0;box-shadow:none;padding:18px}
}

/* ---------- APP SHELL ---------- */
#view-app{background:var(--u-s2)}
#view-app .app{max-width:1180px;margin:0 auto;background:var(--u-s);box-shadow:0 0 70px rgba(20,43,39,.08)}
#view-app .rail{background:#fbfaf8;border-right:1px solid var(--u-line);padding:24px 14px}
#view-app .rail .nav-item{border-radius:14px;color:#4d5756;font-weight:700;font-size:.93rem}
#view-app .rail .nav-item:hover,#view-app .rail .nav-item.active{background:var(--u-wash);color:var(--u-teal-deep)}
#view-app .main{background:var(--u-s2)}
#view-app .content{padding:34px 38px 96px}
#view-app .c-head h2,#view-app .today-greet h2{font-family:Georgia,"Times New Roman",serif;font-weight:600}
#view-app .c-head h2{font-size:2.05rem;margin-bottom:5px}
#view-app .c-head p{color:var(--u-muted)}
#view-app .ucard{background:var(--u-s);border:1px solid var(--u-line);border-radius:20px;box-shadow:0 8px 28px rgba(40,55,51,.04)}

/* Today */
#view-app .today-greet h2{font-size:2.15rem;margin:0 0 4px}
#view-app .today-greet p{color:var(--u-muted);margin:0 0 22px}
.hero-status{padding:20px;background:linear-gradient(135deg,var(--u-wash),#f9fcfb);border:1px solid #cfe0dc;border-radius:22px}
.hero-status .hlabel{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:var(--u-teal-deep)}
.hero-status h3{font-family:Georgia,serif;font-size:1.6rem;margin:6px 0;font-weight:600}
.hero-status p{color:var(--u-muted);margin:0;line-height:1.45}
.status-row{display:flex;gap:10px;margin-top:15px;flex-wrap:wrap}
.spill{padding:8px 11px;border-radius:999px;background:#fff;border:1px solid var(--u-line);font-size:.82rem;font-weight:700}
.spill.good{color:var(--u-good);border-color:#cde3d8;background:#f6fbf8}
.spill.wait{color:var(--u-warn);border-color:#ead8bb;background:#fffaf3}
.sect-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 12px}
.sect-title h3{font-family:Georgia,serif;font-size:1.3rem;margin:0;font-weight:600}
.sect-title button{background:none;border:0;color:var(--u-teal);font-weight:800;font-size:.9rem;cursor:pointer;font-family:inherit}
.task2-list{display:grid;gap:10px}
.task2{display:flex;gap:13px;align-items:flex-start;padding:15px 16px;background:#fff;border:1px solid var(--u-line);border-radius:17px}
.task2.critical{border-left:4px solid var(--u-terra)}
.task2 .tmark{width:24px;height:24px;border-radius:8px;border:2px solid #bfc7c5;display:grid;place-items:center;flex:0 0 auto;color:#fff;font-size:.85rem}
.task2.done .tmark{background:var(--u-teal);border-color:var(--u-teal)}
.task2 .tb{flex:1}
.task2 .tt{font-weight:800}
.task2.done .tt{text-decoration:line-through;color:#7e8886}
.task2 .tm{color:var(--u-muted);font-size:.83rem;margin-top:4px}
.task2 .ttag{font-size:.72rem;font-weight:800;padding:5px 8px;border-radius:999px;background:var(--u-s2);color:var(--u-muted);flex:0 0 auto}
.task2.critical .ttag{background:var(--u-terra-wash);color:var(--u-terra)}
.task2 .t-flag2{font-size:.72rem;font-weight:800;color:var(--u-danger);flex:0 0 auto}
.quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.quick-card{padding:16px;border-radius:17px;background:#fff;border:1px solid var(--u-line);cursor:pointer;text-align:left;font:inherit}
.quick-card b{display:block;margin-top:9px;color:var(--u-ink)}
.quick-card small{color:var(--u-muted);line-height:1.4;display:block;margin-top:3px}
.iconbox{width:34px;height:34px;border-radius:11px;background:var(--u-wash);display:grid;place-items:center;color:var(--u-teal-deep);font-weight:800}
.t-none2{padding:16px;border-radius:17px;background:#fff;border:1px dashed var(--u-line);color:var(--u-muted)}

/* Chat */
#view-app .chatview{max-width:760px;margin:0 auto;padding:26px 20px 96px}
#view-app .chatview .panel-top{background:#fff;border:1px solid var(--u-line);border-bottom:0;border-radius:24px 24px 0 0;padding:16px 18px}
#view-app .chatview .chat{background:#fcfbf9;border:1px solid var(--u-line);border-top:0;border-bottom:0}
#view-app .chatview .quick{background:#fcfbf9;border:1px solid var(--u-line);border-top:0;border-bottom:0;padding:0 14px 12px}
#view-app .chatview .quick button{border:1px solid var(--u-line);border-radius:999px;background:#fff;font-weight:700;font-size:.82rem}
#view-app .chatview .composer{background:#fff;border:1px solid var(--u-line);border-top:1px solid var(--u-line);border-radius:0 0 24px 24px;padding:12px}
#view-app .chatview .send{border-radius:14px;background:var(--u-teal)}
#view-app .chat .bubble{border-radius:16px;line-height:1.48}
#view-app .chat .msg:not(.me) .bubble{background:#fff;border:1px solid var(--u-line);border-bottom-left-radius:6px}
#view-app .chat .msg.me .bubble{background:var(--u-teal);color:#fff;border-bottom-right-radius:6px}

/* Weekly view */
.weekbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 16px}
.weekbar b{font-weight:800}
.report-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}
.metric{padding:17px;background:#fff;border:1px solid var(--u-line);border-radius:20px}
.metric strong{font-family:Georgia,serif;font-size:1.6rem;font-weight:600}
.metric span{display:block;color:var(--u-muted);font-size:.8rem;margin-top:4px}
.report-person{padding:18px;background:#fff;border:1px solid var(--u-line);border-radius:20px;margin-top:12px}
.person-head{display:flex;align-items:center;gap:11px;margin-bottom:4px}
.person-head .pav{width:42px;height:42px;border-radius:50%;background:var(--u-wash);color:var(--u-teal-deep);display:grid;place-items:center;font-weight:800}
.person-head b{display:block}
.person-head small{color:var(--u-muted)}
.rep-item{margin-top:14px}
.rep-item .ri-name{font-weight:700;font-size:.9rem;display:flex;align-items:center;gap:8px}
.rep-item .ri-name .tpill{font-size:.68rem}
.weekdots{display:grid;grid-template-columns:repeat(7,1fr);gap:7px;margin-top:8px}
.wd{text-align:center;font-size:.71rem;color:var(--u-muted)}
.dotday{height:34px;border-radius:10px;margin-top:5px;display:grid;place-items:center;font-weight:900}
.dotday.good{background:#e7f3ed;color:var(--u-good)}
.dotday.bad{background:var(--u-terra-wash);color:var(--u-danger)}
.dotday.neutral{background:var(--u-s2);color:#9aa3a1}
.dotday.up{background:#fffaf3;color:var(--u-warn)}
.ri-count{color:var(--u-muted);font-size:.82rem;margin-top:6px}
.rep-legend2{color:var(--u-muted);font-size:.82rem;margin-top:14px;display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.rep-legend2 i{display:inline-block;width:14px;height:14px;border-radius:5px;vertical-align:-2px;margin-right:4px}
.rep-legend2 .lg{background:#e7f3ed}.rep-legend2 .lb{background:var(--u-terra-wash)}.rep-legend2 .lu{background:#fffaf3}

/* Care circle orbit */
.orbit-card{padding:24px 12px;background:#fff;border:1px solid var(--u-line);border-radius:20px;margin:14px 0 12px;position:relative;overflow:hidden}
.orbit-title{text-align:center;margin-bottom:6px}
.orbit-title h3{font-family:Georgia,serif;margin:0;font-weight:600}
.orbit-title p{margin:5px 0;color:var(--u-muted);font-size:.88rem}
.orbit2{position:relative;width:100%;max-width:390px;height:330px;margin:6px auto 0}
.oring2{position:absolute;left:50%;top:50%;width:270px;height:208px;transform:translate(-50%,-50%);border:1.5px dashed #c9d7d3;border-radius:50%}
.ocore{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;gap:12px}
.person-core,.helper-node{background:#fff;border:1px solid var(--u-line);box-shadow:0 9px 25px rgba(40,55,51,.08);text-align:center;cursor:pointer;font:inherit;color:var(--u-ink)}
.person-core{width:105px;padding:13px 8px;border-radius:18px}
.person-core .cav{width:42px;height:42px;border-radius:50%;margin:auto;background:var(--u-teal);color:#fff;display:grid;place-items:center;font-weight:800}
.person-core b{display:block;margin-top:7px}
.person-core small{font-size:.72rem;color:var(--u-muted);line-height:1.3;display:block}
.helper-node{position:absolute;width:92px;border-radius:16px;padding:10px 6px}
.helper-node .cav{width:34px;height:34px;border-radius:50%;margin:auto;font-size:.8rem;background:var(--u-terra-wash);color:var(--u-terra);display:grid;place-items:center;font-weight:800}
.helper-node b{display:block;font-size:.78rem;margin-top:5px}
.helper-node small{font-size:.67rem;color:var(--u-muted)}
.hn1{left:6px;top:35px}.hn2{right:4px;top:42px}.hn3{left:22px;bottom:16px}.hn4{right:18px;bottom:12px}

/* member cards + add box + contacts + plan reskin */
#view-app .m-card,#view-app .addbox{background:#fff;border:1px solid var(--u-line);border-radius:20px}
#view-app .fc-row{background:#fff;border:1px solid var(--u-line);border-radius:17px;margin-bottom:10px;padding:14px 15px}
#view-app .fc-row .fc-ico{width:42px;height:42px;border-radius:50%;background:var(--u-wash);color:var(--u-teal-deep);display:grid;place-items:center;font-weight:800}
.fc-call{width:38px;height:38px;border-radius:12px;background:var(--u-wash);display:grid;place-items:center;color:var(--u-teal-deep);text-decoration:none;flex:0 0 auto;font-size:1rem}
.up-grid .up-card{background:#fff;border:1px solid var(--u-line);border-radius:20px}
.up-grid .up-card.cur{border:2px solid var(--u-teal)}
.up-grid .pr{font-family:Georgia,serif;font-weight:600}

/* More page */
.more-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.more-card{padding:18px;background:#fff;border:1px solid var(--u-line);border-radius:20px;cursor:pointer;text-align:left;font:inherit;color:var(--u-ink)}
.more-card h4{margin:10px 0 4px;font-size:1.05rem}
.more-card p{margin:0;color:var(--u-muted);font-size:.86rem;line-height:1.4}

/* Mobile bottom nav */
.mnav{display:none}
@media(max-width:760px){
  #view-app .content{padding:20px 16px 96px}
  #view-app .chatview{padding:16px 12px 96px}
  #view-app .rail{display:none}
  .mnav{display:grid;position:fixed;z-index:30;bottom:0;left:0;right:0;grid-template-columns:repeat(4,1fr);background:rgba(255,255,255,.97);border-top:1px solid var(--u-line);padding:7px 7px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -8px 30px rgba(30,45,42,.06)}
  .mnav .nav-item{display:block;text-align:center;font-size:.67rem;color:#687270;font-weight:700;padding:5px 2px;border-radius:10px;background:none;border:0;font-family:inherit}
  .mnav .nav-item svg{display:block;margin:0 auto 4px;width:21px;height:21px}
  .mnav .nav-item.active,.mnav .nav-item:hover{background:var(--u-wash);color:var(--u-teal-deep)}
  .quick-grid,.more-grid{grid-template-columns:1fr}
  .more-grid{grid-template-columns:1fr 1fr}
  .report-summary{grid-template-columns:repeat(3,1fr)}
  .orbit2{height:340px}
  .oring2{width:240px;height:200px}
  .person-core{width:96px}
  .helper-node{width:82px}
  .hn1{left:0}.hn2{right:0}.hn3{left:8px}.hn4{right:6px}
}

/* wizard phone slots carry their own outer label; hide the generic inner one */
#view-onboard .phone-field>label{display:none}

/* ---------- 2026-08-28 polish ---------- */
/* consistent dropdown arrows on every screen (custom teal chevron) */
#view-app select,#view-onboard select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F6E63' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 13px center;background-size:15px;padding-right:40px}
/* task marker: small status dot, not a fake checkbox */
.task2 .tmark{width:10px;height:10px;border-radius:50%;border:0;background:#cfd6d3;margin-top:6px;font-size:0}
.task2.done .tmark{background:var(--u-teal)}
/* stopped pill: soft red */
.tpill.stop{background:var(--u-terra-wash)!important;color:var(--u-danger)!important;border:0!important}
/* contacts counter */
.fc-count{color:var(--u-muted);font-size:.84rem;font-weight:700;margin:0 0 6px}
/* channel + time choice buttons inside the app (match the wizard) */
#view-app .wchoices{display:grid;gap:10px;margin:8px 0 4px}
#view-app .wchoices.two{grid-template-columns:1fr 1fr}
#view-app .wchoice{border:1.5px solid var(--u-line);border-radius:15px;padding:12px 13px;background:#fff;cursor:pointer;text-align:center;font:inherit;font-weight:800;color:var(--u-ink)}
#view-app .wchoice.sel{border-color:var(--u-teal);background:var(--u-wash)}
#view-app .wchoice .wa-i{color:#25D366;vertical-align:-4px;margin-right:6px}
#view-app .wchoice .tg-i{color:#229ED9;vertical-align:-4px;margin-right:6px}
#view-app .wchoices.timechips{grid-template-columns:repeat(4,1fr);gap:8px}
#view-app .wchoices.timechips .wchoice{padding:10px 6px;font-size:.85rem;font-weight:750}
#view-app .wsoft2{background:var(--u-s2);border:1px solid var(--u-line);border-radius:14px;padding:12px 14px;color:var(--u-muted);font-size:.88rem;line-height:1.45;margin:10px 0 0}
#view-app .wsoft2.hidden{display:none}
/* chat: fill the real viewport on every screen size */
#view-app .chatview{display:flex;flex-direction:column;height:100dvh;padding-bottom:24px}
#view-app .chatview .chat{flex:1;min-height:0;overflow-y:auto}
#view-app .chatview .quick{flex-wrap:nowrap;overflow-x:auto}
@media(max-width:760px){
  #view-app .chatview{height:calc(100dvh - 58px);padding:10px 10px calc(76px + env(safe-area-inset-bottom))}
  .a11y-fab{bottom:calc(86px + env(safe-area-inset-bottom));right:10px}
  /* Today: tighter type so the greeting and date each hold one line */
  #view-app .today-greet h2{font-size:1.42rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #view-app .today-greet p{white-space:nowrap;font-size:.86rem}
  .hero-status h3{font-size:1.28rem}
  #view-app .wchoices.timechips{grid-template-columns:repeat(2,1fr)}
}
