/* =============================================================================
   PropReel AI — Design System
   propreel.css  |  Luxury Dark SaaS
   ============================================================================= */

/* ── 1. CSS Custom Properties ─────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --pr-bg:           #0A0F1E;
  --pr-bg-elevated:  #0D1526;
  --pr-bg-card:      #111827;
  --pr-surface:      #1A2235;
  --pr-surface-2:    #1E293B;

  /* Borders */
  --pr-border:       rgba(255, 255, 255, 0.07);
  --pr-border-hover: rgba(255, 255, 255, 0.14);

  /* Primary — electric blue */
  --pr-blue:         #2563EB;
  --pr-blue-hover:   #1D4ED8;
  --pr-blue-light:   #3B82F6;
  --pr-blue-glow:    rgba(37, 99, 235, 0.30);
  --pr-blue-subtle:  rgba(37, 99, 235, 0.10);

  /* Accent — gold */
  --pr-gold:         #F59E0B;
  --pr-gold-hover:   #D97706;
  --pr-gold-light:   #FCD34D;
  --pr-gold-glow:    rgba(245, 158, 11, 0.25);
  --pr-gold-subtle:  rgba(245, 158, 11, 0.10);

  /* Semantic */
  --pr-green:         #10B981;
  --pr-green-glow:    rgba(16, 185, 129, 0.20);
  --pr-green-subtle:  rgba(16, 185, 129, 0.10);

  --pr-red:           #EF4444;
  --pr-red-hover:     #DC2626;
  --pr-red-glow:      rgba(239, 68, 68, 0.25);
  --pr-red-subtle:    rgba(239, 68, 68, 0.10);

  --pr-orange:        #F97316;
  --pr-orange-subtle: rgba(249, 115, 22, 0.10);

  --pr-yellow:        #EAB308;
  --pr-yellow-subtle: rgba(234, 179, 8, 0.10);

  /* Admin accent */
  --pr-admin:      #DC2626;
  --pr-admin-glow: rgba(220, 38, 38, 0.25);

  /* Typography */
  --pr-text:         #F1F5F9;
  --pr-text-muted:   #94A3B8;
  --pr-text-dim:     #64748B;

  /* Layout */
  --sidebar-width:  260px;
  --header-height:  64px;

  /* Spacing */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px;

  /* Radius */
  --r-sm:   6px;    --r-md:  10px;   --r-lg:  14px;
  --r-xl:   20px;   --r-2xl: 28px;   --r-full: 9999px;

  /* Shadows */
  --shadow-xs:   0 1px 2px rgba(0,0,0,0.45);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.50);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.55);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.60);
  --shadow-xl:   0 16px 56px rgba(0,0,0,0.70);
  --shadow-blue: 0 0 0 1px var(--pr-blue), 0 0 24px var(--pr-blue-glow);
  --shadow-gold: 0 0 0 1px var(--pr-gold), 0 0 24px var(--pr-gold-glow);

  /* Glassmorphism */
  --glass-bg:     rgba(255, 255, 255, 0.028);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur:   20px;

  /* Easing */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:      150ms var(--ease);
  --t-base:      220ms var(--ease);
  --t-slow:      350ms var(--ease);
}

/* ── 2. Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--pr-text);
  background-color: var(--pr-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--pr-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

a { color: var(--pr-blue-light); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--pr-text); }

p { color: var(--pr-text-muted); }

img, video { max-width: 100%; height: auto; display: block; }

::selection { background: var(--pr-blue-subtle); color: var(--pr-text); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--pr-surface-2); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--pr-text-dim); }

code {
  font-size: 0.85em;
  color: var(--pr-blue-light);
  background: var(--pr-blue-subtle);
  padding: 2px 7px;
  border-radius: var(--r-sm);
}

/* ── 3. Layout Shell ──────────────────────────────────────────────────────── */
.pr-shell { display: flex; min-height: 100vh; }

/* ── 4. Sidebar ───────────────────────────────────────────────────────────── */
.pr-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #06090F;
  border-right: 1px solid var(--pr-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--t-slow);
  overflow: hidden;
  overflow-y: auto;
}

/* Admin variant — red sidebar brand */
.pr-sidebar--admin .pr-sidebar-brand {
  background: rgba(220, 38, 38, 0.06);
  border-bottom: 1px solid rgba(220, 38, 38, 0.18);
}

.pr-sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-5);
  min-height: var(--header-height);
  border-bottom: 1px solid var(--pr-border);
  text-decoration: none;
  flex-shrink: 0;
}

.pr-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--pr-blue) 0%, #7C3AED 100%);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: white; flex-shrink: 0;
  box-shadow: 0 0 14px var(--pr-blue-glow);
}

.pr-logo-icon--admin {
  background: linear-gradient(135deg, var(--pr-admin) 0%, #7C3AED 100%);
  box-shadow: 0 0 14px var(--pr-admin-glow);
}

.pr-logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--pr-text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.pr-logo-text span { color: var(--pr-blue-light); }
.pr-logo-text--admin span { color: #FCA5A5; }

.pr-sidebar-badge {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 2px 7px;
  border-radius: var(--r-full);
  background: var(--pr-blue-subtle);
  color: var(--pr-blue-light);
  border: 1px solid rgba(59,130,246,0.25);
  white-space: nowrap; margin-left: auto;
}

.pr-sidebar-badge--admin {
  background: var(--pr-red-subtle);
  color: #FCA5A5;
  border-color: rgba(220,38,38,0.30);
}

.pr-sidebar-section-label {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--pr-text-dim);
  padding: var(--sp-5) var(--sp-5) var(--sp-2);
}

.pr-sidebar-nav {
  flex: 1;
  padding: var(--sp-3) var(--sp-3);
  display: flex; flex-direction: column; gap: 2px;
}

.pr-nav-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px var(--sp-4);
  border-radius: var(--r-md);
  color: var(--pr-text-muted);
  font-size: 0.9rem; font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
  text-decoration: none; white-space: nowrap;
  position: relative;
}

.pr-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--pr-text);
}

.pr-nav-item.active {
  background: var(--pr-blue-subtle);
  color: var(--pr-blue-light);
}

