/**
 * HYDRA Tools — Phân tích Hit (đồng bộ layout Storage Tracker)
 */

/* Shell */
#hydraToolsShell .ht-tracker-shell {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px 24px;
  box-sizing: border-box;
}

#hydraToolsShell .ht-tool {
  width: 100%;
  overflow-x: hidden;
}

/* Hero — gọn hơn */
#hydraToolsShell .ht-tool .pw-tool__hero {
  padding: 16px 18px;
  border-radius: 20px;
}

#hydraToolsShell .ht-tool .pw-tool__title {
  font-size: clamp(18px, 2vw, 22px);
}

#hydraToolsShell .ht-tool .pw-tool__subtitle {
  margin-top: 4px;
  font-size: 13px;
}

/* Rate bar */
#hydraToolsShell .ht-rate-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(249, 115, 22, 0.18);
}

#hydraToolsShell .ht-rate-bar__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#hydraToolsShell .ht-rate-bar__exchange {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

#hydraToolsShell .ht-rate-bar__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

#hydraToolsShell .ht-rate-bar__label--long {
  display: none;
}

#hydraToolsShell .ht-rate-bar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#hydraToolsShell .ht-rate-bar__card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

#hydraToolsShell .ht-rate-bar__card-row .pw-btn {
  min-height: 36px !important;
  padding: 0 12px;
  white-space: nowrap;
}

#hydraToolsShell .ht-rate-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
}

#hydraToolsShell .ht-rate-bar__actions .pw-btn {
  min-height: 36px !important;
  padding: 0 12px;
  white-space: nowrap;
}

#hydraToolsShell .ht-rate-bar__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 20px;
}

#hydraToolsShell .ht-rate-bar__label {
  font-size: 12px;
  font-weight: 700;
  color: #9a3412;
}

#hydraToolsShell .ht-rate-bar__status {
  font-size: 12px;
  color: #64748b;
}

#hydraToolsShell .ht-rate-bar__pending {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #9a3412;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.22);
}

#hydraToolsShell .ht-rate-bar__pending[hidden] {
  display: none !important;
}

#hydraToolsShell .ht-rate-bar__input {
  width: 96px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(249, 115, 22, 0.25);
  font-size: 14px;
  font-weight: 700;
}

#hydraToolsShell .ht-rate-apply {
  min-height: 36px !important;
  width: auto;
  flex: 0 0 auto;
}

#hydraToolsShell .ht-rate-refresh-all {
  margin-left: auto;
  min-height: 36px !important;
}

/* Toolbar */
#hydraToolsShell .ht-toolbar {
  margin-bottom: 10px;
}

#hydraToolsShell .ht-toolbar .pw-tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#hydraToolsShell .ht-tool .pw-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px;
}

#hydraToolsShell .ht-tool .pw-btn--compact {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 10px;
}

#hydraToolsShell .ht-tool .pw-btn--primary {
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.22);
}

/* Main panel */
#hydraToolsShell .ht-panel {
  border-radius: 22px;
  border: 1px solid rgba(249, 115, 22, 0.12);
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

#hydraToolsShell .ht-panel__body {
  padding: 0 18px 18px;
}

#hydraToolsShell .ht-panel--content {
  border-top: none;
  border-radius: 0 0 16px 16px;
}

/* Hit action bar — modules thay tab */
#hydraToolsShell .ht-hit-nav {
  margin-bottom: 10px;
}

#hydraToolsShell .ht-hit-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fffdf9;
  border: 1px solid rgba(249, 115, 22, 0.16);
}

#hydraToolsShell .ht-hit-action-bar__btn {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

#hydraToolsShell .ht-hit-action-bar__btn:hover {
  border-color: rgba(249, 115, 22, 0.35);
  color: #c2410c;
}

#hydraToolsShell .ht-hit-action-bar__btn--psa {
  border-color: rgba(59, 130, 246, 0.25);
  color: #1d4ed8;
}

#hydraToolsShell .ht-hit-action-bar__btn--rate {
  flex: 0 0 auto;
  min-width: 72px;
  border-color: rgba(249, 115, 22, 0.28);
  color: #c2410c;
  background: #fff7ed;
}

#hydraToolsShell .ht-hit-action-bar__menu {
  flex: 0 0 auto;
  margin-left: auto;
}

#hydraToolsShell .ht-hit-module-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

#hydraToolsShell .ht-hit-module-header__actions .ht-hit-action-bar__btn--rate {
  min-height: 38px;
  padding: 0 12px;
}

#hydraToolsShell .ht-exchange-rate-modal {
  width: calc(100% - 32px);
  max-width: 360px;
  margin: auto;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

#hydraToolsShell .hit-modal-backdrop:has(.ht-exchange-rate-modal) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#hydraToolsShell .ht-exchange-rate-modal__title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

#hydraToolsShell .ht-exchange-rate-modal__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#hydraToolsShell .ht-exchange-rate-modal__label {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

#hydraToolsShell .ht-exchange-rate-modal__input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  box-sizing: border-box;
  -moz-appearance: textfield;
}

#hydraToolsShell .ht-exchange-rate-modal__input::-webkit-outer-spin-button,
#hydraToolsShell .ht-exchange-rate-modal__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#hydraToolsShell .ht-exchange-rate-modal__input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

#hydraToolsShell .ht-exchange-rate-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

#hydraToolsShell .ht-exchange-rate-modal__btn {
  height: 42px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#hydraToolsShell .ht-exchange-rate-modal__btn--ghost {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
}

#hydraToolsShell .ht-exchange-rate-modal__btn--primary {
  border: 0;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  color: #fff;
}

#hydraToolsShell .ht-exchange-rate-modal__btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#hydraToolsShell .ht-cards-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#hydraToolsShell .ht-hit-module-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 12px;
}

#hydraToolsShell .ht-hit-module-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

#hydraToolsShell .ht-hit-module-header__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

/* Shared */
#hydraToolsShell .ht-accent { color: #c2410c; }
#hydraToolsShell .ht-muted { color: #94a3b8; font-size: 12px; }
#hydraToolsShell .ht-val--pos { color: #16a34a; }
#hydraToolsShell .ht-val--neg { color: #dc2626; }
#hydraToolsShell .ht-sep { color: #cbd5e1; margin: 0 5px; }
#hydraToolsShell .ht-no-price { color: #94a3b8; font-size: 12px; }

#hydraToolsShell .ht-table-empty,
#hydraToolsShell .ht-empty {
  padding: 20px 16px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

#hydraToolsShell .ht-link {
  color: #ea580c;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
}

#hydraToolsShell .ht-act-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e8edf5;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

#hydraToolsShell .ht-act-btn .ht-icon-svg,
#hitModalHost .ht-act-btn .ht-icon-svg {
  display: block;
}

#hydraToolsShell .ht-act-btn:hover {
  background: #f8fafc;
}

#hydraToolsShell .ht-act-btn--danger {
  color: #dc2626;
}

#hydraToolsShell .ht-act-btn--refresh {
  color: #ea580c;
}

#hydraToolsShell .ht-row-menu-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
}

#hydraToolsShell .ht-row-menu-btn:hover {
  background: #f1f5f9;
}

/* Master-detail layout */
#hydraToolsShell .ht-master-detail {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 16px;
  padding-top: 12px;
  align-items: start;
}

#hydraToolsShell .ht-left-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

#hydraToolsShell .ht-month-sidebar {
  gap: 10px;
}

#hydraToolsShell .ht-month-group {
  border-radius: 16px;
  border: 1px solid #e8edf5;
  background: #fff;
  overflow: hidden;
}

#hydraToolsShell .ht-month-group.is-month-active {
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.12);
}

#hydraToolsShell .ht-month-card-wrap {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: stretch;
}

#hydraToolsShell .ht-month-chev {
  border: none;
  background: #fffaf5;
  color: #9a3412;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

#hydraToolsShell .ht-month-chev:hover {
  background: #fff4eb;
}

#hydraToolsShell .ht-month-card {
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  padding: 12px 14px 12px 4px;
  cursor: pointer;
}

#hydraToolsShell .ht-month-card:hover,
#hydraToolsShell .ht-month-group.is-month-active .ht-month-card {
  background: #fffdfb;
}

#hydraToolsShell .ht-month-card__title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

#hydraToolsShell .ht-month-card__meta {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
}

#hydraToolsShell .ht-month-weeks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px 10px 34px;
}

#hydraToolsShell .ht-month-group.is-collapsed .ht-month-weeks {
  display: none;
}

#hydraToolsShell .ht-week-compact {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #eef2f7;
  background: #f8fafc;
  cursor: pointer;
}

#hydraToolsShell .ht-week-compact:hover {
  border-color: rgba(249, 115, 22, 0.25);
  background: #fffaf5;
}

#hydraToolsShell .ht-week-compact.is-active {
  border-color: rgba(249, 115, 22, 0.45);
  background: #fff7ed;
}

#hydraToolsShell .ht-week-compact__row {
  display: flex;
  align-items: center;
  gap: 6px;
}

#hydraToolsShell .ht-week-compact__title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

#hydraToolsShell .ht-week-compact__sub {
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
}

#hydraToolsShell .ht-week-compact__meta {
  margin-top: 3px;
  font-size: 10px;
  color: #64748b;
}

#hydraToolsShell .ht-week-custom-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

#hydraToolsShell .ht-detail--month-summary .ht-detail-kpis--month {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#hydraToolsShell .ht-month-hint {
  margin-top: 12px;
  font-size: 12px;
  color: #64748b;
}

#hydraToolsShell .ht-detail__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#hydraToolsShell .ht-right-panel {
  min-width: 0;
  border-radius: 22px;
  border: 1px solid #e8edf5;
  background: #fff;
  padding: 16px;
  box-sizing: border-box;
}

#hydraToolsShell .ht-list-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #e8edf5;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

#hydraToolsShell .ht-list-item:hover {
  border-color: rgba(249, 115, 22, 0.28);
  background: #fffdfb;
}

#hydraToolsShell .ht-list-item.is-active {
  border-color: rgba(249, 115, 22, 0.45);
  background: #fffaf5;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.12);
}

#hydraToolsShell .ht-list-item__title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

#hydraToolsShell .ht-list-item__sub {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

#hydraToolsShell .ht-list-item__meta {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

#hydraToolsShell .ht-list-item-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 4px;
  border-radius: 16px;
  border: 1px solid transparent;
}

#hydraToolsShell .ht-list-item-wrap.is-active {
  border-color: rgba(249, 115, 22, 0.35);
  background: #fffaf5;
}

#hydraToolsShell .ht-list-item-wrap .ht-list-item {
  border: none;
  padding: 8px 10px;
  box-shadow: none;
}

#hydraToolsShell .ht-list-item-wrap .ht-list-item.is-active {
  background: transparent;
  box-shadow: none;
}

#hydraToolsShell .ht-list-item__row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#hydraToolsShell .ht-list-item__set {
  padding-right: 6px;
}

#hydraToolsShell .ht-set-badge,
#hydraToolsShell .ht-cat-badge {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

#hydraToolsShell .ht-list-item--library .ht-list-item__row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#hydraToolsShell .ht-list-item--library .ht-list-item__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .ht-set-select {
  min-width: 108px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid #e8edf5;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

