/* ==========================================================================
   VISADO DE IMPACTO VERDE - CORPORATE B2B DESIGN SYSTEM
   Theme: Trust & GreenTech (Inter typography, Slate/Emerald palette)
   ========================================================================== */

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

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-emerald-500: #10b981;
  --color-emerald-600: #059669;
  --color-emerald-700: #047857;
  --color-whatsapp: #25D366;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-slate-50);
  color: var(--color-slate-800);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ================= LEAFLET MAP STYLING ================= */
#input-map {
  width: 100%;
  height: 280px;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  z-index: 10;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.leaflet-container {
  font-family: var(--font-sans) !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 4px;
}

/* ================= CIRCULAR SCORE GAUGE ================= */
.score-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(
    #059669 calc(var(--score-pct, 88) * 1%),
    #e2e8f0 0%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.score-circle::before {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  background-color: #ffffff;
  border-radius: 50%;
}

.score-number {
  position: relative;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* ================= RANGE SLIDER STYLING ================= */
.slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  outline: none;
  transition: background 0.2s;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #059669;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.4);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease, background 0.15s ease;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #047857;
}

/* ================= SEGMENTED CONTROL TABS ================= */
.seg-tab-btn {
  transition: all 0.15s ease-in-out;
}

.seg-tab-btn.active {
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
  font-weight: 700 !important;
}

/* Company Auth Modal Tabs and Forms */
.auth-tab-btn {
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.auth-tab-btn.active {
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

#form-register-company,
#form-login-company {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  gap: 1rem !important;
}

#form-register-company.hidden,
#form-login-company.hidden {
  display: none !important;
}

/* Language toggle buttons */
.lang-toggle-btn.active {
  background-color: #059669 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* ================= ACCORDION TRANSITIONS ================= */
.accordion-step .accordion-body {
  display: block;
}

.accordion-step.collapsed .accordion-body {
  display: none;
}

.accordion-step .accordion-chevron {
  transition: transform 0.2s ease;
}

.accordion-step.collapsed .accordion-chevron {
  transform: rotate(-90deg);
}

/* ================= DROPZONE STYLING ================= */
.budget-dropzone-box {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.budget-dropzone-box:hover,
.budget-dropzone-box.dragover {
  border-color: #059669;
  background: #f0fdf4;
}

/* ================= TABLE COMPONENT STYLING ================= */
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8rem;
}

.custom-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.custom-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.custom-table tbody tr:hover {
  background-color: #f8fafc;
}

/* ================= BADGES & PILLS ================= */
.badge-cr {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-en {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-vu {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-green {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ================= MODAL ANIMATIONS ================= */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-animate {
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ================= PRINT / PDF EXPORT ================= */
.print-only-header {
  display: none;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  header,
  aside,
  .no-print,
  #empty-state-view,
  .modal-overlay,
  .loading-overlay {
    display: none !important;
  }
  .print-only-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #059669;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
  }
  .right-panel,
  #audit-dashboard-view {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
  }
  .audit-module-pane {
    display: block !important;
    page-break-inside: avoid;
    margin-bottom: 2rem;
  }
}
