/* Nanban E-Sevai Agent Desk */
.es-ag-desk {
  margin: 0 0 14px;
}
.es-ag-health {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.es-ag-kpi {
  background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}
.es-ag-kpi span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.es-ag-kpi b {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 1000;
  color: #0f172a;
}
.es-ag-kpi--warn {
  background: linear-gradient(160deg, #fffbeb, #fef3c7);
  border-color: #fde68a;
}
.es-ag-kpi--danger {
  background: linear-gradient(160deg, #fff1f2, #ffe4e6);
  border-color: #fecdd3;
}
.es-ag-kpi--ok {
  background: linear-gradient(160deg, #ecfdf5, #d1fae5);
  border-color: #a7f3d0;
}
.es-ag-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.es-ag-search {
  flex: 1 1 180px;
  min-width: 160px;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.es-ag-sort {
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
}
.es-ag-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}
.es-ag-hint {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.es-ag-card--due {
  border-color: #fda4af !important;
}
.es-ag-card-extra {
  margin-top: 10px;
}
.es-ag-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.es-ag-metrics > div {
  background: #f8fafc;
  border-radius: 10px;
  padding: 6px 8px;
}
.es-ag-metrics span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
}
.es-ag-metrics b {
  font-size: 12px;
  font-weight: 1000;
  color: #0f172a;
}
.es-ag-due {
  color: #be123c !important;
}
.es-ag-age {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.es-ag-age--ok {
  background: #dcfce7;
  color: #166534;
}
.es-ag-age--d7 {
  background: #fef9c3;
  color: #854d0e;
}
.es-ag-age--d15 {
  background: #ffedd5;
  color: #c2410c;
}
.es-ag-age--d30 {
  background: #fee2e2;
  color: #b91c1c;
}
.es-ag-age--d30p {
  background: #4c0519;
  color: #fecdd3;
}
.es-ag-ledger {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.es-ag-led {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}
.es-ag-led--collect {
  background: #ecfdf5;
  color: #047857;
}
.es-ag-led--bill {
  background: #eff6ff;
  color: #1d4ed8;
}
.es-ag-led--empty {
  opacity: 0.7;
}
.es-ag-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.es-ag-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  color: #0f172a;
}
.es-ag-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.es-ag-btn--pri {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.es-ag-btn--pri:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.es-ag-profit-card {
  max-width: 480px;
  width: 92%;
  padding: 18px;
}
.es-ag-profit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.es-ag-profit-head p {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  color: #0f766e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.es-ag-profit-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}
.es-ag-profit-head button {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
}
.es-ag-profit-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.es-ag-profit-kpis > div {
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px;
}
.es-ag-profit-kpis span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
}
.es-ag-profit-kpis b {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 1000;
}
.es-ag-profit-note {
  margin: 12px 0;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.es-ag-profit-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.es-ag-works-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 800;
  color: #065f46;
}
.es-ag-kpi--btn {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.es-ag-kpi--btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}
.es-ag-name-btn {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: #0f766e;
  font-size: 15px;
  font-weight: 1000;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(15, 118, 110, 0.35);
}
.es-ag-name-btn--due {
  color: #be123c;
  text-decoration-color: rgba(190, 18, 60, 0.4);
}
.es-ag-name-btn:hover {
  color: #0d9488;
}
.es-ag-name-btn--due:hover {
  color: #e11d48;
}
.es-ag-metric-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: #fff1f2;
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
  font: inherit;
}
.es-ag-metric-btn:hover {
  background: #ffe4e6;
}
.es-ag-due-card {
  max-width: 560px;
  width: min(94vw, 560px);
  padding: 18px 18px 14px;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}
.es-ag-due-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.es-ag-due-head p {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  color: #be123c;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.es-ag-due-head h3 {
  margin: 4px 0 0;
  font-size: 1.25rem;
  font-weight: 1000;
  color: #0f172a;
}
.es-ag-due-total {
  margin-top: 8px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}
.es-ag-due-total span {
  font-size: 10px;
  font-weight: 800;
  color: #9f1239;
  text-transform: uppercase;
}
.es-ag-due-total b {
  font-size: 1.35rem;
  font-weight: 1000;
  color: #be123c;
}
.es-ag-due-x {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  flex: 0 0 auto;
}
.es-ag-due-body {
  max-height: min(55vh, 420px);
  overflow: auto;
  margin-bottom: 12px;
}
.es-ag-due-roster {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.es-ag-due-roster__row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid #fecdd3;
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.es-ag-due-roster__row:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(190, 18, 60, 0.12);
  border-color: #fb7185;
}
.es-ag-due-roster__n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff1f2;
  color: #be123c;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}
.es-ag-due-roster__meta {
  flex: 1 1 auto;
  min-width: 0;
}
.es-ag-due-roster__meta b {
  display: block;
  font-size: 14px;
  font-weight: 1000;
  color: #0f172a;
}
.es-ag-due-roster__meta small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.es-ag-due-roster__amt {
  font-size: 15px;
  font-weight: 1000;
  color: #be123c;
  white-space: nowrap;
}
.es-ag-due-bills {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.es-ag-due-bill {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
}
.es-ag-due-bill__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
}
.es-ag-due-bill__top span {
  color: #be123c;
}
.es-ag-due-bill__sub {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.4;
}
.es-ag-due-note {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.45;
}
.es-ag-due-empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border-radius: 12px;
}
.es-ag-due-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}
@media (max-width: 640px) {
  .es-ag-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .es-ag-profit-kpis {
    grid-template-columns: 1fr;
  }
}
