/**
 * E-Sevai — remaining tabs world elevation
 */
@import url("https://fonts.googleapis.com/css2?family=Catamaran:wght@800;900&family=Outfit:wght@600;700;800&display=swap");

body.esevai-mode .es-tab-world.active-section {
  font-family: "Outfit", "Catamaran", system-ui, sans-serif;
  padding: 8px 12px 36px !important;
  min-height: calc(100vh - 110px);
}

.es-tw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 1320px;
  margin: 0 auto 14px;
  padding: 16px 20px;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.es-tw-header--amber {
  background: linear-gradient(125deg, #78350f 0%, #d97706 50%, #fbbf24 100%);
}
.es-tw-header--violet {
  background: linear-gradient(125deg, #4c1d95 0%, #7c3aed 50%, #a78bfa 100%);
}
.es-tw-header--slate {
  background: linear-gradient(125deg, #0f172a 0%, #334155 55%, #64748b 100%);
}
.es-tw-header--teal {
  background: linear-gradient(125deg, #042f2e 0%, #0f766e 50%, #14b8a6 100%);
}

.es-tw-header__title {
  margin: 0;
  font-family: "Catamaran", sans-serif;
  font-size: clamp(1.15rem, 2.3vw, 1.45rem);
  font-weight: 900;
}
.es-tw-header__sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.92;
}
.es-tw-header__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.es-tw-header__btn {
  min-height: 44px;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 900;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}
.es-tw-header__btn--ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.es-tw-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.es-tw-search {
  flex: 1 1 220px;
  min-height: 42px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 800;
}

.es-tw-counts {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.es-tw-chip {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.es-tw-chip.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.es-tw-health {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  max-width: 1320px;
  margin: 0 auto 12px;
}

.es-tw-kpi {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  text-align: left;
  font: inherit;
}
.es-tw-kpi span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}
.es-tw-kpi b {
  display: block;
  margin-top: 3px;
  font-size: 1.1rem;
  font-weight: 1000;
  color: #0f172a;
}
.es-tw-kpi--warn {
  background: #fffbeb;
  border-color: #fde68a;
}

/* Pending */
body.esevai-mode #esPendingSection.es-pend-world {
  background: linear-gradient(180deg, #fffbeb 0%, #f8fafc 40%, #fff 100%) !important;
}
body.esevai-mode #esPendingSection .es-pending-kanban {
  max-width: 1320px;
  margin: 0 auto;
  gap: 14px;
}
body.esevai-mode #esPendingSection .es-pend-card {
  border-radius: 14px;
  border: 1px solid #fde68a;
  background: #fff;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.08);
}
body.esevai-mode #esPendingSection .es-pend-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Reminders */
body.esevai-mode #esRemSection.es-rem-world {
  background: linear-gradient(180deg, #f5f3ff 0%, #f8fafc 45%, #fff 100%) !important;
}
body.esevai-mode #esRemSection .es-rem-grid {
  max-width: 900px !important;
  margin: 0 auto !important;
  display: grid !important;
  gap: 12px !important;
}
body.esevai-mode #esRemSection .es-rem-card {
  border-radius: 16px !important;
  border: 1px solid #ddd6fe !important;
  box-shadow: 0 8px 20px rgba(91, 33, 182, 0.08) !important;
}
body.esevai-mode #esRemSection .es-rem-card.is-overdue {
  border-color: #fecdd3 !important;
  background: linear-gradient(180deg, #fff1f2, #fff) !important;
}
body.esevai-mode #esRemSection .es-rem-acts {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.es-tw-chip--act {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.es-tw-kpi--ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.es-tw-kpi--danger {
  background: #fff1f2;
  border-color: #fecdd3;
}
.es-tw-header__btn.is-on {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

/* Ledger */
body.esevai-mode #esLedgerSection.es-led-world {
  background: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 40%, #fff 100%) !important;
}
body.esevai-mode #esLedgerSection .es-led-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: end;
  grid-column: 1 / -1;
}
.es-led-sticky {
  position: sticky;
  top: 8px;
  z-index: 5;
  max-width: 1320px;
  margin: 0 auto 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-radius: 14px;
  background: #042f2e;
  color: #ecfdf5;
  box-shadow: 0 10px 28px rgba(4, 47, 46, 0.28);
  font-weight: 800;
}
.es-led-sticky b {
  font-size: 1.25rem;
  font-weight: 1000;
  color: #5eead4;
}

