/* === IntraLogiQ Custom Styles (Bootstrap 5 Override) === */

:root {
  --ilq-dark: #111111;
  --ilq-dark-2: #1a1a1a;
  --ilq-dark-3: #0a0a0a;
  --ilq-border: #333333;
  --ilq-border-2: #222222;
  --ilq-orange: #f97316;
  --ilq-orange-dark: #ea580c;
  --ilq-orange-light: rgba(249, 115, 22, 0.2);
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
}

::selection {
  background-color: #fed7aa;
}

/* === LOGIN SCREEN === */
.ilq-login-screen {
  min-height: 100vh;
  background: var(--ilq-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.ilq-login-screen::before {
  content: '';
  position: absolute;
  top: -10rem;
  right: -10rem;
  width: 30rem;
  height: 30rem;
  background: rgba(249, 115, 22, 0.08);
  border-radius: 9999px;
  filter: blur(80px);
  pointer-events: none;
}

.ilq-login-screen::after {
  content: '';
  position: absolute;
  bottom: -8rem;
  left: -8rem;
  width: 24rem;
  height: 24rem;
  background: rgba(249, 115, 22, 0.05);
  border-radius: 9999px;
  filter: blur(60px);
  pointer-events: none;
}

.ilq-login-card {
  background: var(--ilq-dark-2);
  border: 1px solid var(--ilq-border);
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

.ilq-google-btn {
  background: #ffffff;
  color: #1f1f1f;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ilq-google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #1f1f1f;
}

.ilq-google-btn:active {
  background: #e8eaed;
}

/* === USER AVATAR === */
.ilq-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ilq-orange);
  object-fit: cover;
  background: var(--ilq-dark-2);
}

/* === HEADER === */
.ilq-header {
  background: var(--ilq-dark);
  border-bottom: 1px solid var(--ilq-border-2);
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
}

.ilq-logo-box {
  background: var(--ilq-orange);
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(249,115,22,0.4);
  display: inline-flex;
}

.ilq-sync-badge {
  font-size: 0.75rem;
  color: #94a3b8;
  border: 1px solid var(--ilq-border);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--ilq-dark-2);
}

/* === FORM STYLES === */
.ilq-form-control:focus {
  border-color: var(--ilq-orange) !important;
  box-shadow: 0 0 0 0.2rem rgba(249,115,22,0.25) !important;
}

.ilq-form-control {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ilq-checkbox {
  accent-color: var(--ilq-orange);
}

/* === BUTTONS === */
.btn-ilq-orange {
  background-color: var(--ilq-orange);
  color: white;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 10px rgba(249,115,22,0.3);
  transition: all 0.2s;
}

.btn-ilq-orange:hover {
  background-color: var(--ilq-orange-dark);
  color: white;
  box-shadow: 0 6px 15px rgba(249,115,22,0.4);
}

.btn-ilq-orange:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-ilq-dark {
  background-color: #334155;
  color: white;
  font-weight: 700;
  border: 1px solid #475569;
}

.btn-ilq-dark:hover {
  background-color: #475569;
  color: white;
}

/* === CARDS === */
.ilq-client-card {
  transition: box-shadow 0.3s;
  border: 1px solid #e2e8f0;
}

.ilq-client-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.ilq-client-card:hover .ilq-company-name {
  color: var(--ilq-orange-dark) !important;
}

/* === REPORT VIEW (Dark Theme) === */
.ilq-report {
  background: var(--ilq-dark);
  min-height: 100vh;
  color: #e2e8f0;
}

.ilq-report-section {
  background: var(--ilq-dark-2);
  border: 1px solid var(--ilq-border);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.ilq-hero-total {
  background: var(--ilq-dark);
  border: 2px solid rgba(249,115,22,0.5);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 0 30px rgba(249,115,22,0.15);
  position: relative;
  overflow: hidden;
}

.ilq-hero-total::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #ea580c, #f59e0b);
}

/* === KPI CARDS === */
.ilq-kpi-card {
  background: var(--ilq-dark);
  border: 1px solid var(--ilq-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: border-color 0.3s;
}

.ilq-kpi-card:hover {
  border-color: rgba(249,115,22,0.5);
}

.ilq-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--ilq-border);
  transition: background 0.3s;
}

.ilq-kpi-card:hover::before {
  background: var(--ilq-orange);
}

.ilq-kpi-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--ilq-border);
  background: var(--ilq-dark-2);
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0.8;
}

.ilq-kpi-step:hover {
  opacity: 1;
  border-color: rgba(249,115,22,0.5);
  background: #222222;
}

.ilq-kpi-step.current {
  cursor: default;
  opacity: 0.8;
}

.ilq-kpi-step.selected {
  background: rgba(249,115,22,0.1);
  border-color: var(--ilq-orange);
  box-shadow: 0 0 10px rgba(249,115,22,0.2);
  ring: 1px solid rgba(249,115,22,0.5);
  transform: scale(1.02);
  opacity: 1;
  z-index: 10;
}

