/**
 * HYDRA Tools — Quản lý nợ vay (mobile-first)
 */

#hydraToolsShell #hydraToolsMain:has(.debt-loan-shell) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

#hydraToolsShell .tools-workspace__inner--dl,
#hydraToolsShell .debt-loan-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

#hydraToolsShell .dl-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

#hydraToolsShell .dl-head__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

#hydraToolsShell .dl-head__export {
  padding: 8px 10px;
  font-size: 12px;
}

#hydraToolsShell .dl-head__export:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#hydraToolsShell .dl-head__add {
  padding: 8px 10px;
  font-size: 12px;
}

#hydraToolsShell .dl-btn--mini {
  padding: 6px 10px;
  font-size: 12px;
  height: 30px;
  line-height: 1;
}

#hydraToolsShell .dl-head__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

#hydraToolsShell .dl-head__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}

#hydraToolsShell .dl-btn {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

#hydraToolsShell .dl-btn--primary {
  background: linear-gradient(155deg, #fb923c, #ea580c);
  border-color: transparent;
  color: #fff;
}

#hydraToolsShell .dl-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#hydraToolsShell .dl-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#hydraToolsShell .dl-kpi-grid--wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow-x: visible;
}

#hydraToolsShell .dl-kpi-grid--wide .dl-kpi {
  min-width: 0;
  max-width: none;
  width: 100%;
}

#hydraToolsShell .dl-kpi-grid--primary .dl-kpi {
  min-width: 0;
}

@media (min-width: 901px) {
  #hydraToolsShell .dl-kpi-grid--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  #hydraToolsShell .dl-kpi__val {
    font-size: 13px;
  }

  #hydraToolsShell .dl-kpi__label {
    font-size: 9px;
  }
}

@media (max-width: 389px) {
  #hydraToolsShell .dl-compact-val {
    font-size: 10px;
  }
}

#hydraToolsShell .dl-kpi {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 0;
}

#hydraToolsShell .dl-kpi__label {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .dl-kpi__val {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

#hydraToolsShell .dl-kpi__sub {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  color: #94a3b8;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .dl-priority {
  margin: 0 0 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.15);
}

#hydraToolsShell .dl-priority--compact {
  margin: 0 0 4px;
  padding: 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

#hydraToolsShell .dl-priority--compact.is-collapsed {
  max-height: 44px;
  overflow: hidden;
}

#hydraToolsShell .dl-priority--compact.is-collapsed .dl-priority__toggle {
  min-height: 36px;
  max-height: 44px;
  box-sizing: border-box;
}

#hydraToolsShell .dl-priority--compact:not(.is-expanded) .dl-priority__list {
  display: none !important;
}

#hydraToolsShell .dl-priority--compact.is-expanded {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.15);
}

#hydraToolsShell .dl-priority__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  cursor: pointer;
  text-align: left;
}

#hydraToolsShell .dl-priority--compact:not(.is-expanded) .dl-priority__toggle {
  color: #0f172a;
}

#hydraToolsShell .dl-priority__toggle-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .dl-priority__toggle-action {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

#hydraToolsShell .dl-priority--compact.is-expanded .dl-priority__toggle-action {
  color: #c2410c;
}

#hydraToolsShell .dl-priority--compact .dl-priority__list {
  margin: 0;
  padding: 0 8px 8px;
}

#hydraToolsShell .dl-priority__title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: #c2410c;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#hydraToolsShell .dl-priority__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#hydraToolsShell .dl-priority__item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

#hydraToolsShell .dl-priority__name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .dl-priority__mid {
  flex: 0 0 auto;
  color: #ea580c;
  font-weight: 600;
  white-space: nowrap;
}

#hydraToolsShell .dl-priority__metric {
  flex: 0 0 auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #475569;
  white-space: nowrap;
}

#hydraToolsShell .dl-card__head-end {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 0;
}