.pr-nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 3px;
  background: var(--pr-blue);
  border-radius: 0 3px 3px 0;
}

.pr-nav-item--admin.active { background: var(--pr-red-subtle); color: #FCA5A5; }
.pr-nav-item--admin.active::before { background: var(--pr-admin); }

.pr-nav-item i, .pr-nav-item .fa-solid,
.pr-nav-item .fa-regular { width: 18px; font-size: 15px; text-align: center; flex-shrink: 0; }

.pr-nav-divider { height: 1px; background: var(--pr-border); margin: var(--sp-2) var(--sp-2); }

.pr-sidebar-footer { padding: var(--sp-4); border-top: 1px solid var(--pr-border); flex-shrink: 0; }

.pr-user-chip {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3); border-radius: var(--r-lg);
  cursor: default; position: relative;
}

/* ── 5. Avatar ────────────────────────────────────────────────────────────── */
.pr-avatar {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--pr-blue) 0%, #7C3AED 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 700;
  font-size: 0.875rem; color: white; flex-shrink: 0;
  user-select: none;
}
.pr-avatar--sm { width: 28px; height: 28px; font-size: 0.75rem; }
.pr-avatar--lg { width: 52px; height: 52px; font-size: 1.2rem; }
.pr-avatar--xl { width: 80px; height: 80px; font-size: 1.75rem; }
.pr-avatar--admin { background: linear-gradient(135deg, var(--pr-admin) 0%, #7C3AED 100%); }

/* Legacy avatar-circle compat */
.avatar-circle {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--pr-blue) 0%, #7C3AED 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 700;
  font-size: 0.875rem; color: white; flex-shrink: 0;
}
.avatar-lg { width: 52px; height: 52px; font-size: 1.2rem; border-radius: var(--r-full); }

.pr-user-info { flex: 1; min-width: 0; }
.pr-user-name { font-weight: 600; font-size: 0.875rem; color: var(--pr-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-user-role { font-size: 0.75rem; color: var(--pr-text-dim); text-transform: capitalize; }

/* ── 6. Top Header ────────────────────────────────────────────────────────── */
.pr-header {
  position: fixed; top: 0;
  left: var(--sidebar-width); right: 0;
  height: var(--header-height);
  background: rgba(10, 15, 30, 0.88);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--pr-border);
  display: flex; align-items: center;
  padding: 0 var(--sp-6); gap: var(--sp-4);
  z-index: 90; transition: left var(--t-slow);
}

.pr-header-hamburger {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-md); border: none;
  background: transparent; color: var(--pr-text-muted);
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
  flex-shrink: 0;
}
.pr-header-hamburger:hover { background: var(--pr-surface-2); color: var(--pr-text); }

.pr-header-title {
  flex: 1;
  font-family: 'Sora', sans-serif;
  font-size: 1rem; font-weight: 600; color: var(--pr-text);
}

.pr-header-actions { display: flex; align-items: center; gap: var(--sp-2); }

.pr-header-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-md); border: none;
  background: transparent; color: var(--pr-text-muted);
  cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
  position: relative; text-decoration: none;
}
.pr-header-btn:hover { background: var(--pr-surface-2); color: var(--pr-text); }

.pr-notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--pr-blue); border-radius: var(--r-full);
  border: 2px solid var(--pr-bg);
}

/* ── 7. Main Content ──────────────────────────────────────────────────────── */
.pr-main {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  padding: var(--sp-8);
  transition: margin-left var(--t-slow);
}

/* ── 8. Glassmorphism Card ────────────────────────────────────────────────── */
.pr-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.pr-card:hover { border-color: var(--pr-border-hover); }
.pr-card--glow:hover { box-shadow: var(--shadow-md), 0 0 30px var(--pr-blue-glow); border-color: rgba(37,99,235,0.25); }
.pr-card--gold:hover { box-shadow: var(--shadow-md), 0 0 30px var(--pr-gold-glow); border-color: rgba(245,158,11,0.25); }

.pr-card-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--pr-border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
}
.pr-card-title { font-family: 'Sora', sans-serif; font-size: 1rem; font-weight: 600; color: var(--pr-text); }
.pr-card-body { padding: var(--sp-6); }
.pr-card-footer { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--pr-border); }

/* Bootstrap .card dark override */
.card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--r-xl) !important;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--pr-text) !important;
  box-shadow: var(--shadow-sm) !important;
}
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--pr-border) !important;
  color: var(--pr-text) !important; padding: var(--sp-4) var(--sp-5) !important;
}
.card-body { color: var(--pr-text) !important; padding: var(--sp-5) !important; }
.card-footer { background: transparent !important; border-top: 1px solid var(--pr-border) !important; color: var(--pr-text-muted) !important; }

/* ── 9. Stat Cards ────────────────────────────────────────────────────────── */
.pr-stat-card, .stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl) !important;
  padding: var(--sp-6);
  display: flex; align-items: flex-start; gap: var(--sp-4);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
  box-shadow: var(--shadow-sm);
}
.pr-stat-card:hover, .stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--pr-border-hover);
  box-shadow: var(--shadow-lg);
}

.pr-stat-icon, .stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}

