:root {
  --brand-primary: #4f46e5;
  --brand-secondary: #7c3aed;
  --brand-dark: #1e1b4b;
  --brand-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --brand-gradient-light: linear-gradient(135deg, #eef2ff 0%, #faf5ff 50%, #f0f9ff 100%);
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.08), 0 1px 2px -1px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-brand: 0 4px 20px rgba(79, 70, 229, 0.25);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
}

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

@media (min-width: 768px) {
  html { font-size: 16px; }
}

html { position: relative; min-height: 100%; }

body {
  margin-bottom: 0;
  background: #f4f5fb;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1f2937;
}

/* ===================== NAVBAR ===================== */
.navbar {
  background: var(--brand-gradient) !important;
  padding: 0.65rem 0;
  box-shadow: var(--shadow-brand);
}

.navbar-brand {
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.navbar-logo-wrap {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  backdrop-filter: blur(4px);
}

.navbar-logo-wrap img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.navbar .nav-link {
  font-weight: 500;
  padding: 0.45rem 0.8rem !important;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
  font-size: 0.9rem;
}

.navbar .nav-link:hover {
  background-color: rgba(255,255,255,0.15);
}

.navbar .nav-link.active {
  background-color: rgba(255,255,255,0.2);
}

.navbar .btn-register {
  background: rgba(255,255,255,0.95);
  color: var(--brand-primary);
  border: none;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.navbar .btn-register:hover {
  background: #fff;
  color: var(--brand-secondary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===================== MAIN CONTENT ===================== */
.main-wrapper {
  min-height: calc(100vh - 60px - 80px);
  padding: 2rem 0 3rem;
}

/* ===================== CARDS ===================== */
.card {
  border-radius: var(--radius-lg) !important;
  border: 1px solid rgba(0,0,0,0.05) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
}

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

.card.no-hover:hover {
  transform: none;
  box-shadow: var(--shadow-sm) !important;
}

/* ===================== BUTTONS ===================== */
.btn-primary {
  background: var(--brand-gradient);
  border: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  border-radius: var(--radius-md);
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-gradient);
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  border: none;
}

.btn-outline-primary {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.btn-outline-primary:hover {
  background: var(--brand-gradient);
  border-color: transparent;
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-lg) !important;
}

/* ===================== FORM CONTROLS ===================== */
.form-control, .form-select {
  border-radius: var(--radius-md);
  border-color: #e5e7eb;
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 0.4rem;
}

/* ===================== ALERTS ===================== */
.alert {
  animation: fadeInDown 0.3s ease-in-out;
  border-radius: var(--radius-lg);
  border: none;
  font-size: 0.9rem;
}

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

/* ===================== HERO ===================== */
.hero-section {
  background: var(--brand-gradient-light);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-visual {
  background: linear-gradient(135deg, rgba(79,70,229,0.08) 0%, rgba(124,58,237,0.08) 100%);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(79,70,229,0.12);
}

.hero-visual img {
  max-height: 140px;
  max-width: 280px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 12px rgba(79,70,229,0.2));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(79,70,229,0.1);
  color: var(--brand-primary);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(79,70,229,0.15);
}

/* ===================== FEATURE CARDS ===================== */
.feature-card {
  border-radius: var(--radius-xl) !important;
  border: 1px solid rgba(79,70,229,0.08) !important;
  transition: all 0.2s ease;
  background: #fff;
}

.feature-card:hover {
  border-color: rgba(79,70,229,0.25) !important;
  box-shadow: 0 8px 25px rgba(79,70,229,0.12) !important;
  transform: translateY(-4px);
}

.feature-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--brand-gradient-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 1px solid rgba(79,70,229,0.1);
}

/* ===================== STAT CARDS ===================== */
.stat-card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

/* ===================== TABLE ===================== */
.table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6b7280;
  font-weight: 700;
}

.table-hover tbody tr:hover {
  background-color: rgba(79,70,229,0.03);
}

/* ===================== BADGE ===================== */
.badge {
  font-weight: 600;
  border-radius: 6px;
  padding: 0.35em 0.7em;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* ===================== AUTH PAGES ===================== */
.auth-logo-block {
  text-align: center;
  padding: 1.75rem 1rem 1rem;
  background: var(--brand-gradient);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin: -1px -1px 0;
}

.auth-logo-block img {
  height: 44px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.auth-logo-block .brand-name {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  display: block;
  letter-spacing: -0.5px;
}

/* ===================== FOOTER ===================== */
.site-footer {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: rgba(255,255,255,0.65);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.site-footer .footer-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.site-footer a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover {
  color: #fff;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .table-responsive { font-size: 0.85rem; }
  .hero-section { padding: 2rem 1.25rem; }
  .main-wrapper { padding: 1.25rem 0 2rem; }
}

/* ===================== LANGUAGE DROPDOWN ===================== */
.dropdown-menu {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
}

.dropdown-item {
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: rgba(79,70,229,0.07);
  color: var(--brand-primary);
}

.dropdown-item button {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.75rem;
  color: #212529;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.dropdown-item button.active,
.dropdown-item button:hover {
  background-color: rgba(79,70,229,0.07);
  color: var(--brand-primary);
}

/* ===================== PAGE HEADINGS ===================== */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-title i {
  color: var(--brand-primary);
}
