/* ============================================================
   NUTRIBE — Custom Stylesheet
   Brand color: #C08F0C (gold/amber)
   ============================================================ */

:root {
  --ntb-gold:        #C08F0C;
  --ntb-gold-dark:   #9a720a;
  --ntb-gold-light:  #e8b820;
  --ntb-gold-muted:  #f5e6b8;
  --ntb-dark:        #1a1a2e;
  --ntb-dark-alt:    #16213e;
  --ntb-sidebar-w:   260px;
  --ntb-text:        #495057;
  --ntb-text-muted:  #6c757d;
  --ntb-bg:          #f4f6f9;
  --ntb-white:       #ffffff;
  --ntb-border:      #dee2e6;
  --ntb-success:     #198754;
  --ntb-danger:      #dc3545;
  --ntb-warning:     #ffc107;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--ntb-bg);
  color: var(--ntb-text);
  font-size: 0.9375rem;
  line-height: 1.6;
}

a {
  color: var(--ntb-gold);
  text-decoration: none;
}

a:hover {
  color: var(--ntb-gold-dark);
}

/* ============================================================
   Brand Buttons (override Bootstrap btn-primary)
   ============================================================ */
.btn-ntb-primary,
.btn-ntb-primary:focus {
  background-color: var(--ntb-gold);
  border-color:     var(--ntb-gold);
  color:            #fff;
  font-weight: 500;
}

.btn-ntb-primary:hover,
.btn-ntb-primary:active {
  background-color: var(--ntb-gold-dark);
  border-color:     var(--ntb-gold-dark);
  color:            #fff;
}

.btn-ntb-outline {
  background-color: transparent;
  border-color:     var(--ntb-gold);
  color:            var(--ntb-gold);
  font-weight: 500;
}

.btn-ntb-outline:hover {
  background-color: var(--ntb-gold);
  color:            #fff;
}

/* ============================================================
   Auth Layout
   ============================================================ */
.ntb-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ntb-dark) 0%, var(--ntb-dark-alt) 100%);
  padding: 2rem 1rem;
}

.ntb-auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--ntb-white);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 2.5rem 2rem;
}

.ntb-auth-logo {
  display: block;
  max-width: 160px;
  margin: 0 auto 1.75rem;
}

.ntb-auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ntb-dark);
  text-align: center;
  margin-bottom: 0.25rem;
}

.ntb-auth-subtitle {
  font-size: 0.875rem;
  color: var(--ntb-text-muted);
  text-align: center;
  margin-bottom: 1.75rem;
}

.ntb-auth-divider {
  border-color: var(--ntb-border);
  margin: 1.5rem 0;
}

.ntb-auth-footer-link {
  font-size: 0.875rem;
  text-align: center;
  color: var(--ntb-text-muted);
}

.ntb-auth-footer-link a {
  color: var(--ntb-gold);
  font-weight: 600;
}

/* Form labels */
.ntb-auth-card .form-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ntb-dark);
}

.ntb-auth-card .form-control:focus {
  border-color: var(--ntb-gold);
  box-shadow: 0 0 0 0.2rem rgba(192, 143, 12, 0.2);
}

/* Gold separator accent */
.ntb-auth-accent {
  width: 48px;
  height: 3px;
  background-color: var(--ntb-gold);
  border-radius: 2px;
  margin: 0.5rem auto 1.5rem;
}

/* ============================================================
   App Shell Layout (Practitioner + Admin)
   ============================================================ */
.ntb-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.ntb-sidebar {
  width: var(--ntb-sidebar-w);
  height: 100vh;
  background: var(--ntb-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.ntb-sidebar-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ntb-sidebar-logo {
  max-width: 140px;
  display: block;
}

.ntb-sidebar-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ntb-gold);
  margin-top: 0.4rem;
}

.ntb-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.ntb-sidebar-nav .nav-item {
  margin: 1px 0.75rem;
}

.ntb-sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
}

.ntb-sidebar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.ntb-sidebar-nav .nav-link.active {
  background-color: var(--ntb-gold);
  color: #fff;
}

.ntb-sidebar-nav .nav-link i,
.ntb-sidebar-nav .nav-link svg {
  font-size: 1rem;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.ntb-sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  padding: 0.75rem 1.6rem 0.25rem;
  margin-top: 0.5rem;
}

.ntb-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ntb-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ntb-sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--ntb-gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  overflow: hidden;
}

.ntb-sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ntb-sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ntb-sidebar-user-role {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: capitalize;
}

