/* ===================================================
   TrainerConnect — Custom Design System
   assets/css/style.css
   =================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --tc-primary:    #6366f1;
  --tc-primary-d:  #4f46e5;
  --tc-primary-l:  #eef2ff;
  --tc-secondary:  #8b5cf6;
  --tc-accent:     #ec4899;
  --tc-success:    #10b981;
  --tc-success-l:  #d1fae5;
  --tc-warning:    #f59e0b;
  --tc-warning-l:  #fef3c7;
  --tc-danger:     #ef4444;
  --tc-danger-l:   #fee2e2;
  --tc-info:       #3b82f6;
  --tc-info-l:     #dbeafe;
  --tc-dark:       #1e293b;
  --tc-dark-2:     #0f172a;
  --tc-text:       #1e293b;
  --tc-text-muted: #64748b;
  --tc-border:     #e2e8f0;
  --tc-bg:         #f8fafc;
  --tc-bg-2:       #f1f5f9;
  --tc-bg-card:    #ffffff;
  --tc-shadow:     0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --tc-shadow-md:  0 4px 24px rgba(99,102,241,.12);
  --tc-shadow-lg:  0 12px 48px rgba(99,102,241,.18);
  --tc-shadow-card:0 2px 8px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
  --sidebar-w:     260px;
  --admin-sidebar: 250px;
  --navbar-h:      64px;
  --radius:        .875rem;
  --radius-sm:     .5rem;
  --radius-lg:     1.25rem;
  --radius-xl:     1.75rem;
  --transition:    .18s ease;
  --ease-out:      cubic-bezier(.22, 1, .36, 1);
  /* Spacing scale */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;
  --sp-4: 1rem;    --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-8: 2rem;    --sp-10: 2.5rem; --sp-12: 3rem;
  /* z-index stack */
  --z-sidebar: 400; --z-overlay: 399; --z-topbar: 100;
  --z-toast: 9999; --z-modal: 1055; --z-loader: 99998;
  /* Touch target min */
  --touch-min: 44px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--tc-text);
  background: var(--tc-bg);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--tc-primary); text-decoration: none; }
a:hover { color: var(--tc-primary-d); }
img { max-width: 100%; height: auto; }

/* Utility sizes */
.fs-xs   { font-size: .72rem !important; }
.fs-sm   { font-size: .82rem !important; }
.fs-base { font-size: .9rem !important; }
.x-small { font-size: .72rem; }
.btn-xs  { padding: .2rem .55rem; font-size: .72rem; border-radius: .4rem; }

/* Line clamp */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 3; }

/* Spacing utilities */
.py-6 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
.gap-xs { gap: .35rem !important; }

/* Section badge */
.section-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--tc-primary-l); color: var(--tc-primary);
  font-size: .72rem; font-weight: 700;
  padding: .3rem .9rem; border-radius: 50px;
  letter-spacing: .04em; text-transform: uppercase;
}

/* Responsive table wrapper */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll::-webkit-scrollbar { height: 4px; }

/* Object fit helper */
.object-fit-cover   { object-fit: cover; }
.object-fit-contain { object-fit: contain; }

/* ---------- Navbar ---------- */
.tc-navbar {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  border-bottom: none;
  padding: 0;
  height: var(--navbar-h, 64px);
  transition: all var(--transition);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.tc-navbar .container-xl { height: 100%; }
.tc-navbar .navbar-collapse { padding: .5rem 0; }
.tc-navbar .navbar-brand {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em;
  color: #fff !important; display: flex; align-items: center; gap: .6rem;
}
.tc-navbar .nav-link {
  color: rgba(255,255,255,.8) !important;
  font-size: .875rem; font-weight: 500;
  padding: .5rem .85rem; border-radius: var(--radius-sm);
  transition: all var(--transition);
  min-height: var(--touch-min, 44px);
  display: flex; align-items: center;
}
.tc-navbar .nav-link:hover,
.tc-navbar .nav-link.active {
  background: rgba(255,255,255,.13); color: #fff !important;
}
.tc-navbar .nav-link.active { font-weight: 600; }
.tc-navbar .navbar-toggler {
  border: none; color: #fff; padding: .5rem;
  min-width: var(--touch-min, 44px);
  min-height: var(--touch-min, 44px);
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
  transition: background var(--transition);
}
@media (max-width: 991.98px) {
  .tc-navbar .navbar-toggler { display: flex; }
}
@media (min-width: 992px) {
  .tc-navbar .navbar-toggler { display: none !important; }
}
.tc-navbar .navbar-toggler:hover { background: rgba(255,255,255,.18); }
.tc-navbar .navbar-toggler:focus { box-shadow: none; }

/* Icon button in navbar */
.icon-btn {
  width: var(--touch-min, 44px) !important;
  height: var(--touch-min, 44px) !important;
  display: flex !important; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 1rem;
  position: relative;
}

.brand-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--tc-primary), var(--tc-secondary)); border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: .95rem; flex-shrink: 0; }
.brand-icon-sm { width: 28px; height: 28px; font-size: .75rem; border-radius: .35rem; }
.badge-dot { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; background: var(--tc-danger); border-radius: 50px; border: 1.5px solid #312e81; pointer-events: none; font-size: .65rem; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; line-height: 1; }
.badge-dot:empty { width: 8px; height: 8px; min-width: 8px; padding: 0; top: 6px; right: 6px; }
.notif-dropdown {
  width: min(380px, calc(100vw - 2rem));
  max-height: 440px; overflow-y: auto;
  border: 1px solid var(--tc-border); border-radius: var(--radius-lg);
  box-shadow: var(--tc-shadow-lg);
}
.notif-item { display: flex; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--tc-border); transition: background var(--transition); cursor: pointer; }
.notif-item:hover { background: var(--tc-bg); }
.notif-item.unread { background: var(--tc-primary-l); }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--tc-primary-l); color: var(--tc-primary); display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }

/* Mobile navbar collapse is full-width */
@media (max-width: 991.98px) {
  .tc-navbar .navbar-collapse {
    background: #1e1b4b;
    border-top: 1px solid rgba(255,255,255,.08);
    padding: .75rem 1rem 1rem;
    margin: 0 -12px;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  .tc-navbar .nav-link {
    padding: .6rem .85rem;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.85) !important;
  }
  .tc-navbar .navbar-nav { gap: .2rem; }
  /* Right-side icons stack horizontally */
  .tc-navbar .navbar-nav.align-items-center {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: .5rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: .5rem;
    align-items: center;
    justify-content: flex-start;
  }
  .tc-navbar .navbar-nav.align-items-center .nav-item.dropdown:last-child { margin-left: auto; }
}

/* ---------- Hero Section ---------- */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 80%, #5b21b6 100%);
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 5rem 0 4.5rem;
}
.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-bg-shapes .shape-1 { position: absolute; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,.25), transparent 70%); top: -200px; right: -150px; }
.hero-bg-shapes .shape-2 { position: absolute; width: 350px; height: 350px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.2), transparent 70%); bottom: -100px; left: 5%; }
.hero-bg-shapes .shape-3 { position: absolute; width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, rgba(236,72,153,.15), transparent 70%); top: 38%; left: 28%; }
.hero-stat-card {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #fff;
  transition: transform var(--transition);
  text-align: center;
}
.hero-stat-card:hover { transform: translateY(-4px); }
.hero-stat-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; color: #fff;
  margin: 0 auto .5rem;
}

