:root {
  --hx-ui-primary: #0077c8;
  --hx-ui-primary-hover: #005f9f;
  --hx-ui-brand: #009eff;
  --hx-ui-ink: #0f172a;
  --hx-ui-text: #334155;
  --hx-ui-muted: #64748b;
  --hx-ui-line: #dfe7ef;
  --hx-ui-soft: #f5f8fb;
  --hx-ui-hover: #edf7fd;
  --hx-ui-radius: 12px;
  --hx-ui-shadow: 0 8px 26px rgba(15, 23, 42, .065);
}

body.hx-admin-v2,
.hx-admin-v2 button,
.hx-admin-v2 input,
.hx-admin-v2 select,
.hx-admin-v2 textarea {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

.hx-admin-v2 .tab-content {
  color: var(--hx-ui-text);
}

.hx-admin-v2 .tab-content > .toolbar,
.hx-admin-v2 .tab-content > .list-filter-bar,
.hx-admin-v2 .hx-workflow-section,
.hx-admin-v2 .hx-rotation-section,
.hx-admin-v2 .hx-panel,
.hx-admin-v2 .table-container,
.hx-admin-v2 .preview-table,
.hx-admin-v2 .count-summary {
  border-color: var(--hx-ui-line);
  border-radius: var(--hx-ui-radius);
  box-shadow: 0 3px 14px rgba(15, 23, 42, .04);
}

.hx-admin-v2 .toolbar {
  gap: 9px;
  padding: 15px 16px;
  background: #fff;
}

.hx-admin-v2 .btn,
.hx-admin-v2 .row-action-btn,
.hx-admin-v2 .save-btn-inline,
.hx-admin-v2 .hx-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: color .17s ease, background .17s ease, border-color .17s ease, box-shadow .17s ease, transform .17s ease;
}

.hx-admin-v2 .btn:not(:disabled):hover,
.hx-admin-v2 .row-action-btn:not(:disabled):hover,
.hx-admin-v2 .save-btn-inline:not(:disabled):hover,
.hx-admin-v2 .hx-text-button:not(:disabled):hover {
  border-color: #8fc7e7;
  background: var(--hx-ui-hover);
  color: #006ba8;
  box-shadow: 0 5px 12px rgba(0, 119, 200, .1);
  transform: translateY(-1px);
}

.hx-admin-v2 .btn-primary:not(:disabled):hover,
.hx-admin-v2 .hx-action-primary:not(:disabled):hover {
  border-color: var(--hx-ui-primary-hover);
  background: var(--hx-ui-primary-hover);
  color: #fff !important;
  box-shadow: 0 7px 16px rgba(0, 95, 159, .2);
}

.hx-admin-v2 .btn-danger:not(:disabled):hover {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff !important;
  box-shadow: 0 7px 16px rgba(185, 28, 28, .18);
}

.hx-admin-v2 .btn-success:not(:disabled):hover {
  border-color: #087f5b;
  background: #087f5b;
  color: #fff !important;
}

.hx-admin-v2 .btn-warning:not(:disabled):hover {
  border-color: #b65f05;
  background: #b65f05;
  color: #fff !important;
}

.hx-admin-v2 .btn:hover svg,
.hx-admin-v2 .row-action-btn:hover svg,
.hx-admin-v2 .save-btn-inline:hover svg {
  stroke: currentColor;
}

.hx-admin-v2 .batch-toolbar .btn:not(:disabled):hover,
.hx-admin-v2 #tab-space .toolbar .btn:not(:disabled):hover,
.hx-admin-v2 #tab-space .hx-group-controls button:not(:disabled):hover {
  border-color: #8fc7e7;
  background: var(--hx-ui-hover);
  color: #006ba8;
  box-shadow: 0 5px 12px rgba(0, 119, 200, .1);
  transform: translateY(-1px);
}

.hx-admin-v2 #tab-space .toolbar .btn-primary:not(:disabled):hover,
.hx-admin-v2 #tab-space .toolbar .btn-danger:not(:disabled):hover {
  color: #fff !important;
}

.hx-admin-v2 #tab-space .toolbar .btn.hx-action-secondary:not(:disabled):hover {
  border-color: #9fc9df !important;
  background: #edf6fb !important;
  color: #075985 !important;
  box-shadow: 0 4px 11px rgba(7, 89, 133, .09) !important;
}

