@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Cinzel:wght@500;700;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary-bg: #070D1E;
  --secondary-bg: #0D1730;
  --card-bg: rgba(16, 28, 58, 0.75);
  --card-border: rgba(212, 175, 55, 0.2);
  --card-border-hover: rgba(212, 175, 55, 0.45);
  --gold-primary: #D4AF37;
  --gold-hover: #F3CA40;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --accent-blue: #3B82F6;
  --accent-blue-glow: rgba(59, 130, 246, 0.35);
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --sidebar-w: 270px;
  --header-h: 70px;
  --danger: #EF4444;
  --success: #10B981;
  --warning: #F59E0B;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--primary-bg);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(212, 175, 55, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(13, 23, 48, 0.5) 0%, transparent 80%);
  background-attachment: fixed;
}

/* Tipografía de lujo jurídico */
.font-legal-title {
  font-family: 'Cinzel', serif;
}

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

/* Glassmorphism Styles */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 0 15px 0 rgba(212, 175, 55, 0.05);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 14px 35px -5px rgba(0, 0, 0, 0.5), 0 0 20px 2px rgba(212, 175, 55, 0.1);
}

.glass-card-interactive {
  background: rgba(18, 32, 66, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 14px;
  transition: all 0.25s ease;
}

.glass-card-interactive:hover {
  background: rgba(24, 42, 85, 0.85);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 12px rgba(212, 175, 55, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(7, 13, 30, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.6);
}

/* Buttons */
.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #AA820A 100%);
  color: #070D1E;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.65rem 1.3rem;
  border: 1px solid #FFE07D;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #F3CA40 0%, #C5A059 100%);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
  transform: translateY(-1px);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-outline-gold {
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
  font-weight: 600;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-outline-gold:hover {
  background: rgba(212, 175, 55, 0.2);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
  color: #FFE699;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 500;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Badges */
.badge-gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-primary);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-urgent {
  background: rgba(239, 68, 68, 0.18);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* Inputs & Forms */
.input-legal {
  background: rgba(10, 18, 40, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  color: var(--text-main);
  padding: 0.7rem 1rem;
  width: 100%;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}

.input-legal:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
  background: rgba(13, 23, 48, 0.95);
}

.select-legal {
  background: rgba(10, 18, 40, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  color: var(--text-main);
  padding: 0.7rem 1rem;
  width: 100%;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.select-legal:focus {
  border-color: var(--gold-primary);
}

/* Chat bubble styling */
.chat-msg-user {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(29, 78, 216, 0.35) 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 18px 18px 4px 18px;
  padding: 1rem 1.25rem;
  color: #F8FAFC;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chat-msg-assistant {
  background: rgba(18, 30, 60, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 18px 18px 18px 4px;
  padding: 1.25rem 1.4rem;
  color: #F1F5F9;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  line-height: 1.65;
}

.chat-msg-assistant pre {
  background: rgba(5, 10, 22, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-x: auto;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.chat-msg-assistant code {
  color: var(--gold-hover);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 20, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0B142B;
  border: 1px solid var(--gold-primary);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(212, 175, 55, 0.2);
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

/* Sidebar navigation item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.nav-item:hover {
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-primary);
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.18) 0%, rgba(212, 175, 55, 0.05) 100%);
  color: #FFF;
  font-weight: 700;
  border-left: 3px solid var(--gold-primary);
}

.nav-item.active i, .nav-item.active svg {
  color: var(--gold-primary);
}

/* Animated gradient text */
.gradient-gold-text {
  background: linear-gradient(135deg, #FFF6D6 0%, #D4AF37 50%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Shine effect */
.shine-gold {
  position: relative;
  overflow: hidden;
}
.shine-gold::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: shine-sweep 6s infinite ease-in-out;
}

@keyframes shine-sweep {
  0% { transform: translateX(-100%) rotate(25deg); }
  25%, 100% { transform: translateX(100%) rotate(25deg); }
}