#hydraToolsShell .dl-health {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 999px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#hydraToolsShell .dl-health--good { background: #dcfce7; color: #15803d; }
#hydraToolsShell .dl-health--warning { background: #fef9c3; color: #a16207; }
#hydraToolsShell .dl-health--kpi {
  font-size: 12px;
  padding: 3px 8px;
}

#hydraToolsShell .dl-card--highlight {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 1px;
  transition: outline-color 0.2s ease;
}

#hydraToolsShell .dl-compact-sep {
  flex: 0 0 auto;
  color: #cbd5e1;
  font-weight: 400;
  padding: 0 1px;
}

#hydraToolsShell .dl-money--ok { color: #15803d; }
#hydraToolsShell .dl-money--bad { color: #dc2626; }

#hydraToolsShell .dl-roi--great { color: #15803d; }
#hydraToolsShell .dl-roi--good { color: #ca8a04; }
#hydraToolsShell .dl-roi--warn { color: #ea580c; }
#hydraToolsShell .dl-roi--bad { color: #dc2626; }

#hydraToolsShell .dl-capital-bar {
  margin-bottom: 6px;
  min-width: 0;
}

#hydraToolsShell .dl-capital-bar__track {
  display: flex;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

#hydraToolsShell .dl-capital-bar__ok {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #16a34a);
}

#hydraToolsShell .dl-capital-bar__bad {
  display: block;
  height: 100%;
  background: #ef4444;
}

#hydraToolsShell .dl-capital-bar__label {
  margin: 4px 0 0;
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .dl-progress {
  margin: 2px 0 4px;
  min-width: 0;
}

#hydraToolsShell .dl-progress__row {
  display: flex;
  align-items: center;
  gap: 6px;
}

#hydraToolsShell .dl-progress__track {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  min-width: 0;
}

#hydraToolsShell .dl-progress__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #86efac, #16a34a);
  transition: width 0.45s ease;
}

#hydraToolsShell .dl-progress__fill.is-full {
  background: #16a34a;
}

#hydraToolsShell .dl-progress__pct {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  color: #15803d;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .dl-progress__txt {
  margin: 2px 0 0;
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .dl-history-chip__icon {
  flex: 0 0 auto;
}

#hydraToolsShell .dl-card--repay-animate {
  animation: dl-card-fade 0.45s ease;
}

#hydraToolsShell .dl-card--repay-animate .dl-status--pulse {
  animation: dl-status-pop 0.5s ease;
}

@keyframes dl-card-fade {
  0% { opacity: 0.55; transform: scale(0.99); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes dl-status-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

#hydraToolsShell .dl-summary__flags {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#hydraToolsShell .dl-alert-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 2px;
  min-width: 0;
}

#hydraToolsShell .dl-alert-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#hydraToolsShell .dl-alert-bar::-webkit-scrollbar {
  display: none;
}

#hydraToolsShell .dl-warn-notify {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#hydraToolsShell .dl-warn-notify__ico {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

#hydraToolsShell .dl-warn-notify__text {
  flex: 0 1 auto;
  min-width: 0;
}

#hydraToolsShell .dl-warn-notify__badge {
  flex: 0 0 auto;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .dl-warnings-sheet__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(50dvh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#hydraToolsShell .dl-warnings-sheet__item {
  margin: 0;
}

#hydraToolsShell .dl-warnings-sheet__empty {
  margin: 0;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

#hydraToolsShell .dl-alert-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #475569;
  white-space: nowrap;
  line-height: 1.2;
}

#hydraToolsShell button.dl-alert-chip {
  cursor: pointer;
}

#hydraToolsShell button.dl-alert-chip:disabled {
  opacity: 0.55;
  cursor: default;
}

#hydraToolsShell .dl-alert-chip strong {
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .dl-alert-chip--priority.is-active {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.35);
  color: #c2410c;
}