.ilq-kpi-step.selected .ilq-step-label {
  color: #fb923c !important;
}

.ilq-kpi-step.selected .ilq-step-value {
  color: white !important;
}

/* === PROGRESS BARS === */
.ilq-progress-bar {
  background: #222222;
  border-radius: 9999px;
  height: 12px;
  overflow: hidden;
}

.ilq-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 1s ease-out;
}

.ilq-progress-fill-orange {
  background: linear-gradient(to right, #ea580c, #f59e0b);
}

.ilq-progress-fill-red {
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239,68,68,0.5);
}

.ilq-progress-fill-green {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16,185,129,0.5);
}

/* === PAYBACK SECTION === */
.ilq-payback-section {
  background: linear-gradient(to bottom right, var(--ilq-dark-2), var(--ilq-dark-3));
  border: 1px solid var(--ilq-border);
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.ilq-payback-section::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--ilq-orange);
  transition: width 0.3s;
}

.ilq-payback-section:hover::after {
  width: 6px;
}

/* === VALUE BOX === */
.ilq-value-box {
  background: var(--ilq-dark);
  border: 1px solid var(--ilq-border);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--ilq-orange);
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* === GLOW EFFECT === */
.ilq-glow-orange {
  box-shadow: 0 0 15px rgba(249,115,22,0.4);
}

/* === ANIMATION === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ilq-animate-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* === SATURATION TOGGLES === */
.ilq-sat-toggle {
  transition: all 0.2s;
  cursor: pointer;
}

.ilq-sat-toggle:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ilq-sat-toggle.active-red {
  background-color: #fef2f2 !important;
  border-color: #fca5a5 !important;
}

.ilq-sat-toggle.active-green {
  background-color: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
}

.ilq-sat-toggle.active-yellow {
  background-color: #fefce8 !important;
  border-color: #fde047 !important;
}

/* === LIGHTBULB TIP === */
.ilq-tip-box {
  background: rgba(249,115,22,0.05);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.75rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

/* === TIMELINE DOTS === */
.ilq-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.5s;
}

.ilq-timeline-dot.active {
  background: var(--ilq-orange);
  box-shadow: 0 0 15px rgba(249,115,22,1);
  transform: scale(1.5);
}

.ilq-timeline-dot.past {
  background: #92400e;
}

.ilq-timeline-dot.future {
  background: #444444;
}

/* === MISC === */
.text-orange { color: var(--ilq-orange) !important; }
.bg-ilq-dark { background-color: var(--ilq-dark) !important; }
.bg-ilq-dark-2 { background-color: var(--ilq-dark-2) !important; }
.border-ilq { border-color: var(--ilq-border) !important; }

.ilq-glow-blob {
  position: absolute;
  top: -5rem;
  right: -5rem;
  width: 16rem;
  height: 16rem;
  background: rgba(234,88,12,0.1);
  border-radius: 9999px;
  filter: blur(48px);
  pointer-events: none;
}

/* === SPINNER === */
.ilq-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === PDF HIDDEN CONTAINER === */
.ilq-pdf-offscreen {
  position: absolute;
  left: -9999px;
  top: 0;
}

/* === STICKY ANALYSIS BAR === */
.ilq-sticky-bar {
  position: sticky;
  top: 60px;
  background: #f8fafc;
  z-index: 1040;
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
}

/* === FIX: Textos blancos en reporte === */
.ilq-report p,
.ilq-report span,
.ilq-report div,
.ilq-report label {
  color: #e2e8f0;
}

.ilq-report .text-muted {
  color: #94a3b8 !important;
}

.ilq-report h1, .ilq-report h2, .ilq-report h3,
.ilq-report h4, .ilq-report h5, .ilq-report h6 {
  color: #ffffff;
}
/* === CLIENT TABLE === */
.ilq-client-table th {
  border-bottom: 2px solid #e2e8f0 !important;
}

.ilq-client-row:hover {
  background-color: #f8fafc !important;
}

.ilq-client-row:hover .ilq-company-name {
  color: var(--ilq-orange) !important;
}

.ilq-client-row td {
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.ilq-sim-row:hover {
  background-color: #fff7ed !important;
}

.ilq-sim-row td {
  border-bottom: 1px solid #f1f5f9;
}

/* === DROPDOWN MENU === */
.dropdown-menu {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-width: 10rem;
}

.dropdown-item:hover {
  background-color: #f8fafc;
}

.dropdown-item.text-danger:hover {
  background-color: #fef2f2;
}

/* === ORANGE BADGE === */
.bg-orange-light {
  background-color: rgba(249, 115, 22, 0.1) !important;
}

.text-orange {
  color: var(--ilq-orange) !important;
}

/* === ADMIN TABLE === */
.ilq-admin-table th {
  border-bottom: 2px solid #e2e8f0 !important;
}

.ilq-admin-row:hover {
  background-color: #f8fafc !important;
}

.ilq-admin-row td {
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}