@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root{
  --bg: #f5f1ea;
  --card: rgba(255,255,255,.88);
  --card2: rgba(255,255,255,.96);
  --stroke: rgba(15,23,42,.12);
  --text: #101828;
  --muted: #3f4b5e;
  --muted2: #667085;
  --good: #11885f;
  --warn: #b57714;
  --bad: #c73636;
  --accent: #2a5bd7;
  --shadow: 0 14px 28px rgba(15,23,42,.16);
  --radius: 16px;
  --radius2: 12px;
  --font: "Space Grotesk", "Segoe UI", sans-serif;
  --ink-strong: rgba(15,23,42,.9);
  --ink-mid: rgba(15,23,42,.72);
  --ink-soft: rgba(15,23,42,.1);
  --ink-softer: rgba(15,23,42,.06);
}

/* The widget is designed to fit 300x300 */
html,body{height:100%; margin:0; background:transparent; font-family:var(--font);}
.wf-widget{
  width:100%; height:100%;
  min-height:320px;
  max-height:690px;
  box-sizing:border-box;
  color:var(--text);
  background:transparent;
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  position:relative;
  display:flex;
  flex-direction:column;
  container-type: inline-size;
}

.wf-header{
  height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 10px;
  border-bottom:1px solid rgba(15,23,42,.08);
  backdrop-filter: blur(8px);
  gap:8px;
}

.wf-header-left{
  min-width:0;
  flex:1;
  display:flex;
  align-items:center;
  gap:6px;
}
.wf-header-right{
  display:flex;
  align-items:center;
  gap:6px;
}
.header-select{
  height:28px;
}
.header-select select{
  height:28px;
  font-size:11px;
  padding-left:8px;
}
.header-select .chev{right:6px; width:14px; height:14px;}

.icon-btn{
  width:30px; height:30px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.18);
  background:rgba(15,23,42,.06);
  display:grid; place-items:center;
  cursor:pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.icon-btn:hover{background:rgba(15,23,42,.1); border-color:rgba(15,23,42,.26);}
.icon-btn:active{transform: translateY(1px) scale(.98);}
.icon-btn svg{width:18px; height:18px; fill:var(--ink-strong);}
.icon-btn.subtle{background:transparent;}
.icon-btn:disabled{opacity:.45; cursor:not-allowed; transform:none;}
.avatar-btn{
  border-radius:999px;
  background: linear-gradient(135deg, rgba(42,91,215,.18), rgba(17,136,95,.18));
  border-color: rgba(15,23,42,.22);
}
.avatar-btn svg{width:16px; height:16px;}

.wf-main{
  flex:1;
  min-height:0;
  padding:10px;
  box-sizing:border-box;
}

.panel{
  height:100%;
  background: var(--card);
  border:1px solid rgba(15,23,42,.12);
  border-radius:var(--radius2);
  padding:10px;
  box-sizing:border-box;
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.hidden{display:none !important;}

.panel-top{display:flex; justify-content:flex-start; margin-bottom:10px;}
.chip{
  display:inline-flex; align-items:center; gap:6px;
  background: rgba(15,23,42,.05);
  border:1px solid rgba(15,23,42,.14);
  padding:6px 8px;
  border-radius:999px;
  font-size:12px;
  color: var(--muted);
}
.chip svg{width:16px; height:16px; fill:var(--ink-mid);}

.signin{
  display:flex; gap:8px; align-items:center;
}
input{
  flex:1;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.2);
  background: rgba(255,255,255,.92);
  color:var(--text);
  font-weight:700;
  letter-spacing:2px;
  text-transform:uppercase;
  text-align:center;
  outline:none;
}
input:focus{border-color: rgba(42,91,215,.55); box-shadow: 0 0 0 4px rgba(42,91,215,.15);}
input.search-input{
  height:26px;
  border:0;
  border-radius:0;
  background:transparent;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
  text-align:left;
  box-shadow:none;
}
input.search-input:focus{box-shadow:none;}
input[type="checkbox"]{
  width:14px;
  height:14px;
  border-radius:4px;
  border:1px solid rgba(15,23,42,.35);
  background:#fff;
  appearance:none;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  margin:0;
  cursor:pointer;
}
input[type="checkbox"]::after{
  content:"";
  width:8px;
  height:8px;
  border-radius:2px;
  background: var(--accent);
  transform: scale(0);
  transition: transform .12s ease;
}
input[type="checkbox"]:checked::after{transform: scale(1);}
.primary-btn{
  height:38px;
  padding:0 10px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.45);
  background: linear-gradient(180deg, rgba(15,23,42,.18), rgba(15,23,42,.32));
  color:var(--text);
  cursor:pointer;
  display:flex; align-items:center; gap:8px;
  font-weight:700;
  box-shadow: 0 8px 16px rgba(15,23,42,.16);
}
.primary-btn svg{width:18px; height:18px; fill:var(--ink-strong);}
.primary-btn:active{transform: translateY(1px);}
.primary-btn:disabled{opacity:.6; cursor:not-allowed;}

