/* Public UI refinements. Kept separate from the AdminLTE overrides so the
 * public site can evolve without changing admin modules. */
:root {
  --xv-primary: #10b981;
  --xv-primary-dark: #047857;
  --xv-ink: #0f172a;
  --xv-muted: #64748b;
  --xv-border: #e2e8f0;
  --xv-surface: #ffffff;
  --xv-focus: rgba(16, 185, 129, .28);
}

html { scroll-behavior: smooth; }
body { color: var(--xv-ink); background: #f8fafc; }

/* Consistent keyboard focus across links, controls, and custom buttons. */
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--xv-focus) !important;
  outline-offset: 2px;
}

/* Prevent long tables and forms from breaking mobile layouts. */
.table-responsive, .table-wrap, .dataTables_wrapper { overflow-x: auto; }
input, select, textarea { max-width: 100%; }

button, .btn, input[type="submit"], input[type="button"] {
  min-height: 40px;
  border-radius: 10px;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

button:not(:disabled):hover, .btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.btn-primary, .btn-success {
  background-color: var(--xv-primary);
  border-color: var(--xv-primary);
}
.btn-primary:hover, .btn-success:hover,
.btn-primary:focus, .btn-success:focus {
  background-color: var(--xv-primary-dark);
  border-color: var(--xv-primary-dark);
}

.xv-skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100000;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--xv-ink);
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.xv-skip-link:focus { transform: translateY(0); color: #fff; }

.xv-page-loading {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, .72);
  backdrop-filter: blur(2px);
}

@media (max-width: 767px) {
  .container { width: 100%; padding-left: 18px; padding-right: 18px; }
  .table { min-width: 620px; }
  .btn { white-space: normal; }
}

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