/* ══════════════════════════════════════════
   VEM ENGAJAR — Global Design System
   Modern, Light Theme with Green Palette
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@600;700;800;900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Primary Colors */
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-darker: #047857;
  --primary-light: #34D399;
  --primary-lighter: #6EE7B7;
  --primary-bg: #D1FAE5;
  --primary-bg-light: #ECFDF5;
  
  /* Accent */
  --accent: #0EA5E9;
  --accent-light: #7DD3FC;
  
  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Status */
  --success: #22C55E;
  --success-bg: #F0FDF4;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --error: #EF4444;
  --error-bg: #FEF2F2;
  --info: #3B82F6;
  --info-bg: #EFF6FF;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-green: 0 4px 14px rgba(16, 185, 129, 0.25);
  --shadow-green-lg: 0 8px 25px rgba(16, 185, 129, 0.3);
  
  /* Borders */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  
  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  --max-width: 1280px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Prevent pinch-to-zoom on touch devices */
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  /* Prevent double-tap zoom */
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

/* ── Prevent iOS Auto-Zoom on Input Focus ── */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="date"],
  input[type="file"],
  textarea,
  select,
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px !important;
  }
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

/* ── Logo (Premium) ── */
.brand-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  text-decoration: none;
}

.brand-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #0D9488 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  -webkit-text-fill-color: white;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
  transition: transform 0.25s, box-shadow 0.25s;
}

.brand-logo:hover .logo-icon {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(16,185,129,0.45);
}

.brand-logo .brand-text {
  display: flex;
  align-items: baseline;
  gap: 0;
  line-height: 1;
}

.brand-logo .brand-vem {
  font-weight: 400;
  color: var(--gray-500);
  -webkit-text-fill-color: var(--gray-500);
  font-size: 0.95em;
  letter-spacing: 0.02em;
}

.brand-logo .brand-engajar {
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0D9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  font-size: 1em;
}

.brand-logo-sm {
  font-size: 1.1rem;
}

.brand-logo-sm .logo-icon {
  width: 26px;
  height: 26px;
  font-size: 14px;
  border-radius: 7px;
}

.brand-logo-lg {
  font-size: 2.5rem;
}

.brand-logo-xl {
  font-size: 3rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  outline: none;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-green);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
  box-shadow: var(--shadow-green-lg);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg-light);
}

.btn-danger {
  background: linear-gradient(135deg, var(--error), #DC2626);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #16A34A);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
  letter-spacing: 0.01em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: var(--space-1);
}

.form-error {
  font-size: 12px;
  color: var(--error);
  margin-top: var(--space-1);
}

.input-group {
  position: relative;
}

.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 16px;
}

.input-group .form-input {
  padding-left: 40px;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}

.card-elevated:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--gray-100);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

.card-body {
  padding: 0;
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: var(--space-4);
}

