/* The Dashboard table: toolbar, dropdowns, rows, paging, and cards on small screens. */
.tbl { display: grid; gap: 14px; min-width: 0; }
.tbl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tbl-search { display: flex; align-items: center; gap: 10px; height: 40px; width: min(300px, 100%); padding: 0 14px; background: var(--card); border: 1px solid rgba(20,18,18,.12); border-radius: 12px; color: var(--muted); transition: border-color .16s, box-shadow .16s; }
.tbl-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,18,18,.07); }
.tbl-search svg { width: 16px; height: 16px; flex: none; } .tbl-search input { border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); flex: 1; min-width: 0; }
.tbl-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.tbl-clear { font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 6px 4px; } .tbl-clear:hover { color: var(--ink); }
.dd { position: relative; display: inline-block; }
.dd-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 14px; background: var(--card); border: 1px solid rgba(20,18,18,.12); border-radius: 12px; font: inherit; font-size: 14px; color: var(--ink); white-space: nowrap; transition: border-color .16s, background .16s; }
.dd-btn:hover { border-color: rgba(20,18,18,.28); } .dd-btn .dd-l { color: var(--muted); } .dd-btn b { font-weight: 600; } .dd-btn svg { width: 14px; height: 14px; color: var(--muted); transition: transform .16s; }
.dd.set .dd-btn { border-color: var(--ink); background: var(--canvas); } .dd.open .dd-btn { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,18,18,.07); } .dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-btn.sm { height: 34px; border-radius: 10px; font-size: 13px; padding: 0 10px 0 12px; } .dd-btn.sm b { font-weight: 500; }
.dd-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; min-width: 100%; width: max-content; max-width: 280px; max-height: 320px; overflow: auto; padding: 6px; background: var(--card); border: 1px solid rgba(20,18,18,.1); border-radius: 14px; box-shadow: 0 18px 44px rgba(20,18,18,.16), 0 2px 6px rgba(20,18,18,.06); display: none; }
.dd.open .dd-menu { display: grid; gap: 1px; animation: ddin .14s ease; } .dd.up .dd-menu { top: auto; bottom: calc(100% + 6px); left: auto; right: 0; }
@keyframes ddin { from { opacity: 0; transform: translateY(-4px); } }
.dd-menu button { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 9px; font: inherit; font-size: 14px; text-align: left; color: var(--ink); white-space: nowrap; }
.dd-menu button:hover { background: var(--hover); } .dd-menu button span { flex: 1; } .dd-menu small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dd-menu button svg { width: 14px; height: 14px; margin-left: auto; visibility: hidden; } .dd-menu button.on { font-weight: 600; } .dd-menu button.on svg { visibility: visible; }
.tbl-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
table.dt { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: auto; }
.dt th { height: 44px; padding: 0 16px; text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); background: #fbfaf7; white-space: nowrap; }
.dt th button { display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; } .dt th button:hover, .dt th button.on { color: var(--ink); } .dt th svg { width: 13px; height: 13px; opacity: .45; } .dt th button.on svg { opacity: 1; }
.dt th.r, .dt td.r { text-align: right; } .dt th.r button { flex-direction: row-reverse; }
.dt td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt td.tight, .dt th.tight { max-width: none; width: 1%; overflow: visible; } .dt td.num { font-variant-numeric: tabular-nums; }
.dt tbody tr:last-child td { border-bottom: 0; } .dt tbody tr { transition: background .12s; } .dt tbody tr:hover { background: #faf9f5; } .dt tr.click { cursor: pointer; } .dt tr.warn { background: #fdf6e6; }
.cellp { display: flex; align-items: center; gap: 12px; min-width: 0; } .cellp .avatar, .cellp img, .cellp .ph { width: 34px; height: 34px; border-radius: 50%; flex: none; font-size: 12px; object-fit: cover; display: grid; place-items: center; background: var(--track); color: var(--muted); } .cellp img { border-radius: 9px; }
.cellp .tx { min-width: 0; display: grid; } .cellp .tx b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; } .cellp .tx span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.yrs { display: inline-flex; gap: 4px; } .muted { color: var(--muted); }
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding-top: 2px; }
.tbl-pager { display: inline-flex; align-items: center; gap: 8px; } .pg { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(20,18,18,.12); background: var(--card); display: grid; place-items: center; color: var(--ink); } .pg svg { width: 14px; height: 14px; } .pg:hover:not([disabled]) { border-color: rgba(20,18,18,.3); } .pg[disabled] { opacity: .4; } .pg-n { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.tbl-empty { border: 1.5px dashed rgba(20,18,18,.16); border-radius: 16px; padding: 36px 20px; display: grid; gap: 8px; justify-items: center; text-align: center; } .tbl-empty b { font-size: 15px; } .tbl-empty p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.tbl-cards { display: none; gap: 10px; }
.tc { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 14px; display: grid; gap: 12px; } .tc.click { cursor: pointer; }
.tc dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; border-top: 1px solid var(--line); padding-top: 12px; } .tc dt { font-size: 12px; color: var(--muted); } .tc dd { margin: 2px 0 0; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tc-a { border-top: 1px solid var(--line); padding-top: 12px; display: flex; gap: 8px; } .tc-a .btn { flex: 1; }
.tbl .seg { margin-left: auto; }
@media (max-width: 860px) { .tbl-wrap { display: none; } .tbl-cards { display: grid; } .tbl-search { width: 100%; } .tbl-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; flex: 1 1 100%; } .tbl-filters::-webkit-scrollbar { display: none; } .dd { position: static; } .dd-menu { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-width: none; max-height: 60vh; border-radius: 20px; padding: 10px; box-shadow: 0 -10px 60px rgba(20,18,18,.3); z-index: 70; } .dd.up .dd-menu { left: 12px; right: 12px; bottom: 12px; } .dd-menu button { min-height: 46px; font-size: 15px; } .tbl-foot { justify-content: center; } .tbl .seg { margin-left: 0; } }