@media print {
  body.es-print-ledger #adminTabs,
  body.es-print-ledger .nb-nav,
  body.es-print-ledger header,
  body.es-print-ledger .es-tw-header,
  body.es-print-ledger .es-led-presets,
  body.es-print-ledger .es-daybook__hero-actions {
    display: none !important;
  }
  body.es-print-ledger .es-led-print-root {
    box-shadow: none !important;
    border: none !important;
  }
}

/* History */
body.esevai-mode #esHistSection.es-hist-world {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 40%, #fff 100%) !important;
}
body.esevai-mode #esHistSection .es-hist-grid {
  max-width: 920px !important;
  margin: 0 auto !important;
  gap: 12px !important;
}
body.esevai-mode #esHistSection .es-hist-card,
body.esevai-mode #esHistSection .es-hist-grid .glass-card {
  border-radius: 16px !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
}
body.esevai-mode #esHistSection .es-hist-card.has-credit,
body.esevai-mode #esHistSection .es-hist-grid .glass-card.has-credit {
  border-color: #fecdd3 !important;
  background: linear-gradient(180deg, #fff1f2, #fff) !important;
}
body.esevai-mode #esHistSection .es-hist-money {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}
body.esevai-mode #esHistSection .es-hist-money .is-due {
  color: #be123c;
}
body.esevai-mode #esHistSection .es-hist-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Business */
body.esevai-mode #esEsevaiBizSection.es-biz-world {
  background: linear-gradient(180deg, #e8f7f2 0%, #f8fafc 40%, #fff 100%) !important;
}
body.esevai-mode #esEsevaiBizSection.es-biz-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 16px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
body.esevai-mode #esEsevaiBizSection.es-biz-layout > .es-tw-header,
body.esevai-mode #esEsevaiBizSection.es-biz-layout > .glass-card:last-child {
  grid-column: 1 / -1;
}
.es-biz-preview {
  margin: 0;
  position: sticky;
  top: 12px;
}
.es-biz-preview__card {
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #99f6e4;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.1);
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  line-height: 1.45;
}
.es-biz-preview__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.es-biz-preview__card b {
  display: block;
  font-size: 1.2rem;
  font-weight: 1000;
  color: #0f766e;
}
.es-biz-preview__phone {
  font-size: 12px;
  color: #64748b;
}
.es-biz-preview__badge {
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.es-biz-preview__addr {
  white-space: pre-wrap;
  margin: 8px 0;
  color: #475569;
}
.es-biz-preview__meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.es-biz-preview__table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 12px;
}
.es-biz-preview__table th,
.es-biz-preview__table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 4px;
  text-align: left;
}
.es-biz-preview__table tfoot td {
  font-weight: 1000;
  color: #0f766e;
  border-bottom: none;
  padding-top: 10px;
}
.es-biz-preview__upi {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f0fdfa;
  border: 1px dashed #5eead4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.es-biz-preview__upi span {
  font-size: 10px;
  font-weight: 800;
  color: #0f766e;
  text-transform: uppercase;
  width: 100%;
}
.es-biz-preview__upi b {
  flex: 1;
  font-size: 14px;
  color: #0f172a;
}
.es-biz-preview__upi button {
  border: 1px solid #0f766e;
  background: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 800;
  cursor: pointer;
}
.es-biz-preview__upi.is-empty {
  color: #94a3b8;
  border-style: solid;
  background: #f8fafc;
}
.es-biz-preview__terms {
  margin-top: 10px;
  font-size: 11px;
  color: #64748b;
}

@media (max-width: 900px) {
  body.esevai-mode #esEsevaiBizSection.es-biz-layout {
    grid-template-columns: 1fr;
  }
  .es-biz-preview {
    position: static;
  }
}

/* Cashbook quick */
.es-cash-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #d1fae5;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.08);
}
.es-cash-quick__cell {
  min-width: 100px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f0fdfa;
}
.es-cash-quick__cell span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}
.es-cash-quick__cell b {
  font-size: 1.1rem;
  font-weight: 1000;
  color: #0f766e;
}

/* Reports */
.es-rep-world-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 8px;
}
.es-rep-fav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  font-size: 13px;
  font-weight: 800;
  color: #92400e;
}
.es-rep-fav-bar b {
  font-weight: 1000;
  color: #78350f;
}
#esReportsSection .es-rep-card {
  position: relative;
}
#esReportsSection .es-rep-card.is-fav {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}
#esReportsSection .es-rep-star {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
#esReportsSection .es-rep-star.is-on {
  color: #d97706;
}

/* Bank match tip */
.es-bm-world-tip {
  max-width: 1100px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

/* Dash clickable rows */
.es-dash-click {
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.es-dash-click:hover {
  background: #fff1f2;
}

@media (max-width: 720px) {
  .es-tw-header__btn {
    width: 100%;
  }
}
