:root {
  --bll-navy: #061b2f;
  --bll-navy-2: #0b2f4a;
  --bll-blue: #43c3ee;
  --bll-blue-2: #2fb8e7;
  --bll-blue-soft: #eaf8fd;
  --page-bg: #f2fbff;
  --panel: #ffffff;
  --line: #d4e3ec;
  --ink: #20252b;
  --muted: #637381;
  --success: #0b7a66;
  --shadow: 0 22px 60px rgba(3, 26, 51, .11);
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 14% 16%, rgba(67, 195, 238, .16), transparent 24rem),
    radial-gradient(circle at 86% 12%, rgba(6, 27, 47, .07), transparent 22rem),
    var(--page-bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 80px 0 auto 0;
  height: 640px;
  pointer-events: none;
  opacity: .42;
  background-image:
    linear-gradient(90deg, rgba(3, 26, 51, .12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(3, 26, 51, .08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 252, 255, .92);
  border-bottom: 1px solid rgba(3, 26, 51, .08);
  backdrop-filter: blur(16px);
}

.navbar {
  min-height: 88px;
}

.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: 0;
  margin-right: 2rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  padding: 0;
}

.brand-mark-bll img {
  width: auto;
  height: 74px;
  object-fit: contain;
  display: block;
}

.brand-mark-bb img {
  width: auto;
  height: 74px;
  object-fit: contain;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 58px;
  background: rgba(3, 26, 51, .14);
}

.navbar-nav {
  align-items: center;
  gap: .35rem;
}

.nav-link {
  color: var(--bll-navy);
  font-weight: 700;
  padding-inline: .85rem !important;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--bll-blue-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.settings-form {
  max-width: 980px;
}

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

.main-shell {
  position: relative;
  min-height: calc(100vh - 150px);
  padding: 0 0 4rem;
}

.container-content {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(380px, .68fr);
  gap: 2.4rem;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  color: var(--bll-navy-2);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
}

.eyebrow::before {
  content: "";
  width: 2.25rem;
  height: 3px;
  border-radius: 999px;
  background: var(--bll-blue);
}

.hero h1,
.page-panel h1 {
  color: var(--bll-navy);
  font-weight: 850;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.35rem, 5vw, 4.85rem);
  line-height: 1.02;
  margin-bottom: 1rem;
}

.hero-lead {
  max-width: 660px;
  color: #3f4d5a;
  font-size: 1.13rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.query-card,
.page-panel {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(151, 190, 210, .58);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.query-card {
  padding: 1.25rem;
}

.query-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.query-card-title h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 850;
  color: var(--bll-navy);
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .4rem .62rem;
  background: var(--bll-blue-soft);
  color: var(--bll-navy);
  font-size: .82rem;
  font-weight: 800;
}

.notice-box {
  margin: 1rem 0;
  padding: .85rem 1rem;
  border: 1px solid rgba(67, 195, 238, .45);
  border-left: 4px solid var(--bll-blue);
  border-radius: 8px;
  background: var(--bll-blue-soft);
  color: var(--bll-navy);
  font-weight: 700;
}

.page-panel {
  width: min(1440px, calc(100% - 2rem));
  margin: 2rem auto 1.25rem;
  padding: 1.5rem;
}

.admin-panel {
  width: min(1680px, calc(100% - 2rem));
}

.social-follow {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 2rem));
  margin: -1.5rem auto 3rem;
  padding: 1.05rem 1.2rem 1.25rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #1f394f, var(--bll-navy));
  box-shadow: 0 18px 44px rgba(3, 26, 51, .18);
  text-align: center;
}

.social-follow h2 {
  margin: 0 0 .85rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
}

.social-icon-row {
  display: flex;
  justify-content: center;
  gap: .85rem;
  flex-wrap: wrap;
}

.social-icon-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}

.social-icon-row a:hover,
.social-icon-row a:focus {
  transform: translateY(-2px);
  background: var(--bll-blue);
  border-color: var(--bll-blue);
  color: var(--bll-navy);
}

.social-icon-row span {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 900;
}

.social-icon-row svg {
  width: 24px;
  height: 24px;
  display: block;
}

.narrow {
  max-width: 620px;
}

.stack {
  display: grid;
  gap: .75rem;
}

.muted {
  color: var(--muted);
}

.form-control,
.form-select {
  border-color: #cbdce6;
  border-radius: 8px;
  padding: .72rem .85rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bll-blue);
  box-shadow: 0 0 0 .22rem rgba(57, 188, 232, .18);
}

label {
  color: var(--bll-navy);
  font-weight: 750;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.button-row,
.search-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-row {
  margin-bottom: 1rem;
}

.search-row .form-control {
  max-width: 420px;
}

.btn {
  border-radius: 8px;
  font-weight: 800;
}

.btn-primary {
  background: var(--bll-navy);
  border-color: var(--bll-navy);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--bll-blue-2);
  border-color: var(--bll-blue-2);
}

.btn-outline-primary {
  color: var(--bll-navy);
  border-color: var(--bll-blue);
}

.btn-outline-primary:hover {
  background: var(--bll-blue);
  border-color: var(--bll-blue);
  color: var(--bll-navy);
}

.btn-outline-secondary {
  border-color: #b8c8d5;
  color: var(--bll-navy);
}

.btn-outline-secondary:hover {
  background: var(--bll-navy);
  border-color: var(--bll-navy);
  color: #fff;
}

.code-input {
  max-width: 13rem;
  letter-spacing: .24rem;
  font-size: 1.45rem;
  font-weight: 850;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: var(--bll-navy);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom-color: #bed5e2;
}