#hydraToolsShell .ht-set-select--compact {
  min-width: 92px;
  height: 28px;
  font-size: 11px;
}

#hydraToolsShell .ht-cards-view {
  padding: 12px;
  margin-top: 4px;
  border-radius: 16px;
  background: #f7f3ee;
}

#hydraToolsShell .ht-cards-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #eadfd2;
  background: #fffaf5;
}

#hydraToolsShell .ht-cards-toolbar__search {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #eadfd2;
  background: #fffdf9;
  font-size: 13px;
  box-sizing: border-box;
}

#hydraToolsShell .ht-cards-toolbar__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 44px;
  align-items: center;
  min-width: 0;
}

#hydraToolsShell .ht-cards-toolbar__ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #eadfd2;
  background: #fffdf9;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

#hydraToolsShell .ht-cards-toolbar__ctrl:hover {
  border-color: rgba(249, 115, 22, 0.35);
  color: #c2410c;
}

#hydraToolsShell .ht-cards-toolbar__ctrl--filter.is-active {
  border-color: rgba(249, 115, 22, 0.45);
  background: #fff7ed;
  color: #c2410c;
}

#hydraToolsShell .ht-cards-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#hydraToolsShell .ht-cards-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: #fff7ed;
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  cursor: pointer;
}

#hydraToolsShell .ht-cards-filter-chip:hover {
  background: #ffedd5;
}

#hydraToolsShell .ht-cards-toolbar__extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#hydraToolsShell .ht-cards-toolbar__classify {
  min-height: 38px !important;
}

#hydraToolsShell .ht-card-filter-sheet__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#hydraToolsShell .ht-card-filter-sheet__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#hydraToolsShell .ht-card-filter-sheet__field > span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

#hydraToolsShell .ht-card-filter-sheet__field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: #fffdf9;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  box-sizing: border-box;
}

#hydraToolsShell .ht-card-filter-sheet__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

#hydraToolsShell .ht-card-filter-sheet__btn {
  height: 42px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#hydraToolsShell .ht-card-filter-sheet__btn--ghost {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0f172a;
}

#hydraToolsShell .ht-card-filter-sheet__btn--primary {
  border: 0;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  color: #fff;
}

#hydraToolsShell .ht-cards-mode {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

#hydraToolsShell .ht-cards-mode__label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-right: 4px;
}

#hydraToolsShell .ht-cards-mode__btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e8edf5;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
}

#hydraToolsShell .ht-cards-mode__btn.is-active {
  color: #c2410c;
  border-color: rgba(249, 115, 22, 0.4);
  background: #fffaf5;
}

#hydraToolsShell .ht-cards-view .ht-set-group {
  border: 1px solid #ead7c8;
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 8px 24px rgba(120, 70, 30, 0.06);
  overflow: hidden;
}

#hydraToolsShell .ht-cards-view .ht-set-group + .ht-set-group {
  margin-top: 6px;
}

#hydraToolsShell .ht-cards-view .ht-set-group__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border: none;
  background: #fffdf9;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

#hydraToolsShell .ht-cards-view .ht-set-group__head:hover {
  background: #fff7ef;
  border-color: #ffb27a;
}

#hydraToolsShell .ht-set-group__chev {
  color: #c2410c;
  font-size: 12px;
  width: 14px;
}

#hydraToolsShell .ht-set-group__count {
  color: #94a3b8;
  font-weight: 600;
  font-size: 12px;
}

#hydraToolsShell .ht-set-group__body {
  padding: 4px;
}

#hydraToolsShell .ht-set-group.is-collapsed .ht-set-group__body {
  display: none;
}

#hydraToolsShell .ht-table-empty--inline {
  padding: 16px 12px;
  text-align: center;
}

#hydraToolsShell .ht-detail__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

#hydraToolsShell .ht-detail__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

#hydraToolsShell .ht-detail-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}

#hydraToolsShell .ht-detail-kpi {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(249, 115, 22, 0.12);
  background: #fffdfb;
}

#hydraToolsShell .ht-detail-kpi__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9a3412;
}

#hydraToolsShell .ht-detail-kpi__value {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

#hydraToolsShell .ht-detail-section__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9a3412;
}

#hydraToolsShell .ht-detail-hit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#hydraToolsShell .ht-detail-hit-row {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e8edf5;
  background: #f8fafc;
}

#hydraToolsShell .ht-detail-hit-row__name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

#hydraToolsShell .ht-detail-hit-row__meta {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

#hydraToolsShell .ht-detail-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 16px;
}

#hydraToolsShell .ht-detail-field {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .ht-detail-field:last-child {
  border-bottom: none;
}

#hydraToolsShell .ht-detail-field__label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

#hydraToolsShell .ht-detail-field__value {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  min-width: 0;
  word-break: break-word;
}

#hydraToolsShell .ht-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

#hydraToolsShell .ht-btn--danger {
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.25) !important;
}

#hydraToolsShell .ht-detail-empty,
#hydraToolsShell .ht-detail-loading {
  padding: 24px 16px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

#hydraToolsShell .ht-detail-empty--inline {
  padding: 12px;
  text-align: left;
  font-size: 13px;
  border-radius: 12px;
  background: #f8fafc;
}

/* Week hit entry grid */
#hydraToolsShell .ht-detail-section--week-grid {
  min-width: 0;
}

#hydraToolsShell .ht-week-grid-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}

#hydraToolsShell .ht-week-grid-filters__search {
  flex: 1 1 140px;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
}

#hydraToolsShell .ht-week-grid-filters__field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

#hydraToolsShell .ht-week-grid-filters__field select {
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
}

#hydraToolsShell .ht-week-grid-filters__check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}

#hydraToolsShell .ht-week-grid {
  max-height: min(52vh, 520px);
  overflow: auto;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  background: #fafbfd;
}

#hydraToolsShell .ht-week-grid-head,
#hydraToolsShell .ht-week-grid-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 44px 58px 58px 52px 52px 68px 32px;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
}

#hydraToolsShell .ht-week-grid-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

#hydraToolsShell .ht-week-grid-row {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
}

#hydraToolsShell .ht-week-grid-row:last-child {
  border-bottom: none;
}

#hydraToolsShell .ht-week-grid-row__name {
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .ht-week-grid-row__set {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

#hydraToolsShell .ht-week-grid-row__price {
  font-size: 11px;
  color: #475569;
  text-align: right;
}

#hydraToolsShell .ht-week-grid-row__total {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
}

#hydraToolsShell .ht-qty-input {
  width: 100%;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-sizing: border-box;
}

#hydraToolsShell .ht-qty-input:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.12);
}

#hydraToolsShell .ht-set-group--week {
  border-bottom: 1px solid #e8edf5;
}

#hydraToolsShell .ht-set-group--week:last-child {
  border-bottom: none;
}

#hydraToolsShell .ht-set-group--week .ht-set-group__head {
  position: sticky;
  top: 48px;
  z-index: 4;
  background: #f8fafc;
}

#hydraToolsShell .ht-week-grid-price-btn {
  padding: 2px 6px;
  border: none;
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

#hydraToolsShell .ht-week-grid-refresh {
  width: 28px;
  height: 28px;
  padding: 0;
}

#hydraToolsShell .ht-week-grid--mobile {
  max-height: none;
  border: none;
  background: transparent;
  overflow: visible;
}

#hydraToolsShell .ht-week-grid-mobile-card {
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  border: 1px solid #e8edf5;
  background: #fff;
}

#hydraToolsShell .ht-week-grid-mobile-card__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

#hydraToolsShell .ht-week-grid-mobile-card__head strong {
  font-size: 14px;
  color: #0f172a;
}

#hydraToolsShell .ht-week-grid-mobile-card__head span {
  font-size: 11px;
  color: #64748b;
}

#hydraToolsShell .ht-week-grid-mobile-card__qty {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}

#hydraToolsShell .ht-week-grid-mobile-card__qty label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

#hydraToolsShell .ht-qty-input--mobile {
  height: 36px;
}

#hydraToolsShell .ht-week-grid-mobile-card__total {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

#hydraToolsShell .ht-week-grid-mobile-card__total strong {
  color: #0f172a;
}

#hydraToolsShell .ht-detail--week-mobile .ht-detail-kpis {
  margin-bottom: 12px;
}

#hydraToolsShell .ht-detail--week-mobile .ht-detail-actions {
  margin-top: 12px;
}

#hydraToolsShell .ht-right-panel--card {
  padding: 14px;
  overflow-x: auto;
}

#hydraToolsShell .ht-detail--card {
  min-width: 0;
}

#hydraToolsShell .ht-detail-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
}

#hydraToolsShell .ht-detail-card {
  border-radius: 16px;
  border: 1px solid #e8edf5;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

#hydraToolsShell .ht-detail-card--history {
  background: #fafbfc;
}

#hydraToolsShell .ht-price-history__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #c2410c;
}

#hydraToolsShell .ht-price-history__empty {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

#hydraToolsShell .ht-price-delta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(249, 115, 22, 0.12);
  font-size: 13px;
  color: #64748b;
}

#hydraToolsShell .ht-price-delta strong {
  color: #0f172a;
}

#hydraToolsShell .ht-price-delta__chg {
  margin-left: 4px;
  font-weight: 700;
  color: #c2410c;
}

#hydraToolsShell .ht-price-history-table {
  font-size: 12px;
}

#hydraToolsShell .ht-price-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.7fr) minmax(0, 0.7fr) 48px;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .ht-price-history-row--head {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9a3412;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border-radius: 10px 10px 0 0;
  border-bottom: none;
}

#hydraToolsShell .ht-price-history-row__dt {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .ht-price-history-row__val {
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .ht-price-history-row__rate {
  color: #64748b;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .ht-detail--mobile {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#hydraToolsShell .ht-library-layout,
#hydraToolsShell .ht-master-detail--cards {
  grid-template-columns: 300px 520px minmax(360px, 1fr);
  gap: 14px;
  align-items: start;
}

#hydraToolsShell .ht-cards-left-panel {
  width: 300px;
  max-width: 300px;
  min-width: 0;
  max-height: min(72vh, 720px);
  overflow-y: auto;
  padding-right: 2px;
}

#hydraToolsShell .ht-cards-center-panel {
  min-width: 0;
  max-width: 520px;
}

#hydraToolsShell .ht-cards-view .ht-detail-card {
  border: 1px solid #ead7c8;
  background: #fffdf9;
  box-shadow: 0 8px 24px rgba(120, 70, 30, 0.06);
}

#hydraToolsShell .ht-cards-center-panel .ht-detail-card {
  max-width: 520px;
  padding: 18px 20px;
}

#hydraToolsShell .ht-cards-center-panel .ht-detail-fields {
  gap: 0;
  margin: 10px 0 14px;
}

#hydraToolsShell .ht-cards-center-panel .ht-detail-field {
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  padding: 0;
  border-bottom: 1px solid #eadfd2;
  max-width: 100%;
}

#hydraToolsShell .ht-cards-center-panel .ht-detail-field__label {
  color: #64748b;
  font-size: 12px;
}

#hydraToolsShell .ht-cards-right-panel {
  min-width: 0;
  width: auto;
  max-width: none;
}