.hx-admin-v2 input:not([type="checkbox"]):not([type="radio"]),
.hx-admin-v2 select,
.hx-admin-v2 textarea,
.hx-admin-v2 .hx-date-display {
  border-color: #cfd9e5;
  border-radius: 8px;
  color: var(--hx-ui-ink);
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.hx-admin-v2 input:not([type="checkbox"]):not([type="radio"]):hover,
.hx-admin-v2 select:hover,
.hx-admin-v2 textarea:hover,
.hx-admin-v2 .hx-date-display:hover {
  border-color: #8fc7e7;
}

.hx-admin-v2 input:not([type="checkbox"]):not([type="radio"]):focus,
.hx-admin-v2 select:focus,
.hx-admin-v2 textarea:focus,
.hx-admin-v2 .hx-date-display:focus-visible {
  border-color: var(--hx-ui-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 119, 200, .13);
}

.hx-admin-v2 .form-group > label,
.hx-admin-v2 .hx-log-filter-field > span:first-child,
.hx-admin-v2 .hx-project-filter-field > span:first-child {
  color: #536477;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}

.hx-admin-v2 .modal-content {
  overflow: hidden;
  border: 1px solid #dbe5ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .24);
}

.hx-admin-v2 .modal-header {
  min-height: 64px;
  padding: 16px 22px;
  border-bottom: 1px solid #e5ebf1;
  background: #fff;
}

.hx-admin-v2 .modal-header h2 {
  margin: 0;
  color: var(--hx-ui-ink);
  font-size: 18px;
  font-weight: 760;
  line-height: 26px;
}

.hx-admin-v2 .modal-footer {
  min-height: 64px;
  padding: 12px 22px;
  border-top: 1px solid #e5ebf1;
  background: #fbfcfe;
}

.hx-admin-v2 .modal-close,
.hx-admin-v2 .hx-dialog-title-button {
  color: #60758a;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.hx-admin-v2 .modal-close:hover,
.hx-admin-v2 .hx-dialog-title-button:hover {
  border-color: #b8d4e5;
  background: #edf6fc;
  color: #006fae;
}

.hx-admin-v2 .hx-dialog-section-heading h3,
.hx-admin-v2 .hx-rotation-section-heading h3,
.hx-admin-v2 .hx-filter-workflow-heading h3 {
  color: #17364d;
  font-size: 15px;
  font-weight: 760;
}

.hx-admin-v2 .hx-dialog-section-heading p,
.hx-admin-v2 .hx-rotation-section-heading p,
.hx-admin-v2 .hx-filter-workflow-heading p,
.hx-admin-v2 .hint-text {
  color: #74869a;
  font-size: 12px;
  line-height: 19px;
}

.hx-admin-v2 table thead th {
  height: 42px;
  padding: 9px 11px;
  border-bottom-color: #dce5ed;
  background: #f5f8fb;
  color: #526477;
  font-size: 12px;
  font-weight: 750;
}

.hx-admin-v2 table tbody td {
  height: 46px;
  padding: 9px 11px;
  border-bottom-color: #e9eef3;
  color: #334155;
}

.hx-admin-v2 table tbody tr:not(.property-city-group):not(.space-city-group):hover td {
  background: #f7fbfe;
}

.hx-admin-v2 input[type="checkbox"],
.hx-admin-v2 input[type="radio"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  accent-color: var(--hx-ui-primary);
}

/* One checkbox language across tables, filters and dialogs. */
.hx-admin-v2 input[type="checkbox"] {
  position: relative;
  box-sizing: border-box;
  width: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  height: 15px !important;
  min-height: 15px !important;
  max-height: 15px !important;
  flex: 0 0 15px !important;
  padding: 0 !important;
  appearance: none;
  border: 1px solid #9eafbd;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
}

.hx-admin-v2 input[type="checkbox"]:checked {
  border-color: #477f9f;
  background: #477f9f;
}

.hx-admin-v2 input[type="checkbox"]:checked::after {
  position: absolute;
  top: 2px;
  left: 4px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  content: "";
  transform: rotate(45deg);
}

.hx-admin-v2 input[type="checkbox"]:indeterminate {
  border-color: #477f9f;
  background: #477f9f;
}

.hx-admin-v2 input[type="checkbox"]:indeterminate::after {
  position: absolute;
  top: 6px;
  left: 3px;
  width: 7px;
  height: 1.5px;
  border-radius: 1px;
  background: #fff;
  content: "";
}

.hx-admin-v2 input[type="checkbox"]:disabled {
  border-color: #cbd5df;
  background: #eef2f5;
  cursor: not-allowed;
  opacity: .72;
}

.hx-admin-v2 #tab-log .table-container {
  min-height: 540px;
}

.hx-admin-v2 #logTable tbody tr {
  height: 48px;
}

.hx-admin-v2 .log-pagination-bar {
  border-top: 1px solid #e8eef3;
  background: #fbfcfe;
}

/* White functional actions use the same restrained hover treatment as Point Archive Maintenance. */
.hx-admin-v2 .hx-action-secondary:not(:disabled):hover,
.hx-admin-v2 .row-action-btn:not(:disabled):hover,
.hx-admin-v2 .hx-text-button:not(:disabled):hover,
.hx-admin-v2 .btn:not(.btn-primary):not(.btn-danger):not(.btn-success):not(.btn-warning):not(:disabled):hover {
  border-color: #9fc9df;
  background: #edf6fb;
  color: #075985 !important;
  box-shadow: 0 4px 11px rgba(7, 89, 133, .09);
}

/* Placement property picker: dense cards show substantially more properties in the same dialog. */
.hx-admin-v2 #filterPropertyList.compact-property-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
  max-height: 318px;
  min-height: 148px;
  padding: 8px;
  border: 1px solid #dfe7ef;
  border-radius: 10px;
  background: #f8fafc;
}

