/* ==========================================================================
   Fijate Tools - Traductor de Lenguaje Inmobiliario y Detector de Pisos Trampa
   Hoja de estilos CSS canónica y responsiva
   ========================================================================== */

:root {
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores corporativos tema claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Colores semánticos */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-subtle: #eff6ff;

  --color-emerald: #10b981;
  --color-emerald-subtle: #ecfdf5;
  --color-amber: #f59e0b;
  --color-amber-subtle: #fffbeb;
  --color-orange: #f97316;
  --color-orange-subtle: #fff7ed;
  --color-red: #ef4444;
  --color-red-subtle: #fef2f2;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-card: #131b2a;
  --bg-card-subtle: #1a2436;
  --border-color: #24324a;
  --border-focus: #60a5fa;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --color-primary: #3b82f6;
  --color-primary-hover: #60a5fa;
  --color-primary-subtle: rgba(59, 130, 246, 0.15);

  --color-emerald-subtle: rgba(16, 185, 129, 0.15);
  --color-amber-subtle: rgba(245, 158, 11, 0.15);
  --color-orange-subtle: rgba(249, 115, 22, 0.15);
  --color-red-subtle: rgba(239, 68, 68, 0.15);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6);
}

/* Base y contención */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.section-title,
.hero-title,
.category-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono,
.kpi-score-number,
code,
.compass-degrees {
  font-family: var(--font-mono);
}

/* Layout principal */
.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Header institucional con branding */
.brand-logo-box svg {
  display: block;
}

/* Pestañas de navegación de la herramienta */
.tool-tabs-nav {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.375rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.tool-tabs-nav::-webkit-scrollbar {
  display: none;
}

.tool-tab-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tool-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-subtle);
}

.tool-tab-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.tool-tab-pane {
  display: none;
}

.tool-tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card principal y módulos */
.card-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .card-main {
    padding: 2rem;
  }
}

/* Hero descriptivo */
.hero-box {
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 780px;
}

/* Presets de anuncios arquetípicos */
.presets-section {
  margin-bottom: 1.5rem;
}

.presets-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.presets-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preset-chip-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  min-height: 38px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip-btn:hover {
  background: var(--border-color);
  border-color: var(--border-focus);
}

.preset-chip-btn.active {
  background: var(--color-primary-subtle);
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
}

/* Área de pegado del anuncio */
.ad-input-box {
  margin-bottom: 1.5rem;
}

.input-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.input-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.825rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.2rem 0.4rem;
}

.btn-text-action:hover {
  color: var(--color-red);
}

.inmo-textarea {
  width: 100%;
  min-height: 140px;
  max-height: 300px;
  padding: 0.875rem 1rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  background: var(--bg-page);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  resize: vertical;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inmo-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* Selectores manuales de trampa */
.manual-flags-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.flags-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flags-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .flags-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .flags-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Reglas estrictas canónicas para selects */
select.inmo-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  height: 42px;
  min-height: 42px;
  padding: 0 40px 0 0.875rem;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-main);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

select.inmo-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

