#topdanSatisPage{
  padding: 0 0 14px;
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tds-page{
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 14px 0;
  background:
    radial-gradient(circle at top left, rgba(191, 219, 254, 0.55), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-radius: 22px;
  color: #1f2937;
}

.tds-topbar,
.tds-filters,
.tds-summary,
.tds-panel{
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(191, 219, 254, 0.95);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  border-radius: 8px;
}

.tds-topbar{
  padding: 10px 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: #111827;
  border: 1px solid #d8dee7;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.tds-eyebrow{
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
}

.tds-title{
  margin: 4px 0 0;
  font-size: clamp(16px, 2.2vw, 22px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.tds-filters{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.tds-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tds-field--anbar{
  grid-column: span 2;
}

.tds-field label{
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}

.tds-field input{
  height: 31px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #d1d7e0;
  background: #fff;
  font-size: 11.5px;
  color: #111827;
  outline: none;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.03);
}

.tds-field select{
  height: 37px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #d1d7e0;
  background: #fff;
  font-size: 11px;
  line-height: normal;
  color: #111827;
  outline: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: visible;
}

.tds-field input:focus,
.tds-field select:focus,
.tds-tab-search input:focus{
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tds-actions{
  display: flex;
  align-items: flex-end;
}

.tds-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  gap: 6px;
  min-height: 29px;
  padding: 8px 14px;
  border: 1px solid #cfd6e0;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.tds-btn:hover{
  background: #f8fafc;
  border-color: #bcc6d3;
}

.tds-btn--primary{
  width: 100%;
  color: #1f2937;
  background: #eef2f7;
  border: 1px solid #c8d0dc;
}

.tds-btn--ghost{
  color: #111827;
  background: linear-gradient(180deg, #ffffff 0%, #edf1f5 100%);
  border: 1px solid #b8bec8;
}

.tds-btn__ico{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: #e5e7eb;
  color: #111827;
}

.tds-btn--ghost .tds-btn__ico{
  background: rgba(37, 99, 235, 0.08);
}

.tds-status-row{
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  min-height: 22px;
}

.tds-loading{
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
}

.tds-info{
  font-size: 13px;
  color: #334155;
}

.tds-summary{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.tds-card{
  padding: 10px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #d8dee7;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.tds-card--empty{
  grid-column: 1 / -1;
}

.tds-card__label{
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.tds-card__value{
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.tds-card__subvalue{
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}

.tds-card__meta{
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

.tds-main-view{
  min-height: 0;
}

.tds-panel{
  padding: 10px;
}

.tds-panel__head{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tds-tab-search{
  margin-left: auto;
  min-width: min(100%, 280px);
}

.tds-tab-search input{
  width: 100%;
  height: 31px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #d1d7e0;
  background: #fff;
  outline: none;
  font-size: 11.5px;
}

.tds-drug-view__titlebox{
  min-width: 0;
  flex: 1 1 320px;
}

.tds-drug-view__title{
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.tds-drug-view__meta{
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.tds-table-head{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tds-table-title{
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.tds-table-meta{
  font-size: 11px;
  color: #6b7280;
}

.tds-table-wrap{
  overflow: auto;
  border-radius: 4px;
  border: 1px solid #cfd5dd;
  background: #fff;
}

.tds-table-wrap--main{
  max-height: min(50vh, 560px);
}

.tds-table-wrap--detail{
  max-height: min(25vh, 240px);
}

.tds-table-wrap--drill,
.tds-table-wrap--modal{
  max-height: min(72vh, 680px);
}

.tds-table{
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.tds-table thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 7px 8px;
  background: #f3f5f8;
  border-bottom: 1px solid #d7dee8;
  font-size: 11px;
  font-weight: 600;
  color: #111827;
  text-align: left;
  white-space: nowrap;
}

.tds-th-btn{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.tds-th-btn.is-filtered{
  color: #0b5ed7;
  font-weight: 700;
}

.tds-filter-dot{
  font-size: 9px;
  line-height: 1;
  color: #0b5ed7;
}

.tds-sort{
  color: #6b7280;
  font-size: 10px;
}

.tds-table tbody td{
  padding: 7px 8px;
  border-top: 1px solid #edf1f5;
  font-size: 11.5px;
  line-height: 1.2;
  color: #111827;
  background: #fff;
  white-space: nowrap;
}

.tds-table tbody tr:nth-child(even) td{
  background: #fcfcfd;
}

.tds-table tbody tr:hover td{
  background: #f6f9fc;
}

.tds-table tbody tr.is-selected td{
  background: #e5e7eb;
}

.tds-row{
  cursor: pointer;
}

.tds-cell--num,
.tds-table thead th.tds-th--num{
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.tds-empty{
  padding: 18px !important;
  text-align: center !important;
  color: #64748b !important;
  font-style: italic;
}

.tds-detail{
  position: relative;
  z-index: 20;
  margin-top: 2px;
  padding: 10px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  background: rgba(255,255,255,0.98);
  border: 1px solid #cfd5dd;
  box-shadow: 0 -4px 10px rgba(15, 23, 42, 0.06);
  max-height: 36vh;
  transition: max-height .2s ease, padding .2s ease;
  overflow: hidden;
}

.tds-detail__head-right{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.tds-detail__toggle{
  border: 1px solid #b8bec8;
  background: linear-gradient(180deg, #ffffff 0%, #e9edf3 100%);
  color: #111827;
  border-radius: 4px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.tds-detail--collapsed{
  max-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.tds-detail--collapsed .tds-detail__chips,
.tds-detail--collapsed .tds-table-wrap--detail,
.tds-detail--collapsed .tds-detail__meta{
  display: none;
}

.tds-detail__head{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.tds-detail__eyebrow{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.tds-detail__title{
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.tds-detail__meta{
  font-size: 12px;
  color: #475569;
}

.tds-detail__chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tds-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f3f4f6;
  color: #111827;
  font-size: 11px;
  font-weight: 600;
}

.tds-chip strong{
  color: #0f172a;
}

.tds-op{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.tds-op--sale{
  background: #dcfce7;
  color: #166534;
}

.tds-op--return{
  background: #ffedd5;
  color: #c2410c;
}

.tds-context-menu{
  position: fixed;
  z-index: 120;
  min-width: 128px;
  padding: 4px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #cfd5dd;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.tds-context-menu__btn{
  width: 100%;
  min-height: 28px;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  background: #eaf3ff;
  color: #000 !important;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
}

.tds-context-menu__btn:hover,
.tds-context-menu__btn:focus,
.tds-context-menu__btn:active{
  color: #000 !important;
}

.tds-modal{
  position: fixed;
  inset: 0;
  z-index: 140;
}

.tds-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
}

.tds-modal__card{
  position: relative;
  width: min(1100px, calc(100% - 28px));
  max-height: min(88vh, 900px);
  margin: 36px auto;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #dbeafe;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.tds-modal__card--filter{
  width: min(352px, calc(100% - 16px));
  max-height: none;
  margin: auto;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #d7dde6;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  background: #f8fafc;
}

#tds_filterModal .tds-modal__backdrop{
  background: transparent;
  backdrop-filter: none;
}

.tds-filter-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 10px;
  border-bottom: 1px solid #e5e7eb;
  background: transparent;
  margin-bottom: 12px;
}

.tds-filter-title{
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}

.tds-filter-close{
  border: none;
  background: transparent;
  color: #374151;
  font-size: 16px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  line-height: 16px;
}

.tds-filter-menu{
  background: transparent;
  display: flex;
  gap: 8px;
  padding: 0;
  justify-content: center;
  margin-bottom: 12px;
}

.tds-filter-menu__item{
  flex: 0 0 100px;
  width: 100px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
  border: 1px solid #cfd6e0;
  background: #ffffff;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 500;
  color: #1f2937;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.tds-filter-menu__item:hover{
  background: #f3f6fb;
  border-color: #b9c3d1;
}

.tds-filter-menu__item.is-active{
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22);
}

.tds-filter-text{
  background: #fff;
  padding: 0;
  margin-bottom: 12px;
}

.tds-filter-text input{
  width: 100%;
  height: 31px;
  padding: 0 10px;
  border: 1px solid #cfd6e0;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.tds-filter-text input:focus{
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.tds-filter-list{
  max-height: 190px;
  overflow: auto;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  padding: 0;
  background: #ffffff;
}

.tds-filter-table{
  width: 100%;
  border-collapse: collapse;
}

.tds-filter-table tr + tr td{
  border-top: 1px solid #eef2f7;
}

.tds-filter-table tr:hover td{
  background: #f8fbff;
}

.tds-filter-check{
  width: 22px;
  text-align: center;
  padding: 0 4px 0 8px;
  line-height: 1.2;
  height: 28px;
  vertical-align: middle;
}

.tds-filter-check input[type="checkbox"]{
  width: 12px;
  height: 12px;
  margin: 0;
  vertical-align: middle;
  accent-color: #3b82f6;
}

.tds-filter-value{
  font-size: 12px;
  color: #111827;
  padding: 0 10px 0 2px;
  line-height: 1.25;
  height: 28px;
  vertical-align: middle;
}

.tds-filter-range{
  background: #fff;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.tds-filter-range input{
  height: 31px;
  padding: 0 10px;
  border: 1px solid #cfd6e0;
  border-radius: 6px;
}

.tds-filter-actions{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  margin-top: 0;
  background: transparent;
  border-top: 0;
}

.tds-filter-btn{
  height: 29px;
  min-width: 84px;
  border: 1px solid #cfd6e0;
  border-radius: 6px;
  background: #f3f4f6;
  color: #1f2937;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.tds-filter-btn--ok{
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.tds-filter-btn--ok:hover{
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.tds-filter-btn:not(.tds-filter-btn--ok):hover{
  background: #e5e7eb;
  border-color: #bfc8d5;
}

.tds-modal__head{
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tds-modal__title{
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.tds-modal__meta{
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.tds-modal__close{
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #e9edf3 100%);
  color: #111827;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 1180px){
  .tds-filters{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tds-field--anbar{
    grid-column: span 3;
  }

  .tds-actions{
    grid-column: span 3;
  }

  .tds-summary{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  #topdanSatisPage{
    padding-bottom: 0;
  }

  .tds-page{
    padding: 10px 10px 0;
    gap: 10px;
    border-radius: 0;
  }

  .tds-topbar,
  .tds-filters,
  .tds-summary,
  .tds-panel{
    border-radius: 16px;
  }

  .tds-filters{
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .tds-field--anbar,
  .tds-actions{
    grid-column: span 1;
  }

  .tds-summary{
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .tds-panel{
    padding: 12px;
  }

  .tds-panel__head{
    align-items: stretch;
  }

  .tds-tab-search{
    min-width: 100%;
    margin-left: 0;
  }

  .tds-table-wrap--main{
    max-height: min(42vh, 420px);
  }

  .tds-table{
    min-width: 760px;
  }

  .tds-detail{
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    border-radius: 14px 14px 0 0;
    max-height: 40vh;
  }

  .tds-detail__head-right{
    width: 100%;
    align-items: stretch;
  }

  .tds-table-wrap--detail{
    max-height: 30vh;
  }

  .tds-modal__card{
    width: calc(100% - 18px);
    margin: 10px auto;
    padding: 12px;
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }

  .tds-modal__card--filter{
    width: min(352px, calc(100% - 16px));
    margin: auto;
    padding: 14px;
    border-radius: 8px;
  }
}
