:root {
  --paper: #f4f6f8;
  --ink: #12243a;
  --accent: #0f5ea8;
}

body.bg-paper {
  background: radial-gradient(circle at top right, #e6eff7 0%, var(--paper) 45%, #edf2f6 100%);
  color: var(--ink);
}

.shadow-card {
  border: 1px solid #dae3ec;
  box-shadow: 0 16px 40px rgba(18, 36, 58, 0.08);
}

.metric-box {
  border: 1px solid #dce6f2;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  background: #f8fbff;
}

code {
  color: var(--accent);
  word-break: break-all;
}

.container-narrow {
  max-width: 720px;
}

.mobile-stack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-responsive-mobile {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.actions-cell {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.actions-cell form {
  margin: 0;
}

.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #334155;
  background: transparent;
  border: 0;
  border-radius: 0.375rem;
  text-decoration: none;
}

.icon-action:hover {
  background: #e9eef5;
  color: #0f172a;
}

.terms{font-size: 11px!important;}

.icon-action.danger {
  color: #b91c1c;
}

.icon-action.danger:hover {
  background: #fee2e2;
  color: #991b1b;
}

.simulation-ribbon {
  margin: 0;
  padding: 0.35rem 0.75rem;
  background: #fff3cd;
  color: #5c4300;
  border-top: 1px solid #ffe8a1;
  border-bottom: 1px solid #ffe8a1;
  font-size: 0.875rem;
}

.amount-feature {
  background: linear-gradient(135deg, #e8f3ff 0%, #f7fbff 100%);
  border: 1px solid #cfe2f5;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.amount-feature-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4f6780;
  margin-bottom: 0.1rem;
}

.amount-feature-value {
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1;
  font-weight: 700;
  color: #0a3d70;
}

.proceed-btn-tall {
  min-height: 8.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.admin-tile {
  border: 1px solid #dbe7f3;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 1rem;
  height: 100%;
}

.admin-tile-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.admin-tile-link:hover .admin-tile {
  border-color: #b9d2ea;
  box-shadow: 0 8px 20px rgba(15, 94, 168, 0.08);
}

.admin-tile h2 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.admin-tile p {
  color: #4f6780;
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.tenant-config-form .form-control,
.tenant-config-form .form-select {
  width: 200px;
  max-width: 100%;
}

.flash-banner {
  border-width: 1px;
  border-style: solid;
  border-radius: 0.9rem;
  padding: 0.95rem 1rem;
  box-shadow: 0 12px 28px rgba(18, 36, 58, 0.08);
}

.flash-banner-error {
  color: #7f1d1d;
  background: linear-gradient(180deg, #fff6f5 0%, #ffeceb 100%);
  border-color: #f6c6c1;
}

.flash-banner-info {
  color: #14532d;
  background: linear-gradient(180deg, #f3fff8 0%, #e8fff1 100%);
  border-color: #b7e4c7;
}

.flash-banner-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 1rem;
  flex: 0 0 auto;
}

.flash-banner-error .flash-banner-icon {
  background: rgba(185, 28, 28, 0.12);
  color: #b91c1c;
}

.flash-banner-info .flash-banner-icon {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.flash-banner-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

@media (max-width: 991.98px) {
  .navbar .navbar-collapse .text-white-50 {
    display: block;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
  }
}

@media (max-width: 767.98px) {
  main.container {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .shadow-card {
    box-shadow: 0 10px 24px rgba(18, 36, 58, 0.08);
  }

  .shadow-card.p-4 {
    padding: 1rem !important;
  }

  .btn {
    width: 100%;
  }

  .mobile-stack .btn {
    width: auto;
    flex: 1 1 100%;
  }

  .actions-inline .btn {
    width: auto;
  }

  .actions-inline .icon-action {
    width: 2rem;
    flex: 0 0 auto;
  }

  .table {
    min-width: 640px;
  }
}