#hydraToolsShell .dl-alert-chip--warn {
  color: #c2410c;
  border-color: rgba(234, 88, 12, 0.2);
  background: #fff7ed;
}

#hydraToolsShell .dl-alert-chip--bad {
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.2);
  background: #fef2f2;
}

#hydraToolsShell .dl-flag {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

#hydraToolsShell .dl-flag--warn { color: #c2410c; border-color: rgba(234, 88, 12, 0.2); background: #fff7ed; }
#hydraToolsShell .dl-flag--bad { color: #b91c1c; border-color: rgba(220, 38, 38, 0.2); background: #fef2f2; }

#hydraToolsShell .dl-alert {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

#hydraToolsShell .dl-alert--bad {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

#hydraToolsShell .dl-filters-wrap {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0 4px;
  margin: 0 -2px;
  background: linear-gradient(180deg, #faf8f5 85%, rgba(250, 248, 245, 0));
}

#hydraToolsShell .dl-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}

#hydraToolsShell .dl-filters::-webkit-scrollbar {
  display: none;
}

#hydraToolsShell .dl-filter-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

#hydraToolsShell .dl-filter-chip--priority.is-active {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.4);
  color: #c2410c;
}

#hydraToolsShell .dl-repay-presets {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

#hydraToolsShell .dl-repay-preset {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  height: 30px;
}

#hydraToolsShell .dl-repay-preset:active {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.25);
  color: #1d4ed8;
}

#hydraToolsShell .tools-dash-tile__alert {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  vertical-align: middle;
  line-height: 1.4;
}

#hydraToolsShell .tools-dash-tile__alert--bad {
  background: #fee2e2;
  color: #b91c1c;
}

#hydraToolsShell .tools-dash-tile__alert--warn {
  background: #ffedd5;
  color: #c2410c;
}

#hydraToolsShell .dl-filter-chip.is-active {
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.35);
  color: #c2410c;
}

#hydraToolsShell .dl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#hydraToolsShell .dl-progress--thin {
  margin: 1px 0 3px;
}

#hydraToolsShell .dl-progress--thin .dl-progress__track {
  height: 3px;
}

#hydraToolsShell .dl-progress--thin .dl-progress__pct,
#hydraToolsShell .dl-progress--thin .dl-progress__txt {
  display: none;
}

#hydraToolsShell .dl-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 10px;
  min-width: 0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

#hydraToolsShell .dl-card--paid {
  padding: 10px;
}

#hydraToolsShell .dl-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

#hydraToolsShell .dl-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .dl-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 2px 0 4px;
  min-width: 0;
}

#hydraToolsShell .dl-card__meta-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 10px;
  color: #64748b;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .dl-card__meta-text .dl-purpose {
  font-weight: 600;
  color: #475569;
}

#hydraToolsShell .dl-card__badges {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

#hydraToolsShell .dl-card__countdown {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

#hydraToolsShell .dl-card__countdown.is-overdue {
  color: #dc2626;
}

#hydraToolsShell .dl-card__countdown.is-soon {
  color: #ea580c;
}

#hydraToolsShell .dl-status {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1.2;
}

#hydraToolsShell .dl-status--neutral { background: #f1f5f9; color: #475569; }
#hydraToolsShell .dl-status--ok { background: #dcfce7; color: #15803d; }
#hydraToolsShell .dl-status--warn { background: #ffedd5; color: #c2410c; }
#hydraToolsShell .dl-status--bad { background: #fee2e2; color: #b91c1c; }

#hydraToolsShell .dl-card__compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#hydraToolsShell .dl-card__compact--paid .dl-compact-row {
  justify-content: flex-start;
  gap: 10px;
}

#hydraToolsShell .dl-compact-row {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 2px;
  min-width: 0;
  line-height: 1.25;
  overflow: hidden;
}

#hydraToolsShell .dl-compact-item {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .dl-compact-lbl {
  color: #94a3b8;
  font-weight: 500;
  font-size: 10px;
}