/* Legacy compat color classes */
.bg-primary-soft   { background: var(--pr-blue-subtle) !important; }
.bg-success-soft   { background: var(--pr-green-subtle) !important; }
.bg-warning-soft   { background: var(--pr-yellow-subtle) !important; }
.bg-indigo-soft    { background: rgba(99,102,241,0.12) !important; }
.bg-indigo-soft.text-indigo { color: #818CF8 !important; }

.pr-stat-icon--blue, .stat-icon.bg-primary-soft  { background: var(--pr-blue-subtle) !important; color: var(--pr-blue-light) !important; }
.pr-stat-icon--gold                               { background: var(--pr-gold-subtle); color: var(--pr-gold); }
.pr-stat-icon--green, .stat-icon.bg-success-soft  { background: var(--pr-green-subtle) !important; color: var(--pr-green) !important; }
.pr-stat-icon--red                                { background: var(--pr-red-subtle); color: var(--pr-red); }
.stat-icon.bg-warning-soft                        { background: var(--pr-yellow-subtle) !important; color: var(--pr-yellow) !important; }
.stat-icon.bg-indigo-soft                         { background: rgba(99,102,241,0.12) !important; color: #818CF8 !important; }

.pr-stat-label { font-size: 0.8125rem; color: var(--pr-text-muted); font-weight: 500; margin-bottom: var(--sp-1); }
.pr-stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 2rem; font-weight: 700; color: var(--pr-text); line-height: 1;
}
.pr-stat-trend { font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 3px; margin-top: var(--sp-1); }
.pr-stat-trend--up   { color: var(--pr-green); }
.pr-stat-trend--down { color: var(--pr-red); }

/* ── 10. Buttons ──────────────────────────────────────────────────────────── */
.btn, .pr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 600; line-height: 1;
  padding: 10px 20px; border-radius: var(--r-lg);
  border: 1px solid transparent; cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none; white-space: nowrap; user-select: none;
}
.btn:focus-visible, .pr-btn:focus-visible { outline: 2px solid var(--pr-blue); outline-offset: 2px; }

/* Primary */
.btn-primary, .pr-btn--primary {
  background: var(--pr-blue); border-color: var(--pr-blue); color: white;
  box-shadow: 0 2px 12px var(--pr-blue-glow);
}
.btn-primary:hover, .pr-btn--primary:hover {
  background: var(--pr-blue-hover); border-color: var(--pr-blue-hover);
  box-shadow: 0 4px 24px var(--pr-blue-glow); transform: translateY(-1px); color: white;
}
.btn-primary:active { transform: translateY(0); }

/* Outline primary */
.btn-outline-primary, .pr-btn--secondary {
  background: transparent; border-color: var(--pr-border-hover); color: var(--pr-text-muted);
}
.btn-outline-primary:hover, .pr-btn--secondary:hover {
  background: var(--pr-surface-2); border-color: var(--pr-blue); color: var(--pr-text);
}

/* Outline secondary */
.btn-outline-secondary {
  background: transparent; border-color: var(--pr-border-hover); color: var(--pr-text-muted);
}
.btn-outline-secondary:hover { background: var(--pr-surface-2); border-color: var(--pr-border-hover); color: var(--pr-text); }

/* Danger */
.btn-danger, .pr-btn--danger {
  background: var(--pr-red); border-color: var(--pr-red); color: white;
}
.btn-danger:hover, .pr-btn--danger:hover {
  background: var(--pr-red-hover); box-shadow: 0 4px 24px var(--pr-red-glow);
  transform: translateY(-1px); color: white;
}

.btn-outline-danger { background: transparent; border-color: rgba(239,68,68,0.35); color: var(--pr-red); }
.btn-outline-danger:hover { background: var(--pr-red-subtle); border-color: var(--pr-red); color: var(--pr-red); }

/* Success */
.btn-success, .pr-btn--success {
  background: var(--pr-green); border-color: var(--pr-green); color: white;
}
.btn-success:hover, .pr-btn--success:hover {
  filter: brightness(1.1); box-shadow: 0 4px 24px var(--pr-green-glow);
  transform: translateY(-1px); color: white;
}

/* Gold / Premium */
.pr-btn--gold {
  background: linear-gradient(135deg, var(--pr-gold), #F97316);
  border-color: var(--pr-gold); color: #0A0F1E; font-weight: 700;
}
.pr-btn--gold:hover {
  box-shadow: 0 4px 24px var(--pr-gold-glow); transform: translateY(-1px);
  filter: brightness(1.08); color: #0A0F1E;
}

/* Sizes */
.btn-sm { padding: 7px 14px !important; font-size: 0.8125rem !important; border-radius: var(--r-md) !important; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }

/* btn-close (for alerts) */
.btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: 0.55; }
.btn-close:hover { opacity: 0.9; }

/* ── 11. Badges & Status Pills ────────────────────────────────────────────── */
.badge, .pr-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: var(--r-full);
  text-transform: uppercase; vertical-align: middle;
}

/* Bootstrap badge color overrides */
.bg-primary   { background: var(--pr-blue-subtle) !important; color: var(--pr-blue-light) !important; border: 1px solid rgba(59,130,246,0.25) !important; }
.bg-success   { background: var(--pr-green-subtle) !important; color: var(--pr-green) !important; border: 1px solid rgba(16,185,129,0.25) !important; }
.bg-danger    { background: var(--pr-red-subtle) !important; color: var(--pr-red) !important; border: 1px solid rgba(239,68,68,0.25) !important; }
.bg-warning   { background: var(--pr-yellow-subtle) !important; color: var(--pr-yellow) !important; border: 1px solid rgba(234,179,8,0.25) !important; }
.bg-secondary { background: rgba(255,255,255,0.07) !important; color: var(--pr-text-muted) !important; border: 1px solid var(--pr-border) !important; }
.bg-light     { background: rgba(255,255,255,0.06) !important; color: var(--pr-text-muted) !important; border: 1px solid var(--pr-border) !important; }
.bg-info      { background: rgba(6,182,212,0.10) !important; color: #22D3EE !important; border: 1px solid rgba(6,182,212,0.25) !important; }
.text-dark    { color: var(--pr-text) !important; }

.text-indigo  { color: #818CF8 !important; }

/* Status pills with animated dot */
.pr-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600; padding: 4px 12px;
  border-radius: var(--r-full);
}
.pr-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.pr-status--pending  { background: var(--pr-yellow-subtle); color: var(--pr-yellow); border: 1px solid rgba(234,179,8,0.22); }
.pr-status--pending::before  { background: var(--pr-yellow); }

.pr-status--processing { background: var(--pr-blue-subtle); color: var(--pr-blue-light); border: 1px solid rgba(59,130,246,0.22); }
.pr-status--processing::before { background: var(--pr-blue-light); animation: pulse-dot 1.2s ease-in-out infinite; }

.pr-status--completed { background: var(--pr-green-subtle); color: var(--pr-green); border: 1px solid rgba(16,185,129,0.22); }
.pr-status--completed::before { background: var(--pr-green); }

.pr-status--failed { background: var(--pr-red-subtle); color: var(--pr-red); border: 1px solid rgba(239,68,68,0.22); }
.pr-status--failed::before { background: var(--pr-red); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.65); }
}

