html {
  background: #f5f7fb;
}

body {
  background: #f5f7fb !important;
  color: #1f2937 !important;
  -webkit-font-smoothing: antialiased;
}

.top {
  min-height: 56px !important;
  height: auto !important;
  padding: 10px 20px !important;
  gap: 14px !important;
  box-shadow: none !important;
  border-bottom: 1px solid #e8edf3 !important;
}

.top h1,
.crumbs strong {
  font-size: 17px !important;
  font-weight: 750 !important;
  color: #1f2937 !important;
}

.top a,
.top-back {
  color: #3b82c4 !important;
}

.top-right,
.top-left,
.crumbs {
  flex-wrap: wrap;
}

.wrap,
.page {
  padding: 16px 20px 28px !important;
}

.page-intro,
.intro {
  margin: 0 0 12px !important;
  padding: 10px 12px !important;
  border: 1px solid #e8edf3 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #68758a !important;
  line-height: 1.7 !important;
}

.card,
.panel,
.surface-card,
.quick-item,
.mini-panel,
.mini-card,
.hint-box {
  border-radius: 8px !important;
  border: 1px solid #e8edf3 !important;
  box-shadow: none !important;
}

.card,
.panel {
  padding: 14px !important;
  margin-bottom: 14px !important;
}

.card:has(.card-head) {
  padding: 0 !important;
}

.card h2,
.section-title,
.panel-title {
  margin-bottom: 10px !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  color: #1f2937 !important;
}

.muted,
.card-desc,
.hint,
.surface-card span,
.quick-item span,
.mini-card span {
  color: #68758a !important;
}

input,
select,
textarea {
  border-radius: 6px !important;
  border-color: #d8e0ea !important;
  color: #334155 !important;
  font-size: 13px !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3b82c4 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 196, .12) !important;
}

.btn,
.top-link,
.anchor-link,
button.primary,
button.ghost {
  min-height: 32px !important;
  height: auto !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 13px !important;
  line-height: 30px !important;
}

.btn-prim,
.btn-primary,
button.primary {
  background: #1f9d55 !important;
  color: #fff !important;
  border-color: #1f9d55 !important;
}

.btn-prim:hover,
.btn-primary:hover,
button.primary:hover {
  background: #188747 !important;
  border-color: #188747 !important;
}

.btn-sec,
.btn-gray,
button.ghost,
button.secondary,
.top-link,
.anchor-link {
  background: #fff !important;
  color: #4b5563 !important;
  border: 1px solid #d8e0ea !important;
}

.btn-sec:hover,
.btn-gray:hover,
button.ghost:hover,
button.secondary:hover,
.top-link:hover,
.anchor-link:hover {
  color: #3b82c4 !important;
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
}

.btn-blue,
button.blue {
  background: #3b82c4 !important;
  color: #fff !important;
  border-color: #3b82c4 !important;
}

.btn-blue:hover,
button.blue:hover {
  background: #256fa8 !important;
  border-color: #256fa8 !important;
}

button:disabled,
.btn:disabled {
  opacity: .58 !important;
  cursor: not-allowed !important;
}

.btn-danger,
.btn-dan {
  background: #fff !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

.btn-danger:hover,
.btn-dan:hover {
  background: #fef2f2 !important;
}

.row,
.tools,
.actions {
  gap: 8px !important;
}

.grid {
  gap: 10px 12px !important;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
}

table {
  font-size: 13px !important;
}

th,
td {
  padding: 8px 9px !important;
  border-bottom-color: #edf2f7 !important;
}

th {
  color: #68758a !important;
  background: #fafbfc !important;
  font-weight: 650 !important;
}

tbody tr:hover {
  background: #fbfcfe;
}

.tabs,
.anchor-nav {
  gap: 8px !important;
  margin-bottom: 12px !important;
}

.tab {
  min-height: 32px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  font-size: 13px !important;
}

.tab.active {
  background: #1f9d55 !important;
  border-color: #1f9d55 !important;
  color: #fff !important;
}

.modal {
  border-radius: 10px !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18) !important;
  max-height: min(88vh, 720px) !important;
  overflow: auto !important;
}

.modal h3 {
  margin-top: 0 !important;
}

