@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap");

:root {
  --color-1: #8BE109;
  --color-2: #CEF50A;
  --color-3: #2FD6DC;
  --color-4: #00C6CD;
  --color-5: #00A6AD;
  --color-6: #008D94;
  --color-7: #00757B;
  --color-8: #005E63;

  --dark-bg: #0c1116;
  --card-bg: rgba(22,28,34,0.6);
  --soft-border: rgba(255,255,255,0.06);
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
}

/* Animated Gradient Background */
body {
  background: linear-gradient(-45deg, #001f22, #00363a, #002b2f, #00181a);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
}

p,
span,
li,
label,
small,
.form-text,
.card-text,
.text-muted {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.form-label,
.card-title,
.modal-title,
.offcanvas-title {
  color: var(--text-primary);
}

a {
  color: var(--color-3);
}

a:hover {
  color: var(--color-1);
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating glow effect (Base44 style) */
body::before {
  content: "";
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(47,214,220,0.1), transparent 70%);
  top: -150px;
  right: -150px;
  z-index: -1;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,225,9,0.08), transparent 70%);
  bottom: -100px;
  left: -100px;
  z-index: -1;
  pointer-events: none;
  animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 30px); }
}

/* Glow Text */
.glow-text {
  background: linear-gradient(90deg, var(--color-1), var(--color-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* Dashboard Cards with Glass Effect */
.dashboard-card {
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--soft-border);
  border-radius: 18px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(139,225,9,0.15),
              0 0 60px rgba(47,214,220,0.1);
  border-color: rgba(47,214,220,0.3);
}

.dashboard-card h6 {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Credit Badge */
.credit-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--color-1), var(--color-3));
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  color: #000;
  font-size: 0.9rem;
  box-shadow: 0 0 15px rgba(139,225,9,0.2);
}

/* Neon Button */
.btn-flash {
  background: linear-gradient(90deg, var(--color-1), var(--color-3));
  border: none;
  color: #000;
  font-weight: 600;
  border-radius: 30px;
  padding: 10px 24px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(139,225,9,0.2);
}

.btn-flash:hover {
  box-shadow: 0 0 25px rgba(47,214,220,0.3),
              0 0 35px rgba(139,225,9,0.2);
  transform: translateY(-2px);
  color: #000;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: rgba(0, 94, 99, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 24px 16px;
  border-right: 1px solid var(--soft-border);
  z-index: 1000;
  overflow-y: auto;
}

.sidebar h4 {
  color: var(--text-primary);
  margin-bottom: 32px;
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--color-1), var(--color-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.flash747-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.7rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  font-size: 24px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(5, 18, 12, 0.62);
  box-shadow: 0 0 24px rgba(47, 214, 220, 0.24), inset 0 0 16px rgba(255, 255, 255, 0.06);
}

.flash747-logo-mark {
  font-size: 24px;
  color: #ffd94a;
  text-shadow: 0 0 16px rgba(255, 217, 74, 0.55), 0 0 30px rgba(47, 214, 220, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 217, 74, 0.12);
  border: 1px solid rgba(255, 217, 74, 0.35);
}

.flash747-logo-text {
  font-size: 24px;
  color: #f5f7f0;
  background: linear-gradient(90deg, #ffffff 0%, #d7ff6a 46%, #2fd6dc 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 16px rgba(47, 214, 220, 0.35);
  animation: flash747-logo-shimmer 4s ease-in-out infinite;
}

@supports (-webkit-background-clip: text) {
  .flash747-logo-text {
    -webkit-text-fill-color: transparent;
  }
}

@keyframes flash747-logo-shimmer {
  0%, 100% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 0 rgba(47, 214, 220, 0));
  }
  50% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 8px rgba(47, 214, 220, 0.35));
  }
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 8px;
}

.sidebar a {
  color: rgba(255,255,255,0.7);
  display: block;
  padding: 12px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  position: relative;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.sidebar a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--color-3);
  box-shadow: inset 0 0 15px rgba(47,214,220,0.1);
}

.sidebar a.active {
  background: linear-gradient(90deg, var(--color-1), var(--color-3));
  color: #000;
  font-weight: 600;
}

.sidebar-section-label {
  margin-top: 24px;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 1.5px;
  padding-left: 12px;
  font-weight: 700;
  -webkit-user-select: none;
  user-select: none;
}

/* Main content area */
.main-content {
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
  width: calc(100% - 260px);
  max-width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* Progress bar with gradient */
.progress {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  height: 8px;
  border: 1px solid var(--soft-border);
}

.progress-bar {
  background: linear-gradient(90deg, var(--color-1), var(--color-3));
  border-radius: 10px;
}

/* Tables */
.table-dark {
  color: var(--text-primary);
}

.table-dark thead th {
  color: var(--text-secondary);
  border-color: var(--soft-border);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.table-dark tbody td {
  border-color: var(--soft-border);
  color: var(--text-primary);
}

.table-dark tbody tr:hover {
  background: rgba(139,225,9,0.05);
}

/* Headings */
h2, h3, h4, h5 {
  font-family: "Space Mono", monospace;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
}

/* Form controls with glass effect */
.form-control {
  background: var(--card-bg);
  border: 1px solid var(--soft-border);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.form-control:focus {
  background: var(--card-bg);
  border-color: var(--color-3);
  color: var(--text-primary);
  box-shadow: 0 0 20px rgba(47,214,220,0.15);
}

.form-control::placeholder {
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1200px) {
  .main-content {
    padding: 22px;
  }

  .dashboard-card {
    padding: 18px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--soft-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .sidebar h4 {
    flex: 0 0 100%;
    margin-bottom: 16px;
  }

  .sidebar ul {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .sidebar li {
    flex: 0 0 auto;
    margin-right: 12px;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 16px;
  }

  .dashboard-card {
    border-radius: 14px;
    padding: 14px;
  }

  .flash747-logo,
  .flash747-logo-text {
    font-size: 20px;
  }

  .form-control {
    padding: 10px 12px;
  }
}

@media (max-width: 576px) {
  .sidebar {
    padding: 14px 10px;
  }

  .sidebar a {
    padding: 9px 10px;
    font-size: 0.9rem;
  }

  .main-content {
    padding: 12px;
  }

  h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }
}

/* Animations */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(139,225,9,0.3); }
  50% { box-shadow: 0 0 30px rgba(47,214,220,0.3); }
}

.pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-in {
  animation: scale-in 0.4s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .flash747-logo-text,
  .flash747-logo-mark,
  body::before,
  body::after {
    animation: none !important;
  }
}