#hydraToolsShell .dl-compact-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

#hydraToolsShell .dl-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-top: 6px;
}

#hydraToolsShell .dl-card__actions .dl-card__btn {
  flex: 1 1 0;
}

#hydraToolsShell .dl-card__actions--single {
  display: grid;
  grid-template-columns: 1fr;
}

#hydraToolsShell .dl-card__btn {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  border-radius: 8px;
  padding: 0 6px;
  height: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-width: 0;
  text-align: center;
  line-height: 28px;
}

#hydraToolsShell .dl-card__btn--mini {
  height: 30px;
  line-height: 28px;
  font-size: 12px;
}

#hydraToolsShell .dl-card--paid .dl-card__btn {
  height: 30px;
  line-height: 28px;
}

#hydraToolsShell .dl-card__btn--ok { color: #15803d; border-color: rgba(21, 128, 61, 0.2); }
#hydraToolsShell .dl-card__btn--bad { color: #dc2626; border-color: rgba(220, 38, 38, 0.2); }

#hydraToolsShell .dl-warn--mini {
  height: 18px;
  line-height: 16px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
}

#hydraToolsShell .dl-warn--more {
  background: #f1f5f9;
  color: #64748b;
}

#hydraToolsShell .dl-history-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  padding: 0 5px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
}

#hydraToolsShell .dl-repay-options {
  display: flex;
  gap: 8px;
  margin: 6px 0 10px;
}

#hydraToolsShell .dl-repay-opt {
  flex: 1 1 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

#hydraToolsShell .dl-repay-opt.is-active {
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.35);
  color: #c2410c;
}

#hydraToolsShell .dl-repay-amount-row.is-hidden {
  display: none;
}

#hydraToolsShell .dl-repay-hint {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .dl-return-context {
  display: grid;
  gap: 4px;
  margin: 2px 0 10px;
  color: #64748b;
  font-size: 12px;
}

#hydraToolsShell .dl-return-context span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

#hydraToolsShell .dl-return-context strong,
#hydraToolsShell .dl-return-preview strong {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .dl-return-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}

#hydraToolsShell .dl-return-preview > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #f8fafc;
}

#hydraToolsShell .dl-return-preview span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.25;
}

#hydraToolsShell .dl-return-preview strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .dl-return-meta {
  align-items: end;
}

#hydraToolsShell .dl-empty,
#hydraToolsShell .dl-loading,
#hydraToolsShell .dl-error {
  text-align: center;
  font-size: 13px;
  padding: 16px 8px;
}

#hydraToolsShell .dl-empty__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

#hydraToolsShell .dl-empty__hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

#hydraToolsShell .dl-error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

#hydraToolsShell .dl-error-banner__text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #b91c1c;
  line-height: 1.3;
}

#hydraToolsShell .dl-list-toolbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}

#hydraToolsShell .dl-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 16px;
  font-weight: 500;
  color: #0f172a;
  background: #fff;
  min-width: 0;
}

#hydraToolsShell .dl-sort-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#hydraToolsShell .dl-sort-row::-webkit-scrollbar {
  display: none;
}

#hydraToolsShell .dl-sort-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #64748b;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

#hydraToolsShell .dl-sort-chip.is-active {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.3);
  color: #1d4ed8;
}

#hydraToolsShell .dl-list-count {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}

#hydraToolsShell .dl-skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#hydraToolsShell .dl-skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .dl-skeleton-line {
  display: block;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: dl-skeleton-shimmer 1.2s ease infinite;
}

#hydraToolsShell .dl-skeleton-line--title {
  width: 55%;
  height: 12px;
}

#hydraToolsShell .dl-skeleton-line--short {
  width: 40%;
}

@keyframes dl-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

#hydraToolsShell .dl-error { color: #b91c1c; font-weight: 600; }

#hydraToolsShell .dl-modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-mobile-sheet, 500) + 20);
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
}