.stat-card .stat-icon.green { background: var(--primary-bg); color: var(--primary-dark); }
.stat-card .stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-card .stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.stat-card .stat-icon.red { background: var(--error-bg); color: var(--error); }

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: var(--space-1);
  font-family: var(--font-display);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-success { background: var(--success-bg); color: #15803D; }
.badge-warning { background: var(--warning-bg); color: #B45309; }
.badge-error { background: var(--error-bg); color: #B91C1C; }
.badge-info { background: var(--info-bg); color: #1D4ED8; }
.badge-primary { background: var(--primary-bg); color: var(--primary-dark); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

.badge-featured {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* ── Tables ── */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: var(--gray-50);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-200);
}

td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

tr:hover td {
  background: var(--gray-50);
}

tr:last-child td {
  border-bottom: none;
}

/* ── Progress Bar ── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
  position: relative;
}

.progress-bar .progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

/* ── Toast / Notification ── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  max-width: 420px;
  animation: slideInRight var(--transition-spring) forwards;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast-success::before { background: var(--success); }
.toast-error::before { background: var(--error); }
.toast-warning::before { background: var(--warning); }
.toast-info::before { background: var(--info); }

.toast .toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast .toast-message {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  flex: 1;
}

.toast .toast-close {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 18px;
  padding: 2px;
  line-height: 1;
}

.toast-exit {
  animation: slideOutRight 300ms forwards;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: fadeIn 200ms;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  animation: scaleIn var(--transition-spring) forwards;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-100);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 18px;
  color: var(--gray-500);
}

.modal-close:hover {
  background: var(--error-bg);
  color: var(--error);
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--gray-100);
}

/* ── Alert / Notice ── */
.alert {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: var(--space-5);
  border: 1px solid;
}

.alert-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-success { background: var(--success-bg); border-color: #BBF7D0; color: #15803D; }
.alert-warning { background: var(--warning-bg); border-color: #FDE68A; color: #92400E; }
.alert-error { background: var(--error-bg); border-color: #FECACA; color: #991B1B; }
.alert-info { background: var(--info-bg); border-color: #BFDBFE; color: #1E40AF; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.empty-state .empty-icon {
  font-size: 56px;
  margin-bottom: var(--space-5);
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.empty-state p {
  color: var(--gray-500);
  font-size: 14px;
  max-width: 360px;
  margin: 0 auto var(--space-6);
}

/* ── Loading ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: var(--space-6) 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--gray-400);
  font-size: 13px;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
}

.tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.tab:hover {
  color: var(--gray-700);
}

.tab.active {
  background: var(--white);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

/* ── Dropdown ── */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 100;
  padding: 6px;
  display: none;
  animation: fadeInDown 200ms;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--primary-dark);
}

.dropdown-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0;
}

/* ── Layout ── */
.page-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-base);
}

.sidebar-header {
  padding: var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--gray-100);
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-4) var(--space-4);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: var(--space-2) var(--space-3) var(--space-1);
  margin-bottom: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1.5px solid var(--gray-150, #E8ECF0);
  background: var(--white);
  width: 100%;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg, 12px) 0 0 var(--radius-lg, 12px);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.04), rgba(22, 163, 74, 0.08));
  border-color: rgba(22, 163, 74, 0.25);
  color: var(--primary-dark);
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.1);
}

.nav-item:hover::before {
  width: 4px;
}

.nav-item:active {
  transform: translateX(3px) scale(0.98);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(22, 163, 74, 0.14));
  border-color: rgba(22, 163, 74, 0.35);
  color: var(--primary-dark);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.12), inset 0 1px 0 rgba(255,255,255,0.6);
}

.nav-item.active::before {
  width: 4px;
}

.nav-item .nav-icon {
  font-size: 18px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  border-radius: var(--radius-md, 8px);
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover .nav-icon {
  background: rgba(22, 163, 74, 0.1);
  transform: scale(1.08);
}

.nav-item.active .nav-icon {
  background: rgba(22, 163, 74, 0.15);
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
}

.nav-item .nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--error);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--gray-100);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-user:hover {
  background: var(--gray-50);
}

.sidebar-user .user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.sidebar-user .user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user .user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user .user-role {
  font-size: 12px;
  color: var(--gray-500);
}

.sidebar-logout-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.sidebar-logout-btn:hover {
  background: var(--error-bg, #FEE2E2);
  border-color: var(--error, #EF4444);
  transform: scale(1.05);
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
}

/* Top Header */
.top-header {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-header .page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.notification-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--gray-500);
  transition: all var(--transition-fast);
}

.notification-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.notification-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  border: 2px solid var(--white);
}

.page-content {
  flex: 1;
  padding: var(--space-6) var(--space-8);
  overflow-x: hidden;
  min-width: 0;
}

/* ── Footer ── */
.footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: var(--space-5) var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--gray-500);
  text-align: center;
}

.footer .brand-logo {
  font-size: 1rem;
}

/* ── Grid ── */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Utilities ── */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-muted { color: var(--gray-500); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mr-2 { margin-right: var(--space-2); }

.hidden { display: none !important; }

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Toggle/Switch ── */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ── Animations ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100px); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Mobile Sidebar Toggle ── */
.sidebar-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #16A34A, #15803D);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(22,163,74,0.35), 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.sidebar-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  border-radius: 50px;
}

.sidebar-toggle:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 16px rgba(22,163,74,0.45), 0 2px 6px rgba(0,0,0,0.12);
  background: linear-gradient(135deg, #22C55E, #16A34A);
}

