/* ============================================================
   WG PANEL — GLOBAL STYLES (LIGHT THEME)
   ============================================================ */

:root {
  --grad-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --grad-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --grad-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
  --grad-warning: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
  --grad-info: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
  --grad-purple: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
  --grad-sunset: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);

  --bg-body: #f4f6fb;
  --bg-card: #ffffff;
  --bg-card-2: #f8f9fc;
  --bg-soft: #eef2ff;
  --text-primary: #1a1a2e;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  background: #f4f6fb !important;
  color: var(--text-primary);
}

body {
  background-image:
    radial-gradient(circle at 10% 10%, rgba(102, 126, 234, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(118, 75, 162, 0.08) 0%, transparent 45%);
  background-attachment: fixed;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  padding-bottom: 2rem;
}

/* ---------- NAVBAR ---------- */
.navbar-gradient {
  background: var(--grad-primary) !important;
  box-shadow: var(--shadow-md);
  padding: 0.6rem 1rem;
}

.navbar-gradient .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff !important;
}

.navbar-gradient .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: var(--transition);
  margin: 0 0.15rem;
}

.navbar-gradient .nav-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
  transform: translateY(-1px);
}

.navbar-gradient .nav-link.active {
  background: rgba(255, 255, 255, 0.28);
  color: #fff !important;
}

/* ---------- CARDS ---------- */
.card {
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  color: var(--text-primary) !important;
}

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

.card-header {
  background: #f8f9fc !important;
  border-bottom: 1px solid var(--border-color) !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  font-weight: 600;
  color: var(--text-primary) !important;
}

.card-body { color: var(--text-primary) !important; }

/* ---------- STAT CARDS ---------- */
.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-card:hover::before { transform: scale(1.2); }

.stat-card.stat-primary { background: var(--grad-primary); }
.stat-card.stat-success { background: var(--grad-success); }
.stat-card.stat-warning { background: var(--grad-warning); }
.stat-card.stat-danger  { background: var(--grad-danger); }
.stat-card.stat-info    { background: var(--grad-info); }
.stat-card.stat-purple  { background: var(--grad-purple); }
.stat-card.stat-sunset  { background: var(--grad-sunset); }

.stat-card .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card .stat-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  opacity: 0.35;
}

/* ---------- BUTTONS ---------- */
.btn { border-radius: 8px; font-weight: 600; transition: var(--transition); border: none; }

.btn-gradient-primary { background: var(--grad-primary); color: #fff; }
.btn-gradient-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4); color: #fff; }

.btn-gradient-success { background: var(--grad-success); color: #fff; }
.btn-gradient-success:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4); color: #fff; }

.btn-gradient-danger { background: var(--grad-danger); color: #fff; }
.btn-gradient-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(235, 51, 73, 0.4); color: #fff; }

.btn-gradient-warning { background: var(--grad-warning); color: #fff; }
.btn-gradient-warning:hover { color: #fff; transform: translateY(-2px); }

.btn-gradient-info { background: var(--grad-info); color: #fff; }
.btn-gradient-info:hover { color: #fff; transform: translateY(-2px); }

/* ---------- BADGES ---------- */
.badge { font-weight: 600; padding: 0.4em 0.75em; border-radius: 6px; font-size: 0.75rem; }

.badge-gradient-primary { background: var(--grad-primary); color: #fff; }
.badge-gradient-success { background: var(--grad-success); color: #fff; }
.badge-gradient-danger  { background: var(--grad-danger); color: #fff; }
.badge-gradient-warning { background: var(--grad-warning); color: #fff; }
.badge-gradient-info    { background: var(--grad-info); color: #fff; }

/* ---------- ALERTS ---------- */
.alert {
  border: none;
  border-left: 4px solid;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.4s ease;
}

.alert-success   { background: #d1fae5 !important; border-color: #10b981 !important; color: #065f46 !important; }
.alert-danger    { background: #fee2e2 !important; border-color: #ef4444 !important; color: #991b1b !important; }
.alert-info      { background: #dbeafe !important; border-color: #3b82f6 !important; color: #1e40af !important; }
.alert-warning   { background: #fef3c7 !important; border-color: #f59e0b !important; color: #92400e !important; }
.alert-secondary { background: #f3f4f6 !important; border-color: #9ca3af !important; color: #374151 !important; }

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

/* ---------- TABLE ---------- */
.table {
  color: var(--text-primary) !important;
  margin-bottom: 0;
  --bs-table-bg: #ffffff;
  --bs-table-color: #1a1a2e;
  --bs-table-border-color: #e5e7eb;
  --bs-table-hover-bg: #f0f3ff;
  --bs-table-hover-color: #1a1a2e;
}

.table > :not(caption) > * > * {
  background-color: #ffffff;
  color: #1a1a2e;
  border-color: #e5e7eb;
}

.table-hover > tbody > tr:hover > * {
  background-color: #f0f3ff !important;
  color: #1a1a2e !important;
}

.table thead th {
  background: #f8f9fc !important;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280 !important;
  border-bottom: 2px solid #e5e7eb !important;
  padding: 0.9rem 1rem;
}

.table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-color: #e5e7eb !important;
  color: #1a1a2e !important;
  background-color: #ffffff !important;
}

code {
  color: #d97706;
  background: #fef3c7;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ---------- FORM ---------- */
.form-control,
.form-select,
.form-control:focus,
.form-select:focus {
  background: #ffffff !important;
  color: #1a1a2e !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: #667eea !important;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15) !important;
}

.form-control::placeholder { color: #9ca3af !important; }
.form-label { font-weight: 600; font-size: 0.875rem; color: #1a1a2e !important; margin-bottom: 0.4rem; }
.form-text { font-size: 0.8rem; color: #6b7280 !important; }
.form-check-input { background-color: #ffffff; border-color: #d1d5db; }
.form-check-input:checked { background-color: #667eea; border-color: #667eea; }

/* ---------- PAGE HEADER ---------- */
.page-header {
  background: var(--grad-primary);
  color: #fff;
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
}

.page-header h1,
.page-header h3 {
  position: relative;
  z-index: 1;
  font-weight: 700;
  margin: 0;
  color: #fff !important;
}

.page-header p {
  position: relative;
  z-index: 1;
  margin: 0.5rem 0 0;
  opacity: 0.95;
  color: #fff !important;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease; }

/* ---------- TEXT HELPERS ---------- */
.text-muted { color: #6b7280 !important; }
.text-dark  { color: #1a1a2e !important; }
.text-white { color: #fff !important; }

a { color: #667eea; }
a:hover { color: #764ba2; }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f3f9; }
::-webkit-scrollbar-thumb { background: #667eea; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #764ba2; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .page-header { padding: 1.25rem; }
  .page-header h1, .page-header h3 { font-size: 1.25rem; }
  .stat-card .stat-value { font-size: 1.5rem; }
  .table thead th, .table tbody td { padding: 0.6rem 0.5rem; font-size: 0.85rem; }
}