#hydraToolsShell .dl-modal__card {
  width: 100%;
  max-width: 520px;
  max-height: min(92dvh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  position: relative;
  box-sizing: border-box;
}

#hydraToolsShell .dl-modal__card--sm { max-height: 70dvh; }

#hydraToolsShell .dl-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

#hydraToolsShell .dl-modal__title {
  margin: 0 28px 12px 0;
  font-size: 17px;
  font-weight: 700;
}

#hydraToolsShell .dl-modal__sub {
  margin: -8px 0 12px;
  font-size: 13px;
  color: #64748b;
}

#hydraToolsShell .dl-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#hydraToolsShell .dl-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#hydraToolsShell .dl-warn--warn {
  background: #ffedd5;
  color: #c2410c;
}

#hydraToolsShell .dl-warn--bad {
  background: #fee2e2;
  color: #b91c1c;
}

#hydraToolsShell .dl-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

#hydraToolsShell .dl-field select,
#hydraToolsShell .dl-field input,
#hydraToolsShell .dl-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #0f172a;
  min-width: 0;
  background: #fff;
}

#hydraToolsShell .dl-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

#hydraToolsShell .dl-modal__card .dl-form__actions {
  position: sticky;
  bottom: calc(-16px - env(safe-area-inset-bottom, 0px));
  z-index: 4;
  margin: 4px -14px calc(-16px - env(safe-area-inset-bottom, 0px));
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

#hydraToolsShell .dl-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#hydraToolsShell .dl-history__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12px;
}

#hydraToolsShell .dl-history__item strong {
  grid-column: 2;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .tools-dash-tile--debt .tools-dash-tile__icon {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

#hydraToolsShell .tools-dash-tile--debt .tools-dash-tile__body {
  gap: 2px;
}

#hydraToolsShell .tools-dash-tile--debt .tools-dash-tile__sub {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .tools-dash-tile--debt .tools-dash-tile__sub strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

@media (max-width: 359px) {
  #hydraToolsShell .tools-dash-tile--debt .tools-dash-tile__sub {
    display: none;
  }
}

#hydraToolsShell .tools-dash-tile__stat--ok { color: #15803d; }
#hydraToolsShell .tools-dash-tile__stat--bad { color: #dc2626; }

#hydraToolsShell .dl-badge--compound {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.12);
  white-space: nowrap;
}

#hydraToolsShell .dl-form__hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

#hydraToolsShell .dl-form__cap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

#hydraToolsShell .dl-cap-tl {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(55vh, 420px);
  overflow: auto;
}

#hydraToolsShell .dl-cap-tl__item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

#hydraToolsShell .dl-cap-tl__date {
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .dl-cap-tl__amt {
  grid-column: 2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  min-width: 0;
}

#hydraToolsShell .dl-cap-tl__note {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #475569;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .dl-wiz__preview {
  margin: 8px 0 12px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
}

#hydraToolsShell .dl-wiz__preview ul {
  margin: 8px 0 0;
  padding-left: 16px;
}

#hydraToolsShell .dl-wiz__period {
  margin: 0 0 4px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  #hydraToolsShell .dl-cap-tl__item {
    grid-template-columns: 76px minmax(0, 1fr);
  }
}

#hydraToolsShell .dl-card__menu-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

#hydraToolsShell .dl-card__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

#hydraToolsShell .dl-card__menu-btn:hover,
#hydraToolsShell .dl-card__menu-btn[aria-expanded="true"] {
  background: #f1f5f9;
  color: #0f172a;
}

#hydraToolsShell .dl-card__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  z-index: 8;
  min-width: 160px;
  padding: 4px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

#hydraToolsShell .dl-card__menu[hidden] {
  display: none;
}

#hydraToolsShell .dl-card__menu-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

#hydraToolsShell .dl-card__menu-item:hover {
  background: #f8fafc;
}