.secondary-btn{
  height:34px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.25);
  background: rgba(15,23,42,.04);
  color: var(--text);
  font-weight:700;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease;
}
.secondary-btn:hover{background: rgba(15,23,42,.08); border-color: rgba(15,23,42,.35);}
.secondary-btn:disabled{opacity:.6; cursor:not-allowed;}

.hint{
  margin-top:10px;
  font-size:12px;
  color: var(--muted2);
  line-height:1.25;
}
.link-btn{
  margin-left:6px;
  background:transparent;
  border:0;
  color: #1f2f5c;
  font-weight:700;
  cursor:pointer;
  padding:0;
}

.preview{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:center;
}
.preview-note{
  font-size:11px;
  color: var(--muted2);
}

.dash-top{
  display:flex; align-items:center; justify-content:space-between;
  gap:8px;
  margin-bottom:10px;
}
.rep-pill{
  display:flex; align-items:center; gap:8px;
  min-width:0;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.14);
  background: rgba(15,23,42,.05);
  font-weight:750;
  letter-spacing:.3px;
  font-size:12px;
  max-width:160px;
}
.rep-pill .mini{
  width:18px; height:18px;
  border-radius:6px;
  background: rgba(17,136,95,.16);
  border:1px solid rgba(17,136,95,.35);
  display:grid; place-items:center;
}
.rep-pill .mini svg{width:12px; height:12px; fill:var(--ink-strong);}
.rep-pill .rep-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.controls{display:flex; align-items:center; gap:6px;}
.select{
  position:relative;
  height:30px;
  min-width:74px;
}
select{
  width:100%;
  height:30px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.18);
  background: rgba(15,23,42,.05);
  color: var(--text);
  padding:0 26px 0 10px;
  appearance:none;
  outline:none;
  font-weight:650;
  font-size:12px;
}
.select .chev{
  position:absolute;
  right:8px; top:50%;
  width:16px; height:16px;
  transform: translateY(-50%);
  fill: var(--ink-mid);
  pointer-events:none;
}

.tiles{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap:8px;
  margin-bottom:10px;
}
.tile{
  background: rgba(15,23,42,.05);
  border:1px solid rgba(15,23,42,.12);
  border-radius:14px;
  padding:8px;
  display:flex; gap:8px; align-items:center;
  min-width:0;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.tile:hover{background: rgba(15,23,42,.1); border-color: rgba(15,23,42,.18);}
.tile.active{
  background: rgba(42,91,215,.16);
  border-color: rgba(42,91,215,.35);
}
.tile-ic{
  width:26px; height:26px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.16);
  background: rgba(15,23,42,.1);
  display:grid; place-items:center;
  flex:0 0 auto;
}
.tile-ic svg{width:16px; height:16px; fill:var(--ink-strong);}
.tile-val{font-size:14px; font-weight:850; line-height:1;}
.tile-lbl{font-size:11px; color: var(--muted); margin-top:2px;}
.tile-txt{min-width:0;}