/* Main content area */
.ntb-main {
  margin-left: var(--ntb-sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Navbar */
.ntb-navbar {
  height: 60px;
  background: var(--ntb-white);
  border-bottom: 1px solid var(--ntb-border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}

.ntb-navbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ntb-dark);
  flex: 1;
}

.ntb-navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ntb-notif-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ntb-bg);
  border: 1px solid var(--ntb-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ntb-text);
  cursor: pointer;
  transition: background 0.15s;
}

.ntb-notif-btn:hover {
  background: var(--ntb-gold-muted);
  color: var(--ntb-gold-dark);
}

.ntb-notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ntb-danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ntb-content {
  flex: 1;
  padding: 1.75rem;
}

/* Page header */
.ntb-page-header {
  margin-bottom: 1.5rem;
}

.ntb-page-header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ntb-dark);
  margin-bottom: 0.15rem;
}

.ntb-page-header p {
  font-size: 0.875rem;
  color: var(--ntb-text-muted);
  margin-bottom: 0;
}

/* ============================================================
   Cards
   ============================================================ */
.ntb-card {
  background: var(--ntb-white);
  border-radius: 10px;
  border: 1px solid var(--ntb-border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
}

.ntb-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ntb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ntb-card-header h5,
.ntb-card-header h6 {
  margin: 0;
  font-weight: 600;
  color: var(--ntb-dark);
}

.ntb-card-body {
  padding: 1.25rem;
}

/* Stat cards */
.ntb-stat-card {
  background: var(--ntb-white);
  border-radius: 10px;
  border: 1px solid var(--ntb-border);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.ntb-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--ntb-gold-muted);
  color: var(--ntb-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.ntb-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ntb-dark);
  line-height: 1.2;
}

.ntb-stat-label {
  font-size: 0.8125rem;
  color: var(--ntb-text-muted);
  margin-top: 0.1rem;
}

.ntb-stat-body {
  flex: 1;
  min-width: 0;
}

.ntb-stat-sub {
  font-size: 0.75rem;
  color: var(--ntb-text-muted);
  margin-top: 0.15rem;
}

/* ============================================================
   Badges / Status Pills
   ============================================================ */
.ntb-badge-gold {
  background-color: var(--ntb-gold-muted);
  color: var(--ntb-gold-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25em 0.65em;
  border-radius: 20px;
}

.ntb-badge-pending  { background: #fff3cd; color: #856404; }
.ntb-badge-approved { background: #d1e7dd; color: #0f5132; }
.ntb-badge-rejected { background: #f8d7da; color: #842029; }
.ntb-badge-draft    { background: #e2e3e5; color: #41464b; }

/* ============================================================
   Flash Alerts
   ============================================================ */
.ntb-alert {
  border-left: 4px solid transparent;
  border-radius: 6px;
}

.ntb-alert-success { border-left-color: var(--ntb-success); background: #f0fdf4; }
.ntb-alert-error   { border-left-color: var(--ntb-danger);  background: #fef2f2; }
.ntb-alert-danger  { border-left-color: var(--ntb-danger);  background: #fef2f2; }
.ntb-alert-warning { border-left-color: var(--ntb-warning); background: #fffbeb; }
.ntb-alert-info    { border-left-color: var(--ntb-gold);    background: #fffdf0; }

/* ============================================================
   Live / Webinar indicators
   ============================================================ */
.ntb-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #10B981;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2em 0.6em;
  border-radius: 20px;
}

.ntb-live-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: ntb-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

.ntb-live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  animation: ntb-pulse 1.4s ease-in-out infinite;
}

@keyframes ntb-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

.nav-tabs .nav-link{
      color: #000000;
}

/* ============================================================
   Responsive — mobile sidebar
   ============================================================ */
@media (max-width: 991.98px) {
  .ntb-sidebar {
    transform: translateX(calc(-1 * var(--ntb-sidebar-w)));
  }

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

  .ntb-main {
    margin-left: 0;
  }

  .ntb-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1039;
  }

  .ntb-sidebar-overlay.is-open {
    display: block;
  }

  .ntb-content {
    padding: 1.25rem;
  }
}

@media (min-width: 992px) {
  .ntb-hamburger { display: none; }
}

/* ── Premium Video Library ─────────────────────────────────────────────────── */

.ntb-video-thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--ntb-radius) var(--ntb-radius) 0 0;
  background: #f1f1f1;
  aspect-ratio: 16 / 9;
}

.ntb-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ntb-video-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #adb5bd;
}

.ntb-video-duration {
  position: absolute;
  bottom: 0.4rem;
  right: 0.4rem;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
