/**
 * E-Sevai Products catalog — world-class desk UI
 * Ink/teal elevation · shop-clear rates · no purple
 */

@import url("https://fonts.googleapis.com/css2?family=Catamaran:wght@700;800;900&family=Outfit:wght@600;700;800&display=swap");

body.esevai-mode #esCatalogSection.es-catalog-world.active-section {
  --cat-ink: #0b1220;
  --cat-teal: #0f766e;
  --cat-teal-soft: #ecfdf5;
  --cat-fog: #f4f7f6;
  --cat-elev: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 16px 40px rgba(15, 23, 42, 0.1);
  --cat-elev-hover: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 22px 48px rgba(15, 118, 110, 0.16);
  background:
    radial-gradient(ellipse 70% 40% at 10% 0%, rgba(20, 184, 166, 0.14), transparent 55%),
    linear-gradient(180deg, #e8f7f2 0%, var(--cat-fog) 42%, #ffffff 100%) !important;
  min-height: calc(100vh - 110px);
  padding: 8px 12px 40px !important;
  font-family: "Outfit", "Catamaran", system-ui, sans-serif;
}

body.esevai-mode #esCatalogSection .es-catalog-header.es-pos-world-header {
  max-width: 1320px;
  margin: 0 auto 16px !important;
  padding: 18px 22px !important;
  border-radius: 22px !important;
  background:
    linear-gradient(125deg, #042f2e 0%, #0f766e 48%, #14b8a6 100%) !important;
  box-shadow: 0 22px 48px rgba(15, 118, 110, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.esevai-mode #esCatalogSection .es-pos-world-header__title {
  font-family: "Catamaran", "Outfit", sans-serif !important;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem) !important;
}

body.esevai-mode #esCatalogSection .es-pos-newbill-btn {
  min-height: 46px !important;
  border-radius: 14px !important;
  font-weight: 900 !important;
  background: #fff !important;
  color: #0f766e !important;
  border: none !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18) !important;
}

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

.es-cat-kpi {
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  box-shadow: var(--cat-elev);
}

.es-cat-kpi span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.es-cat-kpi b {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--cat-ink);
}

.es-catalog-layout {
  max-width: 1320px !important;
  gap: 18px !important;
  grid-template-columns: minmax(320px, 400px) 1fr !important;
  align-items: start !important;
}

.es-catalog-form-card,
.es-catalog-list-card {
  padding: 22px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(15, 118, 110, 0.12) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: var(--cat-elev) !important;
}

/* #16 Desktop: edit form sticky while page / list area scrolls */
@media (min-width: 961px) {
  body.esevai-mode #esCatalogSection.es-catalog-world.active-section .es-catalog-form-card {
    position: sticky !important;
    top: 72px !important;
    z-index: 8;
    max-height: calc(100dvh - 88px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.75) inset,
      0 18px 44px rgba(15, 23, 42, 0.12) !important;
  }

  body.esevai-mode #esCatalogSection.es-catalog-world.active-section .es-catalog-list-card {
    min-height: calc(100dvh - 220px);
  }

  body.esevai-mode #esCatalogSection.es-catalog-world.active-section .es-catalog-grid {
    max-height: calc(100dvh - 280px) !important;
  }
}

.es-catalog-form-card h3,
.es-catalog-list-head h3 {
  font-family: "Catamaran", sans-serif !important;
  font-size: 1.1rem !important;
  color: #0f766e !important;
}

.es-catalog-field label {
  color: #334155 !important;
  font-size: 11px !important;
  letter-spacing: 0.03em !important;
}

.es-catalog-form-card .premium-input,
.es-catalog-form-card textarea.premium-input {
  border-radius: 12px !important;
  border: 2px solid #e2e8f0 !important;
  min-height: 44px;
  font-weight: 700 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.es-catalog-form-card .premium-input:focus,
.es-catalog-form-card textarea.premium-input:focus {
  border-color: #14b8a6 !important;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18) !important;
  outline: none;
}

.es-catalog-form-actions .btn-esevai {
  min-height: 50px !important;
  border-radius: 14px !important;
  font-weight: 900 !important;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28) !important;
}

.es-cat-fee-preview {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 800;
  color: #065f46;
  line-height: 1.45;
}

.es-catalog-list-head {
  margin-bottom: 12px !important;
  gap: 10px !important;
}