#hydraToolsShell .dl-card__menu-item--danger {
  color: #dc2626;
}

#hydraToolsShell .dl-card__menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: #e2e8f0;
  pointer-events: none;
}

#hydraToolsShell .dl-card.is-menu-open {
  position: relative;
  z-index: 4;
}

#hydraToolsShell .dl-snap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

#hydraToolsShell .dl-snap__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

#hydraToolsShell .dl-snap__dev {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
}

#hydraToolsShell .dl-snap__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#hydraToolsShell .dl-snap__item {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

#hydraToolsShell .dl-snap__item.is-warn {
  border-color: #fca5a5;
  background: #fef2f2;
}

#hydraToolsShell .dl-snap__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

#hydraToolsShell .dl-snap__date {
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .dl-snap__bal {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .dl-snap__meta {
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .dl-snap__warn {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #dc2626;
  font-weight: 600;
}

#hydraToolsShell .dl-snap__detail {
  margin: 8px 0 0;
  padding: 8px;
  max-height: 160px;
  overflow: auto;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

#hydraToolsShell .dl-snap__banner {
  color: #b91c1c;
}

@media (min-width: 901px) {
  #hydraToolsShell .dl-modal {
    align-items: center;
    padding: 16px;
  }

  #hydraToolsShell .dl-modal__card {
    border-radius: 16px;
  }
}

/* Batch 2 � C?ng kh�ch h�ng (loan detail only) */
#hydraToolsShell .dl-portal {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  min-width: 0;
}
#hydraToolsShell .dl-portal legend {
  padding: 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
}
#hydraToolsShell .dl-portal__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  margin-bottom: 8px;
}
#hydraToolsShell .dl-portal__status {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: #64748b;
  word-break: break-word;
}
#hydraToolsShell .dl-portal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
#hydraToolsShell .dl-portal__create {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}
#hydraToolsShell .dl-portal__warn {
  font-size: 0.8rem;
  color: #b45309;
  margin: 0 0 10px;
}
#hydraToolsShell .dl-portal__temp-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
  margin-bottom: 12px;
}
#hydraToolsShell .dl-portal__temp-code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #0f172a;
  color: #e2e8f0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* TASK-672 — portal account from Capital Manager card */
#hydraToolsShell .dl-portal-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
  vertical-align: middle;
  white-space: nowrap;
}
#hydraToolsShell .dl-portal-badge--on {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}
#hydraToolsShell .dl-portal-badge--off {
  background: rgba(148, 163, 184, 0.22);
  color: #475569;
}
#hydraToolsShell .dl-portal-badge--locked {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}
#hydraToolsShell .dl-account-ctx {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
  min-width: 0;
}
#hydraToolsShell .dl-account-ctx p {
  margin: 0 0 4px;
  font-size: 0.84rem;
  min-width: 0;
  word-break: break-word;
}
#hydraToolsShell .dl-account-ctx p:last-child { margin-bottom: 0; }
#hydraToolsShell .dl-account-ctx__k {
  display: inline-block;
  min-width: 7.5rem;
  color: #64748b;
  font-weight: 600;
}
#hydraToolsShell .dl-account-linked {
  margin: 0 0 10px;
  min-width: 0;
}
#hydraToolsShell .dl-account-linked ul {
  margin: 4px 0 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
}
#hydraToolsShell .dl-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
#hydraToolsShell .dl-form__error {
  margin: 0 0 10px;
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 600;
}
#hydraToolsShell .dl-account-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  color: #64748b;
  font-size: 0.85rem;
}
#hydraToolsShell .dl-account-loading p {
  margin: 0;
}
#hydraToolsShell .dl-account-loading__spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid #e2e8f0;
  border-top-color: #ea580c;
  border-radius: 50%;
  animation: dl-account-spin 0.8s linear infinite;
}
@keyframes dl-account-spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 900px) {
  #hydraToolsShell .dl-account-ctx__k {
    display: block;
    min-width: 0;
    margin-bottom: 2px;
  }
  #hydraToolsShell .dl-account-actions .dl-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
}

