html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ---------- Table sort links ---------- */
.ow-table-sortLink {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ow-table-sortLink:hover {
  text-decoration: underline;
}

.ow-table-sortIndicator {
  font-size: 12px;
  opacity: 0.75;
}

/* ======================================================
   Wide tables (internal areas): horizontal scroll + compact cells
   Use .ow-table-wrap to avoid squeezed columns on wide schemas.
   ====================================================== */

.ow-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ow-border);
  border-radius: 14px;
}

.ow-table-wrap .ow-table {
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  width: max-content;
  min-width: 100%;
}

.ow-table-wrap .ow-table th,
.ow-table-wrap .ow-table td {
  padding: 8px 10px;
  font-size: 13px;
}

.ow-table-wrap .ow-table th {
  white-space: nowrap;
}

.ow-table-wrap .ow-table td {
  max-width: 520px;
  word-break: break-word;
}

.ow-table-wrap .ow-table tbody tr:hover td {
  background: rgba(255,255,255,.03);
}
/* ======================================================
   Toast / snackbar notifications (client-side)
   ====================================================== */

.ow-toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
  pointer-events: none;
}

.ow-toast {
  pointer-events: auto;
  background: var(--ow-card);
  border: 1px solid var(--ow-border);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

.ow-toast.ow-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.ow-toast-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ow-toast-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
}

.ow-toast-close {
  border: 0;
  background: transparent;
  color: var(--ow-muted);
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.ow-toast-close:hover {
  color: var(--ow-text);
}

.ow-toast-message {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ow-text);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.ow-toast-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.ow-toast-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--ow-border);
  background: transparent;
  color: var(--ow-text);
  text-decoration: none;
  font-size: 13px;
}

.ow-toast-action:hover {
  border-color: var(--ow-accent);
}

.ow-toast-info { border-left: 4px solid var(--ow-accent); }
.ow-toast-success { border-left: 4px solid var(--ow-accent2); }
.ow-toast-warn { border-left: 4px solid var(--ow-warn); }
.ow-toast-error { border-left: 4px solid #ff6b6b; }

@media (max-width: 520px) {
  .ow-toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}