/* ── 12. Forms ────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--pr-surface-2) !important;
  border: 1px solid var(--pr-border-hover) !important;
  border-radius: var(--r-md) !important;
  color: var(--pr-text) !important;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  padding: 10px 14px; transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%; outline: none;
}
.form-control::placeholder { color: var(--pr-text-dim); }
.form-control:focus, .form-select:focus {
  border-color: var(--pr-blue) !important;
  box-shadow: 0 0 0 3px var(--pr-blue-subtle) !important;
  background: var(--pr-surface) !important;
}
.form-control.is-invalid { border-color: var(--pr-red) !important; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px var(--pr-red-subtle) !important; }

/* Dark dropdown arrow for select */
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394A3B8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 14px !important;
  padding-right: 40px !important;
}
.form-select option { background: var(--pr-surface-2); color: var(--pr-text); }

.invalid-feedback { color: var(--pr-red); font-size: 0.8125rem; margin-top: 4px; }
.form-label { font-size: 0.875rem; font-weight: 600; color: var(--pr-text-muted); margin-bottom: var(--sp-2); display: block; }
.form-text  { font-size: 0.8rem; color: var(--pr-text-dim); margin-top: var(--sp-1); }
.fw-semibold.small, .form-label.fw-semibold.small { font-size: 0.8125rem !important; }

.input-group { display: flex; gap: 0; }
.input-group .form-control { border-radius: 0 !important; }
.input-group .form-control:first-child, .input-group > *:first-child .form-control { border-radius: var(--r-md) 0 0 var(--r-md) !important; }
.input-group .form-control:last-child  { border-radius: 0 var(--r-md) var(--r-md) 0 !important; }

.input-group-text {
  background: var(--pr-surface) !important;
  border: 1px solid var(--pr-border-hover) !important;
  border-right: none !important;
  border-radius: var(--r-md) 0 0 var(--r-md) !important;
  color: var(--pr-text-dim);
  padding: 10px 14px; font-size: 0.875rem;
  display: flex; align-items: center;
}
.input-group > .btn { border-radius: 0 var(--r-md) var(--r-md) 0 !important; border-left: none; }

/* Number input without spinner */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { opacity: 0.4; }

/* Color input */
input[type=color].form-control { height: 42px; padding: 4px 6px; cursor: pointer; }

/* Password toggle btn in input group */
.input-group .btn-outline-secondary {
  border-left: none !important; border-radius: 0 var(--r-md) var(--r-md) 0 !important;
}

/* Font monospace */
.font-monospace { font-family: 'Courier New', Courier, monospace !important; font-size: 0.85rem !important; letter-spacing: 0.02em; }

/* ── 13. Upload Zone ──────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--pr-border-hover);
  border-radius: var(--r-xl);
  padding: var(--sp-12) var(--sp-8);
  text-align: center; cursor: pointer;
  transition: all var(--t-base);
  background: var(--glass-bg);
  position: relative; overflow: hidden;
}
.upload-zone::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, var(--pr-blue-subtle) 0%, transparent 70%);
  opacity: 0; transition: opacity var(--t-base);
}
.upload-zone:hover, .upload-zone--drag-over {
  border-color: var(--pr-blue);
  background: rgba(37,99,235,0.06);
}
.upload-zone:hover::before, .upload-zone--drag-over::before { opacity: 1; }

.upload-zone-icon {
  font-size: 2.5rem; color: var(--pr-text-dim);
  margin-bottom: var(--sp-4); display: block;
  transition: color var(--t-base), transform var(--t-base); position: relative;
}
.upload-zone:hover .upload-zone-icon { color: var(--pr-blue-light); transform: translateY(-5px); }
.upload-zone-title { font-family: 'Sora', sans-serif; font-weight: 600; color: var(--pr-text); margin-bottom: var(--sp-1); }
.upload-zone-hint  { font-size: 0.85rem; color: var(--pr-text-muted); }

/* Image preview grid */
.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: var(--sp-3); margin-top: var(--sp-4);
}
.upload-preview-item {
  position: relative; aspect-ratio: 1;
  border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--pr-border);
}
.upload-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview-remove {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.75); color: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 10px;
  opacity: 0; transition: opacity var(--t-fast);
}
.upload-preview-item:hover .upload-preview-remove { opacity: 1; }