.table tbody td {
  border-color: #d8e6ee;
  vertical-align: middle;
}

.inline-form {
  display: inline-block;
  margin-left: .25rem;
}

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

.admin-cert-table {
  table-layout: fixed;
  min-width: 1380px;
  font-size: .93rem;
}

.admin-cert-table th:nth-child(1),
.admin-cert-table td:nth-child(1) {
  width: 300px;
}

.admin-cert-table th:nth-child(2),
.admin-cert-table td:nth-child(2) {
  width: 190px;
}

.admin-cert-table th:nth-child(3),
.admin-cert-table td:nth-child(3) {
  width: 360px;
}

.admin-cert-table th:nth-child(4),
.admin-cert-table td:nth-child(4) {
  width: 95px;
}

.admin-cert-table th:nth-child(5),
.admin-cert-table td:nth-child(5) {
  width: 115px;
}

.admin-cert-table th:nth-child(6),
.admin-cert-table td:nth-child(6) {
  width: 70px;
}

.admin-cert-table th:nth-child(7),
.admin-cert-table td:nth-child(7) {
  width: 340px;
}

.admin-wrap-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.35;
}

.admin-actions {
  white-space: nowrap;
}

.admin-actions .btn-sm {
  padding: .38rem .58rem;
  line-height: 1.15;
}

.list-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0 .35rem;
  color: var(--muted);
  font-weight: 700;
  font-size: .92rem;
}

.recent-activity-panel {
  margin: 1.1rem 0 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f6fcff);
  overflow: hidden;
}

.recent-activity-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: .95rem 1rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  list-style: none;
}

.recent-activity-header::-webkit-details-marker {
  display: none;
}

.recent-toggle {
  color: var(--bll-navy);
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.recent-toggle::before {
  content: "↓";
}

.recent-activity-panel[open] .recent-toggle::before {
  content: "↑";
}

.recent-activity-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #f5fbfe;
  color: var(--muted);
  font-size: .9rem;
}

.recent-activity-meta strong {
  color: var(--bll-navy);
}

.recent-activity-header h2 {
  margin: 0;
  color: var(--bll-navy);
  font-size: 1.05rem;
  font-weight: 850;
}

.recent-activity-header p {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.recent-activity-list {
  display: block;
}

.recent-activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.recent-activity-item:last-child {
  border-bottom: 0;
}

.recent-activity-item:hover {
  background: var(--bll-blue-soft);
}

.activity-dot {
  width: .65rem;
  height: .65rem;
  margin-top: .35rem;
  border-radius: 999px;
  background: var(--bll-blue);
  box-shadow: 0 0 0 4px var(--bll-blue-soft);
}

.activity-copy {
  min-width: 0;
}

.activity-text,
.activity-copy small {
  display: block;
}

.activity-text {
  color: var(--bll-navy);
  font-size: .94rem;
  line-height: 1.35;
}

.activity-text strong {
  font-weight: 850;
}

.activity-copy small {
  margin-top: .25rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-time {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
  white-space: nowrap;
}

.activity-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem;
  padding: .85rem 1rem;
  border-top: 1px solid var(--line);
}

.activity-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--bll-navy);
  text-decoration: none;
  font-weight: 800;
}

.activity-page-link.active {
  background: var(--bll-navy);
  border-color: var(--bll-navy);
  color: #fff;
}

.pagination-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  margin-top: 1.1rem;
}

.pagination-wrap .page-link,
.pagination-wrap .page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: .45rem .75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--bll-navy);
  text-decoration: none;
  font-weight: 800;
}

.pagination-wrap .page-link.active {
  background: var(--bll-navy);
  border-color: var(--bll-navy);
  color: #fff;
}

.pagination-wrap .page-link.disabled {
  pointer-events: none;
  opacity: .45;
}

.check-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: .25rem;
}

.file-drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 9rem;
  padding: 1.1rem;
  border: 2px dashed #9bcfe3;
  border-radius: 8px;
  background: #f5fbfe;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.file-drop-zone:hover,
.file-drop-zone.is-dragover {
  border-color: var(--bll-blue);
  background: var(--bll-blue-soft);
  box-shadow: 0 14px 34px rgba(3, 26, 51, .08);
}

.file-drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop-content {
  display: grid;
  gap: .35rem;
  justify-items: center;
  text-align: center;
  color: var(--bll-navy);
  pointer-events: none;
}

.file-drop-content strong {
  font-size: 1.05rem;
}

.file-drop-content span {
  color: var(--muted);
}

.file-drop-content small {
  margin-top: .35rem;
  color: #0b6f94;
  font-weight: 800;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.summary-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .75rem;
  background: linear-gradient(180deg, #fff, #f7fcff);
}

.summary-grid strong,
.summary-grid span {
  display: block;
}

.certificate-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5fbfe;
  margin-bottom: 1rem;
}

.footer {
  border-top: 1px solid rgba(3, 26, 51, .08);
  padding: 1rem 0;
  color: var(--muted);
  background: rgba(255, 255, 255, .74);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.3rem;
  }
}

@media (max-width: 720px) {
  .navbar {
    min-height: 72px;
  }

  .brand-cluster {
    gap: .65rem;
    margin-right: 0;
  }

  .brand-mark-bll img {
    width: auto;
    height: 56px;
  }

  .brand-mark-bb img {
    width: auto;
    height: 56px;
  }

  .brand-divider {
    height: 34px;
  }

  .section-heading,
  .certificate-toolbar {
    display: block;
  }

  .button-row {
    margin-top: .75rem;
  }

  .hero h1 {
    font-size: 2.45rem;
  }
}