select.inmo-select option {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  min-height: 40px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Botón principal de acción */
.btn-primary-action {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary-action:hover {
  background: var(--color-primary-hover);
}

.btn-primary-action:active {
  transform: translateY(1px);
}

/* ==========================================================================
   PANEL DE RESULTADOS Y TRADUCCIÓN AL ESPAÑOL REAL
   ========================================================================== */
.results-dashboard {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--border-color);
}

.results-header-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* KPI Score Card con Gauge Circular */
.kpi-score-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .kpi-score-card {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
}

.gauge-visual-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.circular-gauge {
  position: relative;
  width: 130px;
  height: 130px;
}

.circular-gauge svg {
  transform: rotate(-90deg);
}

.gauge-bg {
  stroke: var(--border-color);
}

.gauge-progress {
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s ease;
}

.gauge-inner-val {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.kpi-score-number {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}

.gauge-max-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-content-box {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.risk-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
}

.badge-low {
  background: var(--color-emerald-subtle);
  color: var(--color-emerald);
}

.badge-medium {
  background: var(--color-amber-subtle);
  color: var(--color-amber);
}

.badge-high {
  background: var(--color-orange-subtle);
  color: var(--color-orange);
}

.badge-critical {
  background: var(--color-red-subtle);
  color: var(--color-red);
}

.kpi-verdict {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

.kpi-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.kpi-meta-item {
  display: flex;
  flex-direction: column;
}

.meta-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.meta-value-cost {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-red);
}

.meta-value-count {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Texto resaltado */
.highlighted-text-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.highlighted-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.ad-text-rendered {
  font-size: 0.975rem;
  line-height: 1.7;
  color: var(--text-main);
}

.ad-text-rendered p {
  margin-bottom: 0.75rem;
}

.ad-text-rendered p:last-child {
  margin-bottom: 0;
}

/* Marcas de resaltado */
mark.inmo-tag-highlight {
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: help;
  transition: opacity 0.2s;
}

mark.mark-low {
  background-color: rgba(16, 185, 129, 0.2);
  color: inherit;
}

mark.mark-medium {
  background-color: rgba(245, 158, 11, 0.28);
  color: inherit;
}

mark.mark-high {
  background-color: rgba(249, 115, 22, 0.3);
  color: inherit;
}

mark.mark-critical {
  background-color: rgba(239, 68, 68, 0.32);
  color: inherit;
  border-bottom: 2px solid var(--color-red);
}

/* Tarjetas de banderas rojas detectadas */
.detected-flags-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flag-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border-left-width: 6px;
}

.flag-critical {
  border-left-color: var(--color-red);
}

.flag-high {
  border-left-color: var(--color-orange);
}

.flag-medium {
  border-left-color: var(--color-amber);
}

.flag-low {
  border-left-color: var(--color-emerald);
}

.flag-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.flag-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.flag-euphemism-tag {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.flag-severity-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.pill-critical {
  background: var(--color-red-subtle);
  color: var(--color-red);
}

.pill-high {
  background: var(--color-orange-subtle);
  color: var(--color-orange);
}

.pill-medium {
  background: var(--color-amber-subtle);
  color: var(--color-amber);
}

.flag-points-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-card-subtle);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.translation-box {
  background: var(--bg-card-subtle);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  margin-bottom: 0.75rem;
}

.translation-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.translation-text {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.45;
}

.meta-details-row {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.meta-label {
  font-weight: 700;
  color: var(--text-muted);
}

.meta-val {
  font-weight: 600;
  color: var(--color-red);
}

.tip-box {
  background: rgba(37, 99, 235, 0.06);
  border-left: 3px solid var(--color-primary);
  padding: 0.65rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.tip-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
}

.tip-text {
  font-size: 0.875rem;
  color: var(--text-main);
  line-height: 1.4;
}

/* ==========================================================================
   CHECKLIST INTERACTIVA DE VISITA PARA MÓVIL
   ========================================================================== */
.checklist-toolbar-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}

.toolbar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.progress-header-info {
  display: flex;
  flex-direction: column;
}

.progress-main-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.progress-count-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.summary-pill {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
}

.pill-bad {
  background: var(--color-red-subtle);
  color: var(--color-red);
}

.pill-warn {
  background: var(--color-amber-subtle);
  color: var(--color-amber);
}

.pill-ok {
  background: var(--color-emerald-subtle);
  color: var(--color-emerald);
}

.pill-pending {
  background: var(--bg-card);
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.toolbar-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-secondary-action {
  flex: 1 1 180px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary-action:hover {
  background: var(--border-color);
}

.btn-outline-danger {
  color: var(--color-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-outline-danger:hover {
  background: var(--color-red-subtle);
}

/* Categorías de la checklist */
.checklist-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.category-header {
  background: var(--bg-card-subtle);
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.category-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.category-items-list {
  display: flex;
  flex-direction: column;
}

.checklist-item-row {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background-color 0.15s ease;
}

.checklist-item-row:last-child {
  border-bottom: none;
}

.checklist-item-row.status-ok {
  background: rgba(16, 185, 129, 0.04);
}

.checklist-item-row.status-warn {
  background: rgba(245, 158, 11, 0.05);
}

.checklist-item-row.status-bad {
  background: rgba(239, 68, 68, 0.06);
}

.item-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.item-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.item-weight-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-critical {
  background: var(--color-red-subtle);
  color: var(--color-red);
}

.badge-high {
  background: var(--color-orange-subtle);
  color: var(--color-orange);
}

.badge-medium {
  background: var(--color-amber-subtle);
  color: var(--color-amber);
}

.item-instruction-box {
  margin-bottom: 0.5rem;
}

.instruction-label,
.danger-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.danger-label {
  color: var(--color-red);
}

.instruction-text,
.danger-text {
  font-size: 0.9rem;
  line-height: 1.45;
}

.danger-text {
  color: var(--text-muted);
}

.item-actions-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .item-actions-panel {
    flex-direction: row;
    align-items: center;
  }
}

.status-btn-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  min-width: 280px;
}

.btn-status-choice {
  min-height: 40px;
  height: 40px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-status-choice:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.btn-status-ok.active {
  background: var(--color-emerald);
  border-color: var(--color-emerald);
  color: #ffffff;
}

.btn-status-warn.active {
  background: var(--color-amber);
  border-color: var(--color-amber);
  color: #ffffff;
}

.btn-status-bad.active {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #ffffff;
}

.item-notes-wrapper {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
}

.input-item-note {
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 0.75rem;
  background: var(--bg-page);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-main);
}

.input-item-note:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* ==========================================================================
   BRÚJULA DIGITAL Y ORIENTACIÓN SOLAR
   ========================================================================== */
.compass-widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.compass-widget-header {
  margin-bottom: 1.25rem;
}

.compass-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .compass-grid-layout {
    grid-template-columns: 200px 1fr;
  }
}

.compass-dial-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.compass-circle-outer {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  background: var(--bg-card-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.compass-rose {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.point-n { position: absolute; top: 6px; color: var(--color-red); }
.point-s { position: absolute; bottom: 6px; }
.point-e { position: absolute; right: 10px; }
.point-w { position: absolute; left: 10px; }

.compass-needle-indicator {
  position: absolute;
  width: 6px;
  height: 120px;
  transition: transform 0.2s cubic-bezier(0.1, 0.7, 0.1, 1);
}

.needle-north {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 55px solid var(--color-red);
}

.needle-south {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 55px solid var(--text-muted);
}

.needle-center-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: var(--text-main);
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.compass-readout-row {
  margin-top: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.compass-degrees {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.compass-cardinal-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.compass-info-box {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.solar-advice-box {
  background: var(--bg-card-subtle);
  border-left: 4px solid var(--color-primary);
  padding: 0.875rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.925rem;
  line-height: 1.5;
}

/* ==========================================================================
   GUÍA LEGAL Y DE VICIOS OCULTOS
   ========================================================================== */
.guide-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guide-item-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.guide-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-item-text {
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.guide-item-text strong {
  color: var(--text-main);
}

/* ==========================================================================
   MODALES ACCESIBLES FIJATE.COM (CERO WINDOW.ALERT)
   ========================================================================== */
.inmo-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.inmo-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.btn-modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.modal-textarea {
  width: 100%;
  min-height: 180px;
  padding: 0.75rem;
  background: var(--bg-page);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-top: 0.75rem;
  resize: vertical;
}

.modal-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN PERICIAL (PDF / PAPEL)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .app-header,
  .fijate-footer,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .tool-tabs-nav,
  .presets-section,
  .manual-flags-card,
  .toolbar-actions-row,
  .btn-primary-action,
  .btn-status-choice,
  .item-notes-wrapper,
  .amazon-affiliate-showcase {
    display: none !important;
  }

  .tool-layout {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .card-main {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .tool-tab-pane {
    display: block !important;
  }

  .checklist-item-row {
    break-inside: avoid;
    border-bottom: 1px solid #ccc !important;
  }
}
