/* ==========================================================================
   LogField — Premium Dark Tactical Design System
   Matches RENAWorkTimer / LogField design tokens
   ========================================================================== */

:root {
  --bg-base: #08090d;
  --bg-surface: #0f111a;
  --bg-card: #151826;
  --bg-card-hover: #1c2033;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  --accent-primary: #6366f1;       /* Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --accent-cyan: #06b6d4;          /* Cyan */
  --accent-emerald: #10b981;       /* Success / Active */
  --accent-rose: #f43f5e;          /* Lock / Alert */
  --accent-amber: #f59e0b;         /* Warning / Pending */
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-2xl: 28px;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  --shadow-subtle: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 50px -10px var(--accent-glow);
  --shadow-cyan: 0 0 40px -10px rgba(6, 182, 212, 0.3);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Tactical ambient background layers */
.bg-canvas-layer {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.bg-grid-layer {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

/* Glassmorphism Cards */
.glass-panel {
  background: rgba(15, 17, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-subtle);
}

.glass-card {
  background: rgba(21, 24, 38, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: rgba(28, 32, 51, 0.85);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.7), 0 0 25px -5px rgba(99, 102, 241, 0.15);
}

/* Status Lightning Indicator (Signature feature from RENA/LogField) */
.lightning-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

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

.lightning-badge.offline {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.pulse-dot.green {
  background-color: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.pulse-dot.amber {
  background-color: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

.pulse-dot.green::after,
.pulse-dot.amber::after {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 50%;
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.pulse-dot.green::after { border: 1.5px solid #10b981; }
.pulse-dot.amber::after { border: 1.5px solid #f59e0b; }

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Gradient text */
.text-gradient-primary {
  background: linear-gradient(135deg, #ffffff 10%, #c7d2fe 60%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Glowing Buttons */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 0 24px -4px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 0 32px -2px rgba(99, 102, 241, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-telegram {
  background: linear-gradient(135deg, #229ed9 0%, #0088cc 100%);
  color: #ffffff;
  box-shadow: 0 0 20px -4px rgba(34, 158, 217, 0.5);
  transition: all 0.2s ease;
}

.btn-telegram:hover {
  box-shadow: 0 0 28px -2px rgba(34, 158, 217, 0.7);
  transform: translateY(-1px);
}

/* Custom Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #6366f1;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.8);
  border: 2px solid #ffffff;
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Modals */
.modal-backdrop {
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Animated radar & trust badge */
@keyframes radar-sweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-spinner {
  animation: radar-sweep 6s linear infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #08090d;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #393e5e;
}
