/* Renavon Premium Theme - "Midnight Data" */
/* Bloomberg Terminal meets Modern SaaS */

/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */
:root {
  /* Background colors */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-card-solid: #1f2937;

  /* Accent colors */
  --accent-cyan: #00d4ff;
  --accent-cyan-dim: #0891b2;
  --accent-gold: #f59e0b;
  --accent-gold-bright: #fbbf24;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  /* Text colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Gradients */
  --gradient-cyan: linear-gradient(135deg, #00d4ff 0%, #0891b2 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --gradient-premium: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
}

/* ============================================
   Base Styles
   ============================================ */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
}

/* Monospace for data */
.font-mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   Data Grid Background Animation
   ============================================ */
.data-grid-bg {
  position: relative;
}

.data-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes grid-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* ============================================
   Glow Effects
   ============================================ */
.glow-cyan {
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15), 0 0 40px rgba(0, 212, 255, 0.1);
}

.glow-cyan-hover:hover {
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.25), 0 0 60px rgba(0, 212, 255, 0.15);
}

.glow-gold {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2), 0 0 40px rgba(245, 158, 11, 0.1);
}

.glow-gold-hover:hover {
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.3), 0 0 60px rgba(245, 158, 11, 0.15);
}

/* ============================================
   Gradient Text
   ============================================ */
.text-gradient-cyan {
  background: linear-gradient(135deg, #00d4ff 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Glass Morphism
   ============================================ */
.glass {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-light {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ============================================
   Custom Scrollbar (dark theme)
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* ============================================
   Animated Gradient Border
   ============================================ */
.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.5) 0%, rgba(139, 92, 246, 0.5) 50%, rgba(245, 158, 11, 0.5) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ============================================
   Skeleton Loading Animation
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

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

/* ============================================
   Pulse Animation for Live Indicators
   ============================================ */
.pulse-live {
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* ============================================
   Hover Lift Effect
   ============================================ */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

/* ============================================
   Focus States
   ============================================ */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* ============================================
   Table Styles (Data Tables)
   ============================================ */
.data-table {
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  background: rgba(17, 24, 39, 0.8);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.5);
}

.data-table tbody td {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

/* ============================================
   Badge Styles
   ============================================ */
.badge-premium {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-free {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ============================================
   Button Hover Effects
   ============================================ */
.btn-primary {
  background: linear-gradient(135deg, #00d4ff 0%, #0891b2 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.btn-outline-cyan {
  border: 1px solid rgba(0, 212, 255, 0.5);
  color: var(--accent-cyan);
  transition: all 0.3s ease;
}

.btn-outline-cyan:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--accent-cyan);
}

/* ============================================
   Card Hover Border Effect
   ============================================ */
.card-hover-border {
  border: 1px solid rgba(55, 65, 81, 0.5);
  transition: border-color 0.3s ease;
}

.card-hover-border:hover {
  border-color: rgba(0, 212, 255, 0.3);
}

/* ============================================
   Accent Line (Section Headers)
   ============================================ */
.accent-line::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.5em;
  background: linear-gradient(180deg, var(--accent-cyan) 0%, var(--accent-cyan-dim) 100%);
  border-radius: 2px;
  margin-right: 0.75rem;
  vertical-align: middle;
}

/* ============================================
   HTMX Indicators
   ============================================ */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request .htmx-indicator-hide {
  display: none;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
  .data-grid-bg::before {
    background-size: 30px 30px;
  }
}
