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;
  background-color: #f6f8fb;
  color: #1f2937;
}

.navbar {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(8px);
}

.dashboard-stat-card {
  border-radius: 1rem;
  box-shadow: 0 0.35rem 1.25rem rgba(31, 41, 55, 0.06);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.dashboard-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.6rem 1.5rem rgba(31, 41, 55, 0.1);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  font-size: 1.35rem;
}

.card {
  border-radius: 1rem;
}

.table > :not(caption) > * > * {
  padding: 1rem 1.25rem;
}

.provider-logo {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  font-weight: 800;
  color: #fff;
}

.provider-logo-bale {
  background: linear-gradient(135deg, #087fdb, #1953c6);
}

.provider-logo-ai {
  background: linear-gradient(135deg, #7537d4, #c136a4);
  font-size: 0.75rem;
}

.identifier-box {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
}

.identifier-box code {
  color: #111827;
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.empty-state-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
  font-size: 1.5rem;
}

code {
  direction: ltr;
  unicode-bidi: plaintext;
}

.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;
}

.validation-summary-valid {
  display: none;
}

.field-validation-valid {
  display: none;
}

.profile-avatar {
  width: 5rem;
  height: 5rem;
  object-fit: cover;
}

/* ===== Outbox management page (Admin/OutgoingMessages) ===== */
.outbox-page .breadcrumb {
  --bs-breadcrumb-divider: "‹";
}

.outbox-stat-card {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 0.35rem 1.25rem rgba(31, 41, 55, 0.06);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
  border-inline-start: 0.35rem solid var(--bs-border-color);
  color: inherit;
}

.outbox-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.6rem 1.5rem rgba(31, 41, 55, 0.12);
}

.outbox-stat-card.outbox-stat-warning {
  border-inline-start-color: var(--bs-warning);
}
.outbox-stat-card.outbox-stat-primary {
  border-inline-start-color: var(--bs-primary);
}
.outbox-stat-card.outbox-stat-success {
  border-inline-start-color: var(--bs-success);
}
.outbox-stat-card.outbox-stat-danger {
  border-inline-start-color: var(--bs-danger);
}
.outbox-stat-card.outbox-stat-info {
  border-inline-start-color: var(--bs-info);
}
.outbox-stat-card.outbox-stat-secondary {
  border-inline-start-color: var(--bs-secondary);
}

.outbox-stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  font-size: 1.25rem;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  flex: 0 0 auto;
}

.outbox-health-item {
  background: var(--bs-tertiary-bg);
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  height: 100%;
}

.outbox-empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
  font-size: 1.5rem;
}

.outbox-table-wrap {
  max-width: 100%;
}

.outbox-table {
  min-width: 68rem;
}

.outbox-table > :not(caption) > * > * {
  padding: 0.75rem 0.85rem;
  vertical-align: middle;
}

.outbox-table thead th {
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 600;
}

.outbox-col-id {
  width: 4.5rem;
}
.outbox-col-kind {
  width: 8.5rem;
}
.outbox-col-group {
  width: 10rem;
}
.outbox-col-content {
  width: auto;
}
.outbox-col-state {
  width: 8rem;
}
.outbox-col-attempt {
  width: 4.5rem;
}
.outbox-col-date {
  width: 8.5rem;
}
.outbox-col-actions {
  width: 15rem;
}

.outbox-group-cell {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outbox-summary,
.outbox-error {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.85rem;
  line-height: 1.6;
}

.outbox-summary {
  color: var(--bs-body-color);
}

.outbox-error {
  margin-top: 0.25rem;
  font-size: 0.78rem;
}

.outbox-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.outbox-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.outbox-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  border-radius: 0.6rem;
}

@media (max-width: 767.98px) {
  .outbox-table > :not(caption) > * > * {
    padding: 0.6rem 0.65rem;
  }

  .outbox-actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .outbox-actions .btn {
    padding-inline: 0.5rem;
  }
}