/* ── 14. Progress Bar ─────────────────────────────────────────────────────── */
.pr-progress {
  height: 6px; background: var(--pr-surface-2);
  border-radius: var(--r-full); overflow: hidden; position: relative;
}
.pr-progress-bar {
  height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--pr-blue), var(--pr-blue-light));
  position: relative; transition: width var(--t-slow);
}
.pr-progress-bar::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.30), transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}
.pr-progress-bar--gold  { background: linear-gradient(90deg, var(--pr-gold), var(--pr-gold-light)); }
.pr-progress-bar--green { background: linear-gradient(90deg, var(--pr-green), #34D399); }
.pr-progress-bar--red   { background: linear-gradient(90deg, var(--pr-red), #F87171); }

/* Bootstrap progress override */
.progress { height: 6px !important; background: var(--pr-surface-2) !important; border-radius: var(--r-full) !important; }
.progress-bar { background: linear-gradient(90deg, var(--pr-blue), var(--pr-blue-light)) !important; border-radius: var(--r-full) !important; }
.progress-bar.bg-danger  { background: linear-gradient(90deg, var(--pr-red), #F87171) !important; }
.progress-bar.bg-warning { background: linear-gradient(90deg, var(--pr-gold), var(--pr-gold-light)) !important; }
.progress-bar.bg-success { background: linear-gradient(90deg, var(--pr-green), #34D399) !important; }

@keyframes shimmer { to { left: 200%; } }

/* ── 15. Tables ───────────────────────────────────────────────────────────── */
.table { color: var(--pr-text) !important; border-color: var(--pr-border) !important; width: 100%; }
.table th {
  font-family: 'Sora', sans-serif;
  font-size: 0.72rem !important; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--pr-text-dim) !important;
  border-bottom: 1px solid var(--pr-border) !important;
  padding: var(--sp-3) var(--sp-4) !important;
  background: rgba(255,255,255,0.02) !important;
  white-space: nowrap;
}
.table td {
  border-bottom: 1px solid var(--pr-border) !important;
  padding: var(--sp-4) !important;
  vertical-align: middle !important;
  color: var(--pr-text) !important;
  background: transparent !important;
}
.table-light { background: transparent !important; }
.table-hover tbody tr { transition: background var(--t-fast); }
.table-hover tbody tr:hover { background: rgba(255,255,255,0.025) !important; }
.table-responsive { overflow-x: auto; }

/* ── 16. Toast Notifications ──────────────────────────────────────────────── */
#pr-toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--sp-4));
  right: var(--sp-6);
  z-index: 9999;
  display: flex; flex-direction: column; gap: var(--sp-3);
  pointer-events: none; max-width: 360px;
}

.pr-toast {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: #0F1829;
  border: 1px solid var(--pr-border-hover);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  pointer-events: all;
  animation: toast-in var(--t-base) var(--ease-spring) forwards;
  min-width: 280px;
  backdrop-filter: blur(16px);
}
.pr-toast.leaving { animation: toast-out 220ms var(--ease-out) forwards; }

.pr-toast-icon {
  width: 30px; height: 30px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.9rem;
}
.pr-toast--success { border-left: 3px solid var(--pr-green); }
.pr-toast--success .pr-toast-icon { background: var(--pr-green-subtle); color: var(--pr-green); }
.pr-toast--error   { border-left: 3px solid var(--pr-red); }
.pr-toast--error   .pr-toast-icon { background: var(--pr-red-subtle); color: var(--pr-red); }
.pr-toast--info    { border-left: 3px solid var(--pr-blue); }
.pr-toast--info    .pr-toast-icon { background: var(--pr-blue-subtle); color: var(--pr-blue-light); }
.pr-toast--warning { border-left: 3px solid var(--pr-gold); }
.pr-toast--warning .pr-toast-icon { background: var(--pr-gold-subtle); color: var(--pr-gold); }

.pr-toast-body { flex: 1; min-width: 0; }
.pr-toast-title { font-weight: 700; font-size: 0.875rem; color: var(--pr-text); margin-bottom: 2px; }
.pr-toast-msg   { font-size: 0.8125rem; color: var(--pr-text-muted); line-height: 1.5; }

.pr-toast-close {
  background: none; border: none; color: var(--pr-text-dim);
  cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; transition: color var(--t-fast); flex-shrink: 0;
}
.pr-toast-close:hover { color: var(--pr-text); }

@keyframes toast-in {
  from { transform: translateX(calc(100% + var(--sp-6))); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(calc(100% + var(--sp-6))); opacity: 0; }
}

/* ── 17. Modal ────────────────────────────────────────────────────────────── */
.pr-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: var(--sp-6);
  opacity: 0; pointer-events: none; transition: opacity var(--t-base);
}
.pr-modal-backdrop.open { opacity: 1; pointer-events: all; }

.pr-modal {
  background: var(--pr-bg-card);
  border: 1px solid var(--pr-border-hover);
  border-radius: var(--r-2xl); box-shadow: var(--shadow-xl);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  transform: scale(0.92) translateY(20px);
  transition: transform var(--t-base) var(--ease-spring);
}
.pr-modal-backdrop.open .pr-modal { transform: scale(1) translateY(0); }

.pr-modal-header { padding: var(--sp-6); border-bottom: 1px solid var(--pr-border); display: flex; align-items: center; justify-content: space-between; }
.pr-modal-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.125rem; color: var(--pr-text); }
.pr-modal-close {
  background: none; border: none; color: var(--pr-text-dim); cursor: pointer; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: var(--r-md); transition: background var(--t-fast), color var(--t-fast);
}
.pr-modal-close:hover { background: var(--pr-surface-2); color: var(--pr-text); }
.pr-modal-body { padding: var(--sp-6); }
.pr-modal-footer { padding: var(--sp-5) var(--sp-6); border-top: 1px solid var(--pr-border); display: flex; justify-content: flex-end; gap: var(--sp-3); }

/* ── 18. Video Cards ──────────────────────────────────────────────────────── */
.pr-video-card, .job-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl) !important;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
  display: flex; flex-direction: column;
}
.pr-video-card:hover, .job-card:hover {
  transform: translateY(-4px);
  border-color: var(--pr-border-hover);
  box-shadow: var(--shadow-xl);
}

.pr-video-thumb, .job-thumb {
  position: relative; aspect-ratio: 16/9;
  background: var(--pr-surface); overflow: hidden;
  max-height: 180px;
}
.pr-video-thumb img, .job-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.pr-video-card:hover .pr-video-thumb img,
.job-card:hover .job-thumb img { transform: scale(1.06); }

.pr-video-thumb-placeholder, .job-thumb-placeholder {
  width: 100%; height: 100%; min-height: 140px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--pr-surface) 0%, var(--pr-bg-card) 100%);
  color: var(--pr-text-dim); font-size: 2.5rem;
}

.pr-video-play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.42); opacity: 0; transition: opacity var(--t-base);
}
.pr-video-card:hover .pr-video-play-overlay { opacity: 1; }

.pr-video-play-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: var(--pr-blue);
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  transform: scale(0.8); transition: transform var(--t-base) var(--ease-spring);
}
.pr-video-card:hover .pr-video-play-btn { transform: scale(1); }

.pr-video-status { position: absolute; top: var(--sp-3); left: var(--sp-3); }

.pr-video-body, .job-card .card-body { padding: var(--sp-4) !important; }
.pr-video-title {
  font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.9375rem;
  color: var(--pr-text); margin-bottom: var(--sp-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pr-video-meta { font-size: 0.8125rem; color: var(--pr-text-muted); display: flex; align-items: center; gap: 4px; }

.pr-video-footer, .job-card .card-footer {
  padding: var(--sp-3) var(--sp-4) !important;
  border-top: 1px solid var(--pr-border) !important;
  display: flex; gap: var(--sp-2);
  background: transparent !important;
}

/* ── 19. Loader & Skeletons ───────────────────────────────────────────────── */
.pr-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--pr-surface-2);
  border-top-color: var(--pr-blue);
  border-radius: 50%; animation: spin 0.75s linear infinite;
}
.pr-spinner--sm { width: 20px; height: 20px; border-width: 2px; }
.pr-spinner--lg { width: 56px; height: 56px; border-width: 4px; }