#hydraToolsShell .ht-cards-right-panel .ht-detail-card--history {
  padding: 18px 20px;
  width: 100%;
  box-sizing: border-box;
  background: #fffaf5;
}

#hydraToolsShell .ht-detail-empty--cards {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  border-radius: 14px;
  border: 1px dashed #eadfd2;
  background: #fffaf5;
  max-width: 520px;
}

#hydraToolsShell .ht-cards-right-panel .ht-price-history-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.85fr) minmax(0, 0.85fr) 56px;
  gap: 10px;
  padding: 8px 10px;
}

#hydraToolsShell .ht-list-item--library {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ead7c8;
  background: #fffdf9;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

#hydraToolsShell .ht-list-item--library:hover {
  border-color: #ffb27a;
  background: #fff7ef;
}

#hydraToolsShell .ht-list-item--library.is-active {
  border-color: #ff8a3d;
  background: #fff7ef;
  box-shadow: 0 4px 14px rgba(120, 70, 30, 0.08);
}

#hydraToolsShell .ht-list-item--library .ht-list-item__sub {
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

#hydraToolsShell .ht-list-item--library .ht-list-item__prices {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

#hydraToolsShell .ht-set-group__body .ht-list-item--library {
  margin-bottom: 6px;
}

#hydraToolsShell .ht-set-group__body .ht-list-item--library:last-child {
  margin-bottom: 0;
}

/* Table — giống Storage */
#hydraToolsShell .ht-table-scroll {
  width: 100%;
  padding: 12px 0 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#hydraToolsShell .ht-table {
  width: 100%;
  font-size: 13px;
  --ht-grid-lib: minmax(0, 16fr) minmax(0, 8fr) minmax(0, 6fr) minmax(0, 7fr) minmax(0, 7fr) minmax(0, 7fr) 44px 44px;
}

#hydraToolsShell .ht-table-header,
#hydraToolsShell .ht-table-row {
  display: grid;
  grid-template-columns: var(--ht-grid-lib);
  align-items: center;
  column-gap: 8px;
  padding: 0 10px;
  box-sizing: border-box;
  width: 100%;
}

#hydraToolsShell .ht-table-header {
  min-height: 40px;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border-radius: 12px 12px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9a3412;
}

#hydraToolsShell .ht-table-row {
  min-height: 64px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
}

#hydraToolsShell .ht-table-row:hover {
  background: rgba(255, 247, 237, 0.45);
}

#hydraToolsShell .ht-table-header > *,
#hydraToolsShell .ht-table-row > * {
  min-width: 0;
}

#hydraToolsShell .ht-col-name {
  overflow: hidden;
  text-align: left;
}

#hydraToolsShell .ht-name-cell {
  min-width: 0;
}

#hydraToolsShell .ht-name-text {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .ht-name-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .ht-col-code,
#hydraToolsShell .ht-col-set {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .ht-col-num {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: #0f172a;
}

#hydraToolsShell .ht-col-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

#hydraToolsShell .ht-col-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Report KPI — portfolio dashboard */
#hydraToolsShell .ht-report-wrap,
#hydraToolsShell .ht-report-wrap--wide {
  width: 100%;
  max-width: min(1840px, 95vw);
  margin: 0 auto;
}

#hydraToolsShell .ht-report-view {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding-top: 8px;
}

#hydraToolsShell .report-kpi-grid,
#hydraToolsShell .report-kpi-grid--portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: none;
  margin: 0 0 16px;
}

#hydraToolsShell .report-kpi-grid .report-kpi-card,
#hydraToolsShell .report-kpi-grid .ht-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 96px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  width: auto;
  max-width: none;
}

#hydraToolsShell .report-kpi-card--featured {
  border-color: rgba(22, 163, 74, 0.22);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .report-kpi-grid .ht-kpi--hero {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}

#hydraToolsShell .report-kpi-grid .ht-kpi__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 8px;
  color: #9aa4b2;
}

#hydraToolsShell .report-kpi-grid .ht-kpi__value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
}

#hydraToolsShell .ht-kpi--desktop-only {
  display: flex;
}

#hydraToolsShell .ht-hit-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

#hydraToolsShell .ht-tool-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #fffdf9;
  color: #475569;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  flex-shrink: 0;
}

#hydraToolsShell .ht-tool-menu-btn .ht-icon-svg,
#hitModalHost .ht-tool-menu-btn .ht-icon-svg {
  display: block;
}

#hydraToolsShell .ht-tool-menu-btn--sm,
#hitModalHost .ht-tool-menu-btn--sm {
  width: 30px;
  height: 30px;
  font-size: 16px;
  border-radius: 8px;
}

#hydraToolsShell .ht-set-group__chev,
#hitModalHost .ht-set-group__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  flex-shrink: 0;
  color: #94a3b8;
}

#hydraToolsShell .ht-icon-chip,
#hitModalHost .ht-icon-chip {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

#hydraToolsShell .ht-icon-chip svg,
#hitModalHost .ht-icon-chip svg,
#hydraToolsShell .ht-icon-chip .ht-icon-svg,
#hitModalHost .ht-icon-chip .ht-icon-svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.25;
}

#hydraToolsShell .ht-icon-chip--good,
#hitModalHost .ht-icon-chip--good {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

#hydraToolsShell .ht-icon-chip--mid,
#hitModalHost .ht-icon-chip--mid {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

#hydraToolsShell .ht-icon-chip--low,
#hitModalHost .ht-icon-chip--low {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

#hydraToolsShell .ht-icon-chip--empty,
#hitModalHost .ht-icon-chip--empty {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

#hydraToolsShell .ht-icon-chip--inline,
#hitModalHost .ht-icon-chip--inline {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

#hydraToolsShell .ht-icon-chip--inline svg,
#hitModalHost .ht-icon-chip--inline svg,
#hydraToolsShell .ht-icon-chip--inline .ht-icon-svg,
#hitModalHost .ht-icon-chip--inline .ht-icon-svg {
  width: 14px;
  height: 14px;
}

#hydraToolsShell .ht-section-title--icon,
#hitModalHost .ht-section-title--icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

#hydraToolsShell .ht-report-empty__title,
#hitModalHost .ht-report-empty__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

#hydraToolsShell .ht-icon-btn,
#hitModalHost .ht-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

#hydraToolsShell .ht-icon-btn--refresh,
#hitModalHost .ht-icon-btn--refresh {
  color: #ea580c;
}

#hydraToolsShell .hit-modal__btn.ht-icon-btn--refresh,
#hitModalHost .hit-modal__btn.ht-icon-btn--refresh {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #475569;
}

#hydraToolsShell .hit-modal__close,
#hitModalHost .hit-modal__close,
#hydraToolsShell .pw-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#hydraToolsShell .ht-growth-inline {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #475569;
}

#hydraToolsShell .ht-growth-inline--empty {
  color: #64748b;
}

#hydraToolsShell .ht-inline-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #ea580c;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Report snapshot chart */
#hydraToolsShell .ht-report-section--snap-chart {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

#hydraToolsShell .ht-report-section__head--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

#hydraToolsShell .ht-snap-chart__period-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
}

#hydraToolsShell .ht-snap-chart__period-row .ht-snap-chart__tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

#hydraToolsShell .ht-snap-chart__actions--period {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin-bottom: 0;
}

#hydraToolsShell .ht-snap-chart__tabs,
#hydraToolsShell .ht-snap-chart__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

#hydraToolsShell .ht-snap-chart__chip-scroll {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#hydraToolsShell .ht-snap-chart__chip-scroll::-webkit-scrollbar {
  display: none;
}

#hydraToolsShell .ht-snap-tab,
#hydraToolsShell .ht-snap-metric {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
  flex: 0 0 auto;
  white-space: nowrap;
}

#hydraToolsShell .ht-snap-tab.is-active,
#hydraToolsShell .ht-snap-metric.is-active {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.35);
  color: #c2410c;
}

#hydraToolsShell .ht-snap-chart__wrap {
  position: relative;
  height: 200px;
  min-height: 180px;
}

#hydraToolsShell .ht-snap-chart__canvas {
  width: 100% !important;
  height: 100% !important;
}

#hydraToolsShell .ht-snap-chart__empty {
  margin: 0;
  padding: 24px 8px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

#hydraToolsShell .ht-snap-history-table th,
#hydraToolsShell .ht-snap-history-table td {
  font-size: 12px;
  white-space: nowrap;
}

#hydraToolsShell .hit-modal--snap-history {
  width: min(720px, 96vw);
  max-height: min(88vh, 720px);
}

#hydraToolsShell .ht-snap-history .ht-snap-chart__tabs {
  margin-bottom: 12px;
}

#hydraToolsShell .ht-snap-history__hint {
  margin: 0 0 10px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}

#hydraToolsShell .ht-snap-chart__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  #hydraToolsShell .ht-report-section--snap-chart {
    padding: 12px 14px;
  }

  #hydraToolsShell .ht-snap-chart__chip-scroll {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #hydraToolsShell .ht-snap-chart__chip-scroll::-webkit-scrollbar {
    display: none;
  }

  #hydraToolsShell .ht-snap-chart__wrap {
    height: 180px;
    min-height: 180px;
  }

  #hydraToolsShell .ht-snap-tab,
  #hydraToolsShell .ht-snap-metric {
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }
}

#hydraToolsShell .report-kpi-grid .ht-kpi__value {
  margin-top: 0;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.1;
}

#hydraToolsShell .report-kpi-grid .ht-kpi__sub {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  line-height: 1.2;
}

@media (max-width: 1366px) {
  #hydraToolsShell .report-kpi-grid,
  #hydraToolsShell .report-kpi-grid--portfolio {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 900px) {
  #hydraToolsShell .report-kpi-grid,
  #hydraToolsShell .report-kpi-grid--portfolio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #hydraToolsShell .report-kpi-grid .report-kpi-card,
  #hydraToolsShell .report-kpi-grid .ht-kpi {
    min-height: 88px;
    padding: 14px 16px;
  }
}

#hydraToolsShell .ht-report-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

#hydraToolsShell .ht-report-lists--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#hydraToolsShell .ht-report-lists--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#hydraToolsShell .ht-report-section {
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

#hydraToolsShell .ht-report-section--growth .ht-report-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

#hydraToolsShell .ht-report-section--growth .ht-section-title {
  margin: 0;
}

#hydraToolsShell .ht-report-section--growth .ht-auto-job-status {
  margin: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .ht-report-view .ht-report-section {
  min-height: 0;
}

#hydraToolsShell .ht-auto-job-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid rgba(249, 115, 22, 0.14);
  font-size: 11px;
  color: #475569;
}

#hydraToolsShell .ht-auto-job-status__label {
  font-weight: 700;
  color: #9a3412;
}

#hydraToolsShell .ht-auto-job-status__hint {
  color: #94a3b8;
  font-size: 11px;
}

#hydraToolsShell .ht-growth-summary__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

#hydraToolsShell .ht-growth-summary__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#hydraToolsShell .ht-growth-summary__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9aa4b2;
}

#hydraToolsShell .ht-growth-summary__col strong {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .ht-growth-sparkline {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 4px;
}

#hydraToolsShell .ht-growth-hint,
#hydraToolsShell .ht-growth-empty p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