/* Asset Settlement (TASK-671) */
#hydraToolsShell .dl-settle {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(14, 116, 144, 0.25);
  border-radius: 12px;
  background: #f8fafc;
  min-width: 0;
}
#hydraToolsShell .dl-settle legend {
  font-weight: 700;
  font-size: 0.85rem;
  color: #0e7490;
  padding: 0 4px;
}
#hydraToolsShell .dl-settle__fresh {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
#hydraToolsShell .dl-settle__progress {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}
#hydraToolsShell .dl-settle__refresh-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
}
#hydraToolsShell .dl-settle__refresh-ico {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.85;
}
#hydraToolsShell .dl-settle__refresh-all.is-busy .dl-settle__refresh-ico {
  animation: dl-settle-spin 0.7s linear infinite;
}
@keyframes dl-settle-spin {
  to { transform: rotate(360deg); }
}
#hydraToolsShell .dl-settle__kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0 10px;
}
#hydraToolsShell .dl-settle__kpis span {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
#hydraToolsShell .dl-settle__kpis strong {
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
#hydraToolsShell .dl-settle__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 8px;
}
#hydraToolsShell .dl-settle__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
#hydraToolsShell .dl-settle__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.82rem;
  min-width: 0;
}
#hydraToolsShell .dl-settle__row.is-voided { opacity: 0.72; }
#hydraToolsShell .dl-settle__thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #e2e8f0;
  flex: 0 0 auto;
}
#hydraToolsShell .dl-settle__thumb--ph,
#hydraToolsShell .dl-settle__thumb.is-err {
  display: inline-block;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}
#hydraToolsShell .dl-settle__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#hydraToolsShell .dl-settle__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}
#hydraToolsShell .dl-settle__sub {
  font-size: 0.72rem;
  color: #64748b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#hydraToolsShell .dl-settle__market {
  min-width: 0;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#hydraToolsShell .dl-settle__market.is-up { color: #0f766e; }
#hydraToolsShell .dl-settle__market.is-down { color: #b45309; }
#hydraToolsShell .dl-settle__market.is-flat { color: #64748b; }
#hydraToolsShell .dl-settle__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}
#hydraToolsShell .dl-settle__row-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
#hydraToolsShell .dl-settle__row-actions .dl-btn {
  min-height: 32px;
  height: 32px;
  padding: 5px 8px;
  white-space: nowrap;
}
#hydraToolsShell .dl-settle__amt {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
#hydraToolsShell .dl-settle__badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
  padding: 2px 6px;
  border-radius: 999px;
}
#hydraToolsShell .dl-settle__preview {
  display: flex;
  gap: 10px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(14, 116, 144, 0.25);
  background: #f8fafc;
}
#hydraToolsShell .dl-settle__preview-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: #e2e8f0;
  flex: 0 0 auto;
}
#hydraToolsShell .dl-settle__preview-img--ph,
#hydraToolsShell .dl-settle__preview-img.is-err {
  display: inline-block;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}