.list-head{
  display:flex; align-items:center; justify-content:space-between;
  margin:6px 0 6px;
}
.list-actions{
  display:flex;
  align-items:center;
  gap:6px;
}
.list-title{font-weight:750; font-size:12px; color: var(--ink-strong);}
.list-count{
  margin-left:6px;
  font-size:10px;
  color: var(--muted2);
  font-weight:600;
}

.tabs{
  display:flex;
  gap:6px;
  margin:4px 0 6px;
}
.tab{
  flex:1;
  height:28px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.18);
  background: rgba(15,23,42,.04);
  font-size:12px;
  font-weight:750;
  color: var(--ink-strong);
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.tab:hover{background: rgba(15,23,42,.08); border-color: rgba(15,23,42,.24);}
.tab:active{transform: translateY(1px) scale(.98);}
.tab.active{
  background: rgba(42,91,215,.15);
  border-color: rgba(42,91,215,.35);
  color: #1b2d5a;
}
.tab:focus-visible{
  outline:2px solid rgba(42,91,215,.45);
  outline-offset:2px;
}
.tab-panel{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.filters{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:6px;
}
.search{
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.16);
  background: rgba(255,255,255,.8);
}
.search svg{width:14px; height:14px; fill: var(--ink-mid);}
.search:focus-within{
  border-color: rgba(42,91,215,.4);
  box-shadow: 0 0 0 3px rgba(42,91,215,.12);
}
.filter-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}
.filter-row .link-btn{margin-left:0;}
.filter-summary{
  font-size:10px;
  color: var(--muted2);
  font-weight:700;
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.select.small{min-width:110px; height:26px;}
.select.small select{
  height:26px;
  font-size:11px;
  padding-left:8px;
}
.select.small .chev{right:6px; width:14px; height:14px;}
.toggle{
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.14);
  background: rgba(15,23,42,.04);
  font-size:11px;
  color: var(--muted);
  font-weight:700;
}

