/* ============================================================
   SPMB SD MUHAMMADIYAH PRAMBANAN - MAIN STYLESHEET
   Versi: 1.0 | Desain: Colorful, 3D, Animasi, Responsive
   ============================================================ */

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

/* ---- CSS VARIABLES ---- */
:root {
  --primary:     #6C63FF;
  --primary-dark:#5046e5;
  --secondary:   #FF6584;
  --accent:      #FFD93D;
  --success:     #06D6A0;
  --danger:      #EF4444;
  --warning:     #F59E0B;
  --info:        #3B82F6;
  --purple:      #8B5CF6;
  --pink:        #EC4899;
  --orange:      #F97316;
  --teal:        #14B8A6;

  --dark:        #0F0E17;
  --dark-2:      #1A1A2E;
  --dark-3:      #16213E;
  --dark-4:      #0F3460;
  --card-bg:     rgba(255,255,255,0.05);
  --card-border: rgba(255,255,255,0.1);

  --text-primary: #FFFFFF;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted:   rgba(255,255,255,0.4);

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  --shadow-sm:  0 4px 15px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(108,99,255,0.4);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --sidebar-width: 260px;
  --navbar-height: 70px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dark-2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ============================================================
   BACKGROUND ANIMATION
   ============================================================ */
.bg-animated {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #0F0E17 0%, #1A1A2E 30%, #16213E 60%, #0F3460 100%);
  overflow: hidden;
}

.bg-animated::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.15) 0%, transparent 70%);
  top: -200px; left: -200px;
  animation: floatBg 8s ease-in-out infinite;
}

.bg-animated::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,101,132,0.1) 0%, transparent 70%);
  bottom: -150px; right: -150px;
  animation: floatBg 10s ease-in-out infinite reverse;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  animation: floatOrb linear infinite;
}

@keyframes floatBg {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 40px) scale(1.1); }
}

@keyframes floatOrb {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-100vh) rotate(360deg); }
}

/* ============================================================
   PARTICLES CANVAS
   ============================================================ */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.glass:hover {
  border-color: rgba(108,99,255,0.3);
  box-shadow: var(--shadow-glow);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: rgba(15,14,23,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(15,14,23,0.95);
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
}

.navbar-brand .logo-circle {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(108,99,255,0.4);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  list-style: none;
}

.navbar-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.navbar-nav a:hover { color: var(--text-primary); background: var(--card-bg); }

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  margin-left: auto;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  background: rgba(15,14,23,0.9);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--card-border);
  overflow-y: auto;
  z-index: 999;
  transition: var(--transition);
  padding: 1.5rem 0;
}

.sidebar-section {
  padding: 0 1rem;
  margin-bottom: 1.5rem;
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.sidebar-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition);
}

.sidebar-item:hover, .sidebar-item.active {
  color: white;
}

.sidebar-item:hover::before, .sidebar-item.active::before {
  opacity: 1;
}

.sidebar-item > * { position: relative; z-index: 1; }

.sidebar-item .icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: var(--card-bg);
  transition: var(--transition);
  flex-shrink: 0;
}

.sidebar-item.active .icon,
.sidebar-item:hover .icon {
  background: rgba(255,255,255,0.2);
}

.sidebar-badge {
  margin-left: auto;
  background: var(--secondary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--navbar-height);
  padding: 2rem;
  min-height: calc(100vh - var(--navbar-height));
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }

