/* Variables globales y paleta de colores premium */
:root {
  --bg-workspace: #000000; /* Negro puro */
  --bg-panel: #18181b; /* Zinc 900 */
  --bg-phone-shell: #09090b; /* Zinc 950 */
  --bg-phone-screen: #000000; /* Negro puro */
  --bg-card: #18181b; /* Zinc 900 */
  --bg-card-hover: #27272a; /* Zinc 800 */
  
  --accent-primary: #38bdf8; /* Sky 400 */
  --accent-secondary: #818cf8; /* Indigo 400 */
  --accent-success: #34d399; /* Emerald 400 */
  --accent-warning: #fbbf24; /* Amber 400 */
  --accent-danger: #f87171; /* Red 400 */
  
  --text-primary: #ffffff; /* Blanco puro */
  --text-secondary: #d4d4d8; /* Zinc 300 */
  --text-muted: #a1a1aa; /* Zinc 400 */
  --border-color: #3f3f46; /* Zinc 700 */
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

/* Tema Claro (Light Mode) */
body.theme-light {
  --bg-workspace: #f8fafc;
  --bg-panel: #ffffff;
  --bg-phone-shell: #e2e8f0;
  --bg-phone-screen: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #cbd5e1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-workspace);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-y: scroll !important;
}

/* Contenedor principal de pantalla dividida */
.workspace {
  display: flex;
  width: 100%;
  min-height: 100vh;
  /* Permitir que crezca con el contenido */
  height: 100%;
}

.panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

/* MODO PRODUCCIÓN (Usuario Final) */
body.prod-mode .mobile-panel {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  background-color: var(--bg-workspace);
}
body.prod-mode .phone-mockup {
  width: 100%;
  max-width: 600px;
  height: 100vh;
  background-color: var(--bg-phone-shell);
  border: none;
  border-radius: 0;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
  position: relative;
  display: flex;
  flex-direction: column;
}
body.prod-mode .phone-notch {
  display: none;
}
body.prod-mode .dev-panel {
  display: none !important;
}

/* MODO DESARROLLADOR (Programador) */
body.dev-mode .mobile-panel {
  flex: 1.2;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 40px;
  padding-bottom: 40px;
  border-right: 1px solid var(--border-color);
  background: radial-gradient(circle at top left, #1e1b4b, var(--bg-workspace));
}
body.dev-mode .phone-mockup {
  width: 375px;
  height: 760px;
  background-color: var(--bg-phone-shell);
  border: 12px solid #27272a;
  border-radius: 48px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.dev-mode .phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 25px;
  background-color: #27272a;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 10;
}

.phone-screen {
  flex: 1;
  background-color: var(--bg-phone-screen);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: 30px;
  min-height: 0; /* Crucial for flexbox scrolling */
  height: 100%;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  z-index: 5;
}

.status-icons {
  display: flex;
  gap: 8px;
}

.status-icon {
  width: 14px;
  height: 14px;
}

/* Cuerpo de la Aplicación Móvil */
.app-body {
  flex: 1;
  position: relative;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 72px; /* Espacio para el nav-bar */
  min-height: 0; /* Crucial for flexbox scrolling */
  height: 100%;
}

/* Custom scrollbar para el celular simulado (optimizado para mouse) */
.app-body::-webkit-scrollbar {
  width: 12px;
}
.app-body::-webkit-scrollbar-thumb {
  background-color: #64748b; /* --text-muted */
  border-radius: 6px;
  border: 2px solid var(--bg-phone-screen); /* Da un efecto de margen */
}
.app-body::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-primary);
}
.app-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.app-screen {
  display: none;
  flex-direction: column;
  min-height: 100%;
}

.app-screen.active {
  display: flex;
}

/* Pantalla Login */
.login-header {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 32px;
}

.logo-box {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 16px;
  box-shadow: 0 10px 20px -5px rgba(56, 189, 248, 0.4);
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: white;
}

.login-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-group input, 
.input-group select, 
.input-group textarea {
  background-color: #000000 !important; /* Negro puro obligatorio */
  border: 1px solid #ffffff !important; /* Borde blanco brillante OBLIGATORIO */
  color: #ffffff !important; /* Letra OBLIGATORIAMENTE blanca */
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  font-family: var(--font-sans);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group textarea {
  resize: none;
  height: 80px;
}

.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.login-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Botones */
.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid #ffffff !important; /* Borde blanco brillante OBLIGATORIO para resaltar */
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  font-family: var(--font-sans);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  box-shadow: 0 4px 10px rgba(56, 189, 248, 0.2);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
}