.es-catalog-search {
  max-width: 260px !important;
  border-radius: 14px !important;
  border: 2px solid #e2e8f0 !important;
  min-height: 44px !important;
}

.es-cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.es-cat-chip {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.15s ease;
}

.es-cat-chip:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.es-cat-chip.is-on {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.25);
}

.es-catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 14px !important;
  max-height: min(72vh, 760px) !important;
  padding: 2px 4px 8px 2px !important;
}

.es-catalog-card {
  position: relative;
  padding: 16px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
  overflow: hidden;
}

.es-catalog-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #14b8a6, #0f766e);
}

.es-catalog-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(15, 118, 110, 0.35) !important;
  box-shadow: var(--cat-elev-hover) !important;
}

.es-catalog-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.es-catalog-card__name {
  font-family: "Catamaran", sans-serif !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.25;
  color: #0f172a !important;
}

.es-catalog-card__code {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 8px;
  background: #042f2e;
  color: #5eead4;
}

.es-catalog-card__cat {
  display: inline-block;
  margin-top: 8px !important;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

.es-catalog-card__rates {
  gap: 6px !important;
  margin-top: 12px !important;
}

.es-catalog-rate {
  font-size: 11px !important;
  padding: 6px 9px !important;
  border-radius: 10px !important;
}

.es-catalog-card__earn {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border-radius: 10px;
  padding: 6px 8px;
}

.es-catalog-card__edit {
  margin-top: 10px !important;
  font-size: 11px !important;
  color: #0f766e !important;
}

.es-catalog-empty {
  border-style: dashed !important;
  border-color: #99d5c8 !important;
  background: #f0fdfa !important;
  color: #0f766e !important;
  border-radius: 18px !important;
}

.es-cat-tools {
  max-width: 1320px;
  margin: 0 auto 12px;
}
.es-cat-tools__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.es-cat-tool {
  border: 1px solid #99d5c8;
  background: #fff;
  color: #0f766e;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.es-cat-tool:hover {
  background: #ecfdf5;
}
.es-cat-tool--file {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.es-cat-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}
.es-cat-sort {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
}
.es-cat-kbhint {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.es-cat-kpi--btn {
  cursor: pointer;
  text-align: left;
  border: none;
  font: inherit;
  width: 100%;
}
.es-cat-kpi--btn:hover {
  box-shadow: var(--cat-elev-hover);
  transform: translateY(-2px);
}
.es-catalog-card.is-pinned {
  border-color: rgba(245, 158, 11, 0.45) !important;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 55%) !important;
}
.es-catalog-card.is-inactive {
  opacity: 0.62;
  filter: grayscale(0.25);
}
.es-catalog-pin {
  border: none;
  background: #f1f5f9;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  color: #94a3b8;
  flex: 0 0 auto;
}
.es-catalog-pin.is-on {
  background: #fef3c7;
  color: #b45309;
}
.es-catalog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.es-catalog-card__use {
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}
.es-catalog-card__off {
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
}
.es-cat-bulk-card {
  max-width: 440px;
  width: min(94vw, 440px);
  padding: 18px;
  border-radius: 20px;
}
.es-cat-bulk-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.es-cat-bulk-head p {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  color: #0f766e;
  text-transform: uppercase;
}
.es-cat-bulk-head h3 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}
.es-cat-bulk-head button {
  border: none;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
}
.es-cat-bulk-card label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
}
.es-cat-bulk-card .premium-input {
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
}
.es-cat-bulk-note {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.45;
}
.es-cat-bulk-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}
.es-cat-top-body {
  max-height: min(50vh, 380px);
  overflow: auto;
}
.es-cat-top-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.es-cat-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.es-cat-top-row:hover {
  border-color: #0f766e;
  background: #f0fdfa;
}
.es-cat-top-n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  color: #0f766e;
  font-weight: 900;
  font-size: 12px;
}
.es-cat-top-meta {
  flex: 1;
  min-width: 0;
}
.es-cat-top-meta b {
  display: block;
  font-size: 13px;
}
.es-cat-top-meta small {
  color: #64748b;
  font-weight: 700;
}
.es-cat-top-q {
  font-weight: 1000;
  color: #0f766e;
}

@media (max-width: 960px) {
  .es-catalog-layout {
    grid-template-columns: 1fr !important;
  }
  .es-catalog-grid {
    max-height: none !important;
  }
  .es-cat-kbhint {
    margin-left: 0;
    width: 100%;
  }
}