#hydraToolsShell .ht-growth-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

#hydraToolsShell .ht-report-empty {
  padding: 12px 4px;
  text-align: center;
}

#hydraToolsShell .ht-report-empty__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

#hydraToolsShell .ht-report-empty__text {
  margin: 0 0 10px;
  font-size: 13px;
  color: #64748b;
}

#hydraToolsShell .ht-rank-row__gain-line {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .ht-roi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

#hydraToolsShell .ht-roi-badge--high {
  color: #15803d;
  background: #dcfce7;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

#hydraToolsShell .ht-roi-badge--mid {
  color: #c2410c;
  background: #ffedd5;
  border: 1px solid rgba(249, 115, 22, 0.22);
}

#hydraToolsShell .ht-roi-badge--low {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid rgba(220, 38, 38, 0.18);
}

#hydraToolsShell .ht-growth-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#hydraToolsShell .ht-report-view .ht-growth-list {
  min-height: 0;
}

#hydraToolsShell .ht-growth-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 11px;
  line-height: 1.2;
}

#hydraToolsShell .ht-growth-row__date {
  font-weight: 700;
  color: #0f172a;
}

#hydraToolsShell .ht-growth-row__vals {
  color: #64748b;
}

#hydraToolsShell .ht-rank-row--compound {
  grid-template-columns: 20px minmax(0, 1fr) auto;
}

#hydraToolsShell .ht-rank-row__pct,
#hydraToolsShell .ht-growth-row__pct {
  font-size: 10px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

#hydraToolsShell .ht-rank-row__pct-inline {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
}

#hydraToolsShell .ht-detail-kpis--month {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

#hydraToolsShell .ht-report-block {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  align-self: start;
  min-height: 0;
  height: auto;
}

#hydraToolsShell .ht-report-view .ht-section-title,
#hydraToolsShell .ht-report-block .ht-section-title,
#hydraToolsShell .ht-report-section .ht-section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
}

#hydraToolsShell .ht-section-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  color: #c2410c;
  line-height: 1.2;
}

#hydraToolsShell .ht-alloc-empty {
  font-size: 12px;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

#hydraToolsShell .ht-rank-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#hydraToolsShell .ht-rank-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
  min-height: 42px;
  line-height: 1.2;
}

#hydraToolsShell .ht-rank-row__pos {
  font-weight: 800;
  color: #c2410c;
  text-align: center;
  font-size: 11px;
}

#hydraToolsShell .ht-rank-row__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#hydraToolsShell .ht-rank-row__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 12px;
  color: #0f172a;
  line-height: 1.2;
}

#hydraToolsShell .ht-rank-row__sub {
  font-size: 10px;
  color: #64748b;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .ht-rank-row__val,
#hydraToolsShell .ht-rank-row strong {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.2;
}

/* Mobile lib cards */
#hydraToolsShell .ht-lib-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
}

#hydraToolsShell .ht-lib-mobile-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e8edf5;
  background: #fff;
}

#hydraToolsShell .ht-lib-mobile-card__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

#hydraToolsShell .ht-lib-mobile-card__head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hydraToolsShell .ht-lib-mobile-card__head span {
  color: #64748b;
  font-size: 12px;
  flex-shrink: 0;
}

#hydraToolsShell .ht-lib-mobile-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
}

#hydraToolsShell .ht-lib-mobile-card__row strong {
  color: #0f172a;
}

/* Drawer */
.ht-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9040;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ht-drawer {
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  border-radius: 16px 16px 0 0;
}

.ht-drawer-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
}

.ht-drawer-metrics {
  margin: 0 0 10px;
  font-size: 13px;
  color: #64748b;
}

.ht-drawer-metrics strong {
  color: #0f172a;
  font-weight: 700;
}

.ht-drawer-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.ht-hit-card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ht-hit-card {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e8edf5;
  background: #fff;
}

.ht-hit-card__line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.ht-hit-card__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ht-hit-card__qty {
  color: #94a3b8;
  font-size: 11px;
}

.ht-hit-card__val {
  color: #c2410c;
  font-variant-numeric: tabular-nums;
}

/* Import / Modal */
.ht-import-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: #64748b;
}

.ht-import-textarea {
  min-height: 120px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

#hitModalHost {
  position: fixed;
  inset: 0;
  z-index: 9030;
  overflow: hidden;
  pointer-events: none;
  max-width: 100%;
  --tools-modal-safe-top: env(safe-area-inset-top, 0px);
  --tools-modal-close-inset: 12px;
  --tools-modal-header-pad-top: calc(var(--tools-modal-close-inset) + var(--tools-modal-safe-top));
}

#hitModalHost:not(:empty) {
  pointer-events: auto;
}

#hitModalHost .hit-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9030;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

#hitModalHost .hit-modal-backdrop--stacked {
  z-index: 9040;
}

#hitModalHost .hit-modal {
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
  background: #fff;
}

#hitModalHost .hit-modal--week-hit {
  width: min(1180px, 92vw);
  max-width: min(1180px, 92vw);
  max-height: 88vh;
  border-radius: 16px;
}

#hitModalHost .hit-modal__header--week-hit {
  align-items: flex-start;
  gap: 12px;
}

#hitModalHost .hit-modal__header-main {
  flex: 1;
  min-width: 0;
}

#hitModalHost .hit-modal__header-main h3 {
  margin: 0;
}

#hitModalHost .ht-week-hit-stats {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

#hitModalHost .hit-modal__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#hitModalHost .ht-week-hit-reload {
  min-height: 36px;
  white-space: nowrap;
}

#hitModalHost .hit-modal__close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

#hitModalHost .hit-modal__body--week-hit {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 8px;
}

#hitModalHost .hit-modal__footer--sticky {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 2;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid {
  max-height: none;
  border: 1px solid #e8edf5;
  overflow-x: auto;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-head,
#hitModalHost .hit-modal--week-hit .ht-week-grid-row {
  grid-template-columns: 240px 72px 88px 88px 72px 72px 96px 96px 96px 100px 48px;
  gap: 0;
  padding: 10px 14px;
  min-width: 1172px;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-head--compound .ht-compound-head,
#hydraToolsShell .ht-compound-val,
#hydraToolsShell .ht-compound-head {
  color: #c2410c;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-row__compound {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-mobile-card__compound {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-head {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 48px;
  min-height: 48px;
  box-sizing: border-box;
  align-items: center;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-head__name {
  text-align: left;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-head__set,
#hitModalHost .hit-modal--week-hit .ht-week-grid-head__num {
  text-align: center;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-row__name {
  max-width: 240px;
  min-width: 0;
  white-space: normal;
  overflow: hidden;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-row__name-main {
  display: block;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-row__name-meta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-row__set {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-align: center;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-row__price {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-row__qty {
  display: flex;
  justify-content: center;
  align-items: center;
}

#hitModalHost .hit-modal--week-hit .ht-qty-input {
  width: 72px;
  height: 40px;
  font-size: 15px;
  border-radius: 10px;
  border-color: rgba(249, 115, 22, 0.22);
  background: #fffdfb;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-row__total {
  font-size: 13px;
  font-weight: 700;
  color: #ea580c;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-row__act {
  display: flex;
  justify-content: center;
  align-items: center;
}

#hitModalHost .hit-modal--week-hit .ht-set-group--week {
  overflow: visible;
  border: none;
  border-radius: 0;
  background: transparent;
}

#hitModalHost .hit-modal--week-hit .hit-set-group + .hit-set-group {
  margin-top: 0;
}

#hitModalHost .hit-modal--week-hit .hit-set-header,
#hitModalHost .hit-modal--week-hit .ht-set-group--week .ht-set-group__head {
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  margin: 0;
  position: sticky;
  top: 48px;
  z-index: 4;
  background: #f8fafc;
  border: none;
  border-bottom: 1px solid #e8edf5;
  box-sizing: border-box;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

#hitModalHost .hit-modal--week-hit .hit-set-rows,
#hitModalHost .hit-modal--week-hit .ht-set-group--week .ht-set-group__body {
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
  background: #fff;
}

#hitModalHost .hit-modal--week-hit .hit-row,
#hitModalHost .hit-modal--week-hit .ht-week-grid-row {
  min-height: 58px;
  position: relative;
  z-index: 1;
  background: #fff;
  box-sizing: border-box;
}

#hitModalHost .hit-modal--week-hit .ht-set-group--week.is-collapsed .hit-set-rows {
  display: none;
}

#hitModalHost .hit-modal--week-hit .ht-week-grid-filters {
  margin-bottom: 12px;
}

#hydraToolsShell .ht-detail--week-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#hydraToolsShell .ht-detail-kpis--week {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 700px) {
  #hydraToolsShell .ht-detail-kpis--week {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  #hydraToolsShell .ht-detail-kpis--week {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

#hitModalHost .hit-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

#hitModalHost .hit-modal__header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

#hitModalHost .hit-modal__body {
  padding: 14px 16px;
  overflow-y: auto;
}

#hitModalHost .hit-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
}

.hit-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .hit-form {
    grid-template-columns: 1fr 1fr;
  }
}

.hit-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hit-form-field--full {
  grid-column: 1 / -1;
}

.hit-form-field span {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.hit-form-input {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 15px;
}

textarea.hit-form-input {
  height: auto;
  padding: 10px 12px;
}

.hit-modal__btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.hit-modal__btn--ghost {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
}

.hit-modal__btn--primary {
  border: none;
  background: #ea580c;
  color: #fff;
}

/* Responsive visibility */
#hydraToolsShell .ht-desktop-only {
  display: block;
}

#hydraToolsShell .ht-mobile-only {
  display: none;
}