/* ============================================================
   STATS CARDS (3D Tilt Effect)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform-style: preserve-3d;
}

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

.stat-card .stat-icon {
  width: 54px; height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--icon-bg, linear-gradient(135deg, var(--primary), var(--primary-dark)));
  box-shadow: 0 8px 20px rgba(108,99,255,0.3);
  margin-bottom: 1rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-card .stat-trend {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 700;
  margin-top: 8px;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition);
}

.btn:hover::after { background: rgba(255,255,255,0.1); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(108,99,255,0.4);
}
.btn-primary:hover { box-shadow: 0 8px 25px rgba(108,99,255,0.6); transform: translateY(-2px); }

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #e05570);
  color: white;
  box-shadow: 0 4px 15px rgba(255,101,132,0.4);
}
.btn-secondary:hover { box-shadow: 0 8px 25px rgba(255,101,132,0.6); transform: translateY(-2px); }

.btn-success {
  background: linear-gradient(135deg, var(--success), #04b889);
  color: white;
  box-shadow: 0 4px 15px rgba(6,214,160,0.4);
}
.btn-success:hover { transform: translateY(-2px); }

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: white;
  box-shadow: 0 4px 15px rgba(245,158,11,0.4);
}

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(108,99,255,0.1); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1.1rem 2.5rem; font-size: 1.1rem; border-radius: var(--radius-md); }

.btn-icon { padding: 0.5rem; width: 38px; height: 38px; justify-content: center; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-label .required { color: var(--secondary); margin-left: 3px; }

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  background: rgba(108,99,255,0.05);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236C63FF' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.2rem;
  padding-right: 2.5rem;
}

select.form-control option { background: var(--dark-2); color: white; }

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

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}

.form-control.error { border-color: var(--danger); }
.form-control.error + .form-error { display: block; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.table-header .title {
  font-size: 1.1rem;
  font-weight: 800;
}

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

thead th {
  padding: 0.9rem 1.25rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: var(--transition);
}

tbody tr:hover { background: rgba(108,99,255,0.05); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 0.9rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  vertical-align: middle;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-gray    { background: rgba(107,114,128,0.2); color: #9CA3AF; }
.badge-yellow  { background: rgba(245,158,11,0.2);  color: #FCD34D; }
.badge-blue    { background: rgba(59,130,246,0.2);  color: #60A5FA; }
.badge-green   { background: rgba(6,214,160,0.2);   color: #6EE7B7; }
.badge-red     { background: rgba(239,68,68,0.2);   color: #FCA5A5; }
.badge-purple  { background: rgba(139,92,246,0.2);  color: #C4B5FD; }
.badge-pink    { background: rgba(236,72,153,0.2);  color: #F9A8D4; }
.badge-orange  { background: rgba(249,115,22,0.2);  color: #FDBA74; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(108,99,255,0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.card-body { padding: 1.5rem; }

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--card-border);
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash-message {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.4s ease;
}

.flash-success { background: rgba(6,214,160,0.15);  border: 1px solid rgba(6,214,160,0.3);  color: #6EE7B7; }
.flash-error   { background: rgba(239,68,68,0.15);  border: 1px solid rgba(239,68,68,0.3);  color: #FCA5A5; }
.flash-warning { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); color: #FCD34D; }
.flash-info    { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: #60A5FA; }

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

/* ============================================================
   SEARCH & FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.8rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.search-box input:focus { border-color: var(--primary); }
.search-box .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 1.25rem;
  border-top: 1px solid var(--card-border);
}

.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(108,99,255,0.4);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--dark-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.1rem;
  position: sticky;
  top: 0;
  background: var(--dark-2);
  z-index: 1;
}

.modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.modal-close:hover { background: var(--danger); border-color: var(--danger); color: white; }
.modal-body { padding: 1.5rem; }

/* ============================================================
   DRAG & DROP (Form Builder)
   ============================================================ */
.draggable-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: grab;
  transition: var(--transition);
  margin-bottom: 0.75rem;
  user-select: none;
}

.draggable-item:active { cursor: grabbing; }
.draggable-item.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  box-shadow: var(--shadow-lg);
}

.drag-handle {
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: grab;
  flex-shrink: 0;
}

.drag-handle:active { cursor: grabbing; }

.draggable-item:hover {
  border-color: rgba(108,99,255,0.3);
  background: rgba(108,99,255,0.05);
}

/* ============================================================
   LOADING / SPINNER
   ============================================================ */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(108,99,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,14,23,0.8);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   TOOLTIP
   ============================================================ */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-2);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: var(--transition);
  z-index: 100;
}

[data-tooltip]:hover::after { opacity: 1; }

/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.section-divider span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .navbar-toggle { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-content { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .table-header { flex-direction: column; align-items: flex-start; }
  .filter-bar { flex-direction: column; }
  .search-box { min-width: 100%; }
  .navbar { padding: 0 1rem; }
  .page-title { font-size: 1.4rem; }
  .modal { border-radius: var(--radius-lg); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .btn-xl { padding: 0.9rem 1.8rem; font-size: 1rem; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

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

.animate-fade-in  { animation: fadeIn 0.6s ease forwards; }
.animate-slide-up { animation: slideUp 0.6s ease forwards; }
.animate-float    { animation: float 3s ease-in-out infinite; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================================
   NUMBER COUNTER
   ============================================================ */
.counter-value {
  display: inline-block;
  transition: all 0.5s ease;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}

/* ============================================================
   CHAT / CONVERSATION
   ============================================================ */
.chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  max-width: 80%;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble.incoming {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-bubble.outgoing {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  color: white;
}

/* ============================================================
   GRADIENT TEXTS
   ============================================================ */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #FFD93D, #FF9500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-green {
  background: linear-gradient(135deg, var(--success), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   NEON GLOW EFFECTS
   ============================================================ */
.glow-purple { box-shadow: 0 0 20px rgba(108,99,255,0.5); }
.glow-pink   { box-shadow: 0 0 20px rgba(255,101,132,0.5); }
.glow-green  { box-shadow: 0 0 20px rgba(6,214,160,0.5); }
.glow-gold   { box-shadow: 0 0 20px rgba(255,217,61,0.5); }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--dark);
  box-shadow: 0 0 10px rgba(108,99,255,0.5);
}

.timeline-item.completed::before { background: var(--success); box-shadow: 0 0 10px rgba(6,214,160,0.5); }
.timeline-item.pending::before   { background: var(--text-muted); box-shadow: none; }

.timeline-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-content {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .sidebar, .navbar, .btn, .filter-bar, .pagination { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  body { background: white; color: black; }
  .card, .table-wrap { border: 1px solid #ccc; border-radius: 0; }
  .badge { border: 1px solid currentColor; }
}
