:root {
  --bs-app-primary: #034287;
  --bs-app-primary-dark: #02346c;
  --bs-app-accent: #0f8a4b;
  --bs-app-teal: #1697a8;
  --bs-app-surface: #ffffff;
  --bs-app-border: rgba(15, 23, 42, 0.12);
  --bs-app-muted: #64748b;
}

#loading {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  position: fixed;
  display: block;
  opacity: 0.72;
  background-color: #fff;
  z-index: 1090;
  text-align: center;
}

#loading-image {
  position: absolute;
  top: 30%;
  left: 50%;
  max-width: 86px;
  transform: translateX(-50%);
  z-index: 1091;
}

.admin-modern-body {
  background: #f4f7fb !important;
  color: #172033;
}

.admin-sidebar-logo {
  width: 100%;
  height: 112px;
  background: #034287 url("../imgs/logo.png") center center / contain no-repeat;
}

.app-menu-heading {
  background: rgba(255, 255, 255, 0.14);
  border-left: 4px solid #7dd3fc;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 16px 12px 8px;
  padding: 10px 12px;
  text-transform: uppercase;
  border-radius: 8px;
}

.app-menu-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  height: 1px;
  margin: 14px 14px 12px;
}

.sidebar .list-unstyled > li > a {
  min-height: 42px;
}

.admin-modern-content {
  width: 100%;
  min-width: 0;
}