.list{
  flex:1 1 auto;
  min-height:120px;
  overflow:auto;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.1);
  background: rgba(15,23,42,.04);
  padding:6px;
  box-sizing:border-box;
}
.row{
  display:flex; align-items:center; gap:8px;
  padding:7px 8px;
  border-radius:12px;
  cursor:default;
  transition: background .12s ease;
  border:0;
  background:transparent;
  color: inherit;
}
.row:hover{background: rgba(15,23,42,.08);}
.row + .row{margin-top:4px;}
.skeleton-row{cursor:default;}
.skeleton-row:hover{background: transparent;}
.skel{
  position:relative;
  display:inline-block;
  overflow:hidden;
  background: rgba(15,23,42,.12);
}
.skel::after{
  content:"";
  position:absolute;
  inset:0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  animation: shimmer 1.2s infinite;
}
.skel.line{border-radius:999px;}
.skel.chip{border-radius:999px; height:14px;}
.skel.box{border-radius:10px;}
.skel.bar{border-radius:999px;}
.skeleton-card{overflow:hidden;}
.badge{
  width:26px; height:26px;
  border-radius:10px;
  background: rgba(42,91,215,.14);
  border:1px solid rgba(42,91,215,.3);
  display:grid; place-items:center;
  flex:0 0 auto;
}
.badge svg{width:15px; height:15px; fill:var(--ink-strong);}
.row-main{min-width:0; flex:1;}
.row-top{
  display:flex;
  align-items:flex-start;
  gap:6px;
}
.company-wrap{
  display:flex;
  align-items:flex-start;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
  flex:1 1 auto;
}
.company{
  font-size:12px; font-weight:800;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.company-btn{
  background:transparent;
  border:0;
  padding:0;
  font: inherit;
  font-weight:800;
  font-size:12px;
  color: var(--text);
  cursor:pointer;
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere;
  max-width:100%;
}
.company-btn:hover{text-decoration:underline;}
.company-btn:focus-visible{
  outline:2px solid rgba(42,91,215,.45);
  outline-offset:2px;
  border-radius:6px;
}
.tag{
  font-size:9px;
  font-weight:800;
  color:#1b2d5a;
  background: rgba(42,91,215,.16);
  border:1px solid rgba(42,91,215,.35);
  padding:2px 6px;
  border-radius:999px;
  flex:0 0 auto;
}
.meta{
  font-size:11px; color: var(--muted);
  white-space:nowrap;
}
.row-bot{
  margin-top:2px;
  font-size:11px;
  color: var(--muted2);
  white-space:normal;
  overflow-wrap:anywhere;
}
.row-details{
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  font-size:10px;
}
.detail-badge{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  padding:4px 8px;
  border-radius:10px;
  background: rgba(15,23,42,.06);
  border:1px solid rgba(15,23,42,.12);
  color: var(--ink-mid);
  font-weight:700;
  flex:1 1 auto;
  min-width:0;
  max-width:100%;
}
.detail-chip{
  background:transparent;
  border:0;
  padding:0;
  margin:0;
  font: inherit;
  color: inherit;
  cursor:pointer;
  text-align:left;
  line-height:1.2;
  white-space:normal;
}
.detail-chip:hover{
  color: var(--text);
  text-decoration: underline;
}
.detail-chip:focus-visible{
  outline:2px solid rgba(42,91,215,.45);
  outline-offset:2px;
  border-radius:6px;
}
.detail-label{
  font-weight:800;
}
.detail-sep{
  color: var(--muted2);
  font-weight:700;
}
.detail-item{
  padding:3px 6px;
  border-radius:999px;
  background: rgba(15,23,42,.06);
  border:1px solid rgba(15,23,42,.12);
  color: var(--ink-mid);
  font-weight:700;
  max-width:160px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.detail-item.muted{
  background: transparent;
  border:1px dashed rgba(15,23,42,.2);
  color: var(--muted2);
  font-weight:600;
}

.empty{
  padding:10px;
  font-size:12px;
  color: var(--muted2);
  text-align:center;
}

.code-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.code-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(15,23,42,.04);
  font-size:12px;
}
.code{
  font-weight:800;
  letter-spacing:.6px;
  color: var(--text);
}
.code-name{
  color: var(--muted);
  margin-left:10px;
  flex:1;
  text-align:right;
}

.status{
  display:flex; align-items:center; gap:8px;
  position:relative;
  font-size:11px;
  color: var(--muted2);
  margin-top:auto;
}
.status .dot{
  width:8px; height:8px; border-radius:999px;
  background: rgba(15,23,42,.35);
  box-shadow: 0 0 0 3px rgba(15,23,42,.12);
}
.status .dot.good{background: var(--good); box-shadow:0 0 0 3px rgba(17,136,95,.2);}
.status .dot.warn{background: var(--warn); box-shadow:0 0 0 3px rgba(181,119,20,.2);}
.status .dot.bad{background: var(--bad); box-shadow:0 0 0 3px rgba(199,54,54,.18);}

.overlay{
  position:absolute; inset:0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
}
.modal{
  width:100%;
  max-height:100%;
  background: rgba(255,255,255,.96);
  border:1px solid rgba(15,23,42,.14);
  border-radius:18px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 10px;
  border-bottom:1px solid rgba(15,23,42,.1);
}
.modal-title{font-weight:900; font-size:12px;}
.modal-body{
  padding:10px;
  max-height: 210px;
  overflow:auto;
  color: var(--muted);
  font-size:12px;
  line-height:1.35;
  user-select:text;
}
.modal-summary{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap:6px;
  margin-bottom:8px;
}
.summary-item{
  padding:6px 8px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(15,23,42,.04);
  display:flex;
  flex-direction:column;
  gap:2px;
}
.summary-item span{
  font-size:10px;
  color: var(--muted2);
  font-weight:700;
}
.summary-item strong{
  font-size:12px;
  color: var(--ink-strong);
  font-weight:900;
}
.ip-gate{
  margin:6px 0 8px;
  padding:8px;
  border-radius:12px;
  border:1px dashed rgba(15,23,42,.2);
  background: rgba(15,23,42,.03);
  font-size:11px;
  color: var(--muted2);
  display:flex;
  flex-direction:column;
  gap:6px;
}
.ip-gate.ok{
  border-style:solid;
  background: rgba(17,136,95,.08);
  color: var(--good);
  font-weight:700;
}
.ip-row{
  display:flex;
  gap:6px;
  align-items:center;
}
.ip-row input{
  height:30px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.2);
  background: rgba(255,255,255,.9);
  color: var(--text);
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
  text-align:left;
  padding:0 8px;
  flex:1;
}
.ip-hint{
  font-size:10px;
  color: var(--muted2);
}
.kv{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:6px 10px;
  padding:8px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(15,23,42,.04);
  margin-bottom:8px;
}
.kv .k{color: var(--muted2);}
.kv .v{color: var(--text); font-weight:800; text-align:right;}
.pills{display:flex; flex-wrap:wrap; gap:6px; margin:8px 0;}
.pill{
  font-size:11px;
  color: var(--text);
  background: rgba(15,23,42,.05);
  border:1px solid rgba(15,23,42,.12);
  padding:5px 8px;
  border-radius:999px;
}
.secondary-btn.small{
  height:30px;
  padding:0 10px;
  border-radius:10px;
  font-size:11px;
}
.pages{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.modal-actions{
  display:flex;
  gap:8px;
  margin:6px 0 8px;
}
.modal-form{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.form-hint{
  font-size:10px;
  color: var(--muted2);
}
.options{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:8px;
}
.option-btn{
  width:100%;
  text-align:left;
  padding:7px 10px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.14);
  background: rgba(15,23,42,.04);
  font-size:11px;
  font-weight:700;
  color: var(--text);
  cursor:pointer;
}
.option-btn.active{
  background: rgba(42,91,215,.15);
  border-color: rgba(42,91,215,.35);
  color: #1b2d5a;
}
.option-toggle{
  align-self:flex-start;
}
.pages-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.visits-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:6px;
}
.page-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(15,23,42,.04);
  font-size:11px;
}
.page-url{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  flex:1;
}
.page-metrics{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
.page-link, .page-text{
  color:#1f2f5c;
  font-weight:700;
  text-decoration:none;
}
.page-link:hover{text-decoration:underline;}
.page-count{
  font-weight:800;
  color: var(--text);
  flex:0 0 auto;
}
.page-time{
  font-weight:700;
  color: var(--muted);
  min-width:48px;
  text-align:right;
}
.visit-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(15,23,42,.04);
  font-size:11px;
}
.visit-date{
  font-weight:800;
  color: var(--ink-strong);
  white-space:nowrap;
}
.visit-meta{
  color: var(--muted2);
  font-weight:700;
  text-align:right;
  flex:1;
}
.link{
  color:#1f2f5c;
  font-weight:700;
  text-decoration:none;
}
.link:hover{text-decoration:underline;}
.sr-only{
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0;
}