.modal-actions {
  position: sticky !important;
  bottom: -1px !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin: 12px -18px -18px !important;
  padding: 12px 18px 16px !important;
  border-top: 1px solid #e8edf3 !important;
  background: #fff !important;
}

.modal-actions .btn,
.modal-actions button {
  min-width: 88px !important;
}

.hw-empty {
  padding: 24px 14px !important;
  text-align: center !important;
  color: #68758a !important;
  line-height: 1.7 !important;
}

.hw-empty-title {
  margin-bottom: 4px !important;
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 750 !important;
}

.hw-empty-desc {
  color: #8a96a8 !important;
  font-size: 13px !important;
}

.hw-empty-error .hw-empty-title {
  color: #dc2626 !important;
}

.hw-empty-loading .hw-empty-title {
  color: #3b82c4 !important;
}

.toast {
  position: fixed !important;
  left: 50% !important;
  bottom: 72px !important;
  transform: translateX(-50%) !important;
  display: none !important;
  max-width: min(520px, calc(100vw - 32px)) !important;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  background: rgba(15, 23, 42, .88) !important;
  color: #fff !important;
  font-size: 14px !important;
  z-index: 2000 !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18) !important;
}

.toast.on {
  display: block !important;
}

.dirty-alert,
.modal-alert,
.inline-alert {
  display: none;
  margin: 0 0 12px !important;
  padding: 9px 11px !important;
  border-radius: 8px !important;
  border: 1px solid #fde68a !important;
  background: #fffbeb !important;
  color: #92400e !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
}

.dirty-alert.on,
.modal-alert.on,
.inline-alert.on {
  display: block !important;
}

.status-grid,
.quick-grid,
.summary-grid {
  gap: 12px !important;
}

.status-card,
.summary-card {
  border-radius: 8px !important;
  border: 1px solid #e8edf3 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.status-label,
.summary-card span {
  color: #68758a !important;
  font-size: 12px !important;
}

.status-value,
.summary-card strong {
  color: #1f2937 !important;
  font-weight: 800 !important;
}

.tag,
.status-pill,
.pill {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 22px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 22px !important;
}

.tag-ok,
.tag-green,
.status-ok,
.pill-ok {
  color: #15803d !important;
  background: #dcfce7 !important;
}

.tag-warn,
.tag-yellow,
.status-warn,
.pill-warn,
.pill-off {
  color: #92400e !important;
  background: #fef3c7 !important;
}

.tag-off,
.status-off {
  color: #64748b !important;
  background: #f1f5f9 !important;
}

.tag-red,
.tag-error,
.status-error {
  color: #b91c1c !important;
  background: #fee2e2 !important;
}

.hw-confirm-mask {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, .42);
}

.hw-confirm-mask.on {
  display: flex;
}

.hw-confirm-dialog {
  width: min(380px, 100%);
  max-height: min(86vh, 520px);
  overflow: auto;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e8edf3;
  box-shadow: 0 20px 48px rgba(15, 23, 42, .22);
  padding: 16px;
}

.hw-confirm-dialog.danger {
  border-color: #fecaca;
  box-shadow: 0 20px 48px rgba(127, 29, 29, .18);
}

.hw-confirm-title {
  margin-bottom: 8px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 750;
}

.hw-confirm-dialog.danger .hw-confirm-title {
  color: #b91c1c;
}

.hw-confirm-text {
  color: #5f6b7c;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.hw-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.hw-confirm-actions button {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid #d8e0ea;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  font-size: 13px;
}

.hw-confirm-actions .hw-confirm-ok {
  border-color: #1f9d55;
  background: #1f9d55;
  color: #fff;
}

.hw-confirm-actions .hw-confirm-ok.danger {
  border-color: #dc2626;
  background: #dc2626;
}

.hw-confirm-actions button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 196, .18);
}

.switch-btn {
  box-shadow: none !important;
}

.image-preview,
.thumb {
  border-radius: 8px !important;
  border-color: #e8edf3 !important;
}

@media (max-width: 760px) {
  .top {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .wrap,
  .page {
    padding: 12px !important;
  }

  .hw-confirm-actions {
    flex-direction: column-reverse;
  }

  .hw-confirm-actions button {
    width: 100%;
  }
}
