/* Work Order Pro brand overrides for Hyper Saas */
:root,
[data-bs-theme='light'] {
  --ct-primary: #1a7f5f;
  --ct-primary-rgb: 26, 127, 95;
  --ct-link-color: #1a7f5f;
  --ct-link-hover-color: #146349;
  --ct-menu-item-hover-color: #1a7f5f;
  --ct-menu-item-active-color: #1a7f5f;
}

[data-bs-theme='dark'] {
  --ct-primary: #2db88a;
  --ct-primary-rgb: 45, 184, 138;
  --ct-link-color: #2db88a;
  --ct-link-hover-color: #4fd4a6;
}

.btn-primary {
  --ct-btn-bg: var(--ct-primary);
  --ct-btn-border-color: var(--ct-primary);
  --ct-btn-hover-bg: #146349;
  --ct-btn-hover-border-color: #146349;
  --ct-btn-active-bg: #146349;
  --ct-btn-active-border-color: #146349;
}

.bg-primary,
.badge.bg-primary,
.text-bg-primary {
  background-color: var(--ct-primary) !important;
}

.text-primary {
  color: var(--ct-primary) !important;
}

.border-primary {
  border-color: var(--ct-primary) !important;
}

/* Hyper component helpers */

.hyper-upload-drag {
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hyper-upload-drag:hover,
.hyper-upload-drag.is-dragover {
  border-color: var(--ct-primary) !important;
  background-color: rgba(var(--ct-primary-rgb), 0.04) !important;
}

.hyper-upload.is-disabled,
.hyper-upload.is-disabled .hyper-upload-drag {
  opacity: 0.65;
  pointer-events: none;
  cursor: not-allowed;
}

.hyper-upload-icon {
  font-size: 2.5rem;
  color: var(--ct-primary);
  margin-bottom: 0.5rem;
}

.hyper-upload-text {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.hyper-upload-hint {
  font-size: 0.875rem;
}

.hyper-statistic-prefix {
  display: inline-flex;
  align-items: center;
}

.app-data-table thead th {
  white-space: nowrap;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.data-table-sort-header {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.data-table-card .card-body {
  padding: 0;
}

.data-table-card .card-header {
  background: transparent;
}

/* Keep app content readable while Hyper shell is active */
.content-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* PageLayout fills the column; avoid Hyper's extra horizontal padding stacking */
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.content-page .app-page-layout {
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* Footer is in the flex column, not absolutely pinned over content */
.content-page .app-page-layout > .footer {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex-shrink: 0;
  height: auto;
  min-height: var(--ct-footer-height, 60px);
}

.page-title-box h4 {
  margin: 0;
}

/* Toast host for Hyper notifications */
.hyper-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}