.btn-icon-only {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.btn-icon-only:hover {
  background-color: var(--border-color);
}

.btn-back {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  cursor: pointer;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

/* Encabezados de pantallas */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.app-header h2 {
  font-size: 20px;
  font-weight: 700;
}

/* Dashboard */
.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-secondary), #4f46e5);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

.user-specialty {
  font-size: 11px;
  color: var(--text-secondary);
}

.dashboard-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  flex: 1;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card.pending {
  border-left: 3px solid var(--accent-warning);
}

.stat-card:not(.pending) {
  border-left: 3px solid var(--accent-success);
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
}

/* Selector de Especialidades */
.specialties-section {
  margin-bottom: 24px;
}

.specialties-section h3, 
.recent-projects-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.specialty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.specialty-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.specialty-card i {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.specialty-card span {
  font-size: 9px;
  font-weight: 500;
  text-align: center;
}

.specialty-card:hover {
  background-color: var(--bg-card-hover);
}

.specialty-card.active {
  border-color: var(--accent-primary);
  background-color: rgba(56, 189, 248, 0.1);
}

.specialty-card.active i {
  color: var(--accent-primary);
}

/* Buscador */
.search-bar-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 16px;
  gap: 8px;
}

.search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* ==========================================
   PASO 6: DIAGRAMADOR VISUAL DE MEDIDAS
   ========================================== */
.diagram-workspace {
  background-color: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  /* Fondo cuadriculado simulando blueprint */
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.diagram-canvas {
  width: 120px;
  height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
}

.diagram-canvas svg {
  width: 100%;
  height: 100%;
  color: var(--accent-primary);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

/* Flip para simular apertura */
.flip-horizontal {
  transform: scaleX(-1);
}

.measure-overlay {
  position: absolute;
  display: flex;
  align-items: center;
  background: var(--bg-phone-screen);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.measure-overlay input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 45px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  outline: none;
}

.measure-overlay .measure-unit {
  font-size: 10px;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Posiciones dinámicas */
.measure-top {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.measure-left {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.measure-depth {
  bottom: 10px;
  right: 10px;
}

.diagram-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diagram-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.diagram-card-icon {
  width: 32px;
  height: 32px;
  background-color: rgba(56, 189, 248, 0.1);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent-primary);
}

.diagram-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.diagram-card-info strong {
  font-size: 13px;
}

.diagram-card-info span {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ==========================================
   PASO 7: MÓDULO DE GASTOS
   ========================================== */
.stat-card.expense .stat-value {
  color: var(--error);
}

.stat-card.profit .stat-value {
  color: #10b981; /* Verde esmeralda para ganancia */
}

.expense-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--error); /* Borde rojo */
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.expense-info {
  display: flex;
  flex-direction: column;
}

.expense-category {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.expense-desc {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.expense-date-project {
  font-size: 11px;
  color: var(--text-secondary);
}

.expense-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--error);
}

.search-bar-container input {
  background: none;
  border: none;
  color: var(--text-primary);
  outline: none;
  font-size: 13px;
  width: 100%;
}

/* Tarjetas de Proyectos y Clientes */
.project-list, 
.client-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card, 
.client-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-card:hover, 
.client-card:hover {
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.project-title {
  font-size: 13px;
  font-weight: 600;
}

.project-client-name {
  font-size: 11px;
  color: var(--text-secondary);
}

.project-tag-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 600;
}

.tag-specialty {
  background-color: rgba(129, 140, 248, 0.15);
  color: var(--accent-secondary);
}

.tag-status {
  background-color: rgba(100, 116, 139, 0.15);
  color: var(--text-secondary);
}

.tag-status.en-progreso {
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--accent-primary);
}

.tag-status.completado {
  background-color: rgba(52, 211, 153, 0.15);
  color: var(--accent-success);
}

.tag-status.cotización {
  background-color: rgba(251, 191, 36, 0.15);
  color: var(--accent-warning);
}

.project-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.project-price {
  font-size: 14px;
  font-weight: 700;
}

/* Barra de Navegación de la App */
.phone-nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background-color: #0c111d;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 10;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color 0.2s;
}

.nav-item i {
  width: 20px;
  height: 20px;
}

.nav-item span {
  font-size: 9px;
  font-weight: 500;
}

.nav-item.active {
  color: var(--accent-primary);
}

/* Pantalla del Creador de Presupuesto */
.estimate-meta {
  background-color: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
}

.estimate-meta h4 {
  font-size: 13px;
  font-weight: 600;
}

.estimate-meta p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-title-row h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filas del Presupuesto */
.estimate-item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.estimate-item-row input {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  outline: none;
  font-family: var(--font-sans);
  width: 100%;
}

.btn-remove-row {
  background: none;
  border: none;
  color: var(--accent-danger);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.btn-remove-row i {
  width: 16px;
  height: 16px;
}

.totals-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.total-row.grand-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}

.btn-save-estimate {
  width: 100%;
}

/* Detalle de Proyecto */
.project-detail-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-card h4 {
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  margin-bottom: 4px;
}

.info-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.info-value {
  font-size: 13px;
  margin-bottom: 8px;
}

/* Vista de Factura */
.invoice-view-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.invoice-summary-box {
  background-color: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  font-family: monospace;
  font-size: 11px;
  white-space: pre-wrap;
  color: #38bdf8; /* Color terminal azul celeste */
  max-height: 300px;
  overflow-y: auto;
}

/* Panel de Desarrollo (Derecho) */
.dev-panel {
  flex: 1.8;
  background-color: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-header h2 {
  font-size: 22px;
  font-weight: 700;
}

.panel-header p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

/* Pestañas */
.tabs-container {
  display: flex;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s, border-bottom-color 0.2s;
  margin-bottom: -2px;
}

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.tab-content.active {
  display: flex;
}

/* Firebase Inspector Tab */
.collection-selector-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.col-btn {
  background-color: var(--bg-workspace);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.col-btn.active {
  background-color: var(--accent-primary);
  color: var(--bg-workspace);
  border-color: var(--accent-primary);
}

.inspector-card {
  background-color: var(--bg-workspace);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 350px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.02);
}

.collection-title {
  font-size: 13px;
}

.btn-small {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.inspector-card pre {
  margin: 0;
  padding: 16px;
  flex: 1;
  overflow: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #34d399; /* Emerald 400 - Terminal de Datos */
}

.helper-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.inline-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent-primary);
}

/* FlutterFlow Guide Tab */
.flutterflow-guide {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flutterflow-guide h3 {
  font-size: 16px;
  font-weight: 600;
}

.flutterflow-guide p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.code-box-wrapper {
  background-color: var(--bg-workspace);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.code-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.btn-copy {
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  cursor: pointer;
  font-weight: 600;
}

.btn-copy:hover {
  background-color: rgba(56, 189, 248, 0.2);
}

.code-box-wrapper pre {
  padding: 16px;
  margin: 0;
  overflow: auto;
  max-height: 250px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #e2e8f0;
}

/* Barra de Filtros de Estado */
.status-filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.status-filter-row::-webkit-scrollbar {
  height: 2px;
}

.status-filter-row::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 2px;
}

.filter-chip {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.filter-chip:hover {
  background-color: var(--bg-card-hover);
}

.filter-chip.active {
  border-color: var(--accent-primary);
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--accent-primary);
}

/* Reportes Financieros y Gráficos */
.financial-report-section {
  margin-bottom: 24px;
}

.financial-report-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.report-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.tax-hold-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tax-hold-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.tax-hold-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.tax-hold-row strong {
  color: var(--text-primary);
}

.tax-hold-row.total {
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
  font-weight: 600;
  color: var(--text-primary);
}

.tax-hold-row.total strong {
  color: var(--accent-warning);
}

/* Responsivo para móviles y tabletas */
@media (max-width: 900px) {
  body {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
  .workspace {
    flex-direction: column;
    height: auto;
  }
  .panel {
    width: 100% !important;
    height: auto;
  }
  .mobile-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 40px 16px;
  }
  .dev-panel {
    padding: 24px 16px;
  }
  .inspector-card {
    min-height: 250px;
    height: 350px;
  }
}