/* Shell, after AFCA and TREAD: the sidebar fills the window and the work sits in one inset panel */
@media (min-width: 921px) {
  .frame, .app { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .app { grid-template-columns: 296px minmax(0, 1fr); align-items: stretch; }
  .sidebar { position: relative; top: auto; height: 100%; min-height: 0; border-right: 0; padding: 20px 16px 0; gap: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; } .sidebar::-webkit-scrollbar { display: none; }
  .app > div:last-child { margin: 10px 10px 10px 0; height: calc(100% - 20px); overflow-y: auto; overscroll-behavior: contain; background: #faf9f6; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 1px 2px rgba(20,18,18,.04), 0 12px 40px rgba(20,18,18,.05); }
  .main { padding: 26px 30px 40px; min-height: 100%; }
  .sidebar .org { padding: 4px 8px 18px; }
  .sidebar .scope { margin: 0 0 6px; }
  .sidebar .group { padding: 28px 12px 8px; font-size: 13px; }
  .sidebar .nav { gap: 2px; }
  .sidebar .nav a { height: 38px; padding: 0 12px; gap: 12px; font-size: 15px; border-radius: 11px; }
  .sidebar .nav a span:not(.count) { overflow: hidden; text-overflow: ellipsis; }
  .sidebar .foot { position: sticky; bottom: 0; margin-top: auto; padding: 14px 0 14px; background: linear-gradient(transparent, var(--canvas) 18px); }
  .sidebar .foot::before { content: ""; display: block; height: 14px; }
}
.tbl { container-type: inline-size; }
.dt th.col-main { width: 34%; min-width: 220px; }
@container (max-width: 700px) { .tbl-wrap { display: none; } .tbl-cards { display: grid; } .tbl-search { width: 100%; } .tbl .seg { margin-left: 0; } }
@media (max-width: 860px) { .tbl-filters { margin: 0; padding: 0 0 2px; min-width: 0; } .tbl-bar > * { min-width: 0; } }
.mobilebar .mscope { display: inline-flex !important; flex-direction: row; align-items: center; white-space: nowrap; }
@media (max-width: 920px) { .tiles[style*="repeat(3"] .tile { min-height: 0 !important; padding: 14px 16px; } .tiles[style*="repeat(3"] .tile .value { font-size: 26px !important; } }
.tbl { grid-template-columns: minmax(0, 1fr); width: 100%; } .tbl > * { min-width: 0; } .tbl-bar { min-width: 0; } .tbl-filters { min-width: 0; }
.cellp .avatar.forest { background: var(--t-forest); color: var(--forest); } .cellp .avatar.gold { background: var(--t-gold); color: var(--ink); } .cellp .avatar.lilac { background: var(--t-lilac); color: #4a4860; } .cellp .avatar.sand { background: var(--t-sand); color: #7a5a1a; } .cellp .avatar.sky { background: var(--t-sky); color: var(--navy); }
.tc dd { white-space: nowrap; }
.tbl-cards { grid-template-columns: minmax(0, 1fr); } .tc { min-width: 0; grid-template-columns: minmax(0, 1fr); } .tc dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tc dd { white-space: normal; } .tc .yrs { flex-wrap: wrap; } .tc-h { min-width: 0; }

/* Sidebar foot, as AFCA: the menu scrolls in full and only the profile stays in the corner */
.sidebar .side-end { flex: none; height: 84px; }
.sidebar .me { position: sticky; bottom: 14px; margin-top: auto; align-self: flex-start; z-index: 3; display: inline-flex; align-items: center; gap: 0; height: 48px; padding: 3px; border-radius: 999px; background: var(--card); border: 1px solid rgba(20,18,18,.1); box-shadow: 0 6px 20px rgba(20,18,18,.12); font: inherit; color: var(--ink); text-align: left; max-width: 100%; transition: box-shadow .2s, padding .2s; }
.sidebar .me .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--t-gold); display: grid; place-items: center; font-size: 13.5px; font-weight: 600; flex: none; }
.sidebar .me .me-t { display: grid; max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; transition: max-width .25s ease, opacity .2s ease, padding .25s ease; } .sidebar .me b { font-size: 13.5px; line-height: 1.2; } .sidebar .me small { font-size: 12px; color: var(--muted); }
.sidebar .me:hover .me-t, .sidebar .me:focus-visible .me-t { max-width: 200px; opacity: 1; padding: 0 16px 0 10px; } .sidebar .me:hover { box-shadow: 0 10px 28px rgba(20,18,18,.18); }
@media (max-width: 920px) { .sidebar { display: flex; flex-direction: column; } .sidebar .me { bottom: 12px; } .sidebar .me .me-t { max-width: 200px; opacity: 1; padding: 0 16px 0 10px; } }

/* Active item, as the reference: a white pill with a soft shadow */
.sidebar .nav a.active, .nav a.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20,18,18,.06), 0 4px 14px rgba(20,18,18,.07); } .nav a.active svg { fill: none; }
.tbl-x { margin-left: auto; } .tbl-x svg { transform: rotate(180deg); color: var(--ink); } .tbl .tbl-x + .seg { margin-left: 0; }
.dt td.go { color: var(--muted-2); padding-left: 0; } .dt td.go svg { width: 15px; height: 15px; display: block; }
/* Reports */
.rep-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; } .rep-tabs::-webkit-scrollbar { display: none; }
.rep-tabs button { font: inherit; font-size: 15px; font-weight: 500; color: var(--muted); padding: 10px 0 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; } .rep-tabs button:hover { color: var(--ink); } .rep-tabs button.on { color: var(--ink); border-color: var(--orange); }
.rep-note { font-size: 13px; color: var(--muted); } .rep-foot { margin: 0; font-size: 13px; color: var(--muted); }
.rep-svg { width: 100%; height: auto; display: block; } .rep-svg text { font: 12px Inter, sans-serif; fill: #7b7b70; } .rep-svg text.b { fill: #141212; font-weight: 600; font-size: 13px; }
.rep-h { display: grid; gap: 14px; } .rep-h > div { display: grid; grid-template-columns: minmax(90px, 150px) minmax(0, 1fr) auto; gap: 14px; align-items: center; font-size: 14px; } .rep-h .track { height: 10px; background: var(--track); border-radius: 999px; overflow: hidden; display: block; } .rep-h .track i { display: block; height: 100%; border-radius: 999px; } .rep-h .v { font-weight: 600; min-width: 48px; text-align: right; } .rep-h .v small { font-weight: 400; color: var(--muted); font-size: 12.5px; } .rep-h .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; } .legend-row { flex-wrap: wrap; }
@media (max-width: 560px) { .rep-h > div { grid-template-columns: minmax(70px, 100px) minmax(0, 1fr) auto; gap: 10px; } .rep-tabs { gap: 20px; } }
.rc-p { display: grid; text-align: right; } .rc-p small { font-size: 12px; color: var(--muted); font-weight: 400; }
.sizes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } .sizes-grid span { display: grid; grid-template-columns: 1fr 72px; gap: 6px; } .sizes-grid input { height: 40px; border: 1px solid rgba(20,18,18,.14); border-radius: 10px; padding: 0 10px; font: inherit; font-size: 14px; min-width: 0; background: var(--card); }
.scanbox { height: 150px; border-radius: 18px; border: 2px dashed rgba(20,18,18,.18); display: grid; place-items: center; color: var(--muted-2); background: var(--canvas); } .scanbox svg { width: 56px; height: 56px; }
.opt.shop { align-items: center; flex-wrap: wrap; } .opt.shop .ph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; } .opt.shop .ph svg { width: 20px; height: 20px; }
.szs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; } .szs button { min-width: 40px; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid rgba(20,18,18,.16); font: inherit; font-size: 13px; font-weight: 600; background: var(--card); } .szs button.on { background: var(--accent, var(--ink)); color: #fff; border-color: transparent; } .szs button[disabled] { opacity: .35; text-decoration: line-through; }
.list .li .btn.sm { flex: none; }
@media (max-width: 560px) { .rc-p { display: none; } }
.dt th { vertical-align: middle; } 
.dt td { max-width: 280px; } .dt td.tight { max-width: none; }
.topbar .title { flex: 1 1 260px; } .topbar .title h1 { text-wrap: balance; }
@container (max-width: 900px) { .tbl-wrap { display: none; } .tbl-cards { display: grid; } }
.tc-a .btn { height: 40px; }
.toasts { left: auto; right: 24px; transform: none; width: min(380px, calc(100vw - 32px)); } @media (max-width: 560px) { .toasts { right: 16px; } }
.evhead { min-height: 0; }