@media (max-width: 1400px) {
  #hydraToolsShell .ht-report-lists--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  #hydraToolsShell .ht-detail-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #hydraToolsShell .ht-report-lists--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #hydraToolsShell .ht-master-detail {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  #hydraToolsShell .ht-tracker-shell {
    padding: 0 10px 12px;
    background: #f7f3ee;
  }

  #hydraToolsShell .ht-panel--content,
  #hydraToolsShell .ht-rate-bar {
    background: #fffdf9;
    border-color: #eadfd2;
  }

  #hydraToolsShell .ht-view-tabs {
    background: #fffdf9;
    border-color: #eadfd2;
  }

  #hydraToolsShell .ht-hit-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }

  #hydraToolsShell .ht-hit-top.ht-desktop-only {
    display: none !important;
  }

  #hydraToolsShell .ht-rate-bar {
    padding: 8px 10px;
    margin-bottom: 0;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    background: #fffdf9;
    border-color: #eadfd2;
  }

  #hydraToolsShell .ht-rate-bar__row {
    align-items: center;
  }

  #hydraToolsShell .ht-rate-bar__exchange {
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
  }

  #hydraToolsShell .ht-rate-bar__label--short {
    display: none;
  }

  #hydraToolsShell .ht-rate-bar__label--long {
    display: block;
    flex: 1 1 100%;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.2;
  }

  #hydraToolsShell .ht-rate-bar__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }

  #hydraToolsShell .ht-rate-bar__input {
    width: 120px;
    flex: 0 0 120px;
    height: 44px;
    padding: 0 10px;
    font-size: 15px;
    font-weight: 700;
    border-color: #eadfd2;
    background: #fff;
  }

  #hydraToolsShell .ht-rate-apply {
    margin-left: 0;
    width: auto;
    min-width: 96px;
    height: 44px;
    min-height: 44px !important;
    padding: 0 14px;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }

  #hydraToolsShell .ht-rate-bar__exchange .ht-tool-menu-btn {
    margin-left: auto;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 14px;
    background: #fffdf9;
    border: 1px solid rgba(15, 23, 42, 0.12);
  }

  #hydraToolsShell .ht-tool-menu-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 14px;
    background: #fffdf9;
    border: 1px solid rgba(15, 23, 42, 0.12);
  }

  #hydraToolsShell .ht-tool-menu-btn:focus {
    outline: none;
  }

  #hydraToolsShell .ht-tool-menu-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(249, 115, 22, 0.45);
  }

  #hydraToolsShell .ht-tool-menu-btn--sm,
  #hitModalHost .ht-tool-menu-btn--sm {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 14px;
  }

  #hydraToolsShell .ht-week-menu-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 14px;
    background: #fffdf9;
    border: 1px solid rgba(15, 23, 42, 0.12);
  }

  @media (min-width: 380px) {
    #hydraToolsShell .ht-rate-bar__label--short {
      display: inline;
      flex: 0 0 auto;
    }

    #hydraToolsShell .ht-rate-bar__label--long {
      display: none;
    }

    #hydraToolsShell .ht-rate-bar__controls {
      flex: 0 0 auto;
    }
  }

  #hydraToolsShell .ht-tool-menu-btn.ht-mobile-only {
    display: inline-flex !important;
  }

  #hydraToolsShell .ht-view-tabs {
    padding: 0 10px;
  }

  #hydraToolsShell .ht-view-tab {
    height: 38px;
    font-size: 12px;
  }

  #hydraToolsShell .ht-panel--content {
    border-radius: 0 0 12px 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
  }

  #hydraToolsShell .ht-panel__body {
    padding: 8px 10px 12px;
  }

  #hydraToolsShell .ht-year-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  #hydraToolsShell .ht-year-filter__label {
    font-size: 12px;
    margin: 0;
  }

  #hydraToolsShell .ht-year-filter__select {
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
  }

  #hydraToolsShell .ht-month-dash-grid,
  #hydraToolsShell .ht-month-dash-grid.ht-desktop-only {
    display: none !important;
  }

  #hydraToolsShell .ht-month-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  #hydraToolsShell .ht-month-status {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    max-height: 68px;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 16px;
    background: #fffdf9;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    text-align: left;
    cursor: pointer;
    overflow: hidden;
  }

  #hydraToolsShell .ht-month-status__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  #hydraToolsShell .ht-month-status__title {
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #hydraToolsShell .ht-month-status__chev {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
  }

  #hydraToolsShell .ht-month-status__meta {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #hydraToolsShell .ht-month-accordion {
    display: none !important;
  }

  #hydraToolsShell .ht-desktop-only {
    display: none !important;
  }

  #hydraToolsShell .ht-mobile-only {
    display: block !important;
  }

  #hydraToolsShell button.ht-mobile-only,
  #hydraToolsShell .ht-tool-menu-btn.ht-mobile-only {
    display: inline-flex !important;
  }

  #hydraToolsShell .report-kpi-grid,
  #hydraToolsShell .report-kpi-grid--portfolio,
  #hydraToolsShell .report-kpi-grid--mobile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  #hydraToolsShell .report-kpi-grid .report-kpi-card,
  #hydraToolsShell .report-kpi-grid .ht-kpi {
    min-height: 76px;
    max-height: 76px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fffdf9;
    border-color: rgba(15, 23, 42, 0.1);
    justify-content: center;
    min-width: 0;
    overflow: hidden;
  }

  #hydraToolsShell .report-kpi-grid .report-kpi-card--featured {
    grid-column: auto;
  }

  #hydraToolsShell .report-kpi-grid .ht-kpi__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 2px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  #hydraToolsShell .report-kpi-grid .ht-kpi__value {
    font-size: clamp(16px, 4.8vw, 20px);
    line-height: 1.08;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
  }

  #hydraToolsShell .report-kpi-grid .ht-kpi__value-row {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  #hydraToolsShell .ht-growth-inline {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  #hydraToolsShell .ht-report-wrap--mobile {
    padding-top: max(0px, env(safe-area-inset-top, 0px));
  }

  #hydraToolsShell .ht-report-section--snap-chart {
    padding: 10px 12px;
    margin-bottom: 8px;
  }

  #hydraToolsShell .ht-snap-chart__wrap {
    height: 280px;
    min-height: 260px;
  }

  #hydraToolsShell .ht-snap-chart__period-row {
    margin-bottom: 6px;
    gap: 8px;
  }

  #hydraToolsShell .ht-snap-chart__chip-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 8px;
    margin-bottom: 6px;
    padding-bottom: 1px;
  }

  #hydraToolsShell .ht-snap-chart__tabs,
  #hydraToolsShell .ht-snap-chart__metrics {
    gap: 8px;
    margin-bottom: 6px;
  }

  #hydraToolsShell .ht-snap-tab,
  #hydraToolsShell .ht-snap-metric {
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #hydraToolsShell .report-kpi-grid .ht-kpi__sub {
    display: none;
  }

  #hydraToolsShell .report-kpi-grid .ht-kpi--desktop-only {
    display: none !important;
  }

  #hydraToolsShell .ht-report-block,
  #hydraToolsShell .ht-report-section {
    padding: 8px 10px;
    margin-bottom: 8px;
  }

  #hydraToolsShell .ht-report-section__head {
    margin-bottom: 4px;
  }

  #hydraToolsShell .ht-section-title {
    font-size: 13px;
    margin: 0 0 6px;
  }

  #hydraToolsShell .ht-rank-row {
    min-height: 34px;
    padding: 6px 8px;
  }

  #hydraToolsShell .ht-rank-row__sub {
    display: none;
  }

  #hydraToolsShell .ht-rank-row__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #hydraToolsShell .ht-report-lists,
  #hydraToolsShell .ht-report-lists--3,
  #hydraToolsShell .ht-report-lists--4 {
    grid-template-columns: 1fr;
  }

  #hydraToolsShell .ht-growth-summary__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #hydraToolsShell .ht-growth-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #hydraToolsShell .ht-master-detail {
    grid-template-columns: 1fr;
  }

  #hydraToolsShell .ht-master-detail--cards {
    grid-template-columns: 1fr;
  }

  #hydraToolsShell .ht-cards-left-panel {
    width: 100%;
    max-width: none;
    max-height: none;
  }

  #hydraToolsShell .ht-cards-center-panel,
  #hydraToolsShell .ht-cards-right-panel {
    display: none !important;
  }

  #hydraToolsShell .ht-right-panel {
    display: none !important;
  }

  #hydraToolsShell .ht-detail-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #hydraToolsShell .ht-detail-field {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  #hydraToolsShell .ht-cards-toolbar {
    gap: 8px;
    padding: 10px 12px;
  }

  #hydraToolsShell .ht-cards-toolbar__search {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
  }

  #hydraToolsShell .ht-cards-toolbar__controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 6px;
    min-height: 40px;
  }

  #hydraToolsShell .ht-cards-toolbar__ctrl {
    height: 40px;
    min-height: 40px;
    padding: 0 8px;
    font-size: 12px;
    gap: 4px;
  }

  #hydraToolsShell .ht-cards-toolbar__view-toggle {
    margin-left: 0;
    flex-shrink: 0;
  }

  #hydraToolsShell .ht-cards-toolbar__view-toggle .hti-view-toggle {
    height: 40px;
    padding: 2px;
  }

  #hydraToolsShell .ht-cards-toolbar__view-toggle .hti-view-seg {
    height: 36px;
    padding: 0 8px;
    font-size: 11px;
  }

  #hydraToolsShell .ht-cards-mode {
    margin-left: 0;
    width: 100%;
  }

  #hydraToolsShell .ht-list-item-wrap {
    grid-template-columns: 1fr;
  }

  #hydraToolsShell .ht-list-item__set {
    padding: 0 10px 6px;
  }

  #hydraToolsShell .ht-detail-grid {
    grid-template-columns: 1fr;
  }

  #hydraToolsShell .ht-price-history-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    font-size: 11px;
  }

  #hydraToolsShell .ht-toolbar .pw-btn {
    flex: 1;
    min-width: 0;
  }

  #hydraToolsShell .ht-drawer,
  #hydraToolsShell .ht-drawer-backdrop .pw-drawer {
    width: 100vw;
    max-width: 100vw;
  }

  /* Card detail drawer — compact mobile */
  #hydraToolsShell .ht-drawer--card-compact .pw-drawer__head--compact {
    align-items: center;
    padding: 12px 14px;
    gap: 10px;
  }

  #hydraToolsShell .ht-drawer--card-compact .pw-drawer__head--compact .pw-drawer__title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
  }

  #hydraToolsShell .ht-drawer--card-compact .pw-drawer__head--compact .ht-drawer-sub {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.2;
  }

  #hydraToolsShell .ht-drawer--card-compact .pw-drawer__head--compact .pw-drawer__close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  #hydraToolsShell .ht-drawer--card-compact .pw-drawer__body {
    padding: 12px 14px 20px;
  }

  #hydraToolsShell .ht-card-drawer-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  #hydraToolsShell .ht-detail-card--compact {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fffdf9;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  #hydraToolsShell .ht-detail-card--history.ht-detail-card--compact {
    background: #fffdf9;
  }

  #hydraToolsShell .ht-compact-rows {
    display: flex;
    flex-direction: column;
  }

  #hydraToolsShell .ht-compact-row {
    display: flex;
    align-items: center;
    min-height: 36px;
    height: 36px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  #hydraToolsShell .ht-compact-row:last-child {
    border-bottom: none;
  }

  #hydraToolsShell .ht-compact-row__label {
    width: 90px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
  }

  #hydraToolsShell .ht-compact-row__value {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #hydraToolsShell .ht-drawer--card-compact .hit-card-actions {
    display: grid;
    grid-template-columns: 1fr 72px 72px;
    gap: 8px;
    margin-top: 0;
    position: static;
  }

  #hydraToolsShell .ht-drawer--card-compact .hit-card-actions button,
  #hydraToolsShell .ht-drawer--card-compact .hit-card-actions .pw-btn {
    width: auto !important;
    max-width: none;
    height: 42px;
    min-height: 42px;
    min-width: 0;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-content: center;
  }

  #hydraToolsShell .ht-drawer--card-compact .hit-card-actions .ht-btn--danger {
    color: #dc2626 !important;
    border-color: rgba(220, 38, 38, 0.22) !important;
  }

  @media (max-width: 379px) {
    #hydraToolsShell .ht-drawer--card-compact .hit-card-actions {
      grid-template-columns: 1fr 60px 60px;
    }
  }

  #hydraToolsShell .ht-price-history--compact .ht-price-history__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
    color: #c2410c;
  }

  #hydraToolsShell .ht-price-history--compact .ht-price-history__summary {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.35;
    color: #64748b;
  }

  #hydraToolsShell .ht-price-history--compact .ht-price-history__summary .ht-price-delta__chg {
    font-weight: 700;
    color: #c2410c;
  }

  #hydraToolsShell .ht-price-history-table--compact {
    font-size: 13px;
  }

  #hydraToolsShell .ht-price-history-table--compact .ht-price-history-row {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
    gap: 6px;
    height: 34px;
    min-height: 34px;
    padding: 0 4px;
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  #hydraToolsShell .ht-price-history-table--compact .ht-price-history-row--head {
    height: 34px;
    min-height: 34px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #9a3412;
    background: #fff7ef;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
  }

  #hydraToolsShell .ht-price-history-table--compact .ht-price-history-row__dt {
    font-size: 12px;
    color: #64748b;
  }

  #hydraToolsShell .ht-price-history-table--compact .ht-price-history-row__val {
    font-size: 13px;
    font-weight: 700;
  }

  /* —— Mobile modals (Hit Tracker) —— */
  #hitModalHost .hit-modal-backdrop {
    align-items: stretch;
    padding: 0;
    background: rgba(15, 23, 42, 0.45);
  }

  #hitModalHost .hit-modal {
    border-radius: 0;
    background: #f7f3ee;
  }

  #hitModalHost .hit-modal--mobile-full,
  #hitModalHost .hit-modal--week-hit {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: #f7f3ee;
  }

  #hitModalHost .hit-modal--mobile-full .hit-modal__header,
  #hitModalHost .hit-modal--week-hit .hit-modal__header {
    flex-shrink: 0;
    padding: 10px 12px;
    padding-top: var(--tools-modal-header-pad-top);
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    background: #fffdf9;
    border-bottom: 1px solid #eadfd2;
  }

  #hitModalHost .hit-modal--mobile-full .hit-modal__header--compact h3,
  #hitModalHost .hit-modal--week-hit .hit-modal__header--compact h3 {
    font-size: 17px;
    margin: 0;
    color: #0f172a;
  }

  #hitModalHost .hit-modal--mobile-full .hit-modal__body,
  #hitModalHost .hit-modal--week-hit .hit-modal__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px 10px;
    background: #f7f3ee;
  }

  #hitModalHost .hit-modal--mobile-full .hit-modal__footer,
  #hitModalHost .hit-modal--week-hit .hit-modal__footer {
    flex-shrink: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: #fffdf9;
    border-top: 1px solid #eadfd2;
  }

  #hitModalHost .ht-month-modal-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 10px;
    padding: 8px 10px 8px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff7ef;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    position: relative;
    overflow: hidden;
  }

  #hitModalHost .ht-month-modal-summary__accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #94a3b8;
  }

  #hitModalHost .ht-month-modal-summary[data-ht-tone="good"] .ht-month-modal-summary__accent {
    background: #16a34a;
  }

  #hitModalHost .ht-month-modal-summary[data-ht-tone="mid"] .ht-month-modal-summary__accent {
    background: #f97316;
  }

  #hitModalHost .ht-month-modal-summary[data-ht-tone="low"] .ht-month-modal-summary__accent {
    background: #ef4444;
  }

  #hitModalHost .ht-month-modal-summary--empty {
    color: #64748b;
    background: #fffdf9;
  }

  #hitModalHost .ht-week-compact-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  #hitModalHost .ht-week-compact-card,
  #hitModalHost .week-card {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 64px;
    max-height: 76px;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    background: #fffdf9;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  #hitModalHost .ht-week-compact-card:active,
  #hitModalHost .week-card:active {
    transform: scale(0.99);
  }

  #hitModalHost .ht-week-compact-card__accent {
    width: 4px;
    flex-shrink: 0;
    background: #94a3b8;
  }

  #hitModalHost .ht-week-compact-card[data-ht-tone="good"] .ht-week-compact-card__accent {
    background: #16a34a;
  }

  #hitModalHost .ht-week-compact-card[data-ht-tone="mid"] .ht-week-compact-card__accent {
    background: #f97316;
  }

  #hitModalHost .ht-week-compact-card[data-ht-tone="low"] .ht-week-compact-card__accent {
    background: #ef4444;
  }

  #hitModalHost .ht-week-compact-card__body {
    flex: 1;
    min-width: 0;
    padding: 8px 10px 8px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  #hitModalHost .ht-week-compact-card__head {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  #hitModalHost .ht-week-compact-card__title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #hitModalHost .ht-week-compact-card__menu {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
  }

  #hitModalHost .ht-week-compact-card__hint {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.2;
  }

  #hitModalHost .ht-week-compact-card__hint .ht-icon-svg {
    flex-shrink: 0;
    opacity: 0.85;
  }

  #hitModalHost .ht-tool-menu-btn--sm {
    width: 30px;
    height: 30px;
    font-size: 16px;
    border-radius: 8px;
  }

  #hitModalHost .ht-week-compact-card__meta {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #hitModalHost .ht-week-compact-card__meta--sub {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters--mobile,
  #hitModalHost .hit-entry-modal .hit-entry-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    max-height: 96px;
    flex-shrink: 0;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: none;
    border-radius: 14px;
    border: 1px solid #eadfd2;
    background: #fff7ef;
    box-sizing: border-box;
  }

  #hitModalHost .hit-entry-modal input[type="search"],
  #hitModalHost .hit-entry-modal .hit-search-input,
  #hitModalHost .hit-entry-modal .ht-week-grid-filters--mobile .ht-week-grid-filters__search--full {
    width: 100%;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    flex: 0 0 42px !important;
    padding: 0 14px !important;
    font-size: 15px !important;
    border-radius: 14px !important;
    border: 1px solid #eadfd2;
    background: #fffdf9;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters__row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    flex: 0 0 40px;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters--mobile .ht-week-grid-filters__set {
    width: 110px;
    flex: 0 0 110px;
    min-width: 110px;
    height: 40px;
    padding: 0 8px;
    font-size: 13px;
    border: 1px solid #eadfd2;
    border-radius: 10px;
    background: #fffdf9;
    box-sizing: border-box;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters--mobile .ht-week-grid-filters__check {
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters__reload {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
  }

  #hitModalHost .ht-hit-set-mobile {
    margin-bottom: 6px;
  }

  #hitModalHost .ht-hit-set-mobile__head {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    margin-bottom: 4px;
    border-radius: 10px;
    background: #fff7ef;
    border: 1px solid #eadfd2;
    font-size: 13px;
    font-weight: 800;
    color: #9a3412;
  }

  #hitModalHost .ht-hit-set-mobile__accent {
    width: 3px;
    height: 16px;
    border-radius: 999px;
    background: #f97316;
    flex-shrink: 0;
  }

  #hitModalHost .ht-hit-set-mobile__cards {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  #hitModalHost .ht-week-grid--mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  #hitModalHost .ht-hit-card-mobile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-height: 82px;
    max-height: 92px;
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    background: #fffdf9;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  #hitModalHost .ht-hit-card-mobile__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }

  #hitModalHost .ht-hit-card-mobile__name {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #hitModalHost .ht-hit-card-mobile__prices {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
  }

  #hitModalHost .ht-hit-card-mobile__inputs {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  #hitModalHost .ht-hit-card-mobile__field {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
  }

  #hitModalHost .ht-hit-card-mobile__field span {
    flex-shrink: 0;
    width: 28px;
  }

  #hitModalHost .ht-hit-card-mobile__field .ht-qty-input {
    width: 64px;
    height: 38px;
    flex: 0 0 64px;
    padding: 0 6px;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    border: 1px solid #eadfd2;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
  }

  #hitModalHost .hit-modal__btn--primary {
    background: #f97316;
    border-color: #f97316;
  }
}