.reports{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
}
.reports-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:6px;
}
.reports-title{
  font-size:12px;
  font-weight:850;
  color: var(--ink-strong);
}
.reports-note{
  font-size:10px;
  color: var(--muted2);
}
.reports-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap:8px;
}
.report-card{
  background: rgba(255,255,255,.9);
  border:1px solid rgba(15,23,42,.12);
  border-radius:14px;
  padding:8px;
  box-shadow: 0 10px 16px rgba(15,23,42,.08);
}
.report-title{
  font-size:12px;
  font-weight:800;
  color: var(--ink-strong);
}
.report-sub{
  font-size:10px;
  color: var(--muted2);
  margin-bottom:6px;
}
.bar-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.bar-row{
  display:grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap:6px;
  align-items:center;
  font-size:10px;
}
.bar-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color: var(--ink-strong);
  font-weight:700;
}
.bar-track{
  height:6px;
  border-radius:999px;
  background: rgba(15,23,42,.08);
  overflow:hidden;
}
.bar-fill{
  height:100%;
  width:0;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(42,91,215,.75), rgba(17,136,95,.7));
  animation: barGrow .6s ease forwards;
  animation-delay: var(--delay, 0s);
}
.bar-val{
  font-weight:800;
  color: var(--ink-strong);
}
.report-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.report-item{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:6px;
  align-items:center;
  font-size:10px;
  padding:6px 8px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.1);
  background: rgba(15,23,42,.04);
}
.report-item .name{
  font-weight:700;
  color: var(--ink-strong);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.report-item .meta{
  color: var(--muted2);
  font-weight:700;
  margin-right:6px;
}
.report-item .value{
  font-weight:800;
  color: var(--ink-strong);
}
.report-empty{
  padding:12px;
  border-radius:12px;
  border:1px dashed rgba(15,23,42,.2);
  color: var(--muted2);
  font-size:11px;
  text-align:center;
}

@keyframes barGrow{
  to{width: var(--pct, 0%);}
}
@keyframes shimmer{
  100%{transform: translateX(100%);}
}

/* scrollbars (subtle) */
.list::-webkit-scrollbar, .modal-body::-webkit-scrollbar{width:8px;}
.list::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb{
  background: rgba(15,23,42,.25);
  border-radius:999px;
}

@media (max-height: 360px) {
  .wf-header{height:40px;}
  .wf-main{padding:8px;}
  .panel{padding:8px;}
  .panel-top{margin-bottom:8px;}
  .tiles{gap:6px; margin-bottom:8px;}
  .tile{padding:6px;}
  .tile-ic{width:22px; height:22px;}
  .list{min-height:96px;}
  .row{padding:6px;}
  .status{font-size:10px;}
}

@media (max-width: 340px), (max-height: 340px) {
  .wf-header{height:38px;}
  .wf-header-right{gap:4px;}
  .header-select{min-width:62px;}
  .header-select select{padding-left:6px; font-size:10px;}
  .icon-btn{width:26px; height:26px; border-radius:8px;}
  .rep-pill{padding:5px 8px; font-size:10px; max-width:110px;}
  .wf-main{padding:6px;}
  .panel{padding:6px;}
  .panel-top{margin-bottom:6px;}
  .tiles{gap:4px; margin-bottom:6px;}
  .tile{padding:6px; border-radius:12px;}
  .tile-ic{width:20px; height:20px; border-radius:8px;}
  .tile-val{font-size:12px;}
  .tile-lbl{font-size:10px;}
  .tabs{margin:3px 0 4px;}
  .tab{height:24px; font-size:11px; border-radius:8px;}
  .filters{gap:4px; margin-bottom:4px;}
  .search{padding:3px 6px; border-radius:10px;}
  .filter-row{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
    -webkit-overflow-scrolling: touch;
  }
  .filter-summary{font-size:9px;}
  .filter-row::-webkit-scrollbar{height:6px;}
  .filter-row::-webkit-scrollbar-thumb{
    background: rgba(15,23,42,.22);
    border-radius:999px;
  }
  .select.small{min-width:96px;}
  .toggle{padding:3px 6px; font-size:10px;}
  .avatar-btn{border-radius:999px;}
  .list{padding:4px;}
  .row{padding:6px;}
  .row-top{
    align-items:flex-start;
    gap:4px;
  }
  .company-btn{
    font-size:11px;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .meta{
    font-size:10px;
    white-space:normal;
  }
  .row-bot{
    font-size:10px;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .row-details{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
  }
  .row-details::-webkit-scrollbar{height:6px;}
  .row-details::-webkit-scrollbar-thumb{
    background: rgba(15,23,42,.22);
    border-radius:999px;
  }
  .detail-badge{
    flex-wrap:wrap;
    gap:4px;
    padding:4px 6px;
  }
  .detail-chip{line-height:1.2;}
  .detail-item{max-width:120px;}
  .reports-grid{grid-template-columns: 1fr;}
  .report-card{padding:6px;}
  .report-title{font-size:11px;}
  .report-sub{font-size:9px;}
  .bar-row{
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label label"
      "track val";
    row-gap:4px;
  }
  .bar-label{
    grid-area: label;
    white-space:normal;
    overflow-wrap:anywhere;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
  }
  .bar-track{grid-area: track;}
  .bar-val{grid-area: val;}
  .modal-body{max-height: 180px;}
}

@container (max-width: 340px) {
  .wf-header{height:38px;}
  .wf-header-right{gap:4px;}
  .header-select{min-width:62px;}
  .header-select select{padding-left:6px; font-size:10px;}
  .icon-btn{width:26px; height:26px; border-radius:8px;}
  .rep-pill{padding:5px 8px; font-size:10px; max-width:110px;}
  .wf-main{padding:6px;}
  .panel{padding:6px;}
  .panel-top{margin-bottom:6px;}
  .tiles{gap:4px; margin-bottom:6px;}
  .tile{padding:6px; border-radius:12px;}
  .tile-ic{width:20px; height:20px; border-radius:8px;}
  .tile-val{font-size:12px;}
  .tile-lbl{font-size:10px;}
  .tabs{margin:3px 0 4px;}
  .tab{height:24px; font-size:11px; border-radius:8px;}
  .filters{gap:4px; margin-bottom:4px;}
  .search{padding:3px 6px; border-radius:10px;}
  .filter-row{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
    -webkit-overflow-scrolling: touch;
  }
  .filter-summary{font-size:9px;}
  .filter-row::-webkit-scrollbar{height:6px;}
  .filter-row::-webkit-scrollbar-thumb{
    background: rgba(15,23,42,.22);
    border-radius:999px;
  }
  .select.small{min-width:96px;}
  .toggle{padding:3px 6px; font-size:10px;}
  .avatar-btn{border-radius:999px;}
  .list{padding:4px;}
  .row{padding:6px;}
  .row-top{
    align-items:flex-start;
    gap:4px;
  }
  .company-btn{
    font-size:11px;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .meta{
    font-size:10px;
    white-space:normal;
  }
  .row-bot{
    font-size:10px;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .row-details{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
  }
  .row-details::-webkit-scrollbar{height:6px;}
  .row-details::-webkit-scrollbar-thumb{
    background: rgba(15,23,42,.22);
    border-radius:999px;
  }
  .detail-badge{
    flex-wrap:wrap;
    gap:4px;
    padding:4px 6px;
  }
  .detail-chip{line-height:1.2;}
  .detail-item{max-width:120px;}
  .reports-grid{grid-template-columns: 1fr;}
  .report-card{padding:6px;}
  .report-title{font-size:11px;}
  .report-sub{font-size:9px;}
  .bar-row{
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label label"
      "track val";
    row-gap:4px;
  }
  .bar-label{
    grid-area: label;
    white-space:normal;
    overflow-wrap:anywhere;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
  }
  .bar-track{grid-area: track;}
  .bar-val{grid-area: val;}
  .modal-body{max-height: 180px;}
}

@media (min-height: 600px) {
  .wf-main{padding:12px;}
  .panel{padding:12px;}
  .panel-top{margin-bottom:12px;}
  .tiles{gap:10px; margin-bottom:12px;}
  .tile{padding:10px;}
  .list{padding:8px;}
  .modal-body{max-height: 320px;}
}