/* Bootstrap spinner compat */
.spinner-border { border-color: var(--pr-surface-2); border-top-color: var(--pr-blue); }
.spinner-border.text-primary { border-top-color: var(--pr-blue) !important; }

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--pr-surface) 0%, var(--pr-surface-2) 50%, var(--pr-surface) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-md);
}
.skeleton-text    { height: 14px; }
.skeleton-text--lg{ height: 24px; }
.skeleton-avatar  { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-thumb   { aspect-ratio: 16/9; }

@keyframes skeleton-shimmer {
  from { background-position: 200% center; }
  to   { background-position: -200% center; }
}

/* ── 20. Alerts (Flash messages) ──────────────────────────────────────────── */
.alert { border-radius: var(--r-lg) !important; border: 1px solid transparent !important; padding: var(--sp-4) var(--sp-5) !important; font-size: 0.9rem !important; }
.alert-success { background: var(--pr-green-subtle) !important; border-color: rgba(16,185,129,0.25) !important; color: #6EE7B7 !important; }
.alert-danger  { background: var(--pr-red-subtle) !important; border-color: rgba(239,68,68,0.25) !important; color: #FCA5A5 !important; }
.alert-info    { background: var(--pr-blue-subtle) !important; border-color: rgba(59,130,246,0.25) !important; color: var(--pr-blue-light) !important; }
.alert-warning { background: var(--pr-yellow-subtle) !important; border-color: rgba(234,179,8,0.25) !important; color: var(--pr-yellow) !important; }
.alert .btn-close { filter: none; opacity: 0.7; }
.alert .btn-close:hover { opacity: 1; }

/* ── 21. Dropdowns ────────────────────────────────────────────────────────── */
.dropdown-menu, .dropdown-menu-dark {
  background: #0D1526 !important;
  border: 1px solid var(--pr-border-hover) !important;
  border-radius: var(--r-xl) !important;
  box-shadow: var(--shadow-xl) !important;
  padding: var(--sp-2) !important;
}
.dropdown-item {
  color: var(--pr-text-muted) !important;
  border-radius: var(--r-md) !important;
  padding: var(--sp-2) var(--sp-4) !important;
  font-size: 0.9rem !important;
  transition: background var(--t-fast), color var(--t-fast) !important;
}
.dropdown-item:hover { background: var(--pr-surface-2) !important; color: var(--pr-text) !important; }
.dropdown-item.text-danger { color: var(--pr-red) !important; }
.dropdown-item.text-danger:hover { background: var(--pr-red-subtle) !important; color: var(--pr-red) !important; }
.dropdown-divider { border-color: var(--pr-border) !important; }

/* ── 22. Breadcrumb ───────────────────────────────────────────────────────── */
.breadcrumb { margin-bottom: var(--sp-2); background: transparent; padding: 0; }
.breadcrumb-item { font-size: 0.85rem; color: var(--pr-text-dim); }
.breadcrumb-item a { color: var(--pr-blue-light); }
.breadcrumb-item.active { color: var(--pr-text-muted); }
.breadcrumb-item + .breadcrumb-item::before { content: '/'; color: var(--pr-text-dim); }

/* ── 23. List Group ───────────────────────────────────────────────────────── */
.list-group-item {
  background: transparent !important;
  border-color: var(--pr-border) !important;
  color: var(--pr-text) !important;
  padding: var(--sp-4) var(--sp-5) !important;
  transition: background var(--t-fast);
}
.list-group-item:hover { background: rgba(255,255,255,0.025) !important; }
.list-group-flush .list-group-item { border-left: none; border-right: none; }

/* ── 24. Radio button preset selectors ───────────────────────────────────── */
.btn-check:checked + .btn-outline-secondary,
.btn-check:checked + .btn-outline-primary {
  background: var(--pr-blue-subtle) !important;
  border-color: var(--pr-blue) !important;
  color: var(--pr-blue-light) !important;
  box-shadow: 0 0 0 3px var(--pr-blue-subtle);
}
.btn-check + .btn-outline-secondary,
.btn-check + .btn-outline-primary {
  background: var(--glass-bg) !important;
  border-color: var(--pr-border-hover) !important;
  color: var(--pr-text-muted);
  padding: var(--sp-4) !important;
  border-radius: var(--r-lg) !important;
  transition: all var(--t-base);
  text-align: left;
}
.btn-check + .btn-outline-secondary:hover,
.btn-check + .btn-outline-primary:hover {
  background: rgba(255,255,255,0.04) !important;
  border-color: var(--pr-border-hover) !important;
  color: var(--pr-text);
}

/* ── 25. Video player ─────────────────────────────────────────────────────── */
video { border-radius: var(--r-xl); display: block; }

/* ── 26. Auth Layout ──────────────────────────────────────────────────────── */
.pr-auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; background: var(--pr-bg);
}
.pr-auth-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(37,99,235,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(245,158,11,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 0%, rgba(124,58,237,0.10) 0%, transparent 60%);
}
.pr-auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--pr-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--pr-border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 30%, black 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 30%, black 100%);
}
.pr-auth-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pr-auth-particle {
  position: absolute; border-radius: 50%; opacity: 0.18;
  animation: particle-float linear infinite;
}
.pr-auth-particle:nth-child(1)  { width:3px; height:3px; background:var(--pr-blue-light); left:12%; top:20%; animation-duration:18s; }
.pr-auth-particle:nth-child(2)  { width:4px; height:4px; background:var(--pr-gold); left:85%; top:75%; animation-duration:24s; animation-delay:2s; }
.pr-auth-particle:nth-child(3)  { width:2px; height:2px; background:var(--pr-blue-light); left:65%; top:10%; animation-duration:20s; animation-delay:1s; }
.pr-auth-particle:nth-child(4)  { width:5px; height:5px; background:#7C3AED; left:40%; top:85%; animation-duration:28s; animation-delay:3s; }
.pr-auth-particle:nth-child(5)  { width:3px; height:3px; background:var(--pr-green); left:25%; top:60%; animation-duration:22s; animation-delay:.5s; }
.pr-auth-particle:nth-child(6)  { width:2px; height:2px; background:var(--pr-gold); left:75%; top:35%; animation-duration:16s; animation-delay:4s; }
.pr-auth-particle:nth-child(7)  { width:4px; height:4px; background:var(--pr-blue); left:55%; top:50%; animation-duration:30s; animation-delay:1.5s; }
.pr-auth-particle:nth-child(8)  { width:3px; height:3px; background:#7C3AED; left:90%; top:20%; animation-duration:19s; animation-delay:2.5s; }
.pr-auth-particle:nth-child(9)  { width:2px; height:2px; background:var(--pr-green); left:8%;  top:80%; animation-duration:25s; animation-delay:.8s; }
.pr-auth-particle:nth-child(10) { width:4px; height:4px; background:var(--pr-blue-light); left:48%; top:5%; animation-duration:21s; animation-delay:3.5s; }
@keyframes particle-float {
  0%   { transform: translateY(0)   translateX(0)   rotate(0deg); }
  25%  { transform: translateY(-28px) translateX(14px)  rotate(90deg); }
  50%  { transform: translateY(-56px) translateX(-9px)  rotate(180deg); }
  75%  { transform: translateY(-28px) translateX(-18px) rotate(270deg); }
  100% { transform: translateY(0)   translateX(0)   rotate(360deg); }
}

.pr-auth-card { position: relative; z-index: 1; width: 100%; max-width: 440px; padding: var(--sp-4); }
.pr-auth-box {
  background: rgba(13, 21, 38, 0.88);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-2xl);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  padding: var(--sp-12) var(--sp-8);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.04);
}
.pr-auth-logo { text-align: center; margin-bottom: var(--sp-8); }
.pr-auth-logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--pr-blue), #7C3AED);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: white; margin: 0 auto var(--sp-4);
  box-shadow: 0 0 24px var(--pr-blue-glow);
}
.pr-auth-logo-text { font-family: 'Sora', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--pr-text); letter-spacing: -0.03em; }
.pr-auth-logo-text span { color: var(--pr-blue-light); }