@media (min-width: 600px) {
  .ht-drawer-backdrop {
    align-items: center;
  }

  .ht-drawer {
    border-radius: 16px;
    max-height: 88dvh;
  }
}

/* Weeks dashboard — 12 month grid */
#hydraToolsShell .ht-weeks-dashboard {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 8px;
}

#hydraToolsShell .ht-year-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

#hydraToolsShell .ht-year-filter__label {
  font-size: 13px;
  font-weight: 700;
  color: #9a3412;
}

#hydraToolsShell .ht-year-filter__select {
  min-width: 100px;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.25);
  font-size: 14px;
  font-weight: 700;
  background: #fff;
}

#hydraToolsShell .ht-month-dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

#hydraToolsShell .ht-month-dash-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 150px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #e8edf5;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

#hydraToolsShell .ht-month-dash-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

#hydraToolsShell .ht-month-dash-card__title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

#hydraToolsShell .ht-month-dash-card__line,
#hydraToolsShell .ht-month-dash-card__meta-line {
  font-size: 12px;
  color: #475569;
  line-height: 1.55;
}

#hydraToolsShell .ht-month-dash-card__empty {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 6px;
}

#hydraToolsShell .ht-month-dash-card--good {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
}

#hydraToolsShell .ht-month-dash-card--mid {
  border-color: rgba(249, 115, 22, 0.28);
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
}

#hydraToolsShell .ht-month-dash-card--low {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
}

#hydraToolsShell .ht-month-dash-card--empty {
  border-color: #e8edf5;
  background: #f8fafc;
}

/* Mobile month accordion */
#hydraToolsShell .ht-month-accordion {
  flex-direction: column;
  gap: 6px;
}

#hydraToolsShell .ht-month-acc {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

#hydraToolsShell .ht-month-acc__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

#hydraToolsShell .ht-month-acc__chev {
  flex-shrink: 0;
  width: 14px;
  font-size: 11px;
  color: #64748b;
  line-height: 1;
}

#hydraToolsShell .ht-month-acc__line {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .ht-month-acc__main,
#hydraToolsShell .ht-month-acc__title,
#hydraToolsShell .ht-month-acc__meta {
  display: none;
}

#hydraToolsShell .ht-month-acc__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px 8px 30px;
}

#hydraToolsShell .ht-month-acc.is-collapsed .ht-month-acc__body {
  display: none;
}

#hydraToolsShell .ht-month-acc-week {
  display: flex;
  align-items: center;
  gap: 4px;
}

#hydraToolsShell .ht-month-acc-week__main {
  flex: 1;
  min-width: 0;
  display: block;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
}

#hydraToolsShell .ht-month-acc-week__line {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .ht-month-acc-week__label,
#hydraToolsShell .ht-month-acc-week__range,
#hydraToolsShell .ht-month-acc-week__meta {
  display: none;
}

#hydraToolsShell .ht-month-acc-week__menu {
  align-self: center;
  flex-shrink: 0;
}

#hitModalHost .hit-modal--month-weeks,
#hitModalHost .hit-modal--week-detail,
#hitModalHost .hit-modal--week-compound {
  width: min(980px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

#hitModalHost .hit-modal__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

#hitModalHost .hit-modal__body--weeks,
#hitModalHost .hit-modal__body--week-detail {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

#hydraToolsShell .ht-week-modal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#hydraToolsShell .ht-week-modal-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #e8edf5;
  background: #fff;
}

#hydraToolsShell .ht-week-modal-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

#hydraToolsShell .ht-week-modal-card__title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

#hydraToolsShell .ht-week-modal-card__range {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

#hydraToolsShell .ht-week-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  flex-shrink: 0;
}

#hydraToolsShell .ht-week-menu-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

