/* ==================================================================
   TEAMS CSS — v1.45.11 rebuild
   Copied from 05_Teams_APPROVED_LOCKED.html, including its "pill
   polish" and "team member avatars" layers, merged in the file's own
   cascade order. Values tagged "file 05". 10/11px text bumped one step
   per amendment 4j. Pill dots sit beside the text (file 05's grid
   layout pushed them above the text — a glitch, fixed with flex).
   ================================================================== */

[data-new-ui] .nu-tm5-context { margin-bottom: 14px; }                                   /* file 05 */
[data-new-ui] .nu-tm5-h1 { margin: 0; font-size: 31px; line-height: 1.1; font-weight: 900; letter-spacing: -.03em; color: var(--nu-c-text-primary); }   /* file 05 */

[data-new-ui] .nu-tm5-icon { width: 18px; height: 18px; display: block; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }   /* file 05 */

[data-new-ui] .nu-tm5-card {
  background: linear-gradient(180deg, #fff 0%, #fbfdfe 100%);                        /* file 05 */
  border: 1px solid #d7e3ec; border-radius: 6px;                                     /* file 05 */
  box-shadow: 0 7px 18px rgba(8,32,51,.055); padding: 12px;                          /* file 05 */
}
[data-new-ui] .nu-tm5-cardhead {
  display: flex; align-items: center; justify-content: space-between;               /* file 05 */
  border-bottom: 1px solid #d7e3ec; padding: 0 1px 9px; margin-bottom: 2px;          /* file 05 */
}
[data-new-ui] .nu-tm5-cardtitle { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 900; color: #0b1d37; }   /* file 05 */
[data-new-ui] .nu-tm5-mini { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: #fff; background: #0cab78; }   /* file 05 */
[data-new-ui] .nu-tm5-searchbox {
  width: 365px; height: 40px; border: 1px solid #cbd9e7; border-radius: 6px; background: #fff;   /* file 05 */
  display: flex; align-items: center; gap: 8px; padding: 0 11px; color: #627b92;     /* file 05 */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 5px rgba(8,32,51,.035);      /* file 05 */
}
[data-new-ui] .nu-tm5-searchbox input {
  border: 0; outline: 0; background: transparent; flex: 1; min-width: 0;
  font-family: var(--nu-t-family); font-size: 13px; font-weight: 600; color: #0b1d37;   /* file 05 */
}
[data-new-ui] .nu-tm5-searchbox input::placeholder { color: #627b92; }                 /* file 05 */

/* ---- Who's on what -------------------------------------------- */
[data-new-ui] .nu-tm5-thead {
  display: grid; grid-template-columns: 250px minmax(95px, max-content) 1fr 28px; gap: 14px;   /* file 05 */
  padding: 10px 0 8px; color: #6b8296; font-size: 12px; font-weight: 900;           /* file 05 (4j: was 10px) */
  letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid #dce7ef;   /* file 05 */
}
[data-new-ui] .nu-tm5-row {
  display: grid; grid-template-columns: 250px minmax(95px, max-content) 1fr 28px;   /* file 05 */
  align-items: center; gap: 14px; min-height: 76px; border-bottom: 1px solid #e8eef3;   /* file 05 */
  cursor: pointer;
}
[data-new-ui] .nu-tm5-person { display: flex; align-items: center; gap: 12px; }      /* file 05 */
[data-new-ui] .nu-tm5-name { font-size: 17px; font-weight: 900; color: #0b1d37; }    /* file 05 */
[data-new-ui] .nu-tm5-name-sm { font-size: 14px; }                                    /* file 05 */
[data-new-ui] .nu-tm5-sub { font-size: 13px; color: var(--nu-c-text-muted); font-weight: 650; }   /* file 05 (4j grey) */
[data-new-ui] .nu-tm5-jobs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }   /* file 05 */
[data-new-ui] .nu-tm5-chev { color: #355777; display: flex; justify-content: flex-end; }   /* file 05 */
[data-new-ui] .nu-tm5-chev .nu-tm5-icon { width: 20px; height: 20px; }
[data-new-ui] .nu-tm5-empty { padding: 18px 0; color: var(--nu-c-text-muted); font-size: 13px; }
[data-new-ui] .nu-tm5-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; }   /* file 05 */

/* Avatars — solid identity circles (file 05 "team member avatars") */
[data-new-ui] .nu-tm5-av {
  display: grid; place-items: center; flex: 0 0 auto; aspect-ratio: 1 / 1; border-radius: 50%;   /* file 05 */
  color: #fff; font-weight: 900; line-height: 1; text-align: center;                 /* file 05 */
  border: 1px solid rgba(12,42,64,.20);                                               /* file 05 */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 2px 5px rgba(8,32,51,.10);     /* file 05 */
  transition: transform .12s ease, box-shadow .14s ease, filter .14s ease;           /* file 05 */
}
[data-new-ui] .nu-tm5-av-lg { width: 44px; height: 44px; font-size: 13px; }           /* file 05 */
[data-new-ui] .nu-tm5-av-sm { width: 32px; height: 32px; font-size: 12px; justify-self: start; }   /* file 05 (4j: was 10px) */
[data-new-ui] .nu-tm5-av-blue   { background: #4f86dc; }   /* file 05 (mp) */
[data-new-ui] .nu-tm5-av-purple { background: #9685e3; }   /* file 05 (dc) */
[data-new-ui] .nu-tm5-av-green  { background: #37b98b; }   /* file 05 (pb) */
[data-new-ui] .nu-tm5-av-orange,
[data-new-ui] .nu-tm5-av-amber  { background: #f18419; }   /* file 05 (pab) */
[data-new-ui] .nu-tm5-row:hover .nu-tm5-av,
[data-new-ui] .nu-tm5-workrow:hover .nu-tm5-av {
  filter: brightness(1.02); transform: translateY(-1px);                             /* file 05 */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.20), 0 3px 7px rgba(8,32,51,.12);     /* file 05 */
}

/* Pills — file 05 "pill polish" (dot beside text) */
[data-new-ui] .nu-tm5-state,
[data-new-ui] .nu-tm5-jobchip,
[data-new-ui] .nu-tm5-count,
[data-new-ui] .nu-tm5-workpill {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  border: 1px solid transparent; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 2px 5px rgba(8,32,51,.055);      /* file 05 */
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;   /* file 05 */
}
[data-new-ui] .nu-tm5-state::before,
[data-new-ui] .nu-tm5-jobchip::before,
[data-new-ui] .nu-tm5-count::before,
[data-new-ui] .nu-tm5-workpill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: 0 0 auto;   /* file 05 */
  margin-right: 7px;                                                                   /* file 05 */
  box-shadow: 0 0 0 2px rgba(255,255,255,.72), 0 1px 2px rgba(8,32,51,.18);           /* file 05 */
}
[data-new-ui] .nu-tm5-state:hover,
[data-new-ui] .nu-tm5-jobchip:hover,
[data-new-ui] .nu-tm5-count:hover,
[data-new-ui] .nu-tm5-workpill:hover {
  transform: translateY(-1px);                                                         /* file 05 */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 5px 10px rgba(8,32,51,.10);       /* file 05 */
}
[data-new-ui] .nu-tm5-state { height: 34px; border-radius: 999px; padding: 0 13px 0 10px; letter-spacing: .01em; font-size: 12px; font-weight: 900; }   /* file 05 */
[data-new-ui] .nu-tm5-onsite    { background: linear-gradient(180deg,#effcf7 0%,#d8f4e9 100%); border-color: #a9ddcb; color: #087451; }   /* file 05 */
[data-new-ui] .nu-tm5-onsite::before { background: #11ae7b; }   /* file 05 */
[data-new-ui] .nu-tm5-available { background: linear-gradient(180deg,#f7fafc 0%,#e7eef4 100%); border-color: #c7d5df; color: #2b4e68; }   /* file 05 */
[data-new-ui] .nu-tm5-available::before { background: #7692a7; }   /* file 05 */
[data-new-ui] .nu-tm5-transit   { background: linear-gradient(180deg,#fff9ec 0%,#ffe9c4 100%); border-color: #edcf92; color: #986100; }   /* file 05 */
[data-new-ui] .nu-tm5-transit::before { background: #e59a18; }   /* file 05 */

[data-new-ui] .nu-tm5-jobchip {
  height: 34px; padding: 0 13px 0 10px; border-radius: 999px;                         /* file 05 */
  background: linear-gradient(180deg,#fafdff 0%,#edf4f8 100%); border-color: #d0dfe8; color: #24465f;   /* file 05 */
  font-size: 12px; font-weight: 800;                                                  /* file 05 */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 4px rgba(8,32,51,.04);       /* file 05 */
}
[data-new-ui] .nu-tm5-jobchip::before { background: #18b88a; }   /* file 05 */
[data-new-ui] .nu-tm5-jobchip:hover { background: linear-gradient(180deg,#f4fcf9 0%,#e1f4ed 100%); border-color: #a7d8ca; color: #0a7657; }   /* file 05 */
[data-new-ui] .nu-tm5-morechip { background: linear-gradient(180deg,#f5f9fc 0%,#e7eef4 100%); border-color: #c9d7e2; color: #45647b; cursor: default; }   /* file 05 */
[data-new-ui] .nu-tm5-morechip::before { background: #91a7b8; }   /* file 05 */

/* ---- Crew Planner + Team workload ----------------------------- */
[data-new-ui] .nu-tm5-grid2 { display: grid; grid-template-columns: 1.12fr .88fr; gap: 14px; margin-top: 14px; }   /* file 05 — boxes stretch to equal height */
[data-new-ui] .nu-tm5-newcrew {
  height: 40px; padding: 0 15px; border: 1px solid #0aa276; border-radius: 999px;     /* file 05 */
  background: linear-gradient(180deg,#18bf92 0%,#0ca879 100%); color: #fff;           /* file 05 */
  font-family: var(--nu-t-family); font-size: 12px; font-weight: 900; cursor: pointer;   /* file 05 */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 4px 9px rgba(12,168,121,.18);    /* file 05 */
}
[data-new-ui] .nu-tm5-crewrow {
  display: grid; grid-template-columns: 1fr 180px 85px 80px 20px;                    /* file 05 */
  align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid #e8eef3;   /* file 05 */
}
[data-new-ui] .nu-tm5-crewrow:last-child { border-bottom: 0; }                          /* file 05 */
[data-new-ui] .nu-tm5-crewname { font-size: 14px; font-weight: 900; color: #0b1d37; }   /* file 05 */
[data-new-ui] .nu-tm5-stack { display: flex; gap: 4px; }                                /* file 05 */
[data-new-ui] .nu-tm5-miniav {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;  /* file 05 */
  font-size: 11px; font-weight: 900; color: #23425c; background: #dceaf3;             /* file 05 (4j: was 9px) */
  border: 1px solid rgba(114,151,173,.28);                                            /* file 05 */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 2px 5px rgba(8,32,51,.06);        /* file 05 */
}
[data-new-ui] .nu-tm5-miniav-green  { background: #d7f0e8; }   /* file 05 */
[data-new-ui] .nu-tm5-miniav-orange,
[data-new-ui] .nu-tm5-miniav-amber  { background: #ffead0; }   /* file 05 */
[data-new-ui] .nu-tm5-miniav-purple { background: #e1dbff; }   /* file 05 */
[data-new-ui] .nu-tm5-count {
  min-width: 42px; height: 30px; border-radius: 999px; padding: 0 10px;               /* file 05 */
  background: linear-gradient(180deg,#f5fafc 0%,#e8f1f6 100%); border-color: #c9d9e3; color: #315b76;   /* file 05 */
  font-size: 13px; font-weight: 900;                                                  /* file 05 (4j: was 11px) */
}
[data-new-ui] .nu-tm5-count::before { background: #5f8aa3; margin-right: 6px; }        /* file 05 */
[data-new-ui] .nu-tm5-count-amber { background: #fff0d4; color: #9b6600; }              /* file 05 */
[data-new-ui] .nu-tm5-count-red   { background: #ffe3e3; color: #c33e38; }              /* file 05 */
[data-new-ui] .nu-tm5-manage {
  height: 34px; border: 1px solid #cbd9e7; border-radius: 6px; background: #fff;     /* file 05 */
  color: #233f5b; font-family: var(--nu-t-family); font-size: 12px; font-weight: 900; cursor: pointer;   /* file 05 */
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
[data-new-ui] .nu-tm5-showmore { padding: 0 12px; }                                     /* file 05 */
[data-new-ui] .nu-tm5-down { display: inline-flex; transform: rotate(90deg); }          /* file 05 */
[data-new-ui] .nu-tm5-down.nu-tm5-up { transform: rotate(-90deg); }
[data-new-ui] .nu-tm5-dots { border: 0; background: none; padding: 0; color: #4d6780; cursor: pointer; display: flex; justify-content: center; }   /* file 05 */

[data-new-ui] .nu-tm5-workrow { display: grid; grid-template-columns: 44px 1fr 185px 104px;   /* fixed pill column so bars line up (Phil) */ align-items: center; gap: 10px; min-height: 64px; }   /* file 05 */
[data-new-ui] .nu-tm5-bar { height: 12px; background: #e6edf2; border-radius: 8px; overflow: hidden; }   /* file 05 */
[data-new-ui] .nu-tm5-fill { height: 100%; border-radius: 8px; }                        /* file 05 */
[data-new-ui] .nu-tm5-fill-high   { background: #ef5552; }   /* file 05 */
[data-new-ui] .nu-tm5-fill-medium { background: #f59a20; }   /* file 05 */
[data-new-ui] .nu-tm5-fill-low    { background: #17b888; }   /* file 05 */
[data-new-ui] .nu-tm5-fill-avail  { background: #7f99b0; }   /* file 05 */
[data-new-ui] .nu-tm5-workpill { height: 30px; border-radius: 999px; padding: 0 11px; min-width: 74px; justify-self: end; font-size: 13px; font-weight: 900; }   /* file 05 (4j: was 11px) */
[data-new-ui] .nu-tm5-high   { background: linear-gradient(180deg,#fff2f1 0%,#ffe0df 100%); border-color: #f0b7b3; color: #c63e39; }   /* file 05 */
[data-new-ui] .nu-tm5-high::before { background: #e34e49; }   /* file 05 */
[data-new-ui] .nu-tm5-low    { background: linear-gradient(180deg,#effcf7 0%,#dcf6ed 100%); border-color: #abdcc9; color: #0a7d52; }   /* file 05 */
[data-new-ui] .nu-tm5-low::before { background: #17b888; }   /* file 05 */
[data-new-ui] .nu-tm5-medium { background: linear-gradient(180deg,#fff8e9 0%,#ffedc9 100%); border-color: #e7cb91; color: #976400; }   /* file 05 */
[data-new-ui] .nu-tm5-medium::before { background: #e4a028; }   /* file 05 */
[data-new-ui] .nu-tm5-avail  { background: linear-gradient(180deg,#f7fafc 0%,#e7eef5 100%); border-color: #c7d5df; color: #38556e; }   /* file 05 */
[data-new-ui] .nu-tm5-avail::before { background: #7f99ad; }   /* file 05 */
[data-new-ui] .nu-tm5-info {
  margin-top: 12px; background: #eaf3ff; border: 1px solid #d1e1f3; border-radius: 8px;   /* file 05 */
  padding: 10px 12px; color: #42617d; font-size: 12px; font-weight: 650;             /* file 05 */
}
[data-new-ui] .nu-tm5-info strong { font-weight: 900; color: #234866; }                /* file 05 */
[data-new-ui] .nu-tm5-info a { color: inherit; }                                        /* file 05: underlined link */

/* ---- Responsive (file 05 breakpoints) ------------------------- */
@media (max-width: 1000px) {
  [data-new-ui] .nu-tm5-grid2 { grid-template-columns: 1fr; }                           /* file 05 */
  [data-new-ui] .nu-tm5-row, [data-new-ui] .nu-tm5-thead { grid-template-columns: 1fr 110px 1fr 24px; }   /* file 05 */
  [data-new-ui] .nu-tm5-searchbox { width: 250px; }                                     /* file 05 */
}
@media (max-width: 760px) {
  [data-new-ui] .nu-tm5-thead { display: none; }
  [data-new-ui] .nu-tm5-row { grid-template-columns: 1fr; gap: 8px; padding: 11px 0; }   /* file 05 */
  [data-new-ui] .nu-tm5-chev { display: none; }
  [data-new-ui] .nu-tm5-cardhead { flex-wrap: wrap; gap: 8px; }
  [data-new-ui] .nu-tm5-searchbox { width: 100%; }                                      /* file 05 */
  [data-new-ui] .nu-tm5-crewrow { grid-template-columns: 1fr 1fr 50px 70px 20px; }      /* file 05 */
  [data-new-ui] .nu-tm5-workrow { grid-template-columns: 36px 1fr 74px; }
  [data-new-ui] .nu-tm5-bar { grid-column: 2 / 4; grid-row: 2; }
}

/* v1.45.46: crew editor (New crew / Manage crew) */
[data-new-ui] .nu-crew-ed { display: flex; flex-direction: column; gap: 12px; }
[data-new-ui] .nu-crew-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
[data-new-ui] .nu-crew-person { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 800; font-size: var(--nu-t-size-md); color: #24425e; cursor: pointer; }
[data-new-ui] .nu-crew-person input { width: 18px; height: 18px; flex: none; margin: 0; }
[data-new-ui] .nu-crew-person small { font-weight: 600; color: var(--nu-c-text-muted); }
[data-new-ui] .nu-crew-err { color: var(--nu-c-red); font-weight: 700; min-height: 1em; }
[data-new-ui] .nu-crew-foot { display: flex; justify-content: space-between; gap: 10px; }
[data-new-ui] .nu-crew-del { color: var(--nu-c-red); }

/* v2.0 (Phil: "does this look SaaS?" — yes): Teams de-SaaS, outranks file 05 here.
   No dots inside the status / job / count / workload pills; "+ New Crew" is a plain square button like Manage / Back;
   the "⋯" next to Manage is gone (it did the same as Manage). */
[data-new-ui] .nu-tm5-state::before, [data-new-ui] .nu-tm5-jobchip::before,
[data-new-ui] .nu-tm5-count::before, [data-new-ui] .nu-tm5-workpill::before { display: none !important; }
[data-new-ui] .nu-tm5-newcrew {
  height: 36px; padding: 0 14px; border-radius: var(--nu-r-base); box-shadow: none !important;
  background: var(--nu-c-surface-card); color: #24425e; border: 1px solid var(--nu-c-border-strong);
  font-size: var(--nu-t-size-sm); font-weight: var(--nu-t-weight-black);
}
[data-new-ui] .nu-tm5-newcrew:hover { background: #f8fbfd; filter: none; transform: none; }
/* crew editor: put on a job */
[data-new-ui] .nu-crew-onjob { display: flex; gap: 8px; }
[data-new-ui] .nu-crew-onjob select { flex: 1; min-width: 0; height: 38px; }
[data-new-ui] .nu-crew-note { color: var(--nu-c-text-muted); font-weight: 600; }

/* v2.0 (Phil): arrow column gone; the finger only on things that do something */
[data-new-ui] .nu-tm5-row, [data-new-ui] .nu-tm5-thead { grid-template-columns: 250px minmax(95px, max-content) 1fr; }
[data-new-ui] .nu-tm5-row { cursor: default; }
[data-new-ui] .nu-tm5-person { cursor: pointer; border-radius: 8px; }
[data-new-ui] .nu-tm5-person:hover .nu-tm5-name { text-decoration: underline; }
[data-new-ui] .nu-tm5-state, [data-new-ui] .nu-tm5-workpill, [data-new-ui] .nu-tm5-count { cursor: default; }
[data-new-ui] .nu-tm5-jobchip, [data-new-ui] .nu-tm5-morechip { cursor: pointer; }
[data-new-ui] .nu-tm5-morechip { border: 0; font-family: var(--nu-t-family); }
[data-new-ui] .nu-tm5-morewrap { position: relative; display: inline-flex; }
[data-new-ui] .nu-tm5-moremenu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 220px; max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; padding: 6px; background: var(--nu-c-surface-card);
  border: 1px solid var(--nu-c-border-default); border-radius: var(--nu-r-md); box-shadow: 0 10px 28px rgba(9,30,55,.16);
}
[data-new-ui] .nu-tm5-moremenu[hidden] { display: none; }
[data-new-ui] .nu-tm5-moremenu a { display: block; padding: 8px 10px; border-radius: var(--nu-r-md); color: #24425e; text-decoration: none; font-size: var(--nu-t-size-sm); font-weight: var(--nu-t-weight-heavy); white-space: nowrap; }
[data-new-ui] .nu-tm5-moremenu a:hover { background: #f6f9fc; }
@media (max-width: 1100px){ [data-new-ui] .nu-tm5-row, [data-new-ui] .nu-tm5-thead { grid-template-columns: 1fr 110px 1fr; } }
@media (max-width: 767px){ [data-new-ui] .nu-tm5-row { grid-template-columns: 1fr; } }