.hx-admin-v2 #filterPropertyList .property-grid-header {
  position: sticky;
  top: -8px;
  z-index: 4;
  display: flex;
  grid-column: 1 / -1;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  margin: -8px -8px 1px;
  padding: 0 11px;
  border-bottom: 1px solid #dfe7ef;
  background: #fff;
}

.hx-admin-v2 #filterPropertyList .property-grid-header strong {
  color: #31475a;
  font-size: 12px;
}

.hx-admin-v2 #filterPropertyList .property-grid-header > span:last-child {
  margin-left: auto;
  color: #8291a1;
  font-size: 11px;
}

.hx-admin-v2 #filterPropertyList > label.property-choice-card {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 9px !important;
  border: 1px solid #dde6ed !important;
  border-radius: 8px !important;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.hx-admin-v2 #filterPropertyList > label.property-choice-card:hover {
  border-color: #aecfe1 !important;
  background: #f4f9fc;
}

.hx-admin-v2 #filterPropertyList > label.property-choice-card:has(input:checked) {
  border-color: #92bfd8 !important;
  background: #eef6fa;
  box-shadow: none;
}

.hx-admin-v2 #filterPropertyList .property-choice-copy {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #263c4d;
  font-size: 12px;
  font-weight: 650;
}

.hx-admin-v2 #filterPropertyList > label.property-choice-card > small {
  flex: 0 0 auto;
  margin-left: auto;
  color: #8190a0;
  font-size: 11px;
  white-space: nowrap;
}

/* Statistics use the same density and rhythm on every resource page. */
.hx-admin-v2 #propertySummary.summary-grid,
.hx-admin-v2 #spaceSummary.summary-grid,
.hx-admin-v2 #projectSummary.summary-grid {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.hx-admin-v2 #propertySummary.summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hx-admin-v2 #spaceSummary.summary-grid,
.hx-admin-v2 #projectSummary.summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.hx-admin-v2 #propertySummary .summary-card,
.hx-admin-v2 #spaceSummary .summary-card,
.hx-admin-v2 #projectSummary .summary-card {
  min-height: 82px;
  padding: 14px 15px;
  border: 1px solid #e3eaf0;
  border-radius: 10px;
  box-shadow: 0 2px 9px rgba(15, 23, 42, .035);
}

.hx-admin-v2 #propertySummary .summary-card .label,
.hx-admin-v2 #spaceSummary .summary-card .label,
.hx-admin-v2 #projectSummary .summary-card .label {
  margin: 0;
  color: #718096;
  font-size: 12px;
  font-weight: 650;
  line-height: 18px;
}

.hx-admin-v2 .summary-card-label-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
}

.hx-admin-v2 .hx-summary-card-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 7px;
  background: #edf3f7;
  color: #557489;
}

.hx-admin-v2 .hx-summary-card-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hx-admin-v2 .summary-card.is-live .hx-summary-card-icon { background: #eaf5fb; color: #24779e; }
.hx-admin-v2 .summary-card.is-locked .hx-summary-card-icon { background: #f5f0e8; color: #8b6a37; }
.hx-admin-v2 .summary-card.is-free .hx-summary-card-icon { background: #edf6f2; color: #3f7f69; }
.hx-admin-v2 .summary-card.is-alert .hx-summary-card-icon { background: #fbefef; color: #a95454; }

.hx-admin-v2 #propertySummary .summary-card .value,
.hx-admin-v2 #spaceSummary .summary-card .value,
.hx-admin-v2 #projectSummary .summary-card .value {
  margin-top: 7px;
  color: #172f43;
  font-size: 23px;
  font-weight: 750;
  line-height: 28px;
}

.hx-admin-v2 .hx-project-page {
  gap: 12px;
}

.hx-admin-v2 .hx-project-page > .hx-project-filter-bar,
.hx-admin-v2 .hx-project-page > .hx-project-filter-note,
.hx-admin-v2 .hx-project-page > .summary-grid,
.hx-admin-v2 .hx-project-page > .table-container {
  margin: 0;
}

.hx-admin-v2 .hx-filter-workflow-section,
.hx-admin-v2 .hx-workflow-section {
  border-left-width: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .hx-admin-v2 *,
  .hx-admin-v2 *::before,
  .hx-admin-v2 *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