.sidebar-toggle:active {
  transform: scale(0.97);
  box-shadow: 0 1px 6px rgba(22,163,74,0.3);
}

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

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .sidebar-overlay.show {
    display: block;
  }

  .sidebar-toggle {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    max-width: 100vw;
  }

  .page-content {
    padding: var(--space-4);
    overflow-x: hidden;
  }

  .top-header {
    padding: 0 var(--space-4);
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
    padding: var(--space-4);
  }

  .modal {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-body {
    padding: var(--space-4);
  }

  .modal-header {
    padding: var(--space-4);
  }

  .modal-footer {
    padding: var(--space-3) var(--space-4);
  }

  /* ── Prevent horizontal overflow globally ── */
  .page-layout {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Flex utility: wrap on mobile */
  .flex {
    flex-wrap: wrap;
  }

  /* Buttons: full width on mobile */
  .btn-lg {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Stat card values: scale down */
  .stat-card .stat-value {
    font-size: clamp(18px, 5vw, 28px);
  }

  /* Tables: proper scrollable container */
  .table-container {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-container table {
    min-width: 580px;
  }

  .table-container th,
  .table-container td {
    white-space: nowrap;
    font-size: 13px;
  }

  /* Cards: allow table scroll inside */
  .card {
    overflow: visible;
  }

  /* Toast: fit mobile screens */
  .toast-container {
    left: 12px;
    right: 12px;
    top: 12px;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }

  /* Badges: allow wrapping */
  .badge {
    white-space: nowrap;
  }

  /* Welcome banner balance */
  .welcome-balance .balance-value {
    font-size: clamp(18px, 5vw, 24px);
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ── Selection ── */
::selection {
  background: var(--primary-bg);
  color: var(--primary-darker);
}

/* ══════════════════════════════════════════
   Verified Badge System
   ══════════════════════════════════════════ */

/* Verified checkmark inline — Instagram-style blue badge */
.verified-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-left: 4px;
  position: relative;
  flex-shrink: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.verified-check::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #1D9BF0;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81C14.67 2.88 13.43 2 12 2s-2.67.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.27 2.52-.81 3.91C2.88 9.33 2 10.57 2 12s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.27 3.91.81C9.33 21.12 10.57 22 12 22s2.67-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91C21.12 14.67 22 13.43 22.25 12z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81C14.67 2.88 13.43 2 12 2s-2.67.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.27 2.52-.81 3.91C2.88 9.33 2 10.57 2 12s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.27 3.91.81C9.33 21.12 10.57 22 12 22s2.67-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91C21.12 14.67 22 13.43 22.25 12z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.verified-check::after {
  content: '';
  position: relative;
  z-index: 1;
  width: 9px;
  height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translateY(-1px);
}

.verified-check-lg {
  width: 28px;
  height: 28px;
}

.verified-check-lg::after {
  width: 13px;
  height: 7px;
  border-left-width: 2.5px;
  border-bottom-width: 2.5px;
}

/* Verified badge pill */
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  color: #065F46;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.badge-verified::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: badgeShimmer 3s ease-in-out infinite;
}

@keyframes badgeShimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

/* Avatar with verified ring */
.avatar-verified-ring {
  box-shadow: 0 0 0 3px white, 0 0 0 5px #1D9BF0;
  animation: verifiedPulse 3s ease-in-out infinite;
}

@keyframes verifiedPulse {
  0%, 100% { box-shadow: 0 0 0 3px white, 0 0 0 5px #1D9BF0; }
  50% { box-shadow: 0 0 0 3px white, 0 0 0 5px #1D9BF0, 0 0 12px rgba(29, 155, 240, 0.3); }
}

/* Verified card glow */
.verified-card-glow {
  border: 1.5px solid #10B981 !important;
  position: relative;
  overflow: hidden;
}

.verified-card-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), transparent, rgba(16,185,129,0.05));
  pointer-events: none;
  z-index: 0;
}

/* Verified badge in participant cards */
.participant-verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  color: #047857;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Sidebar verified indicator */
.sidebar-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #1D9BF0;
  margin-top: 1px;
}

/* Verified profile header */
.verified-profile-header {
  background: linear-gradient(135deg, #059669, #047857);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.verified-profile-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
  animation: rotateGlow 8s linear infinite;
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Verification progress card animations */
.verify-progress-card {
  transition: all 0.3s ease;
}

.verify-progress-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}
