/* SDU "Vipp Pro Max" Premium Design System
   Colors: Red #C60000 | Gold #FFCC00 | Blue #0056b3
   Theme: Glassmorphism, Gradients, Smooth Animations */

:root {
  /* Core Brand Colors */
  --sdu-red: #C60000;
  --sdu-gold: #FFCC00;
  --sdu-blue: #004a99;
  --sdu-dark: #1a1a1a;
  --sdu-light: #f8f9fa;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  --grad-royal: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  --grad-gold: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  --grad-dark-glass: linear-gradient(135deg, rgba(20, 20, 20, 0.8), rgba(60, 60, 60, 0.4));

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --glass-blur: blur(12px);

  /* Typography */
  --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Spacing & Radius */
  --radius-xl: 1rem;
  --radius-lg: 0.75rem;
  --radius-md: 0.5rem;
}

[data-theme="dark"] {
  --sdu-light: #1a1a2e;
  --glass-bg: rgba(30, 30, 50, 0.85);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  color: #e0e0e0;
}

body {
  font-family: var(--font-main);
  background: var(--sdu-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
  background: #1a1a2e;
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
}

[data-theme="dark"] .hero-section h1 {
  color: #ff6b6b !important;
}

[data-theme="dark"] .hero-section h3 {
  color: #74b9ff !important;
}

[data-theme="dark"] .hero-section p {
  color: #b2bec3 !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .card-glass {
  background: var(--glass-bg) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .card-header {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .card-body,
[data-theme="dark"] .card-title,
[data-theme="dark"] h5,
[data-theme="dark"] h4,
[data-theme="dark"] h3 {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .text-muted {
  color: #adb5bd !important;
}

[data-theme="dark"] .text-dark {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .bg-white {
  background-color: #2d2d44 !important;
}

[data-theme="dark"] .bg-light {
  background-color: #252538 !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: #2d2d44;
  border-color: #444;
  color: #e0e0e0;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: #3d3d54;
  border-color: #dc3545;
  color: #fff;
}

[data-theme="dark"] .table {
  color: #e0e0e0;
}

[data-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .list-group-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

[data-theme="dark"] .dropdown-menu {
  background-color: #2d2d44;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dropdown-item {
  color: #e0e0e0;
}

[data-theme="dark"] .dropdown-item:hover {
  background-color: #3d3d54;
}

[data-theme="dark"] .service-card {
  background: rgba(30, 30, 50, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* --- Layout Components --- */

/* Header */
.portal-header {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  box-shadow: var(--glass-shadow);
  position: sticky;
  top: 0;
  z-index: 1020;
  transition: all 0.3s ease;
}

.portal-brand-text {
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.portal-sub-text {
  font-size: 0.85rem;
  color: var(--sdu-blue);
  font-weight: 600;
  text-transform: uppercase;
}

/* Navigation Bar */
.portal-navbar {
  background: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  margin-top: -20px;
  /* Overlap effect */
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
}

.portal-nav-link {
  color: #333 !important;
  font-weight: 600;
  padding: 0.75rem 1.25rem !important;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.portal-nav-link:hover {
  background: #f8f9fa;
  color: var(--sdu-red) !important;
  transform: translateY(-2px);
}

.portal-nav-link.active {
  background: var(--sdu-red);
  color: white !important;
  box-shadow: 0 4px 15px rgba(198, 0, 0, 0.3);
}

/* Dark Mode Navbar */
[data-theme="dark"] .portal-navbar {
  background: #2d2d44;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .portal-nav-link {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .portal-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ff6b6b !important;
}

/* --- Premium Cards (Glassmorphism) --- */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-xl);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-glass:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.25);
}

.card-header-glass {
  background: rgba(198, 0, 0, 0.05);
  border-bottom: 1px solid rgba(198, 0, 0, 0.1);
  padding: 1.25rem;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  font-weight: 700;
  color: var(--sdu-red);
  text-transform: uppercase;
}

/* --- Buttons --- */
.btn-sdu {
  background: var(--grad-primary);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(198, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-sdu:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(198, 0, 0, 0.4);
  color: white;
}

.btn-sdu-gold {
  background: linear-gradient(135deg, #ff8787 0%, #ff6b6b 100%);
  color: white !important;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
}

.btn-sdu-gold:hover {
  background: linear-gradient(135deg, #ff6b6b 0%, #fa5252 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(255, 107, 107, 0.25);
}

.btn-sdu-gold:hover {
  background: linear-gradient(135deg, #ff4d6d 0%, #ff758c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(255, 117, 140, 0.3);
}

.btn-sdu-gold:hover {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(30, 58, 138, 0.3);
}

/* --- Floating Inputs --- */
.form-floating>.form-control {
  border-radius: var(--radius-lg);
  border: 2px solid #eee;
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.form-floating>.form-control:focus {
  border-color: var(--sdu-blue);
  box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.25);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.animate-fade-up {
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-fill-mode: both;
}

.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

/* --- Footer --- */
.portal-footer {
  margin-top: auto;
  background: linear-gradient(to top, #1a1a1a, #2c2c2c);
  color: #bbb;
  padding-top: 3rem;
  padding-bottom: 1rem;
  position: relative;
}

.portal-footer h5 {
  color: white;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.portal-footer h5::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 3px;
  background: var(--sdu-red);
  border-radius: 2px;
}

/* --- Specific Overrides --- */
.list-group-item {
  border: none;
  background: rgba(255, 255, 255, 0.5);
  margin-bottom: 5px;
  border-radius: var(--radius-md) !important;
  transition: background 0.2s;
}

.list-group-item:hover {
  background: rgba(255, 255, 255, 0.9);
}

.badge-sdu {
  background: var(--grad-primary);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Chat Widget */
#chat-widget {
  z-index: 9999;
}

#chatMessages::-webkit-scrollbar {
  width: 6px;
}

#chatMessages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#chatMessages::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* --- Alerts --- */
.alert-soft-warning {
  background-color: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #856404;
  border-radius: var(--radius-md);
}

.alert-soft-danger {
  background-color: rgba(220, 53, 69, 0.12);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #721c24;
  border-radius: var(--radius-md);
}

[data-theme="dark"] .alert-soft-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #ffc107;
  border-color: rgba(255, 193, 7, 0.2);
}

[data-theme="dark"] .alert-soft-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #ff6b6b;
  border-color: rgba(220, 53, 69, 0.2);
}

/* --- Premium Payment UI Extensions --- */
/* --- Final Perfection Payment UI --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;800&display=swap');

.bg-mesh-perfect {
  background-color: #ffffff;
  background-image: 
    radial-gradient(at 0% 0%, hsla(353, 76%, 90%, 1) 0px, transparent 50%),
    radial-gradient(at 50% 0%, hsla(220, 100%, 93%, 1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(38, 100%, 93%, 1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, hsla(190, 100%, 93%, 1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(280, 100%, 93%, 1) 0px, transparent 50%);
  background-size: cover;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.bg-mesh-perfect::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
}

.glass-v2 {
  background: rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 40px !important;
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.rainbow-glow {
  position: relative;
}

.rainbow-glow::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #f06, #9f6, #06f, #f06);
  z-index: -1;
  filter: blur(10px);
  opacity: 0.2;
  border-radius: 42px;
}

.btn-clay {
  background: white;
  border: none;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn-clay:hover {
  transform: translateY(-2px);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -4px 6px rgba(0, 0, 0, 0.15),
    0 15px 25px rgba(0, 0, 0, 0.15);
}

.float-animation {
  animation: float-premium 6s ease-in-out infinite;
}

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

.success-pulse {
  animation: success-pulse-key 2s infinite;
}

@keyframes success-pulse-key {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(40, 167, 69, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.payment-hub-card {
  border: none;
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

[data-theme="dark"] .payment-hub-card {
  background: #2d2d44;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.payment-btn-premium {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: var(--grad-gold);
  border: none;
  color: var(--sdu-red);
  font-weight: 800;
}

.payment-btn-premium:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px rgba(255, 204, 0, 0.3);
}

.payment-btn-premium::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255,255,255,0.3);
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.payment-btn-premium:hover::after {
  left: 120%;
}