/* ── 27. Footer ───────────────────────────────────────────────────────────── */
.pr-footer {
  margin-left: var(--sidebar-width);
  padding: var(--sp-5) var(--sp-8);
  border-top: 1px solid var(--pr-border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem; color: var(--pr-text-dim);
  transition: margin-left var(--t-slow);
}

/* ── 28. Utility overrides ────────────────────────────────────────────────── */
.text-muted   { color: var(--pr-text-muted) !important; }
.text-white   { color: var(--pr-text) !important; }
.text-primary { color: var(--pr-blue-light) !important; }
.text-success { color: var(--pr-green) !important; }
.text-danger  { color: var(--pr-red) !important; }
.text-warning { color: var(--pr-gold) !important; }

.fw-bold    { font-weight: 700 !important; }
.fw-semibold{ font-weight: 600 !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow    { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

hr { border-color: var(--pr-border) !important; opacity: 1 !important; }

dl { margin: 0; }
dt { color: var(--pr-text-dim); }
dd { color: var(--pr-text-muted); }

/* ── 29. Sidebar overlay (mobile backdrop) ────────────────────────────────── */
.pr-sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  z-index: 99; opacity: 0; pointer-events: none;
  transition: opacity var(--t-base);
}
.pr-sidebar-overlay.visible { opacity: 1; pointer-events: all; }

/* ── 30. Page entry animation ─────────────────────────────────────────────── */
.pr-main > * { animation: fade-up 0.32s var(--ease-out) both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 31. Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .pr-main { padding: var(--sp-6); }
  .pr-footer { padding: var(--sp-5) var(--sp-6); }
}

@media (max-width: 992px) {
  :root { --sidebar-width: 240px; }
}

@media (max-width: 768px) {
  .pr-sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); box-shadow: none; }
  .pr-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }

  .pr-header { left: 0; }
  .pr-header-hamburger { display: flex; }

  .pr-main { margin-left: 0; padding: var(--sp-5) var(--sp-4); }
  .pr-footer { margin-left: 0; flex-direction: column; gap: var(--sp-2); text-align: center; }

  #pr-toast-container { right: var(--sp-4); left: var(--sp-4); max-width: none; }

  .pr-auth-box { padding: var(--sp-8) var(--sp-6); }
  .pr-auth-card { max-width: 100%; }

  .upload-zone { padding: var(--sp-8) var(--sp-6); }
}

@media (max-width: 480px) {
  .pr-main { padding: var(--sp-4) var(--sp-3); }
  .pr-stat-value { font-size: 1.625rem; }
}

/* ── 32. Bootstrap grid spacing fix ───────────────────────────────────────── */
.row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }

/* ── 33. Misc component polish ────────────────────────────────────────────── */
.img-thumbnail {
  background: var(--pr-surface) !important;
  border-color: var(--pr-border) !important;
  border-radius: var(--r-md) !important;
}

.table-responsive { border-radius: var(--r-xl); overflow: hidden; }

/* Textarea dark */
textarea.form-control { resize: vertical; min-height: 100px; }

/* Badge in nav sidebar */
.pr-nav-badge {
  margin-left: auto; font-size: 0.65rem; font-weight: 700;
  padding: 1px 7px; border-radius: var(--r-full);
  background: var(--pr-blue-subtle); color: var(--pr-blue-light);
}

/* ── 34. Wide auth card (register page) ───────────────────────────────────── */
.pr-auth-card--wide { max-width: 900px; }
.pr-auth-card--wide .pr-auth-box { padding: var(--sp-8); }
.pr-auth-card--wide .pr-auth-logo { margin-bottom: var(--sp-6); }

