/* ============================================================
   INTRISIO — VIP Admin: 5-tab bar (js/admin-nav.js) and the
   one-screen member page (js/admin-team.js). Uses the vip.css tokens.
   ============================================================ */

/* the old long tab row stays in the page for the code, hidden */
body.vip.has-vnav .segs-rail, body.vip.has-vnav #segs { display: none !important; }

/* ---------- main bar ---------- */
body.vip .vnav { display: flex; gap: 4px; padding: 5px; margin: 0 auto 14px; width: max-content; max-width: 100%;
  border: 1px solid var(--v-line); border-radius: 999px; background: var(--v-surface);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); box-shadow: var(--v-shadow); }
body.vip .vnav-b { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 0; width: auto; border: 0; border-radius: 999px;
  padding: 10px 20px; background: transparent; color: var(--v-text-2); font: 600 15px/1 var(--v-font); letter-spacing: 0; text-transform: none;
  cursor: pointer; transition: background .3s var(--v-ease), color .3s; }
body.vip .vnav-b:hover { color: var(--v-text); background: var(--v-surface-2); }
body.vip .vnav-b.on { color: var(--v-text); background: var(--v-surface-3);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--acc) 45%, transparent) inset, 0 6px 18px -8px var(--acc); }
body.vip .vnav-b:focus-visible, body.vip .vsub-b:focus-visible, body.vip .vsub-p:focus-visible, body.vip .m-tile:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
body.vip .vnav-b .ava-xs { margin-left: -8px; }
body.vip .vnav-n { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--acc); color: #fff;
  font: 700 11px/18px var(--v-font); text-align: center; }
body.vip .vnav-dot { position: absolute; top: 7px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }

