/* The admin's Today and Team (portal rethink stage 15a; adminnew.js). Only drawn for
   an admin while CONFIG.ADMIN_NEW is on for her (or the owner's View-as preview);
   every rule is scoped under .an, so nothing else changes. Red only for what is
   missing or not in. */
.an { --an-ink: #111; --an-card: #fff; --an-line: #E3E3DC; --an-line2: #EFEFE9; --an-mute: #73736D; --an-soft: #ECECE5; --an-red: #D6362B;
  color: var(--an-ink); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; }
.an h1, .an h2, .an h3, .an p { margin: 0; }
.an button { font: inherit; color: inherit; }
.an .an-mute { color: var(--an-mute); }
.an .an-small { font-size: 12.5px; }
.an .is-red { color: var(--an-red); font-style: normal; }
.an .an-empty { margin: 14px 0; color: var(--an-mute); font-size: 14px; }
.an .an-big { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.an .an-sub { margin: 6px 0 0; color: var(--an-mute); font-size: 15px; }
.an .an-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 16px; border: 1px solid var(--an-line);
  border-radius: 10px; background: #fff; font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.an .an-btn.is-k { background: var(--an-ink); border-color: var(--an-ink); color: #fff; }
.an .an-link { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font-size: 14px; font-weight: 600; cursor: pointer; }
.an .an-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #EBEBE4; }
.an .an-seg button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--an-mute); font-size: 14px; cursor: pointer; white-space: nowrap; }
.an .an-seg button.is-on { background: #fff; color: var(--an-ink); font-weight: 600; box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08); }

/* avatars and status dots */
.an .an-av { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  color: #fff; font-size: 11.5px; font-weight: 700; background: #5E6A78; }
.an .an-av-1 { background: #7A6450; } .an .an-av-2 { background: #586E5A; } .an .an-av-3 { background: #7A5C6E; } .an .an-av-4 { background: #4F6A86; } .an .an-av-5 { background: #6E6A5A; }
.an .an-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: #B9B9B0; }
.an .an-dot.is-work { background: #2E9E5B; } .an .an-dot.is-break { background: #E0A200; }
.an .an-st { display: inline-flex; align-items: center; gap: 8px; }
.an .an-st i { width: 8px; height: 8px; border-radius: 50%; background: #B9B9B0; }
.an .an-st.is-work i { background: #2E9E5B; } .an .an-st.is-break i { background: #E0A200; }
.an .an-st.is-notin { color: var(--an-red); } .an .an-st.is-notin i { background: var(--an-red); }

/* cards */
.an .an-card { background: var(--an-card); border: 1px solid var(--an-line); border-radius: 16px; padding: 16px 22px; }
.an .an-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; min-height: 30px; }
.an .an-card > header h2 { font-size: 16px; font-weight: 600; }
.an .an-card > header > span { color: var(--an-mute); font-size: 13.5px; }
.an .an-card > header.an-phd > span { color: inherit; font-size: inherit; }
.an .an-card > header.an-phd > .an-av { color: #fff; }
.an .an-needs { padding: 16px 0 0; overflow: hidden; }
.an .an-needs > header { padding: 0 22px 8px; }
.an .an-nrow { display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-top: 1px solid var(--an-line2); border-left: 3px solid var(--an-ink); }
.an .an-nrow.is-alert { border-left-color: var(--an-red); }
.an .an-nmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.an .an-nmain b { font-size: 15px; font-weight: 600; }
.an .an-nmain span { color: var(--an-mute); font-size: 13.5px; }

/* team today and everyone */
.an .an-table { margin: 4px -22px -16px; }
.an .an-tr { display: grid; grid-template-columns: minmax(130px, 1.4fr) minmax(110px, 1fr) minmax(80px, .8fr) minmax(130px, 1.2fr) minmax(80px, .8fr); align-items: center; column-gap: 14px;
  width: 100%; min-height: 50px; padding: 0 22px; border: 0; border-top: 1px solid var(--an-line2); background: none; text-align: left; font-size: 14.5px; }
.an .an-tr > :last-child { text-align: right; }
.an .an-th { min-height: 36px; border-top: 0; color: var(--an-mute); font-size: 13px; }
.an .an-tteam .an-tr { grid-template-columns: minmax(120px, 1.2fr) minmax(110px, 1fr) minmax(70px, .7fr) minmax(110px, 1fr) minmax(90px, .9fr) minmax(140px, 1.6fr); cursor: pointer; }
.an .an-tteam .an-tr > :last-child { text-align: left; }
.an .an-tteam .an-th { cursor: default; }
.an .an-tteam .an-tr.is-open { background: #FFF8D6; box-shadow: inset 3px 0 0 #F5C500; }
.an .an-tteam button.an-tr:hover:not(.is-open) { background: #FAFAF7; }
.an .an-who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.an .an-who b { font-weight: 600; }
.an .an-clients { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an .an-tasks { display: inline-flex; align-items: center; gap: 10px; }
.an .an-tasks b { font-weight: 500; white-space: nowrap; }
.an .an-bar { flex: 1; max-width: 120px; min-width: 40px; height: 5px; border-radius: 3px; background: #EBEBE4; overflow: hidden; }
.an .an-bar i { display: block; height: 100%; background: var(--an-ink); border-radius: 3px; }

/* desktop and iPad */
.an-desk { padding: 4px 0 24px; }
.an-desk .an-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.an-desk .an-grid.is-team { grid-template-columns: minmax(0, 1fr) 360px; }
.an-desk .an-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.an-desk .an-main > .an-sub { margin-top: -12px; }
.an-desk .an-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.an .an-lrow { display: grid; grid-template-columns: 1fr 56px 76px; column-gap: 8px; align-items: baseline; padding: 6px 0 2px; font-size: 14.5px; }
.an .an-lrow b { text-align: right; font-weight: 600; }
.an .an-lrow.an-lth { color: var(--an-mute); font-size: 13px; }
.an .an-lrow.an-lth span:not(:first-child) { text-align: right; }
.an .an-lrow.is-idle { color: var(--an-mute); }
.an .an-lrow.is-idle b { font-weight: 400; }
.an .an-lbar { grid-column: 1 / -1; height: 4px; margin-top: 6px; border-radius: 2px; background: #EBEBE4; overflow: hidden; }
.an .an-lbar i { display: block; height: 100%; background: var(--an-ink); }
.an .an-wrow { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14.5px; }
.an .an-wrow b { font-weight: 600; }
.an .an-wrow b.is-red { color: var(--an-red); }
.an .tt { display: block; }
.an .an-person h3 { margin: 18px 0 8px; color: var(--an-mute); font-size: 13.5px; font-weight: 600; }
.an .an-phd { display: flex; align-items: center; gap: 14px; justify-content: flex-start !important; }
.an .an-phd .an-av { width: 48px; height: 48px; font-size: 17px; }
.an .an-phd b { display: block; font-size: 18px; font-weight: 600; }
.an .an-phd span span, .an .an-phd > span > span { color: var(--an-mute); font-size: 13.5px; }
.an .an-btns { display: flex; gap: 10px; margin: 12px 0 8px; }
.an .an-task { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 14.5px; }
.an .an-task em { font-style: normal; color: var(--an-mute); }
.an .an-task.is-done > span:last-child { color: var(--an-mute); text-decoration: line-through; }
.an .an-check { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid #C9C9C0; border-radius: 50%; }
.an .an-task.is-done .an-check { background: var(--an-ink); border-color: var(--an-ink); color: #fff; }
.an .an-wk { display: flex; gap: 14px; padding: 5px 0; font-size: 14.5px; }
.an .an-wk b { width: 34px; }
.an .an-pfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--an-line2); font-size: 13.5px; }
.an-classicbar { margin: 0 0 12px; }
@media (max-width: 1240px) {
  .an-desk .an-grid, .an-desk .an-grid.is-team { grid-template-columns: minmax(0, 1fr); }
  .an-desk .an-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
@media (max-width: 980px) {
  .an .an-tteam .an-tr { grid-template-columns: minmax(110px, 1.2fr) minmax(100px, 1fr) minmax(64px, .7fr) minmax(90px, 1fr) minmax(80px, .8fr); }
  .an .an-tteam .an-tr > .an-clients { display: none; }
}
html.tp-ipad .an .an-btn, html.tp-ipad .an .an-seg button, html.tp-ipad .an .an-link { min-height: 44px; }
html.tp-ipad .an .an-tteam .an-tr { min-height: 52px; }

/* phone (p-admin-today, p-admin-team) */
.an-phone { padding: 0 0 24px; }
.an-phone .an-phead { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 14px; }
.an-phone .an-phead h1 { font-size: 34px; font-weight: 700; letter-spacing: -.01em; }
.an-phone .an-phead span { color: var(--an-mute); font-size: 17px; }
.an-phone .an-big { font-size: 25px; line-height: 1.2; margin-bottom: 4px; }
.an-phone .an-sub { margin: 0 0 14px; }
.an-phone .an-big + .an-card { margin-top: 14px; }
.an-phone .an-card { margin-bottom: 14px; padding: 14px 0 0; border-radius: 18px; overflow: hidden; }
.an-phone .an-card > header { padding: 0 16px 8px; }
.an-phone .an-nrow { padding: 12px 16px; }
.an-phone .an-btn { min-height: 44px; }
.an-phone .an-prow { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; border-top: 1px solid var(--an-line2); }
.an-phone .an-prow .an-av { width: 36px; height: 36px; font-size: 13px; }
.an-phone .an-pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.an-phone .an-pmain b { font-size: 16px; font-weight: 600; }
.an-phone .an-pmain b em { font-style: normal; font-weight: 400; color: var(--an-mute); }
.an-phone .an-pmain span { color: var(--an-mute); font-size: 14px; }
.an-phone .an-pnum { flex: none; color: var(--an-mute); font-size: 15px; }
.an-phone .an-seeall { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; padding: 0 16px; border: 0; border-top: 1px solid var(--an-line2);
  background: none; font-size: 16px; font-weight: 600; cursor: pointer; }
.an-phone .an-seeall.is-plain { border: 1px solid var(--an-line); border-radius: 14px; background: #fff; }
.an-phone .an-pteam > .an-prow:first-child { border-top: 0; }

/* the admin's iPhone tab bar: Team and Clients in the two middle slots */
html.tp-ios-app .mobile-bottom-nav a.an-slot-team .mobile-nav-icon {
  --tp-ico: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"%3E%3Ccircle cx="9" cy="8" r="3.2"/%3E%3Cpath d="M3.5 20c0-3 2.5-5 5.5-5s5.5 2 5.5 5"/%3E%3Cpath d="M16 5.5a3 3 0 0 1 0 5.8M17.5 20c0-2.4-1-4.2-2.5-5"/%3E%3C/svg%3E');
}
html.tp-ios-app .mobile-bottom-nav a.an-slot-clients .mobile-nav-icon {
  --tp-ico: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23000" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"%3E%3Crect x="4" y="3.5" width="12" height="17" rx="1.5"/%3E%3Cpath d="M16 9h4v11.5H4"/%3E%3Cpath d="M8 7h2M8 11h2M8 15h2"/%3E%3C/svg%3E');
}
