/* theme-override.css - Global integration overrides for Halvest Presentation Layer */

/* Enforce Halvest action purple across all primary UI atoms */
:root {
  --color-primary: #6935d3 !important;
  --color-primary-rgb: 105 53 211 !important;
  --ring: var(--hv-action) !important;
  --ring-soft: rgba(105, 53, 211, 0.25) !important;
}

/* Override existing .btn-primary utility to match Halvest specification */
.btn-primary,
button.btn-primary,
a.btn-primary {
  background-color: var(--hv-action) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 3px 6px rgba(105, 53, 211, 0.18) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: background-color 120ms cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover {
  background-color: #5828bd !important;
}

.btn-primary:active,
button.btn-primary:active,
a.btn-primary:active {
  background-color: #49209e !important;
}

/* Override .input styling to enforce 8px radius and Halvest focus states */
.input:focus,
input.input:focus,
textarea.input:focus {
  border-color: var(--hv-action) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(105, 53, 211, 0.25) !important;
}

/* Ensure focus-visible rings adhere to Halvest action purple */
:focus-visible {
  outline-color: var(--hv-action) !important;
}

/* Card radius normalization */
.card,
.white-box {
  border-radius: 12px !important;
}

/* Halvest Badge Styling */
.badge-primary,
.badge.bg-primary {
  background-color: var(--hv-purple-tint) !important;
  color: var(--hv-action) !important;
  font-weight: 500 !important;
}

/* Auth / Login Centering & Left Hero Panel Suppression */
.login-bg {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  grid-template-columns: 1fr !important;
  min-height: 100vh !important;
  width: 100% !important;
}

.login-bg > div:first-child:not(:only-child) {
  display: none !important;
}

.login-bg > div:last-child {
  width: 100% !important;
  max-width: 480px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Ensure the full Halvest logo displays cleanly above form title */
.login-bg > div:last-child img[src*="/logo/logo-"] {
  height: 38px !important;
  max-height: 44px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
  display: inline-block !important;
}

.login-bg > div:last-child div:has(> img[src*="/logo/logo-"]) {
  background: transparent !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  width: auto !important;
  min-width: 0 !important;
}

/* Telemetry & Error Catching Panel */
.hv-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.hv-telemetry-metric {
  background-color: var(--hv-surface, #ffffff);
  border: 1px solid var(--hv-line-soft, #f2f2f7);
  border-radius: var(--hv-radius-card, 12px);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(19, 30, 61, 0.04);
}

.dark .hv-telemetry-metric {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.hv-log-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.hv-log-table th {
  background-color: var(--hv-neutral-tint, #f0f0f5);
  color: var(--hv-text-secondary, #6d6e73);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--hv-line-soft, #f2f2f7);
}

.dark .hv-log-table th {
  background-color: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.hv-log-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--hv-line-soft, #f2f2f7);
  vertical-align: top;
}

.dark .hv-log-table td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.hv-log-trace {
  max-height: 250px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-all;
  background-color: #0f172a;
  color: #f8fafc;
  padding: 0.75rem;
  border-radius: 6px;
  margin-top: 0.5rem;
}