/* ---------- row under it ---------- */
body.vip .vsub { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0 0 28px; }
body.vip .vsub[hidden] { display: none; }
body.vip .vsub-views, body.vip .vsub-people { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
body.vip .vsub-b, body.vip .vsub-p { display: inline-flex; align-items: center; gap: 7px; margin: 0; width: auto; cursor: pointer;
  border: 1px solid var(--v-line); border-radius: 999px; background: transparent; color: var(--v-text-2);
  font: 600 13px/1 var(--v-font); letter-spacing: 0; text-transform: none; padding: 8px 14px; transition: background .25s, color .25s, border-color .25s; }
body.vip .vsub-p { padding: 5px 12px 5px 5px; }
body.vip .vsub-b:hover, body.vip .vsub-p:hover { color: var(--v-text); background: var(--v-surface-2); }
body.vip .vsub-b.on, body.vip .vsub-p.on { color: var(--v-text); background: var(--v-surface-3); border-color: color-mix(in srgb, var(--acc) 55%, transparent); }
body.vip .vsub-ask { margin: 0; color: var(--v-text-2); font-size: 14px; text-align: center; }

@media (max-width:600px){
  body.vip .vnav { width: 100%; justify-content: space-between; gap: 0; padding: 4px; }
  body.vip .vnav-b { flex: 1 1 0; justify-content: center; padding: 10px 4px; font-size: 13px; gap: 5px; }
  body.vip .vnav-b .ava-xs { display: none; }
  body.vip .vnav-n { min-width: 16px; padding: 0 5px; font-size: 10px; line-height: 16px; }
  body.vip .vsub-people { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  body.vip .vsub-people::-webkit-scrollbar { display: none; }
  body.vip .vsub-p { flex: none; }
}

/* ---------- member page: home, heads up, tool tiles ---------- */
body.vip .m-heads { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; }
body.vip .m-heads:empty { display: none; }
body.vip .m-flag { display: flex; align-items: flex-start; gap: 12px; width: 100%; margin: 0; padding: 12px 16px; cursor: pointer; text-align: left;
  border: 1px solid var(--v-line); border-radius: var(--v-r-sm); background: var(--v-surface); color: var(--v-text);
  font: 500 14px/1.45 var(--v-font); letter-spacing: 0; text-transform: none; }
body.vip .m-flag:hover { background: var(--v-surface-2); }
body.vip .m-flag i { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: #30D158; }
body.vip .m-flag.warn i { background: #FFD60A; }
body.vip .m-flag.bad i { background: #FF453A; }
body.vip .m-flag.ok { cursor: default; color: var(--v-text-2); }
body.vip .m-flag b { font-weight: 700; }
body.vip .m-h { margin: 0 0 10px; font: 700 11px/1 var(--v-font); letter-spacing: .14em; text-transform: uppercase; color: var(--v-text-3); }

/* the old sub-tab pill row becomes a grid of big buttons */
body.vip .member .subsegs.m-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px;
  padding: 0; margin: 0 0 22px; background: none; border: 0; border-radius: 0; overflow: visible; max-width: none; }
body.vip .member .m-tiles .subseg { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; align-self: stretch; gap: 4px; min-height: 78px; margin: 0; width: auto; height: auto;
  padding: 14px 16px; text-align: left; border: 1px solid var(--v-line); border-radius: 18px; background: var(--v-surface);
  color: var(--v-text); box-shadow: none; transition: background .25s, border-color .25s, transform .25s var(--v-ease); }
body.vip .member .m-tiles .subseg:hover { background: var(--v-surface-2); transform: translateY(-1px); }
body.vip .member .m-tiles .subseg.on { background: var(--v-surface-3); border-color: color-mix(in srgb, var(--acc) 60%, transparent);
  box-shadow: 0 8px 24px -14px var(--acc); }
body.vip .m-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; font-size: 15px; font-weight: 700; }
body.vip .m-tile-hint { font-size: 12.5px; font-weight: 500; color: var(--v-text-2); line-height: 1.35; }
body.vip .m-tile-top .seg-n { margin-left: auto; }
body.vip .m-sub:not([hidden]) { animation: v-fade .35s var(--v-ease) both; }
body.vip .m-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
body.vip .m-pane-head h3 { margin: 0; font: 700 20px/1.2 var(--v-font); letter-spacing: -.01em; text-transform: none; color: var(--v-text); }
body.vip .m-pane-x { margin: 0; width: auto; cursor: pointer; border: 1px solid var(--v-line); border-radius: 999px; background: transparent;
  color: var(--v-text-2); font: 600 13px/1 var(--v-font); letter-spacing: 0; text-transform: none; padding: 8px 14px; }
body.vip .m-pane-x:hover { color: var(--v-text); background: var(--v-surface-2); }
body.vip .m-home .m-today { margin-bottom: 18px; }

@media (max-width:600px){
  body.vip .member .subsegs.m-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  body.vip .member .m-tiles .subseg { min-height: 70px; padding: 12px 13px; }
  body.vip .m-tile-top { font-size: 14px; }
  body.vip .m-tile-hint { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce){
  body.vip .m-sub:not([hidden]) { animation: none; }
  body.vip .member .m-tiles .subseg:hover { transform: none; }
}

/* ---------- Team screen (js/admin-teamview.js) ---------- */
body.vip .tv[hidden] { display: none; }
body.vip .tv { display: flex; flex-direction: column; gap: 26px; margin: 0 0 34px; animation: v-fade .5s var(--v-ease) both; }
body.vip .tv-score:empty { display: none; }
body.vip .tv-sec { display: flex; flex-direction: column; gap: 8px; }
body.vip .tv-sec .m-h { margin-bottom: 2px; }
body.vip .tv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
body.vip .tv-link { margin: 0; width: auto; padding: 0; border: 0; background: none; cursor: pointer; color: var(--acc2);
  font: 600 13px/1.3 var(--v-font); letter-spacing: 0; text-transform: none; }
body.vip .tv-link:hover { text-decoration: underline; }
body.vip .tv-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
body.vip .tv-card { display: flex; flex-direction: column; gap: 10px; margin: 0; width: auto; padding: 14px 16px; text-align: left; cursor: pointer;
  border: 1px solid var(--v-line); border-radius: 18px; background: var(--v-surface); color: var(--v-text);
  font: 500 14px/1.45 var(--v-font); letter-spacing: 0; text-transform: none; transition: background .25s, border-color .25s, transform .25s var(--v-ease); }
body.vip .tv-card:hover { background: var(--v-surface-2); border-color: color-mix(in srgb, var(--acc) 50%, transparent); transform: translateY(-1px); }
body.vip .tv-card:focus-visible, body.vip .tv-link:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
body.vip .tv-card-top { display: flex; align-items: center; gap: 10px; }
body.vip .tv-card .ava { --s: 36px; }
body.vip .tv-who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
body.vip .tv-who b { font-size: 15px; }
body.vip .tv-who span { font-size: 12.5px; color: var(--v-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.vip .tv-st { flex: none; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(48,209,88,.16); color: #30D158; }
body.vip .tv-st.warn { background: rgba(255,214,10,.16); color: #E0B800; }
body.vip .tv-st.bad { background: rgba(255,69,58,.16); color: #FF453A; }
body.vip .tv-focus { color: var(--v-text); }
body.vip .tv-focus.quiet { color: var(--v-text-3); }
body.vip .tv-foot { font-size: 12px; color: var(--v-text-3); }
body.vip .tv-brief-h { margin: 6px 0 -14px; font: 700 11px/1 var(--v-font); letter-spacing: .14em; text-transform: uppercase; color: var(--v-text-3); }
[data-theme="light"] body.vip .tv-st { color: #1E8E3E; }
[data-theme="light"] body.vip .tv-st.warn { color: #8A6200; }
[data-theme="light"] body.vip .tv-st.bad { color: #C4302B; }
@media (max-width:600px){ body.vip .tv-people { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce){ body.vip .tv, body.vip .tv-card:hover { animation: none; transform: none; } }
[data-theme="light"] body.vip .tv-link { color: var(--acc); }
body.vip #tv-body { display: flex; flex-direction: column; gap: 26px; }

/* ---------- Team screen lists: jobs, idea parking lot, lessons ---------- */
body.vip .tv-hint { margin: -2px 0 4px; font-size: 13px; color: var(--v-text-2); max-width: 70ch; }
body.vip .tv-sub { margin: 6px 0 0; font: 700 11px/1 var(--v-font); letter-spacing: .08em; text-transform: uppercase; color: var(--v-text-3); }
body.vip .tv-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--v-line); border-radius: var(--v-r-sm); overflow: hidden; background: var(--v-surface); }
body.vip .tv-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 11px 14px; border-top: 1px solid var(--v-line); font-size: 14px; }
body.vip .tv-list li:first-child { border-top: 0; }
body.vip .tv-job { flex: 1 1 220px; min-width: 0; color: var(--v-text); }
body.vip .tv-pair { display: inline-flex; align-items: center; gap: 6px; color: var(--v-text); font-weight: 600; font-size: 13px; }
body.vip .tv-pair.warn { color: #E0B800; }
body.vip .tv-tag { font: 700 10px/1 var(--v-font); letter-spacing: .1em; text-transform: uppercase; color: var(--v-text-3); }
body.vip .tv-meta { font-size: 12px; color: var(--v-text-3); }
body.vip .tv-kind { flex: none; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(48,209,88,.16); color: #30D158; }
body.vip .tv-kind.slipped { background: rgba(255,69,58,.16); color: #FF453A; }
body.vip .tv-act { margin: 0; width: auto; padding: 6px 12px; cursor: pointer; border: 1px solid color-mix(in srgb, var(--acc) 55%, transparent); border-radius: 999px;
  background: transparent; color: var(--v-text); font: 600 12.5px/1 var(--v-font); letter-spacing: 0; text-transform: none; }
body.vip .tv-act:hover { background: var(--v-surface-2); }
body.vip .tv-act:disabled { opacity: .5; cursor: wait; }
body.vip .tv-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; max-width: none; }
body.vip .tv-form input[type=text] { flex: 1 1 240px; width: auto; min-width: 0; }
body.vip .tv-form select { flex: 0 1 150px; width: auto; }
body.vip .tv-form .sq-btn { flex: none; }
body.vip .tv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
body.vip .tv-chip { margin: 0; width: auto; padding: 6px 12px; cursor: pointer; border: 1px dashed var(--v-line-2); border-radius: 999px; background: transparent;
  color: var(--v-text-2); font: 500 12.5px/1 var(--v-font); letter-spacing: 0; text-transform: none; }
body.vip .tv-chip:hover { color: var(--v-text); border-style: solid; }
[data-theme="light"] body.vip .tv-pair.warn { color: #8A6200; }
[data-theme="light"] body.vip .tv-kind { color: #1E8E3E; }
[data-theme="light"] body.vip .tv-kind.slipped { color: #C4302B; }

/* tasks: "done means" + backup */
body.vip .tk-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.vip .tk-means { font-size: 12.5px; color: var(--v-text-2); }
body.vip .tk-add .tk-means-in { flex: 1 1 260px; width: auto; }
body.vip .tk-add select { flex: 0 1 170px; width: auto; }

/* Team tab: brief first, then this box (admin-teamview.js) */
body.vip #team-top { margin: 34px 0 0; }
body.vip #team-top .tv-brief-h { margin: 0 0 -14px; }