#hydraToolsShell .ht-week-modal-card__line {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}

#hydraToolsShell .ht-week-modal-card__empty {
  font-size: 12px;
  color: #94a3b8;
}

#hydraToolsShell .ht-detail-kpis--week-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

#hydraToolsShell .ht-section-title--inline {
  margin-top: 4px;
}

#hydraToolsShell .ht-week-detail-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#hydraToolsShell .ht-week-detail-table__head,
#hydraToolsShell .ht-week-detail-table__row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 72px repeat(5, minmax(56px, 1fr));
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

#hydraToolsShell .ht-week-detail-table__head {
  font-weight: 700;
  color: #9a3412;
  padding: 0 8px 4px;
}

#hydraToolsShell .ht-week-detail-table__row {
  padding: 8px;
  border-radius: 10px;
  background: #f8fafc;
}

#hydraToolsShell .ht-week-detail-table__name {
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  #hydraToolsShell .ht-month-dash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  #hydraToolsShell .ht-month-dash-grid {
    grid-template-columns: 1fr;
  }

  #hydraToolsShell .ht-month-dash-card {
    min-height: 130px;
    padding: 16px;
  }

  #hitModalHost .hit-modal--month-weeks,
  #hitModalHost .hit-modal--week-detail,
  #hitModalHost .hit-modal--week-compound {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  #hydraToolsShell .ht-detail-kpis--week-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #hydraToolsShell .ht-week-detail-table__head {
    display: none;
  }

  #hydraToolsShell .ht-week-detail-table__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Layout guarantee — month grid + report KPI (cache-bust: 20260611-hit-month-grid-v2) */
.ht-tracker-shell .ht-month-dash-grid,
#hydraToolsShell .ht-month-dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ht-tracker-shell .ht-month-dash-card,
#hydraToolsShell .ht-month-dash-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.ht-tracker-shell .report-kpi-grid,
#hydraToolsShell .report-kpi-grid,
#hydraToolsShell .report-kpi-grid--portfolio {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 12px;
  max-width: min(1840px, 95vw);
  margin: 0 auto 16px;
}

.ht-tracker-shell .report-kpi-grid .report-kpi-card,
.ht-tracker-shell .report-kpi-grid .ht-kpi,
#hydraToolsShell .report-kpi-grid .report-kpi-card,
#hydraToolsShell .report-kpi-grid .ht-kpi {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  width: auto !important;
  max-width: none !important;
}

@media (max-width: 1280px) {
  .ht-tracker-shell .report-kpi-grid,
  #hydraToolsShell .report-kpi-grid,
  #hydraToolsShell .report-kpi-grid--portfolio {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .ht-tracker-shell .ht-month-dash-grid,
  #hydraToolsShell .ht-month-dash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ht-tracker-shell .report-kpi-grid,
  #hydraToolsShell .report-kpi-grid,
  #hydraToolsShell .report-kpi-grid--portfolio {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .ht-tracker-shell .ht-month-dash-grid,
  #hydraToolsShell .ht-month-dash-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile action popover — appended to body, outside #hydraToolsShell */
body > .ht-mobile-action-menu,
#htMobileActionMenu.ht-mobile-action-menu {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fffdf9;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
}

body > .ht-mobile-action-menu[hidden],
#htMobileActionMenu.ht-mobile-action-menu[hidden] {
  display: none !important;
}

body > .ht-mobile-action-menu .ht-menu-item,
#htMobileActionMenu .ht-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 0 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

body > .ht-mobile-action-menu .ht-menu-item:hover,
body > .ht-mobile-action-menu .ht-menu-item:active,
#htMobileActionMenu .ht-menu-item:hover,
#htMobileActionMenu .ht-menu-item:active {
  background: #fff3e8;
  color: #ea580c;
}

body > .ht-mobile-action-menu .ht-menu-item--danger,
#htMobileActionMenu .ht-menu-item--danger {
  color: #dc2626;
}

body > .ht-mobile-action-menu .ht-menu-item--danger:hover,
body > .ht-mobile-action-menu .ht-menu-item--danger:active,
#htMobileActionMenu .ht-menu-item--danger:hover,
#htMobileActionMenu .ht-menu-item--danger:active {
  background: #fef2f2;
  color: #dc2626;
}

body > .ht-mobile-action-menu .ht-menu-item:disabled,
#htMobileActionMenu .ht-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body > .ht-mobile-action-menu .ht-mobile-action-menu__divider,
#htMobileActionMenu .ht-mobile-action-menu__divider {
  height: 1px;
  margin: 4px 6px;
  background: rgba(15, 23, 42, 0.08);
}

body > .ht-mobile-action-menu .ht-menu-item__icon,
#htMobileActionMenu .ht-menu-item__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: inherit;
}

body > .ht-mobile-action-menu .ht-menu-item__label,
#htMobileActionMenu .ht-menu-item__label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PSA đang chấm — compact finance dashboard */
#hydraToolsShell .ht-psa-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#hydraToolsShell .ht-psa-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-height: 72px;
  max-height: 80px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

#hydraToolsShell .ht-psa-kpi-strip__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

#hydraToolsShell .ht-psa-kpi-strip__label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.2;
}

#hydraToolsShell .ht-psa-kpi-strip__value {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .ht-psa-kpi-strip__item--sent .ht-psa-kpi-strip__value {
  color: #1d4ed8;
}

#hydraToolsShell .ht-psa-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#hydraToolsShell .ht-psa-filter {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#hydraToolsShell .ht-psa-filter.is-active {
  border-color: rgba(249, 115, 22, 0.35);
  background: #fff7ed;
  color: #c2410c;
}

#hydraToolsShell .ht-psa-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#hydraToolsShell .ht-psa-batch-card {
  min-height: 90px;
  max-height: 110px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

#hydraToolsShell .ht-psa-batch-card:hover {
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

#hydraToolsShell .ht-psa-batch-card__row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#hydraToolsShell .ht-psa-batch-card__title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .ht-psa-batch-card__range {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.2;
}

#hydraToolsShell .ht-psa-batch-card__stats {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

#hydraToolsShell .ht-psa-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

#hydraToolsShell .ht-psa-status-chip:hover {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

#hydraToolsShell .ht-psa-status-chip:active {
  transform: scale(0.98);
}

#hydraToolsShell .ht-psa-status-chip--not-sent {
  background: #fef9c3;
  color: #a16207;
  border-color: #fde047;
}

#hydraToolsShell .ht-psa-status-chip--sent {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

#hydraToolsShell .ht-psa-status-chip--returned {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

#hydraToolsShell .ht-psa-status-chip--card {
  font-size: 11px;
  max-width: 118px;
  padding-right: 8px;
}

#hydraToolsShell .ht-psa-status-chip--form {
  width: fit-content;
  max-width: 100%;
}

#hydraToolsShell .ht-psa-status-chip__chev {
  opacity: 0.65;
  flex-shrink: 0;
}

body > .ht-psa-status-menu,
#htPsaStatusMenu.ht-psa-status-menu {
  position: fixed;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 148px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

body > .ht-psa-status-menu .ht-psa-status-menu__item,
#htPsaStatusMenu .ht-psa-status-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  text-align: left;
}

body > .ht-psa-status-menu .ht-psa-status-menu__item:hover,
#htPsaStatusMenu .ht-psa-status-menu__item:hover {
  background: #f8fafc;
}

body > .ht-psa-status-menu .ht-psa-status-menu__item.is-active,
#htPsaStatusMenu .ht-psa-status-menu__item.is-active {
  background: #fff7ed;
  color: #c2410c;
}

body > .ht-psa-status-menu .ht-psa-status-menu__item--not-sent .ht-icon-svg,
#htPsaStatusMenu .ht-psa-status-menu__item--not-sent .ht-icon-svg {
  color: #a16207;
}

body > .ht-psa-status-menu .ht-psa-status-menu__item--sent .ht-icon-svg,
#htPsaStatusMenu .ht-psa-status-menu__item--sent .ht-icon-svg {
  color: #1d4ed8;
}

body > .ht-psa-status-menu .ht-psa-status-menu__item--returned .ht-icon-svg,
#htPsaStatusMenu .ht-psa-status-menu__item--returned .ht-icon-svg {
  color: #15803d;
}

#hydraToolsShell .ht-psa-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

#hydraToolsShell .ht-psa-status--not-sent { background: #f1f5f9; color: #475569; }
#hydraToolsShell .ht-psa-status--sent { background: #dbeafe; color: #1d4ed8; }
#hydraToolsShell .ht-psa-status--returned { background: #dcfce7; color: #15803d; }

#hydraToolsShell .ht-psa-empty {
  padding: 20px 14px;
  text-align: center;
  border-radius: 14px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  background: #fffdf9;
}

#hydraToolsShell .ht-psa-empty__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

#hydraToolsShell .ht-psa-empty__text {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

/* PSA drawer */
#hydraToolsShell .ht-drawer--psa .pw-drawer__head--psa {
  align-items: flex-start;
  padding: 12px 14px 10px;
}

#hydraToolsShell .ht-drawer--psa .pw-drawer__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

#hydraToolsShell .ht-psa-drawer-head {
  min-width: 0;
  flex: 1;
}

#hydraToolsShell .ht-psa-drawer-quick {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.3;
}

#hydraToolsShell .ht-drawer--psa .pw-drawer__body {
  padding: 10px 14px 16px;
}

#hydraToolsShell .ht-psa-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#hydraToolsShell .ht-psa-mini-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#hydraToolsShell .ht-psa-mini-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .ht-psa-mini-kpi__label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#hydraToolsShell .ht-psa-mini-kpi__val {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

#hydraToolsShell .ht-psa-detail__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#hydraToolsShell .ht-psa-detail__form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#hydraToolsShell .ht-psa-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#hydraToolsShell .ht-psa-field input {
  min-height: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  text-transform: none;
  letter-spacing: 0;
}

#hydraToolsShell .ht-psa-save-btn {
  width: 100%;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f97316;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

#hydraToolsShell .ht-psa-save-btn:hover {
  background: #ea580c;
}

#hydraToolsShell .ht-psa-section-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #c2410c;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#hydraToolsShell .ht-psa-empty-inline {
  margin: 0;
  padding: 8px 0;
  font-size: 13px;
  color: #64748b;
}

#hydraToolsShell .ht-psa-detail__cards {
  margin: 0;
}

#hydraToolsShell .ht-psa-card-rich {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .ht-psa-card-rich:last-child {
  border-bottom: none;
}

#hydraToolsShell .ht-psa-card-rich__body {
  min-width: 0;
  flex: 1;
}

#hydraToolsShell .ht-psa-card-rich__title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .ht-psa-card-rich__meta {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#hydraToolsShell .ht-psa-card-rich__val {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
}

#hydraToolsShell .ht-psa-card-detail {
  padding: 6px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .ht-psa-card-detail--edit {
  padding: 5px 0 6px;
}

#hydraToolsShell .ht-psa-card-detail:last-child {
  border-bottom: none;
}

#hydraToolsShell .ht-psa-card-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#hydraToolsShell .ht-psa-card-detail__title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

#hydraToolsShell .ht-psa-card-detail__val {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

#hydraToolsShell .ht-psa-card-detail__meta {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

