.backoffice-shell {
  min-height: 100vh;
  background: #f4f7fb;
  color: #172033;
}

.backoffice-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}

.backoffice-nav-container {
  padding: .75rem 1.25rem;
}

.backoffice-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #101827;
  font-weight: 800;
}

.backoffice-brand:hover {
  color: #101827;
}

.backoffice-brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #1f6feb;
  color: #fff;
  font-size: .82rem;
  font-weight: 850;
}

.backoffice-nav {
  gap: .2rem;
  margin-left: 1rem;
}

.backoffice-nav .nav-link {
  border-radius: 8px;
  color: #5f6b7a;
  font-weight: 650;
  padding: .55rem .8rem;
}

.backoffice-nav .nav-link:hover,
.backoffice-nav .nav-link.active {
  background: #eaf1ff;
  color: #1f5fd0;
}

.backoffice-actions {
  align-items: center;
}

.backoffice-logout {
  border-radius: 8px;
  font-weight: 650;
}

.backoffice-main-wrap {
  padding: 1.5rem 0 2rem;
}

.backoffice-main {
  max-width: 1220px;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
}

.backoffice-footer {
  color: #7b8794;
  font-size: .9rem;
  padding: 1.5rem 0 2rem;
}

.bo-breadcrumbs {
  margin-bottom: .85rem;
}

.bo-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  margin: 0;
  padding: 0;
  color: #64748b;
  font-size: .86rem;
  list-style: none;
}

.bo-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: .35rem;
  color: #94a3b8;
}

.bo-breadcrumbs a {
  color: #1f5fd0;
  text-decoration: none;
}

.bo-breadcrumbs a:hover {
  text-decoration: underline;
}

.bo-flash-message {
  border-radius: 8px;
  margin-bottom: 1rem;
}

.bo-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.bo-eyebrow {
  margin-bottom: .35rem;
  color: #1f6feb;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bo-page-header h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 850;
  letter-spacing: 0;
}

.bo-page-subtitle,
.bo-card-header p,
.bo-empty-state p {
  margin: .4rem 0 0;
  color: #64748b;
  line-height: 1.65;
}

.bo-primary-action {
  border-radius: 8px;
  font-weight: 750;
  padding: .7rem 1rem;
  white-space: nowrap;
}

.bo-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dashboard-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bo-summary-card,
.bo-card,
.bo-empty-state {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .06);
}

.bo-summary-card {
  padding: 1.15rem;
}

.dashboard-summary-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dashboard-summary-link:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 111, 235, .35);
  color: inherit;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
}

.bo-summary-label {
  display: block;
  color: #64748b;
  font-size: .86rem;
  font-weight: 700;
}

.bo-summary-card strong {
  display: block;
  margin-top: .35rem;
  color: #111827;
  font-size: 2rem;
  line-height: 1;
}

.dashboard-domain-name {
  overflow-wrap: anywhere;
  font-size: 1.35rem !important;
  line-height: 1.25 !important;
}

.bo-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  padding: 1.15rem 1.25rem;
}

.bo-card-header h2,
.bo-empty-state h2 {
  margin: 0;
  color: #111827;
  font-size: 1.15rem;
  font-weight: 800;
}

.bo-table-wrap {
  overflow-x: auto;
}

.bo-table {
  min-width: 820px;
  margin: 0;
}

.domain-setup-table {
  min-width: 1180px;
}

.bo-table thead th {
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  color: #64748b;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .06em;
  padding: .9rem 1.25rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.bo-table tbody td {
  border-color: rgba(15, 23, 42, .06);
  padding: 1rem 1.25rem;
}

.bo-site-cell {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 220px;
}

.bo-site-avatar {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef4ff;
  color: #1f5fd0;
  font-weight: 850;
}

.bo-site-cell strong {
  display: block;
  color: #111827;
  font-weight: 800;
}

.bo-site-cell span:not(.bo-site-avatar) {
  display: block;
  color: #64748b;
  font-size: .9rem;
}

.bo-code {
  display: inline-flex;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  padding: .22rem .45rem;
}

.bo-dns-box {
  height: 100%;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  background: #f8fafc;
  padding: 1rem;
}

.bo-dns-box h3 {
  margin: 0 0 .8rem;
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
}

.bo-dns-box dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: .5rem .8rem;
  margin: 0;
}