/* ---------- How It Works ---------- */
.hiw-panel {
  background: var(--tc-bg-card, #fff);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: var(--tc-shadow);
  border: 1px solid var(--tc-border);
  height: 100%;
}
.hiw-role-icon {
  width: 52px; height: 52px; min-width: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
}
.hiw-step-num {
  width: 28px; height: 28px; min-width: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800;
}
.hiw-step-icon {
  width: 44px; height: 44px; min-width: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

/* ---------- Category Cards ---------- */
.category-card {
  background: var(--tc-bg-card, #fff);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  border: 1px solid var(--tc-border);
  transition: all .2s var(--ease-out);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--tc-shadow-md); border-color: rgba(99,102,241,.3); color: inherit; }
.cat-icon { width: 52px; height: 52px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }

/* ---------- Trainer Cards ---------- */
.trainer-card {
  background: var(--tc-bg-card, #fff);
  border-radius: var(--radius-lg);
  border: 1px solid var(--tc-border);
  overflow: hidden;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s;
  height: 100%; display: flex; flex-direction: column;
}
.trainer-card:hover { transform: translateY(-5px); box-shadow: var(--tc-shadow-md); border-color: rgba(99,102,241,.3); }
.trainer-card-top { padding: 1.35rem; display: flex; gap: 1rem; align-items: flex-start; }
.trainer-card-full {
  background: var(--tc-bg-card, #fff);
  border-radius: var(--radius-lg);
  border: 1px solid var(--tc-border);
  overflow: hidden;
  transition: transform .2s var(--ease-out), box-shadow .2s;
  height: 100%; display: flex; flex-direction: column;
}
.trainer-card-full:hover { box-shadow: var(--tc-shadow-md); border-color: rgba(99,102,241,.3); transform: translateY(-3px); }
.trainer-card-banner { height: 56px; flex-shrink: 0; background: linear-gradient(135deg, var(--tc-primary-d), var(--tc-secondary)); }
.trainer-rate { font-size: .875rem; font-weight: 700; color: #059669; }

/* ---------- Requirement Cards ---------- */
.req-card {
  background: var(--tc-bg-card, #fff);
  border-radius: var(--radius-lg);
  border: 1px solid var(--tc-border);
  padding: 1.35rem 1.5rem;
  transition: transform .2s var(--ease-out), box-shadow .2s, border-color .2s;
  height: 100%; display: flex; flex-direction: column;
}
.req-card:hover { transform: translateY(-5px); box-shadow: var(--tc-shadow-md); border-color: rgba(99,102,241,.3); }
.req-card-full {
  background: var(--tc-bg-card, #fff);
  border-radius: var(--radius-lg); border: 1px solid var(--tc-border);
  transition: transform .2s var(--ease-out), box-shadow .2s;
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}
.req-card-full:hover { box-shadow: var(--tc-shadow-md); border-color: rgba(99,102,241,.3); transform: translateY(-3px); }
.req-card-header { height: 4px; flex-shrink: 0; }
.hover-primary:hover { color: var(--tc-primary) !important; }
.stretched-link-inner { position: relative; z-index: 1; }
.req-cat-icon { width: 52px; height: 52px; min-width: 52px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.req-cat-icon-sm { width: 36px; height: 36px; min-width: 36px; border-radius: .4rem; display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }
.page-header { padding-bottom: 1rem; border-bottom: 1px solid var(--tc-border); margin-bottom: 1.5rem !important; }
.filter-card { background: var(--tc-bg-card,#fff); border: 1px solid var(--tc-border); border-radius: var(--radius-lg); box-shadow: var(--tc-shadow-sm); }
.filter-card-body { padding: 1.5rem; }
.req-budget { font-size: .875rem; font-weight: 700; color: #059669; }
.req-mini-card {
  background: var(--tc-bg); border-radius: var(--radius); border: 1px solid var(--tc-border);
  padding: .9rem 1.1rem; display: flex; gap: .75rem; align-items: center;
  transition: all var(--transition); text-decoration: none; color: inherit; cursor: pointer;
}
.req-mini-card:hover { background: var(--tc-primary-l); border-color: rgba(99,102,241,.25); color: inherit; transform: translateY(-1px); }
.app-mini-card {
  background: var(--tc-bg-card, #fff); border-radius: var(--radius);
  border: 1px solid var(--tc-border); padding: .9rem 1.1rem;
  display: flex; align-items: center; gap: .75rem;
}

/* ---------- Feature Cards ---------- */
.feature-card {
  background: var(--tc-bg-card, #fff);
  border-radius: var(--radius-lg); padding: 1.75rem 2rem;
  border: 1px solid var(--tc-border);
  height: 100%;
  transition: transform .2s var(--ease-out), box-shadow .2s, border-color .2s;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--tc-shadow-md); border-color: rgba(99,102,241,.3); }
.feature-icon { width: 54px; height: 54px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 1.1rem; }

/* ---------- CTA Section ---------- */
.cta-section { background: linear-gradient(135deg, var(--tc-primary-d) 0%, var(--tc-secondary) 100%); position: relative; overflow: hidden; }
.cta-inner { position: relative; z-index: 1; }
.cta-section::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }

/* ---------- Stat Cards ---------- */
.stat-card {
  background: var(--tc-bg-card, #fff);
  border-radius: var(--radius-lg);
  border: 1px solid var(--tc-border);
  padding: 1.35rem 1.5rem;
  display: flex; gap: 1rem; align-items: center;
  box-shadow: var(--tc-shadow-card);
  transition: all .2s var(--ease-out);
  overflow: hidden;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--tc-shadow-md); border-color: rgba(99,102,241,.2); }
.stat-number {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 800; line-height: 1;
  color: var(--tc-dark); letter-spacing: -.02em;
}
.stat-label { font-size: .8rem; color: var(--tc-text-muted); font-weight: 500; margin-top: .2rem; }
.stat-icon {
  width: 52px; height: 52px; min-width: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.stat-card-sm .stat-number { font-size: clamp(1.15rem, 2.5vw, 1.45rem); }
.stat-icon-sm { width: 42px; height: 42px; min-width: 42px; font-size: 1.05rem; }

/* ---------- Welcome Banner ---------- */
.welcome-banner {
  background: linear-gradient(135deg, var(--tc-primary-d) 0%, var(--tc-primary) 60%, var(--tc-secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.75rem;
}
.welcome-banner::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,.06); border-radius: 50%;
  pointer-events: none;
}
.welcome-vendor { background: linear-gradient(135deg, #0f766e 0%, #0d9488 60%, #14b8a6 100%); }

/* ---------- Dash Card ---------- */
.dash-card { background: var(--tc-bg-card,#fff); border: 1px solid var(--tc-border); border-radius: var(--radius-lg); box-shadow: var(--tc-shadow-sm); overflow: hidden; }
.dash-card-header { padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--tc-border); display: flex; align-items: center; justify-content: space-between; background: transparent; }
.dash-card-body { padding: 1.25rem 1.5rem; }

/* ---------- Dashboard Layout ---------- */
.dashboard-layout { display: flex; min-height: 100vh; }
.dashboard-main {
  flex: 1; min-width: 0;
  padding: 1.75rem 2rem;
  background: var(--tc-bg);
  overflow-x: hidden;
  transition: margin .25s ease, padding .25s ease;
}
@media (max-width: 1199.98px) {
  .dashboard-main { padding: 1.5rem; }
}

/* ---------- Sidebar (Trainer / Vendor) ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: #0f172a;
  border-right: none;
  display: flex; flex-direction: column;
  height: 100vh;
  position: sticky; top: 0;
  overflow-y: auto; overflow-x: hidden;
  z-index: var(--z-sidebar, 400);
  flex-shrink: 0;
  transition: transform .25s var(--ease-out, ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }
.sidebar-brand {
  padding: 1.25rem 1.25rem .85rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: .75rem;
  min-height: var(--navbar-h, 64px);
}
.sidebar-brand .brand-name { font-size: 1.05rem; font-weight: 800; color: #fff; }
.sidebar-user {
  padding: .9rem 1.25rem;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: .75rem;
}
.sidebar-nav { padding: .5rem .625rem; flex: 1; }
.sidebar-section {
  font-size: .62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: #475569;
  padding: .9rem .5rem .25rem;
}
.sidebar-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem .875rem;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: .875rem; font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
  position: relative; overflow: hidden;
  margin-bottom: .1rem;
  min-height: var(--touch-min, 44px);
}
.sidebar-link i { font-size: .9rem; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-link:hover { background: rgba(255,255,255,.08); color: #e2e8f0; text-decoration: none; }
.sidebar-link.active {
  background: rgba(99,102,241,.18);
  color: #a5b4fc;
  border-left: 3px solid var(--tc-primary);
  padding-left: calc(.875rem - 3px);
}
.sidebar-link .sidebar-icon { width: 20px; text-align: center; font-size: .9rem; }
.sidebar-badge {
  margin-left: auto;
  background: var(--tc-danger); color: #fff;
  font-size: .65rem; font-weight: 800;
  border-radius: 50px; padding: .15rem .5rem;
  min-width: 20px; text-align: center; line-height: 1.3;
}
.sidebar-link.active .sidebar-badge { background: rgba(255,255,255,.2); }
.sidebar-toggle-btn {
  display: none;
  position: fixed; bottom: 1.5rem; right: 1.25rem;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--tc-primary); color: #fff; border: none;
  box-shadow: 0 4px 20px rgba(99,102,241,.45);
  z-index: calc(var(--z-sidebar, 400) + 10);
  font-size: 1.15rem;
  align-items: center; justify-content: center;
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: calc(var(--z-sidebar, 400) - 1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ---------- Admin Layout ---------- */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: var(--admin-sidebar);
  background: var(--tc-dark);
  color: #cbd5e1;
  display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0;
  overflow-y: auto; flex-shrink: 0;
  z-index: 200;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.08) transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 3px; }
.admin-sidebar-brand {
  padding: 1.1rem 1.1rem .9rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: .65rem;
  min-height: 60px;
}
.admin-sidebar-brand .brand-name { font-size: .95rem; font-weight: 800; color: #fff; }
.admin-user-info { padding: .75rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03); }
.admin-nav { padding: .5rem .625rem; flex: 1; }
.admin-nav-section { font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #475569; padding: .85rem .5rem .2rem; }
.admin-nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .85rem;
  border-radius: var(--radius-sm); color: #94a3b8;
  font-size: .82rem; font-weight: 500;
  transition: all var(--transition); text-decoration: none;
  margin-bottom: .1rem;
  min-height: 40px;
}
.admin-nav-link:hover { background: rgba(255,255,255,.07); color: #e2e8f0; text-decoration: none; }
.admin-nav-link.active { background: var(--tc-primary); color: #fff; }
.admin-nav-link .nav-icon { width: 16px; text-align: center; font-size: .8rem; }
.admin-main { flex: 1; min-width: 0; overflow-x: hidden; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--tc-border);
  padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: var(--z-topbar, 100);
}

/* ---------- Auth Pages ---------- */
.auth-page { min-height: 100vh; }
.auth-wrapper {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
@media (max-width: 991.98px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-left { display: none; }
}
.auth-left {
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  padding: 3rem 2.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-left::before { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(99,102,241,.15); top: -100px; right: -100px; }
.auth-left::after  { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: rgba(139,92,246,.1); bottom: -80px; left: -80px; }
.auth-left-content { position: relative; z-index: 1; }
.auth-right {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2.5rem;
}
.auth-box { width: 100%; max-width: 420px; padding: 0 .5rem; }
.auth-card { border-radius: var(--radius-xl); overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.1); }
.auth-features { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.auth-feat-icon { width: 40px; height: 40px; border-radius: .5rem; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: .9rem; color: #fff; flex-shrink: 0; }
.role-selector-tabs { display: flex; background: var(--tc-bg-2); border-radius: var(--radius-sm); padding: .3rem; margin-bottom: 1.5rem; gap: .25rem; }
.role-tab { flex: 1; text-align: center; padding: .625rem; border-radius: .4rem; cursor: pointer; font-size: .875rem; font-weight: 600; color: var(--tc-text-muted); transition: all var(--transition); border: none; background: none; }
.role-tab.active { background: #fff; color: var(--tc-primary); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.role-display-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: 1.25rem; color: rgba(255,255,255,.85); transition: all var(--transition); }
.role-display-card:hover { background: rgba(255,255,255,.14); }
.role-display-card.active { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); color: #fff; }
.role-icon { width: 38px; height: 38px; min-width: 38px; border-radius: .5rem; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: .9rem; color: #fff; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: .75rem; top: 0; bottom: 0; width: 2px; background: var(--tc-border); }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -1.75rem; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--tc-primary); background: var(--tc-primary); top: .25rem; }
.timeline-content { background: var(--tc-bg); border-radius: var(--radius-sm); padding: .75rem 1rem; border: 1px solid var(--tc-border); }

/* ---------- Hover Lift ---------- */
.hover-lift { transition: transform var(--transition), box-shadow var(--transition); }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--tc-shadow-md); }

/* ---------- Quick Action Buttons ---------- */
.quick-action-btn { background: #fff; border: 1px solid var(--tc-border); border-radius: var(--radius); padding: 1.25rem; text-align: center; text-decoration: none; color: var(--tc-text); transition: all var(--transition); display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.quick-action-btn:hover { border-color: var(--tc-primary); color: var(--tc-primary); transform: translateY(-2px); box-shadow: var(--tc-shadow-md); text-decoration: none; }
.quick-action-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }

/* ---------- Footer ---------- */
.tc-footer {
  background: var(--tc-dark-2);
  color: #94a3b8;
  padding: 4rem 0 0;
  border-top: 1px solid rgba(255,255,255,.05);
}
.tc-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 1.25rem 0;
  margin-top: 3rem;
  font-size: .8rem; color: #94a3b8;
}
.tc-footer h6, .tc-footer .footer-heading {
  color: #e2e8f0; font-weight: 700;
  font-size: .875rem; margin-bottom: 1.1rem;
  letter-spacing: .02em;
}
.tc-footer a {
  color: #94a3b8; text-decoration: none;
  font-size: .875rem;
  transition: color var(--transition);
  display: inline-flex; align-items: center; gap: .35rem;
}
.tc-footer a:hover { color: #e2e8f0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.footer-links li a { padding: .1rem 0; }
.footer-links li a::before { content: '›'; color: var(--tc-primary); font-weight: 800; transition: transform var(--transition); display: inline-block; }
.footer-links li a:hover::before { transform: translateX(3px); }
.social-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.social-btn {
  width: 38px; height: 38px; border-radius: .5rem;
  background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; transition: all var(--transition);
  font-size: .9rem;
}
.social-btn:hover { background: var(--tc-primary); color: #fff !important; transform: translateY(-2px); }

/* ---------- Admin table ---------- */
.admin-table td, .admin-table th { vertical-align: middle; }

/* ---------- Flash Messages ---------- */
.flash-alert { border: none; border-radius: var(--radius-sm); font-size: .875rem; }

/* ---------- Form Styles ---------- */
.form-control, .form-select {
  border: 1.5px solid var(--tc-border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  padding: .6rem .9rem;
  min-height: var(--touch-min, 44px);
  background: #fafbfc;
  color: var(--tc-text);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 3.5px rgba(99,102,241,.14);
  background: #fff;
  outline: none;
}
.form-control::placeholder { color: #475569; }
.form-control.is-valid { border-color: var(--tc-success); }
.form-control.is-invalid { border-color: var(--tc-danger); }
.form-label { font-size: .875rem; font-weight: 600; color: var(--tc-text); margin-bottom: .4rem; }
.form-text  { font-size: .78rem; color: #64748b; margin-top: .25rem; }
.input-group-text { background: var(--tc-bg-2); border: 1.5px solid var(--tc-border); color: #64748b; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600; letter-spacing: .01em;
  transition: transform .15s var(--ease-out), box-shadow .15s, background .15s;
  min-height: 36px;
}
.btn-lg { min-height: var(--touch-min, 44px); padding: .75rem 1.75rem; }
.btn-primary { background: var(--tc-primary); border-color: var(--tc-primary); font-weight: 600; color: #fff; box-shadow: 0 1px 8px rgba(99,102,241,.22); }
.btn-primary:hover { background: var(--tc-primary-d); border-color: var(--tc-primary-d); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.38); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-outline-primary { border-color: var(--tc-primary); color: var(--tc-primary); font-weight: 600; }
.btn-outline-primary:hover { background: var(--tc-primary); border-color: var(--tc-primary); transform: translateY(-1px); }
.btn-outline-secondary:hover { transform: translateY(-1px); }

/* ---------- Cards ---------- */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--tc-border);
  box-shadow: var(--tc-shadow-card);
  overflow: hidden;
}
.card-header {
  background: var(--tc-bg-card, #fff);
  border-bottom: 1px solid var(--tc-border);
  font-weight: 700; font-size: .9rem;
  padding: 1rem 1.25rem;
}
.card-body { padding: 1.25rem; }
.card-footer {
  background: var(--tc-bg-card, #fff);
  border-top: 1px solid var(--tc-border);
  padding: .85rem 1.25rem;
}

/* ---------- Table ---------- */
.table { font-size: .875rem; }
.table th {
  font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--tc-text-muted);
  border-bottom: 2px solid var(--tc-border);
  padding: .75rem .9rem;
  white-space: nowrap;
}
.table td { padding: .75rem .9rem; vertical-align: middle; }
.table-hover > tbody > tr:hover > * { background: #f8fafc; }
.table-responsive { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--tc-border); }

/* ---------- Select2 Theme ---------- */
.select2-container--bootstrap-5 .select2-selection { border-color: var(--tc-border); border-radius: var(--radius-sm); min-height: 40px; font-size: .9rem; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice { background: var(--tc-primary-l); color: var(--tc-primary); border: none; border-radius: .3rem; font-size: .78rem; }

/* ---------- DataTables ---------- */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input { border-color: var(--tc-border); border-radius: var(--radius-sm); font-size: .875rem; padding: .4rem .7rem; }
.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--tc-primary); box-shadow: none; outline: none; }
div.dataTables_info { font-size: .8rem; color: var(--tc-text-muted); }

/* ---------- Pagination ---------- */
.pagination { gap: .2rem; }
.page-link { border-radius: .4rem !important; border: 1px solid var(--tc-border); color: var(--tc-text); font-size: .82rem; padding: .4rem .7rem; }
.page-link:hover { background: var(--tc-primary-l); color: var(--tc-primary); border-color: var(--tc-primary); }
.page-item.active .page-link { background: var(--tc-primary); border-color: var(--tc-primary); }
.page-item.disabled .page-link { opacity: .45; }

/* ---------- Stars ---------- */
.star-rating .fa-star { color: #fbbf24; }
.star-rating .fa-star.empty { color: #e2e8f0; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 50px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- Chart containers ---------- */
.chart-container { position: relative; }
.chart-container canvas { max-width: 100%; }

/* ---------- Misc Utilities ---------- */
.mini-icon { width: 28px; height: 28px; border-radius: .35rem; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; }
.admin-link { font-size: .82rem; color: var(--tc-text); text-decoration: none; display: flex; align-items: center; gap: .4rem; padding: .3rem .5rem; border-radius: .3rem; transition: all var(--transition); }
.admin-link:hover { background: var(--tc-bg); color: var(--tc-primary); }
.bg-primary-subtle { background-color: var(--tc-primary-l) !important; }
.text-primary { color: var(--tc-primary) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 2rem 1.5rem; min-height: 100vh; display: flex; align-items: center; justify-content: center; }

  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); z-index: var(--z-sidebar, 400); height: 100vh; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--tc-shadow-lg); }
  .sidebar-toggle-btn { display: flex; align-items: center; justify-content: center; }
  .sidebar-overlay.active { display: block; }
  .dashboard-layout { display: block; }
  .dashboard-main { padding: 1rem; }

  .admin-wrapper { display: block; }
  .admin-sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); height: 100vh; transition: transform .25s var(--ease-out); z-index: var(--z-sidebar, 400); }
  .admin-sidebar.open { transform: translateX(0); }

  .hero-section { padding: 4.5rem 0 3rem; min-height: 72vh; }
  .hiw-panel { padding: 1.75rem 1.5rem; }
}
@media (max-width: 767.98px) {
  .hero-section h1 { font-size: clamp(1.65rem, 6vw, 2.2rem); }
  .hero-section { padding: 3.5rem 0 2.5rem; min-height: unset; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .stat-card .stat-icon { width: 44px; height: 44px; font-size: 1.1rem; }
  .notif-dropdown { width: calc(100vw - 1.5rem); }
  .welcome-banner { padding: 1.25rem 1.35rem; }
  .welcome-banner .display-6 { font-size: 1.25rem; }
  .feature-card { padding: 1.5rem; }
  .hero-stat-card { padding: .75rem 1rem; }
  .tc-footer { padding: 2.5rem 0 0; }
}
@media (max-width: 575.98px) {
  .dashboard-main { padding: .75rem .625rem; }
  .trainer-card-full, .req-card-full { flex-direction: column; }
  .trainer-card-full .flex-shrink-0, .req-card-full .req-cat-icon { margin-bottom: .5rem; }
  .auth-right { padding: 1.5rem 1rem; }
  .auth-box .col-6 { flex: 0 0 100%; max-width: 100%; }
  .req-card-full .row { flex-direction: row; flex-wrap: wrap; }
  .req-card-full .col-auto { flex: 0 0 auto; }
  .stat-number { font-size: 1.4rem; }
  .hiw-panel { padding: 1.25rem 1rem; }
  .quick-action-btn { padding: 1rem .75rem; }
  .welcome-banner { border-radius: var(--radius); }
  .card-body { padding: 1rem; }
  .table th, .table td { padding: .6rem .65rem; font-size: .78rem; }
  .chat-layout { height: calc(100vh - 90px); }
  .chat-messages { padding: .75rem; }
  .chat-input-area { padding: .65rem .75rem; }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .5s ease forwards; }
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: .7; }
}
.pulse-dot { animation: pulse-dot 2s infinite; }

/* ---------- Dark mode override (optional, future) ---------- */
/* ================================================================
   DARK MODE
   ================================================================ */

/* Dark mode tokens — applied via [data-theme="dark"] on <html> */
[data-theme="dark"] {
  --tc-bg:         #0f172a;
  --tc-bg-2:       #1e293b;
  --tc-bg-card:    #1e293b;
  --tc-text:       #e2e8f0;
  --tc-text-muted: #94a3b8;
  --tc-dark:       #f1f5f9;
  --tc-dark-2:     #0f172a;
  --tc-border:     rgba(148,163,184,.15);

  --tc-shadow-sm:   0 1px 4px rgba(0,0,0,.3);
  --tc-shadow:      0 2px 12px rgba(0,0,0,.4);
  --tc-shadow-md:   0 4px 24px rgba(0,0,0,.5);
  --tc-shadow-lg:   0 12px 48px rgba(0,0,0,.6);
  --tc-shadow-card: 0 1px 6px rgba(0,0,0,.3);

  color-scheme: dark;
}

/* ── Body & Base ──────────────────────────────────────────── */
[data-theme="dark"] body {
  background: var(--tc-bg);
  color: var(--tc-text);
}

/* ── Cards & Surfaces ─────────────────────────────────────── */
[data-theme="dark"] .card,
[data-theme="dark"] .dash-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .filter-card,
[data-theme="dark"] .trainer-card,
[data-theme="dark"] .trainer-card-full,
[data-theme="dark"] .req-card,
[data-theme="dark"] .req-card-full,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .category-card,
[data-theme="dark"] .hiw-panel,
[data-theme="dark"] .quick-action-btn,
[data-theme="dark"] .app-mini-card {
  background: var(--tc-bg-card);
  border-color: var(--tc-border);
  color: var(--tc-text);
}

/* ── Card Headers ─────────────────────────────────────────── */
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer,
[data-theme="dark"] .dash-card-header {
  background: var(--tc-bg-card);
  border-color: var(--tc-border);
  color: var(--tc-text);
}

/* ── Forms ────────────────────────────────────────────────── */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: var(--tc-bg-2);
  border-color: var(--tc-border);
  color: var(--tc-text);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background: #253347;
  border-color: var(--tc-primary);
  color: var(--tc-text);
}
[data-theme="dark"] .form-control::placeholder { color: #64748b; }
[data-theme="dark"] .input-group-text {
  background: #1a2332;
  border-color: var(--tc-border);
  color: var(--tc-text-muted);
}
[data-theme="dark"] .form-label { color: var(--tc-text); }

/* ── Tables ───────────────────────────────────────────────── */
[data-theme="dark"] .table { color: var(--tc-text); }
[data-theme="dark"] .table th { color: var(--tc-text-muted); border-color: var(--tc-border); }
[data-theme="dark"] .table td { border-color: var(--tc-border); }
[data-theme="dark"] .table > tbody > tr:nth-child(even) > td { background: rgba(30,41,59,.6); }
[data-theme="dark"] .table-hover > tbody > tr:hover > * { background: rgba(99,102,241,.08); }
[data-theme="dark"] .table > tbody > tr:hover > td:first-child { box-shadow: inset 3px 0 0 var(--tc-primary); }
[data-theme="dark"] .table-responsive { border-color: var(--tc-border); }

/* ── Buttons ──────────────────────────────────────────────── */
[data-theme="dark"] .btn-outline-secondary {
  border-color: var(--tc-border);
  color: var(--tc-text-muted);
}
[data-theme="dark"] .btn-outline-secondary:hover {
  background: var(--tc-bg-2);
  color: var(--tc-text);
}
[data-theme="dark"] .btn-light {
  background: var(--tc-bg-2);
  border-color: var(--tc-border);
  color: var(--tc-text);
}

/* ── Dropdown ─────────────────────────────────────────────── */
[data-theme="dark"] .dropdown-menu {
  background: var(--tc-bg-card);
  border-color: var(--tc-border);
}
[data-theme="dark"] .dropdown-item {
  color: var(--tc-text);
}
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
  background: rgba(99,102,241,.12);
  color: #a5b4fc;
}
[data-theme="dark"] .dropdown-divider { border-color: var(--tc-border); }

/* ── Modals ───────────────────────────────────────────────── */
[data-theme="dark"] .modal-content {
  background: var(--tc-bg-card);
  border-color: var(--tc-border);
  color: var(--tc-text);
}
[data-theme="dark"] .modal-header { border-color: var(--tc-border); }
[data-theme="dark"] .modal-footer { border-color: var(--tc-border); }
[data-theme="dark"] .btn-close { filter: invert(1); }

/* ── Alerts ───────────────────────────────────────────────── */
[data-theme="dark"] .alert-warning { background: rgba(245,158,11,.12); color: #fbbf24; }
[data-theme="dark"] .alert-success { background: rgba(16,185,129,.12); color: #6ee7b7; }
[data-theme="dark"] .alert-danger  { background: rgba(239,68,68,.12);  color: #fca5a5; }
[data-theme="dark"] .alert-info    { background: rgba(59,130,246,.12);  color: #93c5fd; }

/* ── Badges ───────────────────────────────────────────────── */
[data-theme="dark"] .badge-soft-primary { background: rgba(99,102,241,.18); }
[data-theme="dark"] .badge-soft-success { background: rgba(16,185,129,.18); }
[data-theme="dark"] .badge-soft-warning { background: rgba(245,158,11,.18); }
[data-theme="dark"] .badge-soft-danger  { background: rgba(239,68,68,.18); }

/* ── Pagination ───────────────────────────────────────────── */
[data-theme="dark"] .page-link {
  background: var(--tc-bg-card);
  border-color: var(--tc-border);
  color: var(--tc-text);
}
[data-theme="dark"] .page-link:hover {
  background: rgba(99,102,241,.15);
  color: #a5b4fc;
}

/* ── Auth Pages ───────────────────────────────────────────── */
[data-theme="dark"] .auth-right {
  background: #fff;
}
[data-theme="dark"] .auth-card { background: #fff; }
[data-theme="dark"] .auth-box { background: #fff; border-color: #e2e8f0; }
[data-theme="dark"] .role-selector-tabs { background: #f1f5f9; }
[data-theme="dark"] .role-tab { color: #64748b; }
[data-theme="dark"] .role-tab.active { background: #fff; color: var(--tc-primary); }
[data-theme="dark"] .step-dot { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
[data-theme="dark"] .step-dot.done { background: var(--tc-primary); color: #fff; }
[data-theme="dark"] .step-line { background: #e2e8f0; }
[data-theme="dark"] .step-line.done { background: var(--tc-primary); }
[data-theme="dark"] .role-display-card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .pass-strength-bar { background: #fafbfc; }

/* ── Chat ─────────────────────────────────────────────────── */
[data-theme="dark"] .chat-layout { background: var(--tc-bg-card); border-color: var(--tc-border); }
[data-theme="dark"] .chat-sidebar { background: var(--tc-bg); border-color: var(--tc-border); }
[data-theme="dark"] .chat-sidebar-header { background: var(--tc-bg-card); }
[data-theme="dark"] .chat-thread-header { background: var(--tc-bg-card); border-color: var(--tc-border); }
[data-theme="dark"] .chat-messages { background: #0c1322; }
[data-theme="dark"] .msg-row.theirs .msg-bubble { background: var(--tc-bg-card); color: var(--tc-text); border-color: var(--tc-border); }
[data-theme="dark"] .chat-input-area { background: var(--tc-bg-card); border-color: var(--tc-border); }
[data-theme="dark"] .chat-input-wrap { background: var(--tc-bg); border-color: var(--tc-border); }
[data-theme="dark"] .chat-input { color: var(--tc-text); }
[data-theme="dark"] .conv-item { border-color: var(--tc-border); }
[data-theme="dark"] .conv-item:hover { background: rgba(99,102,241,.08); }
[data-theme="dark"] .conv-item .conv-name { color: var(--tc-text); }
[data-theme="dark"] .chat-date-sep span { background: #0c1322; }

/* ── Page Loader ──────────────────────────────────────────── */
[data-theme="dark"] #page-loader { background: var(--tc-bg); }

/* ── Scrollbar ────────────────────────────────────────────── */
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(148,163,184,.2); }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,.35); }

/* ── Breadcrumb ───────────────────────────────────────────── */
[data-theme="dark"] .breadcrumb-item.active { color: var(--tc-text-muted); }
[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: var(--tc-text-muted); }

/* ── Timeline ─────────────────────────────────────────────── */
[data-theme="dark"] .timeline::before { background: var(--tc-border); }
[data-theme="dark"] .timeline-content { background: var(--tc-bg-card); border-color: var(--tc-border); }

/* ── Misc ─────────────────────────────────────────────────── */
[data-theme="dark"] hr { border-color: var(--tc-border); }
[data-theme="dark"] .text-dark { color: var(--tc-text) !important; }
[data-theme="dark"] .badge.bg-warning.text-dark { color: #1e293b !important; }
[data-theme="dark"] .bg-white { background: var(--tc-bg-card) !important; }
[data-theme="dark"] .bg-light { background: var(--tc-bg-2) !important; }
[data-theme="dark"] .border { border-color: var(--tc-border) !important; }
[data-theme="dark"] .border-bottom { border-color: var(--tc-border) !important; }
[data-theme="dark"] .border-top { border-color: var(--tc-border) !important; }
[data-theme="dark"] .shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,.3) !important; }
[data-theme="dark"] .req-mini-card { background: var(--tc-bg-card); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .req-mini-card:hover { background: rgba(99,102,241,.08); color: var(--tc-text); }
[data-theme="dark"] .notif-dropdown { background: var(--tc-bg-card); border-color: var(--tc-border); }
[data-theme="dark"] .notif-item.unread { background: rgba(99,102,241,.08); }

/* ── Global text-muted dark mode fix ──────────────────────── */
[data-theme="dark"] .text-muted { color: var(--tc-text-muted) !important; }
[data-theme="dark"] .text-secondary { color: #94a3b8 !important; }

/* ── Notification dropdown dark mode ──────────────────────── */
[data-theme="dark"] .notif-item { border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .notif-item:hover { background: rgba(99,102,241,.06); }
[data-theme="dark"] .notif-item .small.fw-semibold { color: var(--tc-text); }
[data-theme="dark"] .notif-item .small.text-muted,
[data-theme="dark"] .notif-item .x-small.text-muted { color: var(--tc-text-muted) !important; }

/* ── Select2 dark mode — selected value & input ───────────── */
[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered { color: var(--tc-text); }
[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice { background: var(--tc-bg); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder { color: var(--tc-text-muted); }
[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted { background: rgba(99,102,241,.15); color: #a5b4fc; }
[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove { color: var(--tc-text-muted); }

/* ── Trainer-view profile hero dark mode ──────────────────── */
.profile-hero-bg { background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%); }
[data-theme="dark"] .profile-hero-bg { background: linear-gradient(135deg, rgba(99,102,241,.08) 0%, rgba(16,185,129,.06) 100%); }

/* ── Footer text contrast fix ─────────────────────────────── */
.tc-footer .text-muted { color: #b0bec5 !important; }
.tc-footer a { color: #b0bec5; }
.tc-footer a:hover { color: #fff; }
.tc-footer-bottom .text-muted { color: #90a4ae !important; }

/* ── Dark mode toggle ─────────────────────────────────────── */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
  font-size: .9rem;
}
.theme-toggle:hover { background: rgba(255,255,255,.15); transform: scale(1.1); }
[data-theme="dark"] .theme-toggle { border-color: var(--tc-border); background: var(--tc-bg-2); color: #fbbf24; }

/* ── Select2 dark mode ────────────────────────────────────── */
[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection { background: var(--tc-bg-2); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown { background: var(--tc-bg-card); border-color: var(--tc-border); }
[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option { color: var(--tc-text); }
[data-theme="dark"] .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field { background: var(--tc-bg); border-color: var(--tc-border); color: var(--tc-text); }

/* ── SweetAlert2 dark mode ────────────────────────────────── */
[data-theme="dark"] .swal2-popup { background: var(--tc-bg-card) !important; color: var(--tc-text) !important; }
[data-theme="dark"] .swal2-title { color: var(--tc-text) !important; }
[data-theme="dark"] .swal2-html-container { color: var(--tc-text-muted) !important; }
[data-theme="dark"] .swal2-input { background: var(--tc-bg) !important; color: var(--tc-text) !important; border-color: var(--tc-border) !important; }
[data-theme="dark"] .swal2-textarea { background: var(--tc-bg) !important; color: var(--tc-text) !important; border-color: var(--tc-border) !important; }

/* ── DataTables dark mode ─────────────────────────────────── */
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input { background: var(--tc-bg-2); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .dataTables_wrapper .dataTables_length select { background: var(--tc-bg-2); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--tc-text) !important; }
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: rgba(99,102,241,.15) !important; color: #a5b4fc !important; }

/* ── OTP dark mode ────────────────────────────────────────── */
[data-theme="dark"] .otp-digit { background: var(--tc-bg-2); border-color: var(--tc-border); color: #a5b4fc; }
[data-theme="dark"] .otp-digit:focus { background: var(--tc-bg-card); }

/* ── Admin area dark mode ─────────────────────────────────── */
[data-theme="dark"] .admin-body { background: var(--tc-bg); }
[data-theme="dark"] .admin-main { background: var(--tc-bg); }
[data-theme="dark"] .admin-topbar { background: var(--tc-bg-card); border-color: var(--tc-border); }
[data-theme="dark"] .admin-topbar .btn-outline-secondary { border-color: var(--tc-border); color: var(--tc-text-muted); }
[data-theme="dark"] .admin-topbar .btn-outline-primary { border-color: rgba(99,102,241,.4); color: #a5b4fc; }
[data-theme="dark"] .admin-topbar .text-muted { color: var(--tc-text-muted) !important; }
[data-theme="dark"] .stat-card { background: var(--tc-bg-card) !important; border: 1px solid var(--tc-border); }
[data-theme="dark"] .stat-card .stat-number { filter: brightness(1.2); }
[data-theme="dark"] .stat-card .text-muted { color: var(--tc-text-muted) !important; }
[data-theme="dark"] .health-item { background: var(--tc-bg-2); border-color: var(--tc-border); }
[data-theme="dark"] .admin-wrapper .page-header h4 { color: var(--tc-text); }
[data-theme="dark"] .admin-wrapper .breadcrumb-item a { color: #a5b4fc; }
[data-theme="dark"] .admin-wrapper .breadcrumb-item.active { color: var(--tc-text-muted); }

/* ── Bootstrap components dark mode ───────────────────────── */
[data-theme="dark"] .list-group-item { background: var(--tc-bg-card); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .form-control { background: var(--tc-bg-2); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .form-control::placeholder { color: var(--tc-text-muted); }
[data-theme="dark"] .form-control:focus { background: var(--tc-bg-card); border-color: rgba(99,102,241,.5); color: var(--tc-text); }
[data-theme="dark"] .form-select { background-color: var(--tc-bg-2); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .input-group-text { background: var(--tc-bg-2); border-color: var(--tc-border); color: var(--tc-text-muted); }
[data-theme="dark"] .form-label { color: var(--tc-text); }
[data-theme="dark"] .form-check-label { color: var(--tc-text); }
[data-theme="dark"] .btn-outline-secondary { border-color: var(--tc-border); color: var(--tc-text-muted); }
[data-theme="dark"] .btn-outline-secondary:hover { background: var(--tc-bg-2); color: var(--tc-text); }
[data-theme="dark"] .dropdown-menu { background: var(--tc-bg-card); border-color: var(--tc-border); }
[data-theme="dark"] .dropdown-item { color: var(--tc-text); }
[data-theme="dark"] .dropdown-item:hover, [data-theme="dark"] .dropdown-item:focus { background: rgba(99,102,241,.08); color: var(--tc-text); }
[data-theme="dark"] .modal-content { background: var(--tc-bg-card); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .modal-header { border-color: var(--tc-border); }
[data-theme="dark"] .modal-footer { border-color: var(--tc-border); }
[data-theme="dark"] .border-bottom { border-color: var(--tc-border) !important; }
[data-theme="dark"] .border-top { border-color: var(--tc-border) !important; }

/* ── Trainer card full (vendor/trainers) dark mode ────────── */
[data-theme="dark"] .trainer-card-full { background: var(--tc-bg-card); border-color: var(--tc-border); }
[data-theme="dark"] .trainer-card-full .border-white { border-color: var(--tc-bg-card) !important; }
[data-theme="dark"] .trainer-rate { color: var(--tc-success); }

/* ── Unfilled stars visibility ────────────────────────────── */
[data-theme="dark"] .fa-star.text-light { color: var(--tc-border) !important; }
[data-theme="dark"] .fa-star.text-muted.opacity-25 { color: var(--tc-border) !important; opacity: .5 !important; }

/* ── Auth page dark mode extras ───────────────────────────── */
.auth-right .text-dark { color: #0f172a !important; }
.auth-right h4,
.auth-right h5,
.auth-right h6 { color: #0f172a; }
.auth-right .form-label { color: #0f172a; }
.auth-right .form-check-label { color: #0f172a; }
.auth-right .role-selector-tabs { background: #f1f5f9; }
.auth-right .role-tab { color: #64748b; }
.auth-right .role-tab.active { background: #fff; color: var(--tc-primary); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.auth-right .step-dot { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
.auth-right .step-dot.current { background: var(--tc-primary); border-color: var(--tc-primary); color: #fff; }
.auth-right .step-dot.done { background: #10b981; border-color: #10b981; color: #fff; }
.auth-right .step-line { background: #e2e8f0; }
.auth-right .otp-digit { background: #fafbfc; border-color: #e2e8f0; color: #6366f1; }
.auth-right .form-control,
.auth-right .form-select { background: #fafbfc; border-color: #e2e8f0; color: #0f172a; }
.auth-right .form-control:focus,
.auth-right .form-select:focus { background: #fff; border-color: var(--tc-primary); color: #0f172a; }
.auth-right .form-control::placeholder { color: #94a3b8; }
.auth-right .input-group-text { background: #f1f5f9; border-color: #e2e8f0; color: #fff; }
.auth-right .input-group-text i { color: #fff; opacity: 1; }
.auth-right .text-muted { color: #64748b !important; }
.auth-right .alert { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.auth-right .alert-danger { background: #fee2e2; border-color: #fecaca; color: #7f1d1d; }

/* ── Section heading dark mode ────────────────────────────── */
[data-theme="dark"] .display-6 { color: var(--tc-text); }
.auth-right .fw-bold,
.auth-right .fw-semibold { color: #0f172a; }
[data-theme="dark"] .section-badge { color: var(--tc-text); }

/* ── How it Works panel dark mode ─────────────────────────── */
[data-theme="dark"] .hiw-panel .fw-semibold { color: var(--tc-text); }

/* ── Features section dark mode ───────────────────────────── */
[data-theme="dark"] .features-section h5.fw-bold { color: var(--tc-text); }

/* ── Chat dark mode extras ────────────────────────────────── */
[data-theme="dark"] .chat-sidebar { background: var(--tc-bg-card); border-color: var(--tc-border); }
[data-theme="dark"] .chat-sidebar .input-group-text { background: var(--tc-bg-2); border-color: var(--tc-border); color: var(--tc-text-muted); }
[data-theme="dark"] .chat-area { background: var(--tc-bg); }
[data-theme="dark"] .chat-compose { background: var(--tc-bg-card); border-color: var(--tc-border); }

/* ---------- Back To Top ---------- */
#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--tc-primary);
  color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  box-shadow: 0 4px 16px rgba(99,102,241,.4);
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, visibility .25s, transform .25s var(--ease-out);
  z-index: var(--z-toast, 9999);
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: var(--tc-primary-d); transform: translateY(-2px); }
/* Push away from sidebar-toggle on mobile */
@media (max-width: 991.98px) {
  #back-to-top { bottom: 5rem; right: 1rem; }
}

/* ---------- Print ---------- */
@media print {
  .sidebar, .admin-sidebar, .tc-navbar, .sidebar-toggle-btn, #back-to-top { display: none !important; }
  .dashboard-main, .admin-main { padding: 0 !important; }
}

/* =====================================================
   Enterprise Additions
   ===================================================== */

/* ---------- Glass Cards ---------- */
.glass-card {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(99,102,241,.1);
}
.glass-dark {
  background: rgba(30,27,75,.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
}

/* ---------- Training Mode Badges ---------- */
.mode-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 700; padding: .2rem .65rem;
  border-radius: 50px; letter-spacing: .03em; text-transform: uppercase;
}
.mode-online   { background: #d1fae5; color: #065f46; }
.mode-offline  { background: #dbeafe; color: #1e40af; }
.mode-hybrid   { background: #ede9fe; color: #5b21b6; }

/* ---------- Online Presence Indicator ---------- */
.online-indicator {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--tc-success); border: 2px solid #fff;
  display: inline-block; flex-shrink: 0;
}
.online-indicator.offline { background: #94a3b8; }
.user-avatar-wrap { position: relative; display: inline-block; }
.user-avatar-wrap .online-indicator {
  position: absolute; bottom: 1px; right: 1px;
}

/* ---------- Chat UI ---------- */
.chat-layout { display: flex; height: calc(100vh - 160px); min-height: 500px; gap: 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--tc-border); background: #fff; box-shadow: var(--tc-shadow); }

/* Conversations panel */
.chat-sidebar { width: 320px; border-right: 1px solid var(--tc-border); display: flex; flex-direction: column; flex-shrink: 0; background: #fafafa; }
.chat-sidebar-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--tc-border); background: #fff; }
.chat-sidebar-search { padding: .75rem 1rem; border-bottom: 1px solid var(--tc-border); }
.chat-sidebar-list { flex: 1; overflow-y: auto; }
.conv-item { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; cursor: pointer; border-bottom: 1px solid var(--tc-border); transition: background var(--transition); position: relative; }
.conv-item:hover { background: var(--tc-primary-l); }
.conv-item.active { background: linear-gradient(90deg, var(--tc-primary-l), transparent); border-left: 3px solid var(--tc-primary); }
.conv-item .conv-name { font-size: .875rem; font-weight: 600; color: var(--tc-dark); }
.conv-item .conv-preview { font-size: .78rem; color: var(--tc-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.conv-item .conv-time { font-size: .68rem; color: var(--tc-text-muted); white-space: nowrap; }
.conv-item .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc-primary); flex-shrink: 0; }
.conv-unread-count { background: var(--tc-primary); color: #fff; font-size: .62rem; font-weight: 700; border-radius: 50px; padding: .1rem .4rem; min-width: 18px; text-align: center; }
.conv-item.has-unread .conv-name { color: var(--tc-primary); }

/* Thread panel */
.chat-thread { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-thread-header { padding: .85rem 1.25rem; border-bottom: 1px solid var(--tc-border); display: flex; align-items: center; gap: .75rem; background: #fff; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; background: var(--tc-bg); }
.chat-messages-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--tc-text-muted); gap: .5rem; }

/* Message bubbles */
.msg-row { display: flex; align-items: flex-end; gap: .5rem; max-width: 70%; }
.msg-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.theirs { align-self: flex-start; }
.msg-bubble {
  padding: .65rem 1rem; border-radius: 1rem;
  font-size: .875rem; line-height: 1.5; word-break: break-word;
  position: relative; max-width: 100%;
}
.msg-row.mine .msg-bubble   { background: var(--tc-primary); color: #fff; border-bottom-right-radius: .25rem; }
.msg-row.theirs .msg-bubble { background: #fff; color: var(--tc-text); border: 1px solid var(--tc-border); border-bottom-left-radius: .25rem; }
.msg-meta { display: flex; align-items: center; gap: .3rem; font-size: .65rem; margin-top: .25rem; }
.msg-row.mine   .msg-meta { color: rgba(255,255,255,.75); justify-content: flex-end; }
.msg-row.theirs .msg-meta { color: var(--tc-text-muted); }

/* File message bubble */
.msg-bubble-file {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; min-width: 220px;
}
.msg-file-icon { width: 40px; height: 40px; border-radius: .5rem; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.msg-row.mine .msg-file-icon   { background: rgba(255,255,255,.2); color: #fff; }
.msg-row.theirs .msg-file-icon { background: var(--tc-primary-l); color: var(--tc-primary); }
.msg-file-info { flex: 1; min-width: 0; }
.msg-file-name { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-file-size { font-size: .7rem; opacity: .8; }
.msg-file-dl { font-size: .72rem; opacity: .85; }
.msg-file-dl:hover { opacity: 1; }

/* Image message */
.msg-bubble-img { padding: .35rem !important; }
.msg-bubble-img img { max-width: 240px; max-height: 240px; border-radius: .65rem; cursor: pointer; display: block; object-fit: cover; }

/* Date separator */
.chat-date-sep { text-align: center; font-size: .72rem; color: var(--tc-text-muted); position: relative; margin: .5rem 0; }
.chat-date-sep::before, .chat-date-sep::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--tc-border); }
.chat-date-sep::before { left: 0; }
.chat-date-sep::after  { right: 0; }
.chat-date-sep span { background: var(--tc-bg); padding: 0 .75rem; position: relative; }

/* Reaction */
.msg-reaction { font-size: .9rem; position: absolute; bottom: -12px; right: 8px; background: #fff; border-radius: 50px; padding: .05rem .35rem; box-shadow: 0 1px 4px rgba(0,0,0,.12); line-height: 1; }
.msg-row.theirs .msg-reaction { right: auto; left: 8px; }

/* Read receipts */
.msg-read-tick { font-size: .65rem; }
.msg-read-tick.read    { color: #38bdf8; }
.msg-read-tick.unread  { color: rgba(255,255,255,.65); }

/* Typing indicator */
.typing-indicator { display: flex; align-items: center; gap: .4rem; padding: .5rem .75rem; font-size: .8rem; color: var(--tc-text-muted); }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tc-text-muted); animation: typing-bounce .9s infinite ease-in-out; }
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

/* Chat input area */
.chat-input-area { padding: 1rem 1.25rem; border-top: 1px solid var(--tc-border); background: #fff; }
.chat-input-wrap { display: flex; align-items: flex-end; gap: .5rem; background: var(--tc-bg); border: 1px solid var(--tc-border); border-radius: var(--radius); padding: .5rem .75rem; transition: border-color var(--transition), box-shadow var(--transition); }
.chat-input-wrap:focus-within { border-color: var(--tc-primary); box-shadow: 0 0 0 .2rem rgba(99,102,241,.15); }
.chat-input { flex: 1; border: none; background: transparent; outline: none; resize: none; font-size: .9rem; line-height: 1.5; max-height: 120px; overflow-y: auto; padding: .25rem 0; color: var(--tc-text); }
.chat-send-btn { width: 36px; height: 36px; border-radius: .5rem; border: none; background: var(--tc-primary); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--transition), transform var(--transition); flex-shrink: 0; }
.chat-send-btn:hover { background: var(--tc-primary-d); transform: scale(1.05); }
.chat-attach-btn { width: 36px; height: 36px; border-radius: .5rem; border: none; background: transparent; color: var(--tc-text-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition); flex-shrink: 0; }
.chat-attach-btn:hover { background: var(--tc-primary-l); color: var(--tc-primary); }
/* Attach preview chips */
.attach-preview-bar { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem 0 0; }
.attach-chip { display: flex; align-items: center; gap: .35rem; background: var(--tc-primary-l); border-radius: 50px; padding: .25rem .65rem; font-size: .75rem; color: var(--tc-primary); }
.attach-chip .remove-chip { cursor: pointer; opacity: .7; }
.attach-chip .remove-chip:hover { opacity: 1; }

/* Drag-drop overlay */
.drop-overlay { position: absolute; inset: 0; background: rgba(99,102,241,.08); border: 2px dashed var(--tc-primary); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; z-index: 50; pointer-events: none; opacity: 0; transition: opacity var(--transition); }
.drop-overlay.active { opacity: 1; }
.chat-thread { position: relative; }

/* No conversation selected */
.chat-empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--tc-text-muted); gap: 1rem; padding: 2rem; }
/* Mobile chat */
@media (max-width: 767.98px) {
  .chat-layout { height: calc(100vh - 120px); }
  .chat-sidebar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 10; transform: translateX(-100%); transition: transform var(--transition); width: 90%; max-width: 320px; background: #fff; }
  .chat-sidebar.open { transform: translateX(0); box-shadow: var(--tc-shadow-lg); }
  .msg-row { max-width: 90%; }
}

/* ---------- Floating WhatsApp Button ---------- */
.whatsapp-float {
  position: fixed; bottom: 5.5rem; right: 1.5rem; z-index: 9998;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; box-shadow: 0 4px 16px rgba(37,211,102,.45);
  text-decoration: none; transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37,211,102,.6); color: #fff; }
.whatsapp-float::before {
  content: ''; position: absolute; width: 100%; height: 100%;
  border-radius: 50%; background: #25d366;
  animation: wa-pulse 2.5s infinite; opacity: .6;
}
@keyframes wa-pulse {
  0%   { transform: scale(1); opacity: .6; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- Admin Ban / Warn Controls ---------- */
.ban-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; padding: .25rem .65rem; border-radius: 50px; }
.ban-status.active-ban { background: #fee2e2; color: #991b1b; }
.ban-status.warned    { background: #fef3c7; color: #92400e; }
.ban-status.clean     { background: #d1fae5; color: #065f46; }
.warn-count-badge { background: #fef3c7; color: #b45309; font-size: .72rem; font-weight: 700; border-radius: 50px; padding: .1rem .45rem; }
.admin-note-snippet { font-size: .78rem; color: var(--tc-text-muted); font-style: italic; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ban-log-row td { vertical-align: middle; font-size: .82rem; }
.action-ban    { background: #fee2e2; color: #991b1b; }
.action-unban  { background: #d1fae5; color: #065f46; }
.action-warn   { background: #fef3c7; color: #92400e; }

/* ---------- Profile Score / Rating Bar ---------- */
.profile-score-bar { height: 6px; border-radius: 50px; background: var(--tc-border); overflow: hidden; }
.profile-score-fill { height: 100%; border-radius: 50px; transition: width .6s ease; }
.score-0-40  { background: var(--tc-danger); }
.score-40-70 { background: var(--tc-warning); }
.score-70-100{ background: var(--tc-success); }

/* ---------- Application Score Slider ---------- */
.score-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 50px; background: var(--tc-border); outline: none; }
.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--tc-primary); cursor: pointer; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(99,102,241,.4);
}
.score-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--tc-primary); cursor: pointer; border: 2px solid #fff;
}
.score-display { font-size: 1.1rem; font-weight: 800; color: var(--tc-primary); min-width: 28px; text-align: center; }

/* ---------- Interview Status Badge ---------- */
.badge-interviewed { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; font-size: .72rem; font-weight: 700; }

/* ---------- Shortlist Order ---------- */
.shortlist-order-btn { width: 28px; height: 28px; border-radius: .35rem; border: 1px solid var(--tc-border); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; transition: all var(--transition); }
.shortlist-order-btn:hover { background: var(--tc-primary-l); border-color: var(--tc-primary); color: var(--tc-primary); }

/* ---------- Navbar Phone CTA ---------- */
.navbar-phone-cta { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; padding: .4rem .9rem; border-radius: 50px; transition: all var(--transition); white-space: nowrap; }
.btn-wa-nav { background: #25d366 !important; border-color: #25d366 !important; color: #fff !important; }

/* ---------- Premium Landing Sections ---------- */
.contact-info-bar { background: linear-gradient(90deg, var(--tc-primary-d), var(--tc-secondary)); padding: .5rem 0; }
.contact-info-bar a, .contact-info-bar span { color: rgba(255,255,255,.9); font-size: .8rem; }
.contact-info-bar a:hover { color: #fff; }
.cta-phone-btn { background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.4); color: #fff !important; border-radius: 50px; padding: .65rem 1.5rem; font-weight: 700; font-size: .95rem; transition: all var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.cta-phone-btn:hover { background: rgba(255,255,255,.25); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.cta-wa-btn { background: #25d366; border: none; color: #fff !important; border-radius: 50px; padding: .65rem 1.5rem; font-weight: 700; font-size: .95rem; transition: all var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.cta-wa-btn:hover { background: #1ebe5d; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(37,211,102,.4); }

/* ---------- Trainer Card enhancements ---------- */
.trainer-card-v2 .trainer-card-top { background: linear-gradient(135deg, var(--tc-primary-l) 0%, #fff 100%); }
.availability-pulse { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; color: var(--tc-success); font-weight: 600; }
.availability-pulse::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tc-success); animation: pulse-dot 2s infinite; }

/* ---------- Skill Chips ---------- */
.skill-chip { display: inline-block; background: var(--tc-bg-2); border: 1px solid var(--tc-border); border-radius: 50px; padding: .2rem .6rem; font-size: .72rem; color: var(--tc-text-muted); font-weight: 500; transition: all var(--transition); }
.skill-chip:hover { background: var(--tc-primary-l); border-color: var(--tc-primary); color: var(--tc-primary); }

/* ---------- Portfolio Items ---------- */
.portfolio-item { border-radius: var(--radius); overflow: hidden; position: relative; }
.portfolio-item img { width: 100%; height: 180px; object-fit: cover; transition: transform .4s; }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-overlay { position: absolute; inset: 0; background: rgba(30,27,75,.55); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition); }
.portfolio-item:hover .portfolio-overlay { opacity: 1; }

/* ---------- Content Report Button ---------- */
.report-btn { font-size: .72rem; color: var(--tc-text-muted); transition: color var(--transition); border: none; background: none; padding: 0; cursor: pointer; }
.report-btn:hover { color: var(--tc-danger); }

/* ---------- Navbar — extra compact on small screens ---------- */
@media (max-width: 1199.98px) {
  .navbar-phone-cta .cta-label { display: none; }
}
@media (max-width: 991.98px) {
  .whatsapp-float { bottom: 8.5rem; right: 1rem; width: 48px; height: 48px; font-size: 1.3rem; z-index: 9990; }
}

/* ---------- Pulse Dot (Live indicator) ---------- */
@keyframes pulse-anim { 0% { opacity: 1; } 50% { opacity: .3; } 100% { opacity: 1; } }
.pulse-dot { animation: pulse-anim 1.5s ease-in-out infinite; }

/* ---------- Timeline Mini ---------- */
.timeline-mini { border-left: 2px solid var(--tc-border, #e5e7eb); padding-left: .75rem; margin-left: .3rem; }

/* ---------- SVG Illustrations ---------- */
.svg-illustration { width: 100%; height: auto; display: block; }
.hero-illustration-wrap { max-width: 480px; margin: 0 auto; }
.hero-illustration-wrap .svg-hero { filter: drop-shadow(0 8px 32px rgba(99,102,241,.12)); }
.svg-empty { max-width: 220px; margin: 0 auto; opacity: .85; }
.svg-error { max-width: 300px; margin: 0 auto; }
.svg-auth  { max-width: 280px; margin: 0 auto; filter: drop-shadow(0 4px 24px rgba(0,0,0,.08)); }
.svg-feature { max-width: 200px; margin: 0 auto; }

/* SVG float animation (used via class on wrapper) */
@keyframes svgFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.svg-float { animation: svgFloat 3s ease-in-out infinite; }
@keyframes svgPulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.03); opacity: 1; } }
.svg-pulse { animation: svgPulse 3s ease-in-out infinite; }

/* ================================================================
   OTP VERIFICATION STYLES
   ================================================================ */

/* Step indicator used in register/forgot-password 2-step flows */
.step-indicator { display: flex; align-items: center; gap: 0; }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  border: 2px solid var(--tc-border, #e2e8f0);
  background: #fff; color: #475569;
  transition: all .3s ease; flex-shrink: 0;
}
.step-dot.current {
  border-color: var(--tc-primary, #6366f1);
  background: var(--tc-primary, #6366f1);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,.15);
}
.step-dot.done {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}
.step-line {
  width: 40px; height: 2px;
  background: var(--tc-border, #e2e8f0);
  transition: background .3s ease; flex-shrink: 0;
}
.step-line.done { background: #10b981; }
.step-label { font-size: .7rem; color: #475569; font-weight: 500; white-space: nowrap; }
.step-label.current { color: var(--tc-primary, #6366f1); font-weight: 700; }
.step-label.done { color: #10b981; }

/* OTP digit boxes */
.otp-input-group { display: flex; gap: .4rem; justify-content: center; }
.otp-digit {
  width: clamp(38px, 13vw, 52px);
  height: clamp(44px, 14vw, 60px);
  flex: 1 1 0;
  min-width: 0;
  max-width: 52px;
  text-align: center;
  font-size: clamp(1.2rem, 4.5vw, 1.6rem); font-weight: 800; font-family: 'Courier New', monospace;
  border: 2px solid var(--tc-border, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--tc-primary, #6366f1);
  transition: border-color .2s, box-shadow .2s, background .2s, transform .15s;
  outline: none;
  caret-color: var(--tc-primary, #6366f1);
  appearance: textfield;
  -moz-appearance: textfield;
}
.otp-digit::-webkit-outer-spin-button,
.otp-digit::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; }
.otp-digit:focus {
  border-color: var(--tc-primary, #6366f1);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
  transform: translateY(-2px);
}
.otp-digit.filled {
  border-color: var(--tc-primary, #6366f1);
  background: rgba(99,102,241,.06);
}
/* Shake animation on wrong OTP */
@keyframes otp-shake {
  0%,100% { transform: translateX(0); }
  15%      { transform: translateX(-7px); }
  30%      { transform: translateX(7px); }
  45%      { transform: translateX(-5px); }
  60%      { transform: translateX(5px); }
  75%      { transform: translateX(-3px); }
  90%      { transform: translateX(3px); }
}
.otp-input-group.otp-shake .otp-digit {
  animation: otp-shake .55s ease;
  border-color: var(--tc-danger, #ef4444) !important;
  background: rgba(239,68,68,.07);
}

/* Resend countdown */
.resend-countdown { font-size: .8rem; color: var(--tc-text-muted, #64748b); }
.resend-countdown strong { color: var(--tc-primary, #6366f1); }

/* ================================================================
   SKILLS SELECT2 MULTI-SELECT
   ================================================================ */

/* Override Select2 container */
.select2-skills + .select2-container .select2-selection--multiple,
.select2-container--bootstrap-5 .select2-selection--multiple {
  min-height: 46px;
  padding: .4rem .6rem;
  border-radius: 10px !important;
  border: 1.5px solid var(--tc-border, #e2e8f0) !important;
  background: #f8fafc;
  cursor: text;
}
.select2-container--bootstrap-5 .select2-selection--multiple:focus-within {
  border-color: var(--tc-primary, #6366f1) !important;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,.1) !important;
}
/* Tags inside Select2 */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  background: var(--tc-primary-l, #eef2ff);
  border: 1px solid rgba(99,102,241,.25);
  color: var(--tc-primary, #6366f1);
  border-radius: 50px;
  padding: .2rem .75rem;
  font-size: .78rem;
  font-weight: 600;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--tc-primary, #6366f1);
  opacity: .6;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
  opacity: 1; background: transparent;
}
/* Dropdown */
.select2-container--bootstrap-5 .select2-dropdown {
  border-radius: 12px;
  border: 1.5px solid var(--tc-border, #e2e8f0);
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  overflow: hidden;
}
.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background: var(--tc-primary-l, #eef2ff);
  color: var(--tc-primary, #6366f1);
}
.select2-container--bootstrap-5 .select2-results__option--selected {
  background: rgba(99,102,241,.12);
  color: var(--tc-primary, #6366f1);
}
.select2-container--bootstrap-5 .select2-results__group {
  font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--tc-text-muted, #94a3b8);
  padding: .6rem 1rem .3rem;
}
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
  border-radius: 8px;
  border: 1.5px solid var(--tc-border, #e2e8f0);
  padding: .45rem .75rem;
  font-size: .85rem;
}
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--tc-primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  outline: none;
}

/* ================================================================
   GENERAL UI IMPROVEMENTS
   ================================================================ */

/* Smoother card hovers */
.card { transition: box-shadow .22s ease, transform .2s ease; }
.card-hover:hover { box-shadow: 0 8px 32px rgba(0,0,0,.1) !important; transform: translateY(-2px); }

/* Input group improvements */
.input-group .input-group-text {
  border: 1.5px solid var(--tc-border); background: var(--tc-bg-2);
}
/* First element */
.input-group > .form-control:first-child,
.input-group > .input-group-text:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }
/* Last element */
.input-group > .form-control:last-child,
.input-group > .input-group-text:last-child,
.input-group > .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important; }
/* Middle elements */
.input-group > .form-control:not(:first-child):not(:last-child),
.input-group > .input-group-text:not(:first-child):not(:last-child) { border-radius: 0 !important; }

/* Auth page improvements */
.auth-panel-left { background: linear-gradient(145deg, #4f46e5 0%, #7c3aed 100%); }

/* Password strength bar */
.pass-strength-bar,
.password-strength-bar { margin-top: .5rem; }
.pass-strength-bar .strength-track,
.password-strength-bar .strength-track { height: 4px; border-radius: 50px; background: var(--tc-border); overflow: hidden; }
.pass-strength-fill,
.strength-fill { height: 100%; border-radius: 50px; transition: width .4s, background .4s; width: 0%; }
.pass-strength-text,
.strength-label { font-size: .72rem; margin-top: .2rem; display: block; font-weight: 600; }

/* Skill chip (legacy, kept for backwards compat) */
.skill-chip { display: inline-flex; align-items: center; padding: .3rem .8rem; border-radius: 50px; background: var(--tc-bg); border: 1.5px solid var(--tc-border); font-size: .8rem; cursor: pointer; transition: all .2s; user-select: none; }
.skill-chip.selected, .skill-chip:has(input:checked) { background: var(--tc-primary-l); border-color: var(--tc-primary); color: var(--tc-primary); font-weight: 600; }
.skill-chip:hover { border-color: var(--tc-primary); }

/* ================================================================
   MISSING COMPONENTS — Added to complete the enterprise UI
   ================================================================ */

/* ---- Extra :root tokens (consolidated — duplicates from bottom) ---- */
:root {
  --ease-in:   cubic-bezier(.55, 0, 1, .45);
  --dur-fast:  120ms;
  --dur:       200ms;
  --dur-slow:  380ms;
}

/* ---- Focus visible (keyboard accessibility) ---- */
:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
}
.btn:focus-visible   { outline-offset: 3px; }
.sidebar-link:focus-visible { outline-color: #a5b4fc; }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -999px;
  left: 1rem;
  z-index: 99999;
  background: var(--tc-primary);
  color: #fff;
  padding: .5rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  font-size: .875rem;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---- Page Loader ---- */
#page-loader {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-loader, 99998);
  transition: opacity .35s ease, visibility .35s ease;
}
#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-ring {
  width: 44px;
  height: 44px;
  border: 3px solid var(--tc-primary-l);
  border-top-color: var(--tc-primary);
  border-radius: 50%;
  animation: loader-spin .7s linear infinite;
}
@keyframes loader-spin { to { transform: rotate(360deg); } }

/* ---- Sidebar user card (dark sidebar) ---- */
.user-name {
  font-size: .875rem;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-badge {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 50px;
  padding: .1rem .55rem;
  margin-top: .1rem;
}
.badge-vendor  { background: rgba(20,184,166,.2); color: #2dd4bf; border: 1px solid rgba(45,212,191,.3); }
.badge-trainer { background: rgba(99,102,241,.2); color: #a5b4fc; border: 1px solid rgba(165,180,252,.3); }

/* ---- Sidebar divider ---- */
.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: .5rem .75rem;
}

/* ---- Sidebar danger link (logout) ---- */
.sidebar-link-danger       { color: #f87171; }
.sidebar-link-danger:hover { background: rgba(239,68,68,.12); color: #ef4444; }

/* ---- Notification badge (numeric) ---- */
.badge-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 .35rem;
  background: var(--tc-danger);
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  border-radius: 50px;
  line-height: 1;
  position: absolute;
  top: 4px;
  right: 4px;
  border: 1.5px solid #312e81;
}

/* ---- Stat card accent-line (data-accent attribute) ---- */
.stat-card { position: relative; }
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 3px;
  border-radius: 50px;
  background: var(--_accent, transparent);
  transform: scaleX(0);
  transition: transform .3s var(--ease-out, ease);
}
.stat-card:hover::after { transform: scaleX(1); }
.stat-card[data-accent="primary"]  { --_accent: var(--tc-primary); }
.stat-card[data-accent="success"]  { --_accent: var(--tc-success); }
.stat-card[data-accent="warning"]  { --_accent: var(--tc-warning); }
.stat-card[data-accent="danger"]   { --_accent: var(--tc-danger); }
.stat-card[data-accent="info"]     { --_accent: var(--tc-info, #3b82f6); }

/* ---- Stat trend badge ---- */
.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 50px;
  margin-top: .25rem;
}
.stat-trend.up      { color: #065f46; background: var(--tc-success-l, #d1fae5); }
.stat-trend.down    { color: #991b1b; background: var(--tc-danger-l,  #fee2e2); }
.stat-trend.neutral { color: #374151; background: #f1f5f9; }

/* ---- Ripple micro-interaction ---- */
/* overflow:hidden only on buttons that are not dropdown toggles, to avoid clipping */
.btn:not(.dropdown-toggle):not([data-bs-toggle="dropdown"]) { position: relative; overflow: hidden; }
.sidebar-link { overflow: hidden; } /* already set above but explicit here */
.tc-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  transform: scale(0);
  animation: tc-ripple-anim .55s var(--ease-out, ease) forwards;
  pointer-events: none;
  z-index: 0;
}
@keyframes tc-ripple-anim { to { transform: scale(4); opacity: 0; } }

/* Breadcrumb refinements */
.breadcrumb { font-size: .8rem; padding: .45rem 0; margin-bottom: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--tc-text-muted); }
.breadcrumb-item a { color: var(--tc-primary); text-decoration: none; font-weight: 500; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--tc-text-muted); font-weight: 500; }

/* ================================================================
   ENTERPRISE POLISH
   ================================================================ */

/* ---- 1. Skeleton Loading Placeholders ---- */
@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--tc-bg-2) 25%, #e2e8f0 37%, var(--tc-bg-2) 63%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}
.skeleton * { visibility: hidden; }
.skeleton-text    { height: .9rem; border-radius: 4px; margin-bottom: .5rem; }
.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-heading { height: 1.4rem; border-radius: 4px; width: 40%; margin-bottom: .75rem; }
.skeleton-avatar  { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.skeleton-card    { height: 140px; border-radius: var(--radius); }
.skeleton-stat    { height: 88px; border-radius: var(--radius); }
.skeleton-img     { height: 180px; border-radius: var(--radius); }

/* ---- 2. Enhanced Stat Cards ---- */
.stat-card {
  font-feature-settings: 'tnum' 1;
  transition: transform .22s var(--ease-out), box-shadow .22s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--tc-shadow-md);
}
.stat-number { font-variant-numeric: tabular-nums; }

/* ---- 3. Welcome Banner Upgrades ---- */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.welcome-banner {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -30%; left: 10%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
.welcome-banner .btn {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ---- 4. Card & Component Refinements ---- */
.dash-card {
  transition: transform .22s var(--ease-out), box-shadow .25s ease;
  border: 1px solid var(--tc-border);
}
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,.08);
}
.dash-card .card-header {
  border-left: 3px solid var(--tc-primary);
  font-weight: 700;
}

/* Badge refinements */
.badge {
  font-weight: 600;
  letter-spacing: .02em;
  padding: .3em .65em;
}
.badge-soft-primary { background: var(--tc-primary-l); color: var(--tc-primary); }
.badge-soft-success { background: var(--tc-success-l); color: #047857; }
.badge-soft-warning { background: var(--tc-warning-l); color: #92400e; }
.badge-soft-danger  { background: var(--tc-danger-l); color: #b91c1c; }
.badge-soft-info    { background: var(--tc-info-l); color: #1d4ed8; }

/* Alert refinements */
.alert {
  border-left: 4px solid;
  border-radius: var(--radius-sm);
  font-size: .875rem;
}
.alert-success { border-left-color: var(--tc-success); }
.alert-warning { border-left-color: var(--tc-warning); }
.alert-danger  { border-left-color: var(--tc-danger); }
.alert-info    { border-left-color: var(--tc-info); }

/* ---- 5. Table Enhancements ---- */
.table > tbody > tr:nth-child(even) > td,
.table > tbody > tr:nth-child(even) > th {
  background: rgba(248,250,252,.6);
}
.table > tbody > tr {
  transition: background .15s ease;
  position: relative;
}
.table > tbody > tr:hover > td,
.table > tbody > tr:hover > th {
  background: var(--tc-primary-l);
}
.table > tbody > tr:hover > td:first-child {
  box-shadow: inset 3px 0 0 var(--tc-primary);
}
.table > thead > tr > th {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--tc-text-muted);
  border-bottom-width: 2px;
}

/* DataTables pagination match */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm) !important;
  font-size: .82rem;
  padding: .35rem .7rem !important;
  margin: 0 2px;
  transition: all var(--transition);
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--tc-primary) !important;
  border-color: var(--tc-primary) !important;
  color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--tc-primary-l) !important;
  border-color: var(--tc-primary) !important;
  color: var(--tc-primary) !important;
}
.dataTables_wrapper .dataTables_filter input {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--tc-border);
  padding: .4rem .75rem;
  font-size: .85rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
  outline: none;
}
.dataTables_wrapper .dataTables_length select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--tc-border);
  padding: .3rem .5rem;
  font-size: .85rem;
}
.dataTables_wrapper .dataTables_info {
  font-size: .8rem;
  color: var(--tc-text-muted);
}

/* ---- 6. Form & Input Polish ---- */
.form-control, .form-select {
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.input-group-text {
  transition: border-color var(--transition), color var(--transition);
}
.input-group:focus-within .input-group-text {
  border-color: var(--tc-primary);
  color: var(--tc-primary);
}

/* File input styling */
.form-control[type="file"] {
  padding: .5rem;
  cursor: pointer;
}
.form-control[type="file"]::file-selector-button {
  background: var(--tc-primary-l);
  color: var(--tc-primary);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: var(--radius-sm);
  padding: .35rem .85rem;
  font-weight: 600;
  font-size: .82rem;
  cursor: pointer;
  transition: all var(--transition);
}
.form-control[type="file"]::file-selector-button:hover {
  background: var(--tc-primary);
  color: #fff;
}

/* Custom checkbox & radio */
.form-check-input {
  width: 1.15em; height: 1.15em;
  border: 2px solid var(--tc-border);
  transition: all var(--transition);
  cursor: pointer;
}
.form-check-input:checked {
  background-color: var(--tc-primary);
  border-color: var(--tc-primary);
}
.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
  border-color: var(--tc-primary);
}

/* ---- 7. Empty State Upgrades ---- */
@keyframes empty-breathe {
  0%, 100% { transform: scale(1); opacity: .85; }
  50%      { transform: scale(1.03); opacity: 1; }
}
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}
.empty-state img, .empty-state svg {
  max-width: 200px;
  margin: 0 auto 1.25rem;
  display: block;
  animation: empty-breathe 3.5s ease-in-out infinite;
}
.empty-state h5, .empty-state .empty-title {
  font-weight: 700;
  color: var(--tc-text);
  margin-bottom: .5rem;
}
.empty-state p, .empty-state .empty-desc {
  color: var(--tc-text-muted);
  font-size: .875rem;
  max-width: 360px;
  margin: 0 auto 1.25rem;
  line-height: 1.6;
}
.empty-state .btn {
  font-weight: 600;
  padding: .55rem 1.5rem;
}

/* ---- 8. Page Transitions & Micro-interactions ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Page entry — applied by JS on DOMContentLoaded */
body:not(.page-loaded) .dashboard-main,
body:not(.page-loaded) .auth-wrapper,
body:not(.page-loaded) .admin-wrapper > .container-fluid {
  opacity: 0;
}
.page-loaded .dashboard-main,
.page-loaded .auth-wrapper,
.page-loaded .admin-wrapper > .container-fluid {
  animation: slideUp .45s var(--ease-out) forwards;
}
.page-loaded .hero-section {
  animation: fadeIn .5s ease forwards;
}

/* Staggered children animation */
.stagger-in > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.stagger-in.animated > * { opacity: 1; transform: translateY(0); }
.stagger-in.animated > *:nth-child(1) { transition-delay: 0ms; }
.stagger-in.animated > *:nth-child(2) { transition-delay: 60ms; }
.stagger-in.animated > *:nth-child(3) { transition-delay: 120ms; }
.stagger-in.animated > *:nth-child(4) { transition-delay: 180ms; }
.stagger-in.animated > *:nth-child(5) { transition-delay: 240ms; }
.stagger-in.animated > *:nth-child(6) { transition-delay: 300ms; }
.stagger-in.animated > *:nth-child(n+7) { transition-delay: 360ms; }

/* Button press feedback */
.btn:active:not(:disabled) {
  transform: scale(.97);
  transition-duration: 80ms;
}

/* Navbar scroll state */
.tc-navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,.12);
  transition: box-shadow .3s ease;
}
.tc-navbar.scrolled .navbar-brand { transform: scale(.97); }

/* ---- 9. Sidebar Refinements ---- */
.sidebar-link {
  position: relative;
  transition: background .18s ease, color .18s ease, padding-left .18s ease;
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 15%; bottom: 15%;
  width: 3px;
  border-radius: 0 50px 50px 0;
  background: var(--tc-primary);
  animation: slideRight .25s var(--ease-out);
}
@keyframes slideRight {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

.sidebar-section-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  padding: .75rem .75rem .25rem;
}

/* Sidebar footer */
.sidebar-footer {
  padding: .75rem;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: .65rem;
  color: rgba(255,255,255,.3);
}

/* ---- 10. Responsive Refinements ---- */
@media (max-width: 767.98px) {
  /* 2-column stat cards on mobile */
  .stat-row, .row:has(> .col-md-3 > .stat-card) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }
  .stat-row > *, .row:has(> .col-md-3 > .stat-card) > * {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* Tighter card padding on mobile */
  .dash-card .card-body { padding: .85rem; }
  .stat-card .card-body { padding: .75rem; }

  /* Safe area insets for notched devices */
  .sidebar { padding-bottom: env(safe-area-inset-bottom, 0); }
  .dashboard-main { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0)); }
}

@media (max-width: 575.98px) {
  /* Stack stat cards single column on very small screens */
  .stat-row, .row:has(> .col-md-3 > .stat-card) {
    grid-template-columns: 1fr;
  }
}

/* Smooth scrollbar styling (webkit) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,.2); border-radius: 50px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,.35); }

/* ---- Print Styles ---- */
@media print {
  .sidebar, .tc-navbar, .whatsapp-float, .back-to-top, #page-loader { display: none !important; }
  .dashboard-main { margin-left: 0 !important; padding: 0 !important; }
  .dash-card, .stat-card { break-inside: avoid; box-shadow: none !important; border: 1px solid #ddd; }
  body { font-size: 12pt; }
}

/* ---- Reduced Motion Preference ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .skeleton { animation: none; background: var(--tc-bg-2); }
  .welcome-banner { animation: none; }
}

/* ================================================================
   DESIGN SYSTEM — Premium Fonts, Glassmorphism & Visual Polish
   ================================================================ */

/* ── Typography ─────────────────────────────────────────────── */
:root {
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Refined shadows */
  --tc-shadow-glow:    0 0 0 3px rgba(99,102,241,.18), 0 8px 24px rgba(99,102,241,.22);
  --tc-shadow-success: 0 4px 20px rgba(16,185,129,.28);
  --tc-shadow-danger:  0 4px 20px rgba(239,68,68,.25);

  /* New accent tokens */
  --tc-teal:    #0d9488;
  --tc-teal-l:  #ccfbf1;
  --tc-rose:    #f43f5e;
  --tc-rose-l:  #ffe4e6;
  --tc-amber:   #d97706;
  --tc-amber-l: #fef3c7;

  /* Gradient presets */
  --grad-primary:   linear-gradient(135deg, #6366f1, #8b5cf6);
  --grad-success:   linear-gradient(135deg, #10b981, #059669);
  --grad-warning:   linear-gradient(135deg, #f59e0b, #d97706);
  --grad-danger:    linear-gradient(135deg, #ef4444, #dc2626);
  --grad-teal:      linear-gradient(135deg, #14b8a6, #0d9488);
  --grad-dark:      linear-gradient(135deg, #1e1b4b, #312e81);
  --grad-aurora:    linear-gradient(135deg, #6366f1 0%, #8b5cf6 35%, #ec4899 70%, #f59e0b 100%);
}

body {
  font-family: var(--font-body);
  font-feature-settings: 'cv02','cv03','cv04','cv11';
}

/* Headings use display font */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.fw-bold, .fw-semibold, .fw-bolder,
.navbar-brand, .brand-text,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--font-display);
  letter-spacing: -.02em;
}

/* Monospace elements */
code, kbd, pre, .font-mono { font-family: var(--font-mono); }

/* ── Gradient Text ─────────────────────────────────────────── */
.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-aurora {
  background: var(--grad-aurora);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: aurora-shift 5s ease infinite;
}
@keyframes aurora-shift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.text-gradient-success {
  background: var(--grad-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Missing Utility Fixes ─────────────────────────────────── */
/* Bootstrap only goes to fs-6; add fs-7 */
.fs-7 { font-size: .78rem !important; }
.fs-8 { font-size: .68rem !important; }

/* text-purple */
.text-purple { color: #8b5cf6 !important; }
.bg-purple    { background-color: #8b5cf6 !important; }
.bg-purple-subtle { background-color: #ede9fe !important; }

/* notif-card */
.notif-card {
  border-radius: var(--radius-lg);
  transition: box-shadow .2s, transform .2s;
}
.notif-card:hover {
  box-shadow: var(--tc-shadow-md);
  transform: translateY(-1px);
}
.notif-card.unread { background: var(--tc-primary-l); }

/* ── Premium Navbar ─────────────────────────────────────────── */
.tc-navbar {
  background: linear-gradient(135deg, #0f0e2a 0%, #1e1b4b 50%, #312e81 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 24px rgba(0,0,0,.18);
}
.tc-navbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.6) 30%, rgba(139,92,246,.6) 70%, transparent);
}
.tc-navbar .navbar-brand .brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(90deg, #fff 60%, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-icon {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  box-shadow: 0 0 12px rgba(99,102,241,.5);
}

/* ── Premium Buttons ──────────────────────────────────────── */
.btn-primary {
  background: var(--grad-primary);
  border: none;
  box-shadow: 0 2px 12px rgba(99,102,241,.35);
  position: relative;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0);
  transition: background .2s;
}
.btn-primary:hover::before { background: rgba(255,255,255,.08); }
.btn-primary:hover {
  background: var(--grad-primary);
  box-shadow: var(--tc-shadow-glow);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--grad-success);
  border: none;
  box-shadow: 0 2px 12px rgba(16,185,129,.3);
}
.btn-success:hover {
  box-shadow: var(--tc-shadow-success);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--grad-danger);
  border: none;
  box-shadow: 0 2px 12px rgba(239,68,68,.25);
}
.btn-danger:hover {
  box-shadow: var(--tc-shadow-danger);
  transform: translateY(-2px);
}

/* Glow button variant */
.btn-glow {
  box-shadow: 0 0 0 0 rgba(99,102,241,.4);
  animation: btn-glow-pulse 2.5s ease-in-out infinite;
}
@keyframes btn-glow-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,.4); }
  50%      { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}

/* Outline with gradient border */
.btn-outline-gradient {
  background: transparent;
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
  color: var(--tc-primary);
  font-weight: 600;
}
.btn-outline-gradient::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--grad-primary);
  z-index: -1;
}
.btn-outline-gradient:hover {
  background: var(--tc-primary-l);
  color: var(--tc-primary-d);
}

/* ── Premium Cards ─────────────────────────────────────────── */
.card-premium {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(99,102,241,.1);
  box-shadow: 0 4px 24px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  overflow: hidden;
  transition: transform .25s var(--ease-out), box-shadow .25s ease;
}
.card-premium:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(99,102,241,.14), 0 4px 12px rgba(0,0,0,.06);
}
.card-premium .card-top-bar {
  height: 4px;
  background: var(--grad-primary);
}

/* Aurora glass card */
.card-glass {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(99,102,241,.1), inset 0 1px 0 rgba(255,255,255,.8);
}
.card-glass-dark {
  background: rgba(15,14,42,.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.05);
}

/* ── Gradient Backgrounds ──────────────────────────────────── */
.bg-gradient-primary  { background: var(--grad-primary) !important; }
.bg-gradient-success  { background: var(--grad-success) !important; }
.bg-gradient-warning  { background: var(--grad-warning) !important; }
.bg-gradient-danger   { background: var(--grad-danger)  !important; }
.bg-gradient-teal     { background: var(--grad-teal)    !important; }
.bg-gradient-dark     { background: var(--grad-dark)    !important; }
.bg-gradient-aurora   { background: var(--grad-aurora); background-size: 200% 200%; animation: aurora-shift 6s ease infinite; }

/* Soft tinted backgrounds */
.bg-teal-subtle  { background-color: var(--tc-teal-l)  !important; }
.bg-rose-subtle  { background-color: var(--tc-rose-l)  !important; }
.bg-amber-subtle { background-color: var(--tc-amber-l) !important; }
.text-teal  { color: var(--tc-teal)  !important; }
.text-rose  { color: var(--tc-rose)  !important; }
.text-amber { color: var(--tc-amber) !important; }

/* ── Hero Section Upgrade ─────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #070718 0%, #0f0e2a 25%, #1e1b4b 55%, #312e81 80%, #4c1d95 100%);
}
.hero-section h1, .hero-section h2 {
  font-family: var(--font-display);
  letter-spacing: -.04em;
}
/* Floating orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: .55;
  animation: orb-drift 12s ease-in-out infinite;
}
.hero-orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, #6366f1, transparent 70%); top: -180px; right: -120px; animation-duration: 14s; }
.hero-orb-2 { width: 300px; height: 300px; background: radial-gradient(circle, #8b5cf6, transparent 70%); bottom: -60px; left: 5%; animation-duration: 10s; animation-delay: -4s; }
.hero-orb-3 { width: 200px; height: 200px; background: radial-gradient(circle, #ec4899, transparent 70%); top: 30%; left: 25%; animation-duration: 16s; animation-delay: -8s; }
@keyframes orb-drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(24px,-16px) scale(1.04); }
  66%      { transform: translate(-16px,20px) scale(.97); }
}

/* ── Welcome Banner Enhanced ─────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 40%, #7c3aed 70%, #6d28d9 100%);
  box-shadow: 0 8px 32px rgba(99,102,241,.28);
}
.welcome-vendor {
  background: linear-gradient(135deg, #065f46 0%, #047857 40%, #059669 70%, #10b981 100%) !important;
  box-shadow: 0 8px 32px rgba(16,185,129,.22);
}

/* ── Sidebar Upgrade ──────────────────────────────────────── */
.sidebar {
  background: linear-gradient(180deg, #0a0920 0%, #0f0e2a 40%, #111827 100%);
  border-right: 1px solid rgba(99,102,241,.12);
}
.sidebar-brand { border-bottom-color: rgba(99,102,241,.15); }
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(99,102,241,.22), rgba(99,102,241,.06));
  color: #c4b5fd;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.06);
  color: #c4b5fd;
}

/* ── Stat Card Upgrade ────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(99,102,241,.08);
  box-shadow: 0 2px 12px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.02);
}
.stat-icon {
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* ── Form Enhancements ────────────────────────────────────── */
.form-control, .form-select {
  font-family: var(--font-body);
  background: #fafbfc;
  border: 1.5px solid var(--tc-border);
}
.form-control:focus, .form-select:focus {
  background: #fff;
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12), 0 1px 4px rgba(99,102,241,.15);
}
.form-label {
  font-family: var(--font-display);
  font-size: .825rem;
  font-weight: 700;
  letter-spacing: .01em;
}

/* ── Badges Enhanced ──────────────────────────────────────── */
.badge {
  font-family: var(--font-display);
  letter-spacing: .03em;
}
.badge-gradient-primary {
  background: var(--grad-primary);
  color: #fff;
  font-weight: 700;
}
.badge-gradient-success {
  background: var(--grad-success);
  color: #fff;
  font-weight: 700;
}

/* ── Proficiency Badges ───────────────────────────────────── */
.proficiency-beginner     { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.proficiency-intermediate { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.proficiency-expert       { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }

/* ── Trainer Card Enhanced ───────────────────────────────── */
.trainer-card {
  box-shadow: 0 2px 12px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.03);
}
.trainer-card:hover {
  box-shadow: 0 16px 40px rgba(99,102,241,.14), 0 4px 12px rgba(0,0,0,.06);
  border-color: rgba(99,102,241,.25);
}
.trainer-card-banner {
  height: 60px;
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 40%, #7c3aed 100%);
  position: relative;
  overflow: hidden;
}
.trainer-card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='white' fill-opacity='0.05'%3E%3Ccircle cx='20' cy='20' r='12'/%3E%3C/g%3E%3C/svg%3E");
}

/* ── Req Card Enhanced ─────────────────────────────────── */
.req-card, .req-card-full {
  box-shadow: 0 2px 12px rgba(0,0,0,.04), 0 0 0 1px rgba(0,0,0,.03);
}
.req-card:hover, .req-card-full:hover {
  box-shadow: 0 16px 40px rgba(99,102,241,.12), 0 4px 12px rgba(0,0,0,.06);
  border-color: rgba(99,102,241,.22);
}
.req-card-header {
  height: 5px;
  background: var(--grad-primary);
}

/* ── Dash Card Enhanced ────────────────────────────────── */
.dash-card {
  box-shadow: 0 2px 12px rgba(0,0,0,.04), 0 0 0 1px rgba(0,0,0,.02);
  border-color: rgba(99,102,241,.08);
}
.dash-card-header {
  border-left: 3px solid var(--tc-primary);
  font-family: var(--font-display);
}

/* ── Table Headers ─────────────────────────────────────── */
.table thead th { font-family: var(--font-display); }

/* ── Auth Page Polish ──────────────────────────────────── */
.auth-left {
  background: linear-gradient(155deg, #070718 0%, #0f0e2a 30%, #1e1b4b 60%, #312e81 85%, #4c1d95 100%);
}

/* ── Page Header Enhancement ─────────────────────────── */
.page-header {
  padding-bottom: 1.1rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--tc-primary), rgba(99,102,241,0)) 1;
  margin-bottom: 1.75rem !important;
}
.page-header h5 {
  font-family: var(--font-display);
  letter-spacing: -.025em;
}

/* ── Section Headings ────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.03em;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--tc-text-muted);
  line-height: 1.7;
}

/* ── Footer Enhancement ──────────────────────────────── */
.tc-footer {
  background: linear-gradient(180deg, #070718 0%, #0f0e2a 60%, #0a0920 100%);
  border-top: 1px solid rgba(99,102,241,.15);
}
.tc-footer::before {
  content: '';
  display: block;
  height: 2px;
  background: var(--grad-aurora);
  background-size: 200% 100%;
  animation: aurora-shift 6s linear infinite;
}
.tc-footer h6 {
  font-family: var(--font-display);
}

/* ── Chat UI Polish ──────────────────────────────────── */
.chat-layout {
  box-shadow: 0 4px 32px rgba(0,0,0,.08), 0 0 0 1px rgba(99,102,241,.08);
  border-color: rgba(99,102,241,.1);
}
.chat-sidebar-header {
  font-family: var(--font-display);
  background: #fff;
}
.chat-thread-header {
  font-family: var(--font-display);
}
.msg-row.mine .msg-bubble {
  background: var(--grad-primary);
  box-shadow: 0 2px 8px rgba(99,102,241,.25);
}

/* ── Notification Dropdown ───────────────────────────── */
.notif-dropdown {
  border-color: rgba(99,102,241,.12);
  box-shadow: 0 16px 48px rgba(0,0,0,.12), 0 4px 12px rgba(99,102,241,.08);
}
.notif-icon {
  background: var(--tc-primary-l);
  color: var(--tc-primary);
}

/* ── Category Card Enhanced ──────────────────────────── */
.category-card {
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.category-card:hover {
  box-shadow: 0 12px 32px rgba(99,102,241,.14);
  border-color: rgba(99,102,241,.22);
}

/* ── Feature Card Enhanced ───────────────────────────── */
.feature-card {
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  border-color: rgba(99,102,241,.08);
}
.feature-card:hover {
  box-shadow: 0 16px 40px rgba(99,102,241,.12);
}

/* ── Loading Spinner ─────────────────────────────────── */
.loader-ring {
  border: 3px solid rgba(99,102,241,.15);
  border-top-color: var(--tc-primary);
  box-shadow: 0 0 12px rgba(99,102,241,.2);
}

/* ── Scrollbar (primary tinted) ──────────────────────── */
::-webkit-scrollbar-thumb { background: rgba(99,102,241,.18); }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,.32); }

/* ── Dropdown Enhanced ───────────────────────────────── */
.dropdown-menu {
  border-color: rgba(99,102,241,.1);
  box-shadow: 0 12px 40px rgba(0,0,0,.1), 0 4px 12px rgba(99,102,241,.08);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
}
.dropdown-item {
  font-size: .875rem;
  border-radius: var(--radius-sm);
  margin: .1rem .35rem;
  padding: .5rem .75rem;
  transition: background .15s, color .15s;
  width: calc(100% - .7rem);
}
.dropdown-item:hover, .dropdown-item:focus {
  background: var(--tc-primary-l);
  color: var(--tc-primary);
}

/* ── Modals ──────────────────────────────────────────── */
.modal-content {
  border: 1px solid rgba(99,102,241,.1);
  box-shadow: 0 24px 64px rgba(0,0,0,.16), 0 8px 24px rgba(99,102,241,.1);
  border-radius: var(--radius-xl);
}
.modal-header {
  border-bottom-color: rgba(99,102,241,.1);
  font-family: var(--font-display);
}
.modal-footer { border-top-color: rgba(99,102,241,.1); }

/* ── Pagination Enhanced ─────────────────────────────── */
.page-link {
  font-family: var(--font-display);
  font-weight: 600;
}

/* ── Alert Styles Enhanced ───────────────────────────── */
.alert {
  font-family: var(--font-body);
  border-radius: var(--radius);
  border-left-width: 4px;
}

/* ── SweetAlert2 Integration ─────────────────────────── */
.swal2-popup {
  font-family: var(--font-display) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.14) !important;
}
.swal2-title { font-weight: 800 !important; letter-spacing: -.025em !important; }
.swal2-confirm { border-radius: var(--radius-sm) !important; font-weight: 700 !important; }
.swal2-cancel  { border-radius: var(--radius-sm) !important; font-weight: 600 !important; }

/* ── Flatpickr Integration ───────────────────────────── */
.flatpickr-calendar {
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,.12) !important;
  border: 1px solid rgba(99,102,241,.12) !important;
  font-family: var(--font-body) !important;
}
.flatpickr-day.selected, .flatpickr-day.selected:hover {
  background: var(--tc-primary) !important;
  border-color: var(--tc-primary) !important;
}
.flatpickr-day:hover { background: var(--tc-primary-l) !important; color: var(--tc-primary) !important; }

/* ── Responsive font scaling ─────────────────────────── */
@media (max-width: 991.98px) {
  h1, .h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
  h2, .h2 { font-size: clamp(1.3rem, 4vw, 1.8rem); }
}

/* ── Extra utility classes ───────────────────────────── */
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.shadow-glow  { box-shadow: var(--tc-shadow-glow) !important; }
.shadow-md    { box-shadow: var(--tc-shadow-md)   !important; }
.shadow-lg    { box-shadow: var(--tc-shadow-lg)   !important; }
.border-primary-soft { border-color: rgba(99,102,241,.2) !important; }
.border-gradient {
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}
.border-gradient::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--grad-primary);
  z-index: -1;
}

/* Divider with gradient */
.divider-gradient {
  height: 2px;
  border: none;
  background: linear-gradient(90deg, transparent, var(--tc-primary) 20%, var(--tc-secondary) 80%, transparent);
  opacity: .35;
  margin: 1.5rem 0;
}

/* Subtle pattern overlay */
.pattern-dots::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* ── Performance: gpu-composite layers for animations ── */
.hero-orb, .whatsapp-float, #back-to-top, .loader-ring { will-change: transform; }
.fade-in-up, .stagger-in > * { will-change: opacity, transform; }

/* ================================================================
   DARK MODE — Comprehensive Visibility Fixes (Batch 3)
   ================================================================ */

/* ── Table header (table-light / thead) ───────────────────── */
[data-theme="dark"] .table-light,
[data-theme="dark"] .table-light th,
[data-theme="dark"] .table-light td,
[data-theme="dark"] .table thead { background: var(--tc-bg-2) !important; color: var(--tc-text-muted) !important; }
[data-theme="dark"] .table thead th { background: var(--tc-bg-2) !important; color: var(--tc-text-muted) !important; }

/* ── Category card inner text ─────────────────────────────── */
[data-theme="dark"] .category-card .fw-semibold { color: var(--tc-text); }
[data-theme="dark"] .category-card .x-small { color: var(--tc-text-muted) !important; }

/* ── Req card / req-card-full inner text ──────────────────── */
[data-theme="dark"] .req-card h6,
[data-theme="dark"] .req-card-full h6,
[data-theme="dark"] .req-card .fw-bold,
[data-theme="dark"] .req-card-full .fw-bold { color: var(--tc-text); }
[data-theme="dark"] .req-card .line-clamp-2,
[data-theme="dark"] .req-card-full .line-clamp-2 { color: var(--tc-text-muted); }

/* ── Feature card (Why Us) text ───────────────────────────── */
[data-theme="dark"] .feature-card h5 { color: var(--tc-text); }
[data-theme="dark"] .feature-card p.text-muted { color: var(--tc-text-muted) !important; }

/* ── How It Works step text ───────────────────────────────── */
[data-theme="dark"] .hiw-panel .small.text-muted { color: var(--tc-text-muted) !important; }
[data-theme="dark"] .hiw-step-num { border-color: var(--tc-border); }

/* ── Trainer card (homepage & vendor/trainers) ────────────── */
[data-theme="dark"] .trainer-card h6,
[data-theme="dark"] .trainer-card-full h6 { color: var(--tc-text); }
[data-theme="dark"] .trainer-card .small.text-muted,
[data-theme="dark"] .trainer-card-full .small.text-muted { color: var(--tc-text-muted) !important; }
[data-theme="dark"] .trainer-card .badge.bg-light,
[data-theme="dark"] .trainer-card-full .badge.bg-light { background: var(--tc-bg-2) !important; color: var(--tc-text) !important; }
[data-theme="dark"] .trainer-card-full .trainer-card-banner { background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(16,185,129,.1)); }
[data-theme="dark"] .trainer-card-full .border-white { border-color: var(--tc-bg-card) !important; }

/* ── Req-mini-card (dashboard opportunities) ──────────────── */
[data-theme="dark"] .req-mini-card .fw-semibold,
[data-theme="dark"] .req-mini-card .text-dark { color: var(--tc-text) !important; }
[data-theme="dark"] .req-mini-card .x-small { color: var(--tc-text-muted) !important; }

/* ── App-mini-card (dashboard recent applications) ────────── */
[data-theme="dark"] .app-mini-card .fw-semibold { color: var(--tc-text); }
[data-theme="dark"] .app-mini-card .x-small { color: var(--tc-text-muted) !important; }

/* ── Dashboard dash-card inner text ───────────────────────── */
[data-theme="dark"] .dash-card .fw-semibold { color: var(--tc-text); }
[data-theme="dark"] .dash-card .fw-bold { color: var(--tc-text); }
[data-theme="dark"] .dash-card .small.text-dark,
[data-theme="dark"] .dash-card .fw-semibold.small.text-dark { color: var(--tc-text) !important; }

/* ── Timeline (recent activity) ───────────────────────────── */
[data-theme="dark"] .timeline-content .fw-medium,
[data-theme="dark"] .timeline-content .small { color: var(--tc-text); }
[data-theme="dark"] .timeline-mini .fw-medium { color: var(--tc-text); }

/* ── Profile tips & about sections ────────────────────────── */
[data-theme="dark"] .alert-info { background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.2); color: var(--tc-text); }
[data-theme="dark"] .alert-light { background: var(--tc-bg-2); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .alert-warning { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.2); color: var(--tc-text); }

/* ── Score display (application score) ────────────────────── */
[data-theme="dark"] .score-display { color: #a5b4fc; }

/* ── Vendor trainer-view profile details ──────────────────── */
[data-theme="dark"] .profile-hero-bg .text-muted { color: var(--tc-text-muted) !important; }
[data-theme="dark"] .profile-hero-bg .fw-bold { color: var(--tc-text); }
[data-theme="dark"] .profile-hero-bg .small { color: var(--tc-text-muted); }

/* ── Footer improved visibility ───────────────────────────── */
[data-theme="dark"] .tc-footer { background: #0c1322; }
[data-theme="dark"] .tc-footer .text-muted { color: #b0bec5 !important; }
[data-theme="dark"] .tc-footer .social-btn { color: #b0bec5; background: rgba(255,255,255,.1); }
[data-theme="dark"] .tc-footer .social-btn:hover { color: #fff; background: rgba(255,255,255,.2); }
[data-theme="dark"] .footer-links a { color: #b0bec5 !important; }
[data-theme="dark"] .footer-links a:hover { color: #fff !important; }

/* ── Notification page heading ────────────────────────────── */
[data-theme="dark"] .page-header h4 { color: var(--tc-text); }
[data-theme="dark"] .page-header p { color: var(--tc-text-muted); }

/* ── Messages page heading & search ───────────────────────── */
[data-theme="dark"] .chat-sidebar-header .fw-bold { color: var(--tc-text); }
[data-theme="dark"] .chat-sidebar-search .form-control { background: var(--tc-bg-2); color: var(--tc-text); border-color: var(--tc-border); }

/* ── Response templates text ──────────────────────────────── */
[data-theme="dark"] .card-body p.text-muted { color: var(--tc-text-muted) !important; }
[data-theme="dark"] .card-body .small { color: var(--tc-text-muted); }

/* ── Settings Account Info heading & tabs ─────────────────── */
[data-theme="dark"] .nav-tabs { border-color: var(--tc-border); }
[data-theme="dark"] .nav-tabs .nav-link { color: var(--tc-text-muted); }
[data-theme="dark"] .nav-tabs .nav-link.active { background: var(--tc-bg-card); border-color: var(--tc-border); color: var(--tc-text); }
[data-theme="dark"] .list-group-item h6,
[data-theme="dark"] .list-group-item .fw-bold { color: var(--tc-text); }
[data-theme="dark"] .list-group-item small { color: var(--tc-text-muted); }

/* ── Badges in dark mode (bg-light text-dark) ─────────────── */
[data-theme="dark"] .badge.bg-light.text-dark { background: var(--tc-bg-2) !important; color: var(--tc-text) !important; border-color: var(--tc-border) !important; }
[data-theme="dark"] .dash-card .table tbody tr:nth-child(odd) { background: rgba(255,255,255,.02); }
[data-theme="dark"] .dash-card .table tbody tr:nth-child(odd) td { color: var(--tc-text) !important; }
[data-theme="dark"] .badge.bg-light.text-muted { background: var(--tc-bg-2) !important; color: var(--tc-text-muted) !important; }

/* ── Browse requirements search icon ──────────────────────── */
[data-theme="dark"] .filter-card .input-group-text i { color: var(--tc-text-muted) !important; }

/* ── Landing page sections dark mode ──────────────────────── */
[data-theme="dark"] .bg-light { background: var(--tc-bg-2) !important; }
[data-theme="dark"] section.py-6 { color: var(--tc-text); }
[data-theme="dark"] .display-6 { color: var(--tc-text); }
[data-theme="dark"] .section-badge { background: rgba(99,102,241,.15); color: #a5b4fc; }

/* ── Vendor post-requirement select2 dark ─────────────────── */
[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option { color: var(--tc-text); }
[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--selected { background: rgba(99,102,241,.2); }

/* ── Trainer card name cutoff fix ──────────────────────────── */
.trainer-card-full .p-4.pt-2 { padding-top: .75rem !important; }
.trainer-card-full .d-flex[style*="margin-top:-2rem"] { margin-top: -1.5rem !important; }

/* ── Privacy / settings list items padding ────────────────── */
[data-theme="dark"] .list-group-item.px-0 { color: var(--tc-text); }

/* =====================================================
   Product polish pass
   ===================================================== */
:root {
  --tc-primary: #2563eb;
  --tc-primary-d: #1d4ed8;
  --tc-primary-l: #dbeafe;
  --tc-secondary: #0f766e;
  --tc-accent: #d97706;
  --tc-success: #16a34a;
  --tc-success-l: #dcfce7;
  --tc-warning: #d97706;
  --tc-warning-l: #fef3c7;
  --tc-danger: #dc2626;
  --tc-danger-l: #fee2e2;
  --tc-info: #0284c7;
  --tc-info-l: #e0f2fe;
  --tc-dark: #172033;
  --tc-dark-2: #0b1220;
  --tc-text: #172033;
  --tc-text-muted: #667085;
  --tc-border: #d9e2ec;
  --tc-bg: #f6f8fb;
  --tc-bg-2: #eef3f8;
  --tc-bg-card: #ffffff;
  --tc-shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.06);
  --tc-shadow-md: 0 12px 28px rgba(16,24,40,.10);
  --tc-shadow-lg: 0 20px 48px rgba(16,24,40,.16);
  --tc-shadow-card: 0 1px 2px rgba(16,24,40,.06), 0 0 0 1px rgba(16,24,40,.04);
  --grad-primary: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
  --grad-success: linear-gradient(135deg, #16a34a 0%, #0f766e 100%);
  --grad-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-danger: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  --grad-dark: linear-gradient(135deg, #0b1220 0%, #172033 100%);
  --grad-aurora: linear-gradient(135deg, #2563eb 0%, #0f766e 45%, #d97706 100%);
  --radius: .5rem;
  --radius-sm: .375rem;
  --radius-lg: .5rem;
  --radius-xl: .75rem;
  --navbar-h: 68px;
}

* { letter-spacing: 0 !important; }
html { scroll-padding-top: calc(var(--navbar-h) + 1rem); }
body {
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,0) 260px),
    var(--tc-bg);
}
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  letter-spacing: 0 !important;
}

.card,
.dash-card,
.stat-card,
.trainer-card,
.trainer-card-full,
.req-card,
.req-card-full,
.feature-card,
.category-card,
.filter-card,
.hiw-panel,
.quick-action-btn,
.app-mini-card,
.req-mini-card {
  border-radius: var(--radius) !important;
}
.rounded-3,
.rounded-4,
.rounded-lg,
.rounded-xl {
  border-radius: var(--radius) !important;
}

.tc-navbar {
  background: rgba(11,18,32,.94);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 30px rgba(11,18,32,.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.tc-navbar::after {
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.75), rgba(15,118,110,.75), transparent);
}
.tc-navbar .nav-link {
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.78) !important;
}
.tc-navbar .nav-link:hover,
.tc-navbar .nav-link.active {
  background: rgba(255,255,255,.10);
  color: #fff !important;
}
.brand-icon {
  background: linear-gradient(135deg, var(--tc-primary), var(--tc-secondary));
  box-shadow: none;
}
.theme-toggle,
.icon-btn {
  border-radius: var(--radius-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: var(--radius-sm);
  line-height: 1.2;
  letter-spacing: 0 !important;
  box-shadow: none;
}
.btn i { margin-left: 0 !important; margin-right: 0 !important; }
.btn-primary {
  background: var(--tc-primary);
  border-color: var(--tc-primary);
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--tc-primary-d);
  border-color: var(--tc-primary-d);
  box-shadow: 0 8px 18px rgba(37,99,235,.22);
}
.btn-warning {
  background: var(--tc-warning);
  border-color: var(--tc-warning);
  color: #fff;
}
.btn-warning:hover,
.btn-warning:focus {
  background: #b45309;
  border-color: #b45309;
  color: #fff;
}
.btn-success {
  background: var(--tc-success);
  border-color: var(--tc-success);
}
.btn-outline-primary {
  border-color: rgba(37,99,235,.38);
  color: var(--tc-primary);
}
.btn-outline-primary:hover {
  background: var(--tc-primary);
  border-color: var(--tc-primary);
}
.btn-glow { animation: none; }

.form-control,
.form-select,
.select2-container--bootstrap-5 .select2-selection {
  border-radius: var(--radius-sm) !important;
  background-color: #fff;
  border-color: var(--tc-border);
}
.form-control::placeholder { color: #98a2b3; }
.form-control:focus,
.form-select:focus {
  border-color: rgba(37,99,235,.72);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.input-group:focus-within .input-group-text {
  border-color: rgba(37,99,235,.72);
  color: var(--tc-primary);
}
.auth-right .input-group-text,
.auth-right .input-group-text i {
  color: #667085 !important;
}
.pass-strength-bar,
.password-strength-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--tc-bg-2);
  overflow: hidden;
}
.pass-strength-fill,
.strength-fill {
  display: block;
  min-height: 100%;
}

.hero-bg-shapes,
.hero-orb,
.auth-left::before,
.auth-left::after {
  display: none !important;
}
.hero-section {
  min-height: auto;
  padding: 5.5rem 0 4.75rem;
  background: #0b1220;
  isolation: isolate;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,18,32,.98) 0%, rgba(11,18,32,.82) 46%, rgba(11,18,32,.28) 100%),
    linear-gradient(135deg, rgba(37,99,235,.32), rgba(15,118,110,.22) 52%, rgba(217,119,6,.18));
  z-index: 0;
}
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 38%, #000 100%);
  pointer-events: none;
  z-index: 0;
}
.hero-product-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-product-card {
  position: absolute;
  width: min(330px, 32vw);
  color: #fff;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.hero-card-requirement {
  right: 9vw;
  top: 16%;
}
.hero-card-trainer {
  right: 23vw;
  bottom: 18%;
}
.hero-card-metrics {
  right: 8vw;
  bottom: 12%;
  width: min(270px, 28vw);
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #fde68a;
  font-size: .74rem;
  font-weight: 700;
}
.hero-meta,
.hero-card-copy {
  color: rgba(255,255,255,.68);
  font-size: .82rem;
}
.hero-card-title {
  font-weight: 800;
  font-family: var(--font-display);
}
.hero-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1rem;
}
.hero-signal-row span {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.86);
  font-size: .72rem;
  padding: .28rem .5rem;
}
.hero-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37,99,235,.92);
}
.hero-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.hero-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2dd4bf);
}
.hero-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.hero-metric-grid strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
  color: #fff;
}
.hero-metric-grid span {
  display: block;
  margin-top: .35rem;
  color: rgba(255,255,255,.68);
  font-size: .76rem;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #bfdbfe;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245,158,11,.18);
}
.hero-lede {
  max-width: 640px;
  color: rgba(255,255,255,.82);
  font-size: 1.12rem;
  line-height: 1.72;
}
.hero-section h1 {
  font-size: 3.75rem;
  letter-spacing: 0 !important;
}
.hero-stat-card {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.16);
  border-radius: var(--radius);
}
.hero-stat-card:hover { transform: none; }
.hero-stat-icon {
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.12);
}

.section-badge {
  border-radius: var(--radius-sm);
  background: #e8f2ff;
  color: var(--tc-primary);
  letter-spacing: 0 !important;
}
.feature-card,
.category-card,
.trainer-card,
.trainer-card-full,
.req-card,
.req-card-full {
  box-shadow: var(--tc-shadow-card);
}
.feature-card:hover,
.category-card:hover,
.trainer-card:hover,
.trainer-card-full:hover,
.req-card:hover,
.req-card-full:hover {
  transform: translateY(-2px);
  box-shadow: var(--tc-shadow-md);
}
.trainer-card-banner,
.req-card-header {
  background: linear-gradient(90deg, var(--tc-primary), var(--tc-secondary)) !important;
}

.dashboard-main {
  background:
    linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,0) 220px),
    var(--tc-bg);
}
.welcome-banner,
.welcome-vendor {
  animation: none;
  border-radius: var(--radius) !important;
  box-shadow: var(--tc-shadow-md);
}
.welcome-banner {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #0f766e 100%);
}
.welcome-vendor {
  background: linear-gradient(135deg, #0f766e 0%, #15803d 100%) !important;
}
.welcome-banner::before,
.welcome-banner::after {
  display: none;
}
.dash-card,
.stat-card {
  border-color: rgba(16,24,40,.08);
  box-shadow: var(--tc-shadow-card);
}
.dash-card:hover,
.stat-card:hover {
  transform: none;
  box-shadow: var(--tc-shadow);
}
.dash-card-header {
  min-height: 56px;
  border-left: 0;
  background: linear-gradient(180deg, rgba(248,250,252,.8), rgba(255,255,255,.95));
}
.stat-card {
  min-height: 112px;
}
.stat-number {
  font-size: 1.85rem;
}
.stat-icon {
  box-shadow: none;
}
.stat-trend {
  gap: .35rem;
  border-radius: var(--radius-sm);
}
.quick-action-btn {
  min-height: 118px;
  color: var(--tc-text);
}

.filter-card {
  background: rgba(255,255,255,.92);
  box-shadow: var(--tc-shadow-card);
}
.filter-card-body { padding: 1.25rem; }
.page-header {
  border-image: none;
  border-bottom: 1px solid var(--tc-border);
}
.breadcrumb {
  --bs-breadcrumb-divider-color: var(--tc-text-muted);
}

.table-responsive.is-scrollable {
  position: relative;
}
.table-responsive.is-scrollable::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0), var(--tc-bg-card));
}
.table th {
  background: #f8fafc;
}
.table > tbody > tr:hover > td,
.table > tbody > tr:hover > th {
  background: #eef6ff;
}

.empty-state,
.text-center.py-6 {
  padding: 3rem 1.5rem !important;
}
.empty-state img,
.text-center.py-6 img.svg-empty {
  animation: none;
}

.chat-layout {
  border-radius: var(--radius) !important;
}
.msg-bubble {
  border-radius: var(--radius);
}
.msg-row.mine .msg-bubble,
.msg-row.theirs .msg-bubble {
  border-bottom-right-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

[data-theme="dark"] {
  --tc-bg: #0b1220;
  --tc-bg-2: #111827;
  --tc-bg-card: #172033;
  --tc-text: #eef2f7;
  --tc-text-muted: #a8b3c4;
  --tc-border: rgba(148,163,184,.18);
  --tc-primary-l: rgba(96,165,250,.16);
  --tc-info-l: rgba(14,165,233,.16);
  --tc-success-l: rgba(34,197,94,.16);
  --tc-warning-l: rgba(245,158,11,.16);
}
[data-theme="dark"] body,
[data-theme="dark"] .dashboard-main {
  background: var(--tc-bg);
}
[data-theme="dark"] .tc-navbar {
  background: rgba(7,12,24,.94);
}
[data-theme="dark"] .dash-card-header {
  background: rgba(23,32,51,.92);
}
[data-theme="dark"] .filter-card,
[data-theme="dark"] .table th {
  background: var(--tc-bg-card);
}
[data-theme="dark"] .table-responsive.is-scrollable::after {
  background: linear-gradient(90deg, rgba(23,32,51,0), var(--tc-bg-card));
}
[data-theme="dark"] .table > tbody > tr:hover > td,
[data-theme="dark"] .table > tbody > tr:hover > th {
  background: rgba(37,99,235,.14);
}
[data-theme="dark"] .section-badge {
  background: rgba(37,99,235,.16);
  color: #93c5fd;
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection {
  background-color: #111827;
  color: var(--tc-text);
}
[data-theme="dark"] .auth-right .input-group-text,
[data-theme="dark"] .auth-right .input-group-text i {
  color: #667085 !important;
}

@media (max-width: 1199.98px) {
  .hero-product-card { width: min(300px, 38vw); }
  .hero-card-trainer { right: 18vw; }
}

@media (max-width: 991.98px) {
  .hero-section {
    padding: 4.5rem 0 3.5rem;
  }
  .hero-product-stage {
    opacity: .24;
  }
  .hero-card-requirement { right: -2rem; top: 12%; }
  .hero-card-trainer { right: 22vw; bottom: 12%; }
  .hero-card-metrics { display: none; }
  .hero-section h1 { font-size: 2.75rem; }
  .tc-navbar .navbar-collapse {
    background: rgba(11,18,32,.98);
    border-radius: 0 0 var(--radius) var(--radius);
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 3.25rem 0 2.75rem;
  }
  .hero-section h1 { font-size: 2.25rem; }
  .hero-lede {
    font-size: 1rem;
    line-height: 1.62;
  }
  .hero-product-stage { opacity: .14; }
  .hero-product-card {
    width: 260px;
  }
  .hero-card-requirement {
    right: -7rem;
    top: 4rem;
  }
  .hero-card-trainer {
    right: -2rem;
    bottom: 2rem;
  }
  .hero-section .btn-lg {
    width: 100%;
  }
  .dashboard-main { padding: 1rem; }
  .dashboard-main > .container-fluid > .row:has(.stat-card) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }
  .dashboard-main > .container-fluid > .row:has(.stat-card) > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }
  .stat-card {
    min-height: 128px;
    padding: 1rem;
  }
  .stat-number { font-size: 1.55rem; }
  .filter-card-body { padding: 1rem; }
  .filter-card .btn {
    flex: 1 1 0;
  }
}

@media (max-width: 575.98px) {
  .dashboard-main > .container-fluid > .row:has(.stat-card) {
    grid-template-columns: 1fr;
  }
  .welcome-banner .btn {
    width: 100%;
  }
  .page-header {
    align-items: flex-start !important;
  }
}

/* =====================================================
   REGISTER PAGE — Polished UX (Feb 2026)
   ===================================================== */

/* Page wrapper tone-down for register */
.register-page .auth-left {
  background: radial-gradient(110% 90% at 0% 0%, #4338ca 0%, #312e81 45%, #1e1b4b 100%);
  padding: 2.5rem 3rem;
  overflow: hidden;
}
.register-page .auth-left::before,
.register-page .auth-left::after { display: none !important; }

/* Animated mesh + grid overlay on left panel */
.auth-bg-mesh,
.auth-bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.auth-bg-mesh {
  background:
    radial-gradient(closest-side at 18% 22%, rgba(139,92,246,.55), transparent 70%),
    radial-gradient(closest-side at 82% 78%, rgba(99,102,241,.45), transparent 70%),
    radial-gradient(closest-side at 50% 110%, rgba(236,72,153,.30), transparent 70%);
  filter: blur(40px);
  opacity: .85;
  animation: meshFloat 18s ease-in-out infinite alternate;
}
@keyframes meshFloat {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-3%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(2%, -2%, 0) scale(1.02); }
}
.auth-bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
  opacity: .55;
}

/* Left content typography */
.auth-eyebrow {
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: .4rem .85rem;
  backdrop-filter: blur(6px);
  margin-bottom: 1.5rem;
}
.auth-headline {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: clamp(1.85rem, 2.4vw, 2.5rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.auth-headline em {
  font-style: normal;
  background: linear-gradient(135deg, #fcd34d 0%, #f472b6 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-sub {
  color: rgba(255,255,255,.78);
  font-size: 1rem;
  max-width: 36ch;
}

/* Role display cards (left panel) — now interactive */
.register-page .role-display-cards {
  display: flex; flex-direction: column; gap: .75rem;
  max-width: 420px;
}
.register-page .role-display-card {
  width: 100%; text-align: left;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  color: rgba(255,255,255,.9);
  transition: all .25s var(--ease-out);
  cursor: pointer;
  position: relative;
}
.register-page .role-display-card:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.25);
  transform: translateY(-1px);
}
.register-page .role-display-card.active {
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.10));
  border-color: rgba(255,255,255,.45);
  color: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.20);
}
.register-page .role-display-card .role-icon {
  width: 42px; height: 42px; min-width: 42px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
}
.register-page .role-display-card.active .role-icon {
  background: linear-gradient(135deg, #a78bfa, #f472b6);
}
.register-page .role-display-card .role-arrow {
  opacity: 0; transition: opacity .2s, transform .2s;
  font-size: .75rem;
}
.register-page .role-display-card:hover .role-arrow { opacity: .6; transform: translateX(2px); }
.register-page .role-display-card.active .role-arrow { opacity: 1; transform: translateX(2px); }

/* Trust chips */
.auth-trust-row { max-width: 460px; }
.trust-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.88);
  border-radius: 999px;
  padding: .35rem .75rem;
  font-size: .72rem; font-weight: 600;
  backdrop-filter: blur(6px);
}
.trust-chip i { font-size: .7rem; color: #fcd34d; }

/* OTP checklist (left panel step 2) */
.otp-checklist { display: flex; flex-direction: column; gap: 1rem; max-width: 420px; }
.otp-check-item { display: flex; gap: .9rem; align-items: flex-start; color: rgba(255,255,255,.92); }
.otp-check-item .check-circle {
  width: 38px; height: 38px; min-width: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .85rem;
}

/* Right panel layout polish */
.register-page .auth-right {
  background: #f8fafc;
  padding: 2.5rem 2rem;
}
.register-page .auth-box {
  max-width: 460px;
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 18px;
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 8px 32px rgba(15,23,42,.06), 0 1px 0 rgba(15,23,42,.02);
}
@media (max-width: 575.98px) {
  .register-page .auth-right { padding: 1.25rem 1rem; }
  .register-page .auth-box   { padding: 1.5rem 1.25rem; border-radius: 14px; }
}

/* New step indicator */
.reg-stepper {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem;
}
.reg-step { display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 78px; }
.reg-step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 2px solid #e2e8f0;
  color: #94a3b8; font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s var(--ease-out);
}
.reg-step.current .reg-step-dot {
  background: var(--tc-primary); border-color: var(--tc-primary); color: #fff;
  box-shadow: 0 0 0 5px rgba(99,102,241,.14);
}
.reg-step.done:not(.current) .reg-step-dot {
  background: var(--tc-success); border-color: var(--tc-success); color: #fff;
}
.reg-step-label { font-size: .72rem; font-weight: 600; color: #94a3b8; }
.reg-step.current .reg-step-label { color: var(--tc-primary); }
.reg-step.done:not(.current) .reg-step-label { color: var(--tc-success); }
.reg-step-line {
  flex: 0 0 56px; height: 2px; background: #e2e8f0; border-radius: 2px;
  margin-bottom: 1.45rem;
  position: relative; overflow: hidden;
}
.reg-step-line.done { background: var(--tc-success); }
.reg-step-line.done::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: stepShimmer 2.5s ease-in-out infinite;
}
@keyframes stepShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Headings */
.reg-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em;
  color: #0f172a; margin: 0 0 .25rem;
}
.reg-subtitle { color: #64748b; font-size: .875rem; margin: 0; }

/* Role tabs polished */
.register-page .role-selector-tabs {
  background: #f1f5f9;
  border-radius: 12px;
  padding: .3rem;
  gap: .25rem;
  display: flex;
}
.register-page .role-tab {
  flex: 1; min-height: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: none; background: transparent;
  border-radius: 9px;
  font-size: .85rem; font-weight: 600;
  color: #64748b;
  transition: all .2s var(--ease-out);
  position: relative;
}
.register-page .role-tab:hover { color: #475569; }
.register-page .role-tab.active {
  background: #fff;
  color: var(--tc-primary);
  box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 12px rgba(99,102,241,.12);
}
.register-page .role-tab i { font-size: .85rem; }

/* Required asterisk */
.req { color: var(--tc-danger); margin-left: 2px; }

/* Field polish — modern with status icons */
.register-page .form-label {
  font-size: .8rem; font-weight: 600; color: #334155;
  margin-bottom: .35rem;
  display: inline-flex; align-items: center; gap: .25rem;
}
.register-page .reg-field {
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  background: #fafbfc;
  border: 1.5px solid #e2e8f0;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.register-page .reg-field:focus-within {
  background: #fff;
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.register-page .reg-field .input-group-text {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  padding-left: .85rem; padding-right: .35rem;
}
.register-page .reg-field .input-group-text i { color: #94a3b8 !important; }
.register-page .reg-field:focus-within .input-group-text i { color: var(--tc-primary) !important; }
.register-page .reg-field .form-control {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: .65rem .85rem;
  font-size: .92rem;
  color: #0f172a;
}
.register-page .reg-field .form-control:focus { background: transparent !important; }
.register-page .reg-field .form-control::placeholder { color: #94a3b8; }

.register-page .reg-field .toggle-pass {
  border: none !important;
  background: transparent !important;
  color: #94a3b8 !important;
  padding: 0 .85rem;
  min-height: auto;
}
.register-page .reg-field .toggle-pass:hover { color: var(--tc-primary) !important; }

/* Field status (check / cross on right) */
.field-status {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.field-status.ok  { opacity: 1; background: var(--tc-success-l); color: var(--tc-success); }
.field-status.bad { opacity: 1; background: var(--tc-danger-l);  color: var(--tc-danger); }

/* Vendor field smooth show/hide */
.register-page .vendor-field {
  overflow: hidden;
  transition: max-height .35s var(--ease-out), opacity .25s, margin .25s;
  max-height: 120px;
  opacity: 1;
}
.register-page .vendor-field.is-hidden {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0; padding-bottom: 0;
  pointer-events: none;
}

/* Password strength bar (override register-specific) */
.register-page .pass-strength-bar {
  height: 6px; border-radius: 999px;
  background: #eef0f4; overflow: hidden;
  margin-bottom: 0;
}
.register-page .pass-strength-fill {
  display: block; height: 100%; width: 0%;
  background: #e2e8f0;
  transition: width .35s var(--ease-out), background .35s;
  border-radius: 999px;
}
.pass-strength-fill.lvl-weak   { background: linear-gradient(90deg, #ef4444, #f87171); }
.pass-strength-fill.lvl-fair   { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.pass-strength-fill.lvl-good   { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.pass-strength-fill.lvl-strong { background: linear-gradient(90deg, #10b981, #34d399); }

#strengthLabel { transition: color .2s; }
.pass-strength-fill.lvl-weak   ~ * #strengthLabel,
#strengthBar.lvl-weak   + .d-flex #strengthLabel { color: var(--tc-danger); }

/* Password requirements list */
.pass-req-list {
  list-style: none; margin: .65rem 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .85rem;
}
.pass-req-list li {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 500;
  color: #94a3b8;
  transition: color .2s;
}
.pass-req-list li i {
  font-size: .65rem;
  color: #cbd5e1;
  transition: color .2s, transform .2s;
}
.pass-req-list li.met { color: var(--tc-success); }
.pass-req-list li.met i { color: var(--tc-success); transform: scale(1.1); }

/* Match indicator */
.match-indicator { display: flex; align-items: center; }

/* Caps lock warning */
.caps-warn { display: flex; align-items: center; }

/* Alerts polished */
.reg-alert {
  border: 1px solid;
  border-radius: 12px;
  padding: .75rem .9rem;
  background: #fff;
  font-size: .85rem;
}
.reg-alert.alert-danger  { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.reg-alert.alert-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.reg-alert i { margin-top: 2px; }

/* Submit button — loading state */
.reg-submit {
  position: relative;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--tc-primary), var(--tc-secondary));
  border: none;
  box-shadow: 0 4px 14px rgba(99,102,241,.32);
  transition: transform .15s, box-shadow .2s, opacity .2s;
  overflow: hidden;
}
.reg-submit:hover {
  background: linear-gradient(135deg, var(--tc-primary-d), #7c3aed);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99,102,241,.42);
}
.reg-submit:active { transform: translateY(0); }
.reg-submit .btn-label,
.reg-submit .btn-loading {
  display: inline-flex; align-items: center; justify-content: center;
}
.reg-submit .btn-loading { display: none; }
.reg-submit.is-loading .btn-label { display: none; }
.reg-submit.is-loading .btn-loading { display: inline-flex; }
.reg-submit.is-loading { opacity: .85; cursor: progress; }

/* OTP — slightly larger and softer */
.register-page .otp-input-group { gap: .55rem; }
.register-page .otp-digit {
  width: clamp(42px, 13vw, 56px);
  height: clamp(50px, 14vw, 62px);
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fafbfc;
  color: var(--tc-primary);
  font-family: 'JetBrains Mono','Courier New', monospace;
  font-size: clamp(1.3rem, 4.5vw, 1.6rem);
  font-weight: 700;
  transition: all .18s var(--ease-out);
}
.register-page .otp-digit:focus {
  background: #fff;
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.14);
  transform: translateY(-1px);
}
.register-page .otp-digit.filled {
  background: rgba(99,102,241,.06);
  border-color: var(--tc-primary);
}

/* Resend button */
#resendBtn { color: var(--tc-primary); }
#resendBtn:disabled { color: #94a3b8; cursor: not-allowed; }
#resendBtn:not(:disabled):hover { color: var(--tc-primary-d); }

/* Form hint (email typo suggestion) */
.form-hint { font-size: .75rem; margin-top: .3rem; }
.form-hint a { text-decoration: none; }
.form-hint a:hover { text-decoration: underline; }

/* Dark theme — keep right panel light for legibility, leave it untouched */
[data-theme="dark"] .register-page .auth-box {
  background: #fff;
  border-color: #eef0f4;
}
[data-theme="dark"] .register-page .reg-field { background: #fafbfc; border-color: #e2e8f0; }
[data-theme="dark"] .register-page .reg-field:focus-within { background: #fff; border-color: var(--tc-primary); }
[data-theme="dark"] .register-page .reg-title { color: #0f172a; }
[data-theme="dark"] .register-page .reg-subtitle,
[data-theme="dark"] .register-page .form-label { color: #475569; }
[data-theme="dark"] .register-page .pass-req-list li { color: #94a3b8; }
[data-theme="dark"] .register-page .pass-req-list li.met { color: var(--tc-success); }

/* Tighten the visual on narrow screens */
@media (max-width: 991.98px) {
  .register-page .auth-right { padding: 1.5rem 1rem; min-height: 100vh; }
  .register-page .auth-box { margin: 0 auto; }
}
@media (max-width: 420px) {
  .pass-req-list { grid-template-columns: 1fr; }
  .register-page .role-tab span { font-size: .8rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-bg-mesh { animation: none; }
  .reg-step-line.done::after { animation: none; }
  .reg-submit:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
 * MESSAGING — Enterprise additions
 * ═══════════════════════════════════════════════════════════════ */

/* Folder tabs */
.chat-folder-tabs { display: flex; border-bottom: 1px solid var(--tc-border); background: var(--tc-bg); }
.chat-folder-tabs a {
  flex: 1; text-align: center; padding: .55rem .5rem;
  font-size: .8rem; color: var(--tc-text-muted); text-decoration: none;
  border-bottom: 2px solid transparent; font-weight: 500;
}
.chat-folder-tabs a.active { color: var(--tc-primary); border-bottom-color: var(--tc-primary); background: #fff; }

/* Blocked conv item */
.conv-item.is-blocked { opacity: .6; }
.conv-item.is-blocked .conv-name::after { content: " · blocked"; color: #ef4444; font-size: .7rem; }

/* Pinned indicator on row */
.msg-row.is-pinned > .msg-bubble { box-shadow: 0 0 0 2px rgba(245,158,11,.35); }
.msg-pinned-flag { color: #f59e0b; margin-right: .35rem; }
.msg-pinned-flag i { font-size: .65rem; }

/* Flash highlight (jump-to) */
@keyframes msgFlash {
  0%   { background: rgba(99,102,241,.18); }
  100% { background: transparent; }
}
.msg-row.flash { animation: msgFlash 1.5s ease-out; border-radius: var(--radius); }

/* Recalled / Forwarded */
.msg-recalled {
  font-style: italic; color: var(--tc-text-muted) !important;
  background: rgba(0,0,0,.04) !important; border-style: dashed !important;
}
.msg-forwarded { display: flex; align-items: center; color: var(--tc-text-muted); font-size: .7rem; margin-bottom: .25rem; }
.msg-forwarded i { margin-right: .25rem; }

/* Reply quote inside a message */
.msg-reply-quote {
  border-left: 3px solid var(--tc-primary);
  padding: .35rem .55rem; margin-bottom: .35rem;
  background: rgba(99,102,241,.06); border-radius: 6px;
  cursor: pointer; font-size: .75rem; line-height: 1.3; max-width: 100%;
}
.msg-reply-quote:hover { background: rgba(99,102,241,.12); }
.msg-reply-name { display: block; font-weight: 600; color: var(--tc-primary); }
.msg-reply-snippet { color: var(--tc-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg-row.mine .msg-reply-quote { background: rgba(255,255,255,.18); border-left-color: rgba(255,255,255,.6); }
.msg-row.mine .msg-reply-name  { color: #fff; }
.msg-row.mine .msg-reply-snippet { color: rgba(255,255,255,.85); }

.msg-img-caption { padding: .5rem .65rem; font-size: .85rem; background: rgba(0,0,0,.45); color: #fff; }
.msg-row.theirs .msg-img-caption { background: rgba(0,0,0,.05); color: var(--tc-text); }

.msg-edited { font-size: .7rem; margin-left: .25rem; opacity: .7; }

/* Reactions row */
.msg-reactions { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .25rem; }
.react-pill {
  display: inline-flex; align-items: center; gap: .2rem;
  background: #fff; border: 1px solid var(--tc-border);
  border-radius: 999px; padding: 1px 8px; font-size: .75rem;
  cursor: pointer; line-height: 1.4;
}
.react-pill small { color: var(--tc-text-muted); font-weight: 600; }
.react-pill.mine { background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.45); }
.react-pill.mine small { color: var(--tc-primary); }
.react-pill:hover { background: rgba(99,102,241,.1); }

/* Per-message action buttons (hover) */
.msg-row { position: relative; }
.msg-actions {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: none; gap: .15rem;
  background: #fff; border: 1px solid var(--tc-border);
  border-radius: 999px; padding: 2px 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08); z-index: 5;
}
.msg-row.mine   .msg-actions { right: calc(100% + 6px); }
.msg-row.theirs .msg-actions { left:  calc(100% + 6px); }
.msg-row:hover .msg-actions { display: flex; }
.msg-action {
  border: none; background: transparent; width: 26px; height: 26px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--tc-text-muted); cursor: pointer;
}
.msg-action:hover { background: var(--tc-bg); color: var(--tc-primary); }
@media (max-width: 768px) {
  .msg-actions { display: flex !important; position: static; transform: none; margin-top: .15rem; box-shadow: none; }
}

/* Reaction picker (floating) */
.react-picker {
  position: absolute; z-index: 1100; display: flex; gap: 2px;
  background: #fff; border: 1px solid var(--tc-border);
  border-radius: 999px; padding: 4px 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.react-picker button {
  border: none; background: transparent;
  font-size: 1.1rem; width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; transition: transform .12s;
}
.react-picker button:hover { transform: scale(1.3); background: var(--tc-bg); }

/* Per-message context menu */
.msg-menu {
  position: absolute; z-index: 1100; min-width: 200px;
  background: #fff; border: 1px solid var(--tc-border);
  border-radius: 8px; padding: 4px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.msg-menu button {
  display: flex; align-items: center; width: 100%;
  padding: .5rem .85rem; border: none; background: transparent;
  text-align: left; font-size: .85rem; color: var(--tc-text); cursor: pointer;
}
.msg-menu button:hover  { background: var(--tc-bg); }
.msg-menu button.danger { color: #ef4444; }

/* Read ticks 3-state */
.msg-read-tick.sent      { color: rgba(255,255,255,.6); }
.msg-read-tick.delivered { color: rgba(255,255,255,.85); }
.msg-read-tick.read      { color: #2dd4bf; }
.msg-row.theirs .msg-read-tick.sent      { color: var(--tc-text-muted); }
.msg-row.theirs .msg-read-tick.delivered { color: var(--tc-text); }
.msg-row.theirs .msg-read-tick.read      { color: var(--tc-primary); }

/* Reply / Edit bar above input */
.reply-bar {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .85rem;
  background: rgba(99,102,241,.07);
  border-top: 1px solid var(--tc-border);
  border-bottom: 1px solid var(--tc-border);
}
.reply-bar .reply-marker {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--tc-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.reply-bar[data-kind="edit"] .reply-marker { background: #f59e0b; }
.reply-bar .reply-content { min-width: 0; flex: 1; }
.reply-bar .reply-close { padding: .25rem .5rem; }

/* Block notice */
.block-notice { border-radius: 0; margin: 0; }

/* Thread search bar */
.thread-search-bar {
  padding: .55rem .85rem; border-bottom: 1px solid var(--tc-border); background: #fff;
}
.thread-search-results { max-height: 280px; overflow-y: auto; margin-top: .5rem; }
.search-result {
  display: block; padding: .55rem .75rem; border-radius: 6px;
  text-decoration: none; color: var(--tc-text);
  border-bottom: 1px solid var(--tc-border);
}
.search-result:hover { background: var(--tc-bg); }
.search-snippet { font-size: .82rem; line-height: 1.4; }
.search-snippet mark { background: rgba(245,158,11,.25); color: inherit; padding: 0 2px; }
.search-meta { font-size: .7rem; color: var(--tc-text-muted); margin-top: .15rem; }

/* Pinned messages drawer */
.pinned-drawer {
  background: rgba(245,158,11,.06);
  border-bottom: 1px solid var(--tc-border);
  max-height: 220px; overflow-y: auto; padding: .35rem;
}
.pinned-item {
  padding: .5rem .65rem; border-radius: 6px; cursor: pointer;
  border-bottom: 1px solid rgba(245,158,11,.15);
}
.pinned-item:hover { background: rgba(245,158,11,.12); }
.pinned-sender  { font-weight: 600; font-size: .8rem; color: #b45309; }
.pinned-snippet { font-size: .82rem; color: var(--tc-text); margin-top: .15rem; }
.pinned-meta    { font-size: .68rem; color: var(--tc-text-muted); margin-top: .1rem; }

/* Forward modal list */
.forward-list {
  max-height: 300px; overflow-y: auto;
  border: 1px solid var(--tc-border); border-radius: 8px;
}
.forward-target {
  display: flex; align-items: center; width: 100%;
  padding: .55rem .85rem; background: transparent;
  border: none; border-bottom: 1px solid var(--tc-border);
  text-align: left; cursor: pointer; font-size: .85rem; color: var(--tc-text);
}
.forward-target:last-child { border-bottom: none; }
.forward-target:hover { background: var(--tc-bg); }

/* Quick reply manager rows */
.qr-row {
  border: 1px solid var(--tc-border); border-radius: 8px;
  padding: .55rem; margin-bottom: .5rem;
}
.qr-row > * + * { margin-top: .35rem; }

/* Dark-mode tweaks */
[data-theme="dark"] .react-pill,
[data-theme="dark"] .react-picker,
[data-theme="dark"] .msg-menu,
[data-theme="dark"] .msg-actions,
[data-theme="dark"] .thread-search-bar,
[data-theme="dark"] .chat-folder-tabs a.active {
  background: var(--tc-bg-card); color: var(--tc-text); border-color: var(--tc-border);
}
[data-theme="dark"] .msg-action,
[data-theme="dark"] .msg-menu button { color: var(--tc-text); }
[data-theme="dark"] .msg-action:hover { background: var(--tc-bg); }
[data-theme="dark"] .pinned-drawer { background: rgba(245,158,11,.12); }
[data-theme="dark"] .pinned-sender { color: #fbbf24; }
[data-theme="dark"] .msg-row.theirs .msg-img-caption { background: rgba(255,255,255,.06); }