#hydraToolsShell .ht-psa-card-detail__qtys,
#hydraToolsShell .ht-psa-card-detail__prices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

#hydraToolsShell .ht-psa-card-detail__grade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

#hydraToolsShell .ht-psa-card-detail__grade-row--readonly {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

#hydraToolsShell .ht-psa-card-detail__grade,
#hydraToolsShell .ht-psa-card-detail__raw-readonly {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#hydraToolsShell .ht-psa-card-detail__grade-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#hydraToolsShell .ht-psa-card-detail__raw-readonly strong {
  min-width: 20px;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}

#hydraToolsShell .ht-psa-card-detail__price-block {
  margin-top: 4px;
}

#hydraToolsShell .ht-psa-card-detail__price-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}

#hydraToolsShell .ht-psa-card-detail__price-summary strong {
  font-weight: 800;
  color: #334155;
}

#hydraToolsShell .ht-psa-price-detail-toggle {
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
}

#hydraToolsShell .ht-psa-price-detail-toggle:hover,
#hydraToolsShell .ht-psa-price-detail-toggle.is-open {
  color: #2563eb;
}

#hydraToolsShell .ht-psa-card-detail__price-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .ht-psa-card-detail__price-detail[hidden] {
  display: none;
}

#hydraToolsShell .ht-psa-card-detail__sent {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

#hydraToolsShell .ht-psa-edit-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

#hydraToolsShell .ht-psa-edit-hint--active {
  color: #c2410c;
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.2);
}

#hydraToolsShell .ht-psa-card-detail__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

#hydraToolsShell .ht-psa-card-detail__row--grades {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#hydraToolsShell .ht-psa-card-detail__row--price {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#hydraToolsShell .ht-psa-card-detail__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#hydraToolsShell .ht-psa-card-detail__field > span {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#hydraToolsShell .ht-psa-qty-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}

#hydraToolsShell .ht-psa-qty-stepper__btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

#hydraToolsShell .ht-psa-qty-stepper--compact {
  gap: 6px;
}

#hydraToolsShell .ht-psa-qty-stepper--compact .ht-psa-qty-stepper__btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 15px;
}

#hydraToolsShell .ht-psa-qty-stepper__val {
  min-width: 24px;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}

#hydraToolsShell .ht-psa-qty-stepper__btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.2);
}

#hydraToolsShell .ht-psa-qty-stepper__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#hydraToolsShell .ht-psa-qty-stepper__input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 4px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: #0f172a;
  -moz-appearance: textfield;
}

#hydraToolsShell .ht-psa-qty-stepper__input::-webkit-outer-spin-button,
#hydraToolsShell .ht-psa-qty-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#hydraToolsShell .ht-psa-card-detail__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

#hydraToolsShell .ht-psa-result-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

#hydraToolsShell .ht-psa-result-badge--good {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

#hydraToolsShell .ht-psa-result-badge--warn {
  background: rgba(234, 179, 8, 0.16);
  color: #a16207;
}

#hydraToolsShell .ht-psa-result-badge--bad {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

#hydraToolsShell .ht-psa-raw-warn {
  font-size: 11px;
  font-weight: 600;
  color: #b45309;
}

#hydraToolsShell .ht-psa-field--status {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 700px) {
  #hydraToolsShell .ht-hit-action-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 6px;
    padding: 8px;
    align-items: center;
  }

  #hydraToolsShell .ht-hit-action-bar__btn {
    min-height: 38px;
    padding: 0 6px;
    font-size: 11px;
  }

  #hydraToolsShell .ht-hit-action-bar__menu {
    grid-column: 4;
    grid-row: 1;
    margin-left: 0;
  }

  #hydraToolsShell .ht-psa-kpi-strip {
    min-height: 68px;
    max-height: 76px;
    padding: 8px 6px;
    gap: 4px;
  }

  #hydraToolsShell .ht-psa-kpi-strip__label {
    font-size: 11px;
  }

  #hydraToolsShell .ht-psa-kpi-strip__value {
    font-size: 20px;
  }

  #hydraToolsShell .ht-psa-batch-card__row1 {
    align-items: center;
  }

  #hydraToolsShell .ht-psa-status-chip--card {
    max-width: 108px;
    font-size: 10px;
  }

  #hydraToolsShell .ht-psa-detail__form-row {
    grid-template-columns: 1fr;
  }

  #hydraToolsShell .ht-psa-card-detail__row {
    grid-template-columns: 1fr;
  }

  #hydraToolsShell .ht-psa-card-detail__row--price {
    grid-template-columns: 1fr;
  }

  #hydraToolsShell .ht-psa-price-detail-toggle {
    margin-left: 0;
  }

  #hydraToolsShell .ht-drawer--psa .pw-drawer__title {
    font-size: 17px;
  }
}

/* —— Hit entry modal (Nhập hit Tuần) — mobile overflow fix @640 —— */
html.hit-entry-modal-open,
html.hit-entry-modal-open body {
  overflow-x: hidden !important;
  max-width: 100%;
}

html.hit-entry-modal-open #hydraToolsShell,
html.hit-entry-modal-open #hitModalHost {
  overflow-x: hidden !important;
  max-width: 100%;
}

@media (max-width: 640px) {
  #hitModalHost .hit-modal-backdrop:has(.hit-entry-modal) {
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

  #hitModalHost .hit-modal.hit-entry-modal,
  #hitModalHost .hit-modal--week-hit.hit-entry-modal {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
  }

  #hitModalHost .hit-entry-modal *,
  #hitModalHost .hit-entry-modal *::before,
  #hitModalHost .hit-entry-modal *::after {
    box-sizing: border-box;
  }

  #hitModalHost .hit-entry-modal .hit-modal__header {
    position: sticky;
    top: 0;
    z-index: 4;
    flex-shrink: 0;
    padding: 10px 12px;
    padding-top: var(--tools-modal-header-pad-top);
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    background: #fffdf9;
    border-bottom: 1px solid #eadfd2;
  }

  #hitModalHost .hit-entry-modal .hit-modal__header-main {
    min-width: 0;
    padding-right: 8px;
  }

  #hitModalHost .hit-entry-modal .hit-modal__header-main h3 {
    font-size: 17px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #hitModalHost .hit-entry-modal .hit-modal__close {
    flex-shrink: 0;
    margin: 0;
  }

  #hitModalHost .hit-entry-modal .hit-modal__body,
  #hitModalHost .hit-entry-modal .hit-modal__body--week-hit {
    flex: 1;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    background: #f7f3ee;
  }

  #hitModalHost .hit-entry-modal .hit-modal__footer,
  #hitModalHost .hit-entry-modal .hit-modal__footer--sticky {
    position: sticky;
    bottom: 0;
    z-index: 4;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    background: #fffdf9;
    border-top: 1px solid #eadfd2;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid,
  #hitModalHost .hit-entry-modal .ht-week-grid--mobile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    border: none;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-head,
  #hitModalHost .hit-entry-modal .ht-week-grid-row {
    display: none !important;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters--mobile,
  #hitModalHost .hit-entry-modal .hit-entry-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: none;
    flex-shrink: 0;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #eadfd2;
    background: #fff7ef;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters__search--full,
  #hitModalHost .hit-entry-modal input[type="search"].hit-search-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 42px;
    flex: none;
    padding: 0 12px;
    font-size: 15px;
    border-radius: 12px;
    border: 1px solid #eadfd2;
    background: #fffdf9;
    -webkit-appearance: none;
    appearance: none;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 40px;
    max-height: none;
    flex: none;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters__set {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 8px;
    font-size: 13px;
    border: 1px solid #eadfd2;
    border-radius: 10px;
    background: #fffdf9;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters__check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    min-width: 0;
  }

  #hitModalHost .hit-entry-modal .ht-week-grid-filters__reload {
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    padding: 0;
  }

  #hitModalHost .hit-entry-modal .ht-hit-set-mobile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 6px;
  }

  #hitModalHost .hit-entry-modal .ht-hit-set-mobile__head {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 30px;
    height: auto;
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 10px;
    background: #fff7ef;
    border: 1px solid #eadfd2;
    font-size: 12px;
    font-weight: 800;
    color: #9a3412;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #hitModalHost .hit-entry-modal .ht-hit-set-mobile__cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #hitModalHost .hit-entry-modal .ht-hit-card-mobile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    max-height: none;
    padding: 8px 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    background: #fffdf9;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  #hitModalHost .hit-entry-modal .ht-hit-card-mobile__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    width: 100%;
  }

  #hitModalHost .hit-entry-modal .ht-hit-card-mobile__name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #hitModalHost .hit-entry-modal .ht-hit-card-mobile__prices {
    flex: 0 1 46%;
    min-width: 0;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.25;
    text-align: right;
    white-space: normal;
    word-break: break-word;
  }

  #hitModalHost .hit-entry-modal .ht-hit-card-mobile__inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #hitModalHost .hit-entry-modal .ht-hit-card-mobile__field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
  }

  #hitModalHost .hit-entry-modal .ht-hit-card-mobile__field span {
    width: auto;
    flex-shrink: 0;
  }

  #hitModalHost .hit-entry-modal .ht-hit-card-mobile__field .ht-qty-input,
  #hitModalHost .hit-entry-modal .ht-qty-input--mobile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    flex: 1 1 auto;
    padding: 0 8px;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    border: 1px solid #eadfd2;
    border-radius: 10px;
    background: #fff;
  }
}

/* —— Hit bulk import modal (paste text) —— */
#hitModalHost .ht-bulk-import__checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  flex-shrink: 0;
}

#hitModalHost .ht-bulk-import__checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
}

#hitModalHost .pw-modal-backdrop--form {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.48);
  box-sizing: border-box;
}

#hitModalHost .pw-modal--bulk-import {
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100vw - 32px));
  max-height: min(92vh, 720px);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22);
}

#hitModalHost .pw-modal--bulk-import .pw-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

@media (min-width: 701px) {
  #hitModalHost .pw-modal--bulk-import .pw-modal__body {
    max-height: min(72vh, 640px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}

#hitModalHost .pw-bulk-import__lines {
  min-height: 140px;
  max-height: 200px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

#hitModalHost .pw-bulk-preview {
  margin-top: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fafbfc;
  overflow: hidden;
}

#hitModalHost .pw-bulk-preview__list {
  max-height: 180px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 700px) {
  #hitModalHost .pw-modal-backdrop--form {
    padding: 0;
    align-items: stretch;
  }

  #hitModalHost .pw-modal--bulk-import {
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  #hitModalHost .pw-modal--bulk-import .pw-modal__header {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-shrink: 0;
    padding: 10px 14px 8px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    background: #fff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  #hitModalHost .pw-modal--bulk-import .pw-modal__close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  #hitModalHost .pw-modal--bulk-import .pw-modal__body {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 14px 0;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }

  #hitModalHost .pw-modal--bulk-import .pw-modal__actions--footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
  }

  #hitModalHost .pw-modal--bulk-import .pw-modal__actions--footer .pw-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    font-size: 14px;
    border-radius: 14px;
  }

  #hitModalHost .pw-modal--bulk-import .pw-modal__actions--footer .pw-btn--primary {
    flex: 1.2 1 0;
  }
}