/* ── 35. Plan selection cards ─────────────────────────────────────────────── */
.plan-card {
  display: block;
  padding: var(--sp-5);
  border: 1px solid var(--pr-border-hover);
  border-radius: var(--r-xl);
  cursor: pointer;
  transition: all var(--t-base);
  background: var(--glass-bg);
  height: 100%;
  position: relative;
  user-select: none;
}
.plan-card:hover {
  border-color: var(--pr-border-hover);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-check:checked + .plan-card {
  border-color: var(--pr-blue);
  background: var(--pr-blue-subtle);
  box-shadow: 0 0 0 2px var(--pr-blue-glow), var(--shadow-md);
}
.btn-check:checked + .plan-card--gold {
  border-color: var(--pr-gold);
  background: var(--pr-gold-subtle);
  box-shadow: 0 0 0 2px var(--pr-gold-glow), var(--shadow-md);
}
.btn-check:checked + .plan-card--purple {
  border-color: #7C3AED;
  background: rgba(124,58,237,0.10);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.25), var(--shadow-md);
}
.plan-card-popular {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 12px; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--pr-gold), #F97316);
  color: #0A0F1E; white-space: nowrap;
}
.plan-card-name {
  font-family: 'Sora', sans-serif; font-size: 1.125rem; font-weight: 700;
  color: var(--pr-text); margin-bottom: 2px;
}
.plan-card-price {
  font-family: 'Sora', sans-serif; font-size: 1.75rem; font-weight: 800;
  color: var(--pr-text); line-height: 1;
}
.plan-card-price span { font-size: 1rem; font-weight: 500; color: var(--pr-text-muted); }
.plan-card-desc { font-size: 0.8rem; color: var(--pr-text-dim); margin-top: var(--sp-1); }
.plan-card-divider { height: 1px; background: var(--pr-border); margin: var(--sp-4) 0; }
.plan-card-features { list-style: none; padding: 0; margin: 0; }
.plan-card-features li {
  font-size: 0.82rem; color: var(--pr-text-muted);
  padding: 3px 0; display: flex; align-items: center; gap: 7px;
}
.plan-card-features li::before {
  content: ''; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  background: var(--pr-green-subtle);
  border: 1.5px solid var(--pr-green);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 5l2.5 2.5L8 3' stroke='%2310B981' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* ── 36. Auth how-it-works steps ──────────────────────────────────────────── */
.pr-auth-steps { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); }
.pr-auth-step { flex: 1; text-align: center; }
.pr-auth-step-icon {
  width: 44px; height: 44px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; margin: 0 auto var(--sp-2);
  border: 1px solid var(--pr-border-hover);
  background: var(--glass-bg);
}
.pr-auth-step-label { font-size: 0.75rem; font-weight: 600; color: var(--pr-text-muted); }
.pr-auth-step-desc  { font-size: 0.7rem; color: var(--pr-text-dim); margin-top: 2px; }
.pr-auth-step-arrow { color: var(--pr-text-dim); font-size: 1rem; flex-shrink: 0; }

/* ── 37. Form row helpers for auth pages ──────────────────────────────────── */
.pr-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 600px) {
  .pr-form-row { grid-template-columns: 1fr; }
  .pr-auth-card--wide .pr-auth-box { padding: var(--sp-6) var(--sp-4); }
  .plan-card-price { font-size: 1.375rem; }
}

/* ── 38. Mobile polish ────────────────────────────────────────────────────── */

/* 44-px minimum tap targets */
.pr-nav-item { min-height: 44px; }
.btn { min-height: 36px; }
.dropdown-item { min-height: 40px !important; }

/* Tables: always scrollable */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--pr-border) transparent;
}

/* Sidebar: use dynamic viewport height on mobile */
@media (max-width: 768px) {
  .pr-sidebar { height: 100dvh; height: 100vh; }
  .pr-step-title  { font-size: 1.25rem; }
  .pr-step-label  { font-size: 0.65rem; }
  .pr-step-indicator {
    gap: var(--sp-1);
    overflow-x: auto;
    padding-bottom: var(--sp-1);
    scrollbar-width: none;
  }
  .pr-step-indicator::-webkit-scrollbar { display: none; }

  /* Settings: stack nav + content */
  .settings-layout { flex-direction: column !important; }
  .settings-nav { width: 100% !important; position: static !important; top: auto !important; }
  .settings-nav .list-group {
    flex-direction: row; flex-wrap: wrap; gap: var(--sp-1);
    border: none; padding: 0;
  }
  .settings-nav .list-group-item {
    border-radius: var(--r-md) !important;
    border: 1px solid var(--pr-border) !important;
    padding: var(--sp-2) var(--sp-3) !important;
    font-size: 0.78rem; white-space: nowrap;
  }
}

/* Single-column video/job cards ≤ 576px */
@media (max-width: 576px) {
  .col-sm-6, .col-md-4, .col-md-6, .col-lg-3, .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .upload-preview { grid-template-columns: repeat(2, 1fr) !important; }
  .pr-video-grid  { grid-template-columns: 1fr !important; }
  .job-card       { margin-bottom: var(--sp-3); }
  .pr-stat-grid   { grid-template-columns: repeat(2, 1fr); }
}

/* ≤ 390px: tighten spacing and typography */
@media (max-width: 390px) {
  .pr-main        { padding: var(--sp-3) var(--sp-2); }
  .pr-page-title  { font-size: 1.25rem; }
  .pr-stat-value  { font-size: 1.375rem; }
  .pr-header      { padding: 0 var(--sp-3); gap: var(--sp-2); }
  .pr-card        { border-radius: var(--r-lg); }
  .upload-zone    { padding: var(--sp-6) var(--sp-4); }
  .pr-auth-box    { padding: var(--sp-6) var(--sp-4); }
  .btn:not(.btn-sm):not(.btn-xs) { padding: var(--sp-2) var(--sp-3) !important; font-size: 0.85rem !important; }
  .pr-stat-grid   { grid-template-columns: 1fr; }
}

/* Dragging state for preview reorder */
.upload-preview-item.dragging {
  opacity: 0.45;
  cursor: grabbing;
  transform: scale(0.97);
}
.upload-preview-item[draggable="true"] { cursor: grab; }