.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-page-eyebrow {
  color: #034287;
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.admin-page-header h1 {
  color: #172033;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  font-weight: 800;
  margin: 0;
}

.admin-page-header p {
  color: #64748b;
  margin: 6px 0 0;
}

.admin-shell {
  background: #fff;
  border: 1px solid #dde7f2;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  padding: 18px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-toolbar input,
.admin-toolbar select,
.admin-toolbar .admin-filter {
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  color: #172033;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-btn {
  align-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  text-decoration: none !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.admin-btn:hover {
  transform: translateY(-1px);
}

.admin-btn-primary {
  background: #034287;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(3, 66, 135, 0.22);
}

.admin-btn-secondary {
  background: #e8f1fb;
  color: #034287 !important;
}

.admin-btn-danger {
  background: #fee2e2;
  color: #b91c1c !important;
}

.admin-btn-ghost {
  background: #f1f5f9;
  color: #334155 !important;
}

.admin-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
}

.admin-kpi {
  background: #f8fbff;
  border: 1px solid #dbe8f6;
  border-radius: 8px;
  padding: 14px;
}

.admin-kpi span {
  color: #64748b;
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-kpi strong {
  color: #0f172a;
  display: block;
  font-size: 1.55rem;
  line-height: 1.2;
  margin-top: 4px;
}

.admin-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.admin-record-card {
  background: #fff;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}

.admin-compact-cards .admin-record-card {
  padding: 12px;
}

.admin-record-top {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.admin-record-logo {
  align-items: center;
  background: #eef4fb;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  color: #034287;
  display: flex;
  flex: 0 0 58px;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  overflow: hidden;
  width: 58px;
}

.admin-record-logo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.admin-record-title {
  color: #172033;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-record-subtitle {
  color: #64748b;
  font-size: 0.88rem;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.admin-meta-list {
  display: grid;
  gap: 8px;
}

.admin-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.admin-meta-row span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-meta-row strong,
.admin-meta-row a {
  color: #172033;
  font-size: 0.92rem;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.admin-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  min-height: 26px;
  padding: 7px 10px;
}

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

.admin-status-muted {
  background: #e2e8f0;
  color: #475569;
}

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

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.admin-empty-state {
  background: #f8fafc;
  border: 1px dashed #bfd1e4;
  border-radius: 8px;
  color: #64748b;
  padding: 22px;
  text-align: center;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 18px;
}

.admin-pagination button {
  background: #fff;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  color: #034287;
  cursor: pointer;
  font-weight: 800;
  min-width: 40px;
  padding: 8px 10px;
}

.admin-pagination button.active {
  background: #034287;
  color: #fff;
}

.admin-modal {
  background: rgba(15, 23, 42, 0.62);
  display: none;
  inset: 0;
  padding: 20px;
  position: fixed;
  z-index: 1100;
}

.admin-modal.is-open {
  display: flex;
}

.admin-modal-panel {
  background: #fff;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  height: min(92vh, 900px);
  margin: auto;
  max-width: 980px;
  overflow: hidden;
  width: min(100%, 980px);
}

.admin-modal-header {
  align-items: center;
  border-bottom: 1px solid #dde7f2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.admin-modal-header h2 {
  color: #172033;
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.admin-modal iframe {
  border: 0;
  flex: 1;
  width: 100%;
}

.admin-settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.admin-setting-card {
  background: #fff;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  padding: 16px;
}

.admin-setting-card h2 {
  color: #172033;
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 10px;
}

.admin-setting-card label {
  color: #334155;
  display: block;
  font-weight: 700;
  margin: 12px 0 6px;
}

.admin-setting-help {
  background: #f1f7ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #33536f;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 14px;
  padding: 10px 12px;
}

.admin-setting-card input,
.admin-setting-card select,
.admin-setting-card textarea {
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

.admin-setting-card textarea {
  resize: vertical;
}

.admin-setting-card-wide {
  grid-column: span 2;
}

.admin-toggle-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 10px 0;
}

.admin-toggle-row input {
  min-height: auto;
  width: auto;
}

.admin-home-buttons {
  display: grid;
  gap: 14px;
}

.admin-home-button-row {
  background: #f8fbff;
  border: 1px solid #dce7f4;
  border-radius: 8px;
  padding: 14px;
}

.admin-home-button-title,
.admin-inline-check,
.admin-home-button-preview {
  align-items: center;
  display: flex;
  gap: 10px;
}

.admin-home-button-title {
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-home-button-title strong {
  color: #172033;
  font-weight: 900;
}

.admin-inline-check {
  color: #334155;
  font-weight: 800;
  margin: 0;
}

.admin-inline-check input {
  min-height: auto;
  width: auto;
}

.admin-home-button-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-home-button-preview {
  background: #fff;
  border: 1px dashed #c7d7eb;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
  margin-top: 10px;
  padding: 8px 10px;
}

.admin-home-button-preview img {
  height: 34px;
  object-fit: contain;
  width: 34px;
}

.admin-modern-footer {
  margin-top: 22px;
  text-align: center;
}

@media (max-width: 768px) {
  .admin-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-shell {
    border-left: 0;
    border-right: 0;
    margin-left: -14px;
    margin-right: -14px;
    padding: 14px;
  }

  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-toolbar-actions {
    justify-content: stretch;
  }

  .admin-btn {
    flex: 1 1 auto;
  }

  .admin-card-grid {
    grid-template-columns: 1fr;
  }

  .admin-meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .admin-meta-row strong,
  .admin-meta-row a {
    text-align: left;
  }

  .admin-modal {
    padding: 8px;
  }

  .admin-modal-panel {
    height: 94vh;
  }
}

html {
  font-size: 120%;
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  background: #f4f7fb !important;
  color: #172033;
  text-rendering: optimizeLegibility;
}

body,
td,
th,
input,
select,
textarea,
button,
.btn,
.dropdown-menu {
  font-size: 1rem;
}

.content {
  width: 100%;
  min-width: 0;
  background: #f4f7fb;
}

.card,
.dropdown-menu,
.modal-content {
  border: 1px solid var(--bs-app-border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.btn,
button,
input[type="button"],
input[type="submit"],
a.btn {
  min-height: 44px;
  border-radius: 8px !important;
  font-weight: 600;
}

.navbar {
  min-height: 56px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.navbar .navbar-collapse.collapse,
.collapse.show {
  visibility: visible;
}

.sidebar {
  width: 280px;
  min-width: 280px;
  overflow-y: auto;
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.16);
}

.sidebar a {
  text-decoration: none;
}

.sidebar > a > div {
  height: 108px !important;
  margin: 14px 14px 8px;
}

.sidebar .list-unstyled {
  margin: 0;
  padding: 8px 12px 22px;
}

.sidebar .list-unstyled li {
  margin: 2px 0;
}

.sidebar .list-unstyled a {
  align-items: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  gap: 10px;
  line-height: 1.25;
  min-height: 42px;
  padding: 10px 12px;
  white-space: normal;
  word-break: normal;
}

.sidebar .list-unstyled a.app-menu-item {
  padding-left: 12px;
}

.sidebar .list-unstyled a.app-menu-item i {
  flex: 0 0 18px;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
}

.sidebar .list-unstyled a:hover,
.sidebar .list-unstyled a:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.app-menu-heading {
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0;
  margin: 14px 10px 6px;
  text-transform: uppercase;
}

.app-page-title {
  color: #172033;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 18px;
  text-align: center;
}

.app-page-card {
  background: #fff;
  border: 1px solid var(--bs-app-border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
  padding: 18px;
}

.app-page-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 16px;
}

.app-page-toolbar > div {
  min-width: 0;
  text-align: right;
}

.app-page-toolbar span {
  color: var(--bs-app-muted);
  display: block;
  font-size: 0.82rem;
  line-height: 1.2;
}

.app-page-toolbar strong {
  color: #172033;
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
}

.app-back-link {
  align-items: center;
  background: #fff;
  border: 1px solid var(--bs-app-border);
  border-radius: 8px;
  color: #034287;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 10px 13px;
  text-decoration: none;
}

.app-back-link:hover,
.app-back-link:focus {
  background: rgba(3, 66, 135, 0.08);
  color: #034287;
  text-decoration: none;
}

.card-wallet-page {
  background:
    linear-gradient(180deg, #eef5fb 0%, #f8fafc 42%, #ffffff 100%);
  min-height: calc(100vh - 64px);
}

.card-wallet-page > table:last-of-type {
  margin-top: 28px;
}

.card-wallet-hero {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  margin: 0 auto 14px;
  max-width: 620px;
}

.card-wallet-back {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  color: #034287;
  display: inline-flex;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
  text-decoration: none;
  width: 44px;
}

.card-wallet-back:hover,
.card-wallet-back:focus {
  color: #034287;
  text-decoration: none;
}

.card-wallet-hero span {
  color: #0f8a4b;
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-wallet-hero h1 {
  color: #102033;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.05;
  margin: 4px 0 5px;
}

.card-wallet-hero p {
  color: #64748b;
  font-size: 0.94rem;
  line-height: 1.35;
  margin: 0;
}

.wallet-stage {
  margin: 0 auto;
  max-width: 620px;
}

.wallet-card {
  border-radius: 8px;
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.22);
  color: #fff;
  overflow: hidden;
  padding: 20px;
  position: relative;
}

.card-wallet-theme-blue .wallet-card {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #034287 0%, #0e7490 55%, #16a34a 100%);
}

.card-wallet-theme-green .wallet-card {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #064e3b 0%, #0f8a4b 58%, #0ea5a6 100%);
}

.card-wallet-theme-dark .wallet-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #111827 0%, #034287 62%, #0f766e 100%);
}

.wallet-card-glow {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0, rgba(255, 255, 255, 0) 65%);
  height: 230px;
  position: absolute;
  right: -84px;
  top: -76px;
  width: 230px;
}

.wallet-card-top,
.wallet-chip-row,
.wallet-holder,
.wallet-card-grid,
.wallet-inactive-art,
.wallet-inactive-copy {
  position: relative;
  z-index: 1;
}

.wallet-card-top {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.wallet-card-top span {
  color: rgba(255, 255, 255, 0.72);
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
}

.wallet-card-top strong {
  color: #fff;
  display: block;
  font-size: 1.26rem;
  font-weight: 900;
  line-height: 1.1;
  margin-top: 3px;
}

.wallet-status {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 900;
  max-width: 138px;
  overflow-wrap: anywhere;
  padding: 7px 9px;
  text-align: center;
  text-transform: uppercase;
}

.wallet-status-active {
  background: rgba(34, 197, 94, 0.22);
  color: #dcfce7;
}

.wallet-status-inactive {
  background: rgba(251, 191, 36, 0.2);
  color: #fef3c7;
}

.wallet-chip-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 28px 0 18px;
}

.wallet-chip {
  background: linear-gradient(135deg, #fff7c2 0%, #c7952a 50%, #f8e8a5 100%);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  height: 34px;
  width: 52px;
}

.wallet-signal {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.24rem;
}

.wallet-card-number {
  color: #fff;
  font-size: 1.52rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.wallet-holder {
  margin-bottom: 14px;
}

.wallet-holder span,
.wallet-card-grid span {
  color: rgba(255, 255, 255, 0.65);
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.wallet-holder strong,
.wallet-card-grid strong {
  color: #fff;
  display: block;
  font-size: 0.91rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.wallet-card-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallet-card-grid div {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  min-width: 0;
  padding: 9px;
}

.wallet-card-grid-wide {
  grid-column: 1 / -1;
}

.wallet-inactive-art {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 18px auto 14px;
  max-width: 280px;
}

.wallet-inactive-art img {
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.2));
  height: auto;
  max-height: 172px;
  object-fit: contain;
  width: min(100%, 280px);
}

.wallet-inactive-copy {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 13px;
  text-align: left;
}

.wallet-inactive-copy strong {
  color: #fff;
  display: block;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.22;
  margin-bottom: 5px;
}

.wallet-inactive-copy p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.89rem;
  line-height: 1.38;
  margin: 0;
}

.wallet-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.wallet-action {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  color: #102033;
  display: flex;
  flex-direction: column;
  font-size: 0.84rem;
  font-weight: 900;
  gap: 7px;
  justify-content: center;
  min-height: 82px;
  padding: 10px;
  text-align: center;
  text-decoration: none;
}

.wallet-action i {
  color: #034287;
  font-size: 1.28rem;
}

.wallet-action-primary {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff !important;
  grid-column: 1 / -1;
  min-height: 58px;
}

.wallet-action-primary i {
  color: #fff;
}

.wallet-action:hover,
.wallet-action:focus {
  color: #102033;
  text-decoration: none;
  transform: translateY(-1px);
}

.wallet-action-primary:hover,
.wallet-action-primary:focus {
  background: #12843e;
  color: #fff;
}

.wallet-highlight {
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07);
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
}

.wallet-highlight-icon {
  align-items: center;
  background: #e8f6ef;
  border-radius: 8px;
  color: #0f8a4b;
  display: flex;
  flex: 0 0 42px;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.wallet-highlight span {
  color: #102033;
  display: block;
  font-size: 0.93rem;
  font-weight: 900;
  line-height: 1.2;
}

.wallet-highlight p {
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.38;
  margin: 4px 0 0;
}

.app-member-card-shell {
  background: linear-gradient(180deg, #fff 0%, #f6fbff 100%);
  border: 0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.app-member-card-shell .card-body {
  padding: 18px;
}

.member-card {
  border-radius: 8px;
  margin: 0 auto;
  max-width: 520px;
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.member-card::before {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0, rgba(255, 255, 255, 0) 65%);
  content: "";
  height: 220px;
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
}

.member-card-active {
  background: linear-gradient(135deg, #034287 0%, #0d6b87 100%);
  color: #fff;
}

.member-card-inactive {
  background: linear-gradient(135deg, #1f3347 0%, #034287 100%);
  color: #fff;
}

.member-card-top {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.member-card-top span {
  color: rgba(255, 255, 255, 0.74);
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
}

.member-card-top h2 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.12;
  margin: 4px 0 0;
}

.member-status {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  padding: 7px 10px;
  text-transform: uppercase;
}

.member-status-active {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.member-status-inactive {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

.member-card-chip {
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  border-radius: 6px;
  height: 34px;
  margin: 34px 0 18px;
  position: relative;
  width: 48px;
  z-index: 1;
}

.member-card-number {
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.member-card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
  z-index: 1;
}

.member-card-grid div {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  min-width: 0;
  padding: 10px;
}

.member-card-grid span {
  color: rgba(255, 255, 255, 0.66);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.member-card-grid strong {
  color: #fff;
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.member-card-illustration {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  margin: 22px 0 16px;
  padding: 16px;
  position: relative;
  z-index: 1;
}

.member-card-illustration img {
  height: auto;
  max-height: 190px;
  max-width: 100%;
  object-fit: contain;
}

.member-card-message {
  position: relative;
  text-align: center;
  z-index: 1;
}

.member-card-message strong {
  color: #fff;
  display: block;
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.member-card-message p {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
}

.member-card-action {
  align-items: center;
  background: #22c55e;
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 1rem;
  font-weight: 900;
  gap: 9px;
  justify-content: center;
  margin-top: 18px;
  min-height: 48px;
  padding: 12px 16px;
  position: relative;
  text-decoration: none;
  z-index: 1;
}

.member-card-action:hover,
.member-card-action:focus {
  background: #16a34a;
  color: #fff;
  text-decoration: none;
}

.app-back-button,
.tabela-status {
  align-items: center;
  background: var(--bs-app-accent) !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #fff !important;
  display: inline-flex;
  justify-content: center;
  min-width: 150px;
  padding: 10px 18px !important;
  text-decoration: none;
}

.content form input:not([type="checkbox"]):not([type="radio"]),
.content form select,
.content form textarea {
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  color: #172033;
  min-height: 46px;
  padding: 10px 12px;
}

.content form input:focus,
.content form select:focus,
.content form textarea:focus {
  border-color: var(--bs-app-primary);
  box-shadow: 0 0 0 3px rgba(3, 66, 135, 0.12);
  outline: 0;
}

.content form input[disabled],
.content form input[readonly] {
  background: #eef3f8 !important;
  color: #334155;
  opacity: 1;
}

.content input[type="submit"] {
  background: var(--bs-app-primary) !important;
  border: 0 !important;
  color: #fff !important;
  width: 100%;
}

.app-footer,
.content > table:last-of-type td {
  color: var(--bs-app-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 18px 8px;
}

.table-responsive {
  border-radius: 8px;
}

.app-home-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 14px;
}

.app-home-header span {
  color: #172033;
  font-size: 1.18rem;
  font-weight: 800;
}

.app-home-header strong {
  background: rgba(3, 66, 135, 0.08);
  border-radius: 999px;
  color: #034287;
  font-size: 0.82rem;
  padding: 7px 11px;
}

.app-home-card {
  border: 0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.app-home-card .card-body {
  padding: 16px;
}

.app-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.app-action-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 158px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 12px;
  text-align: center;
  color: #172033;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  border: 1px solid var(--bs-app-border);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.app-action-tile::before {
  background: #034287;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.app-action-tile strong {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.app-action-tile:hover {
  color: #034287;
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(3, 66, 135, 0.24);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.app-action-tile img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.app-action-icon {
  align-items: center;
  background: linear-gradient(135deg, #e7f1ff, #f0fdf8);
  border: 1px solid rgba(3, 66, 135, 0.12);
  border-radius: 8px;
  color: #034287;
  display: inline-flex;
  font-size: 2.35rem;
  height: 82px;
  justify-content: center;
  width: 82px;
}

.swal2-popup {
  border-radius: 8px !important;
  font-family: inherit;
}

.empresas-container {
  background: transparent !important;
  gap: 16px !important;
  padding: 16px 0 !important;
}

.empresa-card {
  border: 1px solid var(--bs-app-border);
  border-radius: 8px !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
  cursor: pointer;
}

.empresa-botoes-container {
  flex-wrap: wrap;
}

.empresa-botoes-container button {
  flex: 1 1 130px;
}

@media (max-width: 768px) {
  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open::before {
    background: rgba(15, 23, 42, 0.45);
    content: "";
    inset: 0;
    position: fixed;
    z-index: 1035;
  }

  .sidebar {
    position: fixed;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    width: min(84vw, 310px);
    max-width: 84vw;
    min-height: 100vh;
    top: 0;
    left: 0;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .content {
    padding: 14px !important;
  }

  .navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
  }

  .navbar-brand {
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  table {
    max-width: 100%;
  }

  td,
  th {
    word-break: break-word;
  }

  .card-body {
    padding: 1rem;
  }

  .card,
  .app-page-card {
    margin-left: 0;
    margin-right: 0;
  }

  .app-page-title,
  .content h4 {
    font-size: 1.15rem;
    margin-bottom: 14px !important;
  }

  .content > table:first-of-type td {
    display: block;
    height: auto !important;
    text-align: center !important;
    width: 100% !important;
  }

  .content form table,
  .content form tbody,
  .content form tr,
  .content form td {
    display: block;
    width: 100% !important;
  }

  .content form td {
    padding: 0 !important;
    text-align: left !important;
  }

  .content form td:first-child {
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
    margin: 12px 0 5px;
  }

  .content form input:not([type="checkbox"]):not([type="radio"]),
  .content form select,
  .content form textarea {
    width: 100% !important;
  }

  .content form fieldset {
    border: 0;
    margin: 0 0 18px;
    padding: 0;
  }

  .content form legend {
    color: #172033;
    font-size: 1.12rem;
    font-weight: 700;
    margin: 18px 0 10px;
    text-align: left;
  }

  .app-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .app-action-tile {
    min-height: 136px;
    padding: 14px 8px;
  }

  .app-action-tile img {
    height: 68px;
    width: 68px;
  }

  .app-action-icon {
    font-size: 2rem;
    height: 68px;
    width: 68px;
  }

  .app-action-tile strong {
    font-size: 1rem;
  }

  .app-home-card .card-body {
    padding: 12px;
  }

  .admin-home-button-grid {
    grid-template-columns: 1fr;
  }

  .app-home-header {
    margin-top: 0;
  }

  .app-page-toolbar {
    align-items: flex-start;
  }

  .app-page-toolbar strong {
    font-size: 1rem;
  }

  .admin-setting-card-wide {
    grid-column: auto;
  }

  .card-wallet-page {
    padding: 14px 12px !important;
  }

  .card-wallet-page > table:last-of-type td {
    font-size: 0.75rem;
    line-height: 1.45;
    padding: 12px 4px;
  }

  .card-wallet-hero {
    gap: 10px;
    margin-bottom: 12px;
  }

  .card-wallet-back {
    flex-basis: 40px;
    height: 40px;
    width: 40px;
  }

  .card-wallet-hero h1 {
    font-size: 1.32rem;
  }

  .card-wallet-hero p {
    font-size: 0.86rem;
  }

  .wallet-card {
    padding: 16px;
  }

  .wallet-card-top strong {
    font-size: 1.1rem;
  }

  .wallet-status {
    font-size: 0.64rem;
    max-width: 112px;
    padding: 6px 8px;
  }

  .wallet-chip-row {
    margin: 22px 0 14px;
  }

  .wallet-card-number {
    font-size: 1.24rem;
    margin-bottom: 14px;
  }

  .wallet-card-grid {
    gap: 8px;
  }

  .wallet-card-grid div {
    padding: 8px;
  }

  .wallet-inactive-art {
    margin: 12px auto;
    max-width: 236px;
  }

  .wallet-inactive-art img {
    max-height: 142px;
    width: min(100%, 236px);
  }

  .wallet-inactive-copy {
    padding: 11px;
  }

  .wallet-inactive-copy strong {
    font-size: 0.98rem;
  }

  .wallet-actions {
    gap: 8px;
    margin-top: 12px;
  }

  .wallet-action {
    min-height: 74px;
    padding: 9px 7px;
  }

  .wallet-action-primary {
    min-height: 54px;
  }

  .wallet-highlight {
    padding: 12px;
  }

  .app-member-card-shell .card-body {
    padding: 12px;
  }

  .member-card {
    padding: 18px;
  }

  .member-card-top h2 {
    font-size: 1.16rem;
  }

  .member-card-number {
    font-size: 1.28rem;
  }

  .member-card-grid {
    grid-template-columns: 1fr;
  }

  .member-card-illustration {
    margin-top: 18px;
    padding: 12px;
  }

  .member-card-illustration img {
    max-height: 160px;
  }

  .empresas-container {
    grid-template-columns: 1fr !important;
  }

  .empresa-card {
    padding: 14px !important;
  }

  .content center {
    display: block;
    width: 100%;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}
