:root {
  --nb-bg-top: #f8f2e6;
  --nb-bg-bottom: #efe3cc;
  --nb-card: #ffffff;
  --nb-text: #1f2937;
  --nb-muted: #6b7280;
  --nb-accent: #b8860b;
  --nb-accent-soft: #f5e8c6;
  --nb-border: rgba(31, 41, 55, 0.1);
  --nb-shadow: 0 16px 30px rgba(31, 41, 55, 0.1);
}

body.nb-surface {
  background: linear-gradient(165deg, var(--nb-bg-top), var(--nb-bg-bottom));
  color: var(--nb-text);
  font-family: "Cairo", sans-serif;
  min-height: 100vh;
}

body.nb-admin-locked {
  visibility: hidden;
}

.nb-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 14px 26px;
}

.nb-shell {
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: 18px;
  box-shadow: var(--nb-shadow);
  padding: 14px;
  margin-bottom: 14px;
}

.nb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.nb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nb-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--nb-border);
  background: #fff;
}

.nb-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.nb-subtitle {
  margin: 0;
  font-size: .86rem;
  color: var(--nb-muted);
}

.nb-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nb-nav .nb-link {
  border: 1px solid var(--nb-border);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: var(--nb-text);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
}

.nb-nav .nb-link:hover {
  border-color: rgba(184, 134, 11, 0.4);
  background: #fffdf7;
}

.nb-nav .nb-link.is-active {
  background: var(--nb-accent-soft);
  border-color: rgba(184, 134, 11, 0.45);
  color: #6d4a00;
}

.nb-panel {
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: 16px;
  box-shadow: var(--nb-shadow);
}

.nb-panel .card-body {
  padding: 16px;
}

.nb-footer {
  max-width: calc(1180px - 28px);
  margin: 16px auto 20px;
  padding: 12px 14px;
  border: 1px solid var(--nb-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
  text-align: center;
  color: var(--nb-muted);
  font-size: .9rem;
}

.nb-footer-copy {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.nb-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.nb-footer-links a {
  color: #5a4a1f;
  text-decoration: none;
  font-weight: 700;
}

.nb-footer-links a:hover {
  text-decoration: underline;
}

.nb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.nb-pagination .nb-page-info {
  min-width: 108px;
  text-align: center;
  font-size: .85rem;
  color: var(--nb-muted);
  font-weight: 700;
}

/* Theme all Bootstrap buttons to match the gold brand palette */
.btn {
  border-radius: 12px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

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

.btn-primary,
.btn-success,
.btn-warning {
  color: #1f2937;
  border-color: transparent;
  background: linear-gradient(135deg, #e9c468, var(--nb-accent));
  box-shadow: 0 10px 18px rgba(184, 134, 11, 0.25);
}

.btn-primary:hover,
.btn-success:hover,
.btn-warning:hover {
  color: #111827;
  border-color: transparent;
  background: linear-gradient(135deg, #efcf7d, #c6961f);
}

.btn-outline-primary {
  color: #6d4a00;
  border-color: rgba(184, 134, 11, 0.45);
  background: #fff9ef;
}

.btn-outline-primary:hover {
  color: #1f2937;
  border-color: transparent;
  background: linear-gradient(135deg, #e9c468, var(--nb-accent));
}

.btn-outline-secondary {
  color: #5b4b2a;
  border-color: rgba(109, 76, 26, 0.25);
  background: #fffdf7;
}

.btn-outline-secondary:hover {
  color: #4d3814;
  border-color: rgba(184, 134, 11, 0.4);
  background: #fff3d6;
}

.btn-outline-dark {
  color: #5a4620;
  border-color: rgba(109, 76, 26, 0.35);
  background: #fff9ef;
}

.btn-outline-dark:hover {
  color: #1f2937;
  border-color: transparent;
  background: linear-gradient(135deg, #e9c468, var(--nb-accent));
}

.nav-pills .nav-link {
  color: var(--nb-text);
  border: 1px solid var(--nb-border);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
}

.nav-pills .nav-link:hover {
  border-color: rgba(184, 134, 11, 0.4);
  background: #fffaf0;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: #1f2937;
  border-color: transparent;
  background: linear-gradient(135deg, #e9c468, var(--nb-accent));
  box-shadow: 0 10px 18px rgba(184, 134, 11, 0.25);
}

.form-check-input {
  min-width: auto !important;
}

#nb-lang-toggle {
  position: fixed;
  inset-inline-start: 16px;
  bottom: 16px;
  z-index: 1100;
  border: 1px solid rgba(184, 134, 11, 0.45);
  background: #fff7e3;
  color: var(--nb-text);
  width: 49px;
  height: 49px;
  padding: 0;
  border-radius: 50%;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 14px 24px rgba(184, 134, 11, 0.3);
}

#nb-lang-toggle:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #e9c468, #d8ac45);
  border-color: transparent;
}

html[dir="ltr"] #nb-lang-toggle {
  inset-inline-start: auto;
  inset-inline-end: 16px;
}

.table-responsive {
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  margin-bottom: 0;
}

.table-responsive > .table > :not(caption) > * > * {
  white-space: nowrap;
}

/* Improve dense admin/customer tables readability */
.table-responsive > .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fcf6e9;
  color: #5d420c;
  border-bottom: 1px solid rgba(184, 134, 11, 0.22);
}

.table-responsive > .table tbody tr:nth-child(even) {
  background: rgba(255, 251, 241, 0.52);
}

.table-responsive > .table tbody tr:hover {
  background: #fff4d6;
}

/* Generic skeleton state for loading-heavy tables */
.nb-skeleton-row td {
  padding-top: .65rem;
  padding-bottom: .65rem;
}

.nb-skeleton-line {
  display: block;
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f2efe7 25%, #e7dfcc 37%, #f2efe7 63%);
  background-size: 400% 100%;
  animation: nb-skeleton-shimmer 1.2s ease-in-out infinite;
}

@keyframes nb-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (max-width: 768px) {
  .nb-page {
    padding: 12px 10px 20px;
  }

  .nb-logo {
    width: 50px;
    height: 50px;
  }

  .nb-title {
    font-size: 1rem;
  }

  .nb-nav .nb-link {
    font-size: .82rem;
    padding: 6px 10px;
  }

  .table-responsive > .table {
    font-size: .84rem;
  }

  .table-responsive > .table > :not(caption) > * > * {
    padding: .5rem .45rem;
  }

  .nb-footer {
    max-width: calc(1180px - 20px);
    margin: 12px auto 18px;
    font-size: .84rem;
  }
}

@media (max-width: 420px) {
  .table-responsive > .table {
    font-size: .8rem;
  }

  #nb-lang-toggle {
    width: 45px;
    height: 45px;
    font-size: 18px;
    bottom: 12px;
  }
}
  .btn-close {
      display: none;
    }

@media print {
  #nb-lang-toggle {
    display: none !important;
  }
}