.bo-dns-box dt {
  color: #64748b;
  font-weight: 800;
}

.bo-dns-box dd {
  margin: 0;
  color: #334155;
}

.bo-dns-mini {
  display: grid;
  gap: .25rem;
  min-width: 180px;
}

.bo-dns-mini span {
  color: #475569;
  font-weight: 750;
}

.bo-dns-mini code {
  width: fit-content;
}

.bo-help-text {
  max-width: 260px;
  margin-top: .35rem;
  color: #64748b;
  font-size: .85rem;
  line-height: 1.45;
}

.bo-theme-chip {
  display: inline-flex;
  border: 1px solid rgba(31, 111, 235, .18);
  border-radius: 999px;
  background: #f5f8ff;
  color: #1f5fd0;
  font-size: .82rem;
  font-weight: 750;
  padding: .28rem .65rem;
}

.bo-status {
  border-radius: 999px;
  font-weight: 750;
  padding: .42rem .65rem;
}

.bo-status-active {
  background: #dcfce7;
  color: #166534;
}

.bo-status-inactive {
  background: #f1f5f9;
  color: #64748b;
}

.bo-status-warning {
  background: #fef3c7;
  color: #92400e;
}

.bo-status-danger {
  background: #fee2e2;
  color: #991b1b;
}

.bo-action-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
}

.bo-action-group .btn {
  border-radius: 8px;
  font-weight: 700;
}

.bo-empty-state {
  display: grid;
  justify-items: center;
  padding: 3rem 1.25rem;
  text-align: center;
}

.bo-empty-state-inline {
  border: 0;
  box-shadow: none;
  padding: 2.5rem 1rem;
}

.bo-empty-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: #eaf1ff;
  color: #1f5fd0;
  font-size: 2rem;
  font-weight: 700;
}

.bo-empty-state p {
  max-width: 520px;
  margin-bottom: 1.25rem;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-action {
  display: grid;
  gap: .35rem;
  min-height: 112px;
  align-content: start;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  background: #f8fafc;
  color: #172033;
  padding: 1rem;
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dashboard-action:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 111, 235, .35);
  color: #172033;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
}

.dashboard-action strong {
  color: #111827;
  font-weight: 850;
}

.dashboard-action span {
  color: #64748b;
  line-height: 1.5;
}

.dashboard-action-disabled {
  cursor: not-allowed;
  opacity: .72;
}

.template-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.template-option {
  display: flex;
  height: 100%;
  gap: .85rem;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  padding: 1rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.template-option:hover,
.template-option:has(input:checked) {
  border-color: #1f6feb;
  box-shadow: 0 14px 28px rgba(31, 111, 235, .12);
}

.template-option input {
  margin-top: .25rem;
}

.template-option span {
  display: grid;
  gap: .35rem;
}

.template-option strong {
  color: #111827;
  font-size: 1rem;
}

.template-option small {
  color: #64748b;
  line-height: 1.5;
}

.template-option em {
  width: fit-content;
  border-radius: 999px;
  background: #eef4ff;
  color: #1f5fd0;
  font-size: .78rem;
  font-style: normal;
  font-weight: 800;
  padding: .22rem .55rem;
}

.media-picker-card {
  overflow: hidden;
}

.media-picker-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eef2f7;
}

@media (max-width: 991.98px) {
  .backoffice-nav {
    margin: .8rem 0 0;
  }

  .backoffice-actions {
    margin-top: .75rem;
  }

  .backoffice-logout {
    width: 100%;
  }

  .bo-page-header {
    flex-direction: column;
  }

  .bo-primary-action {
    width: 100%;
  }

  .bo-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-action-grid {
    grid-template-columns: 1fr;
  }

  .bo-action-group {
    justify-content: flex-start;
  }

  .template-option-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .backoffice-nav-container,
  .backoffice-main {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .backoffice-main-wrap {
    padding-top: 1rem;
  }

  .bo-card-header {
    padding: 1rem;
  }

  .bo-table {
    min-width: 720px;
  }
}