#hydraToolsShell .dl-settle__preview-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8rem;
  color: #475569;
}
#hydraToolsShell .dl-settle__preview-body strong {
  color: #0f172a;
  font-size: 0.9rem;
}
#hydraToolsShell .dl-settle-grade {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
#hydraToolsShell .dl-settle-grade legend {
  margin-bottom: 6px;
  font-weight: 650;
  color: #475569;
}
#hydraToolsShell .dl-settle-grade__scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 1px 1px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#hydraToolsShell .dl-settle-grade__scroll::-webkit-scrollbar {
  display: none;
}
#hydraToolsShell .dl-settle-grade__chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-weight: 650;
  white-space: nowrap;
}
#hydraToolsShell .dl-settle-grade__chip.is-active {
  border-color: #f97316;
  background: #fff7ed;
  color: #c2410c;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.16);
}
#hydraToolsShell .dl-settle-grade__chip:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
#hydraToolsShell .dl-btn--danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.35);
  background: #fff7f7;
}
#hydraToolsShell .dl-btn--danger:hover {
  background: #fee2e2;
}
#hydraToolsShell .dl-settle__state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 2px;
  color: #64748b;
  font-size: 0.82rem;
}
#hydraToolsShell .dl-settle__state--error {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid rgba(185, 28, 28, 0.2);
  border-radius: 9px;
  background: #fef2f2;
  color: #b91c1c;
}
#hydraToolsShell .dl-settle__more {
  margin-top: 6px;
}
#hydraToolsShell .dl-settle__url-row {
  display: flex;
  gap: 6px;
  min-width: 0;
}
#hydraToolsShell .dl-settle__url-row input {
  flex: 1;
  min-width: 0;
}
#hydraToolsShell .dl-settle__impact {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
}
#hydraToolsShell .dl-settle__impact span {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
}
#hydraToolsShell .dl-settle__impact strong {
  font-variant-numeric: tabular-nums;
}
#hydraToolsShell .dl-modal__card--wide {
  width: 100%;
  max-width: 720px;
}
#hydraToolsShell .dl-settle-bulk__list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
}
#hydraToolsShell .dl-settle-bulk__row {
  display: grid;
  grid-template-columns: 28px minmax(150px, 1fr) 112px 64px 104px 104px;
  gap: 6px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
  min-width: 0;
}
#hydraToolsShell .dl-settle-bulk__row--error {
  grid-template-columns: 28px minmax(0, 1fr);
  color: #b91c1c;
}
#hydraToolsShell .dl-settle-bulk__meta {
  min-width: 0;
}
#hydraToolsShell .dl-settle-bulk__meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}
#hydraToolsShell .dl-settle-bulk__qty,
#hydraToolsShell .dl-settle-bulk__vnd,
#hydraToolsShell .dl-settle-bulk__grade {
  width: 100%;
  min-width: 0;
  font-size: 0.8rem;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
#hydraToolsShell .dl-settle-bulk__field {
  display: block;
  min-width: 0;
}
#hydraToolsShell .dl-settle-bulk__field > span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
}
@media (max-width: 520px) {
  #hydraToolsShell .dl-settle-bulk__row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  #hydraToolsShell .dl-settle-bulk__qty,
  #hydraToolsShell .dl-settle-bulk__vnd,
  #hydraToolsShell .dl-settle-bulk__grade {
    grid-column: 2;
  }
  #hydraToolsShell .dl-settle-bulk__field {
    grid-column: 2;
  }
  #hydraToolsShell .dl-settle-bulk__field > span {
    display: block;
    margin-bottom: 3px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
  }
}

@media (max-width: 480px) {
  #hydraToolsShell .dl-settle__row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
  }
  #hydraToolsShell .dl-settle__side {
    grid-column: 2;
    width: 100%;
    align-items: flex-start;
  }
  #hydraToolsShell .dl-settle__row-actions {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
  }
  #hydraToolsShell .dl-alert-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #hydraToolsShell .dl-alert-row::-webkit-scrollbar {
    display: none;
  }
  #hydraToolsShell .dl-alert-bar {
    flex: 0 0 auto;
    overflow: visible;
  }
  #hydraToolsShell .dl-warn-notify {
    order: -1;
  }
  #hydraToolsShell .dl-btn--mini,
  #hydraToolsShell .dl-card__menu-btn,
  #hydraToolsShell .dl-modal__close,
  #hydraToolsShell .dl-repay-preset {
    min-height: 40px;
  }
  #hydraToolsShell .dl-btn--mini {
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hydraToolsShell .dl-account-loading__spinner,
  #hydraToolsShell .dl-skeleton-card {
    animation: none;
  }
}
