/* CSS Mínimo y Funcional - MMR Studio App MVP */
:root {
  --primary: #0070f3;
  --primary-hover: #005bb5;
  --success: #137333;
  --success-bg: #e6f4ea;
  --success-border: #bbf7d0;
  --warning: #856404;
  --warning-bg: #fff3cd;
  --warning-border: #ffc107;
  --error: #c5221f;
  --error-bg: #fce8e6;
  --error-border: #f8bbd0;
  --info: #1a73e8;
  --info-bg: #e8f0fe;
  --info-border: #c5d9f7;
  --text-main: #111;
  --text-muted: #555;
  --text-light: #777;
  --border: #e0e0e0;
  --border-light: #eee;
  --bg-main: #f9f9f9;
  --bg-card: #fff;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px rgba(0, 112, 243, 0.15);
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.5;
}

.is-hidden {
  display: none !important;
}

/* =========================================
   Typography & Utilities
   ========================================= */
.text-center { text-align: center; }
.empty-text, .empty-list { color: #999; font-size: 0.85em; font-style: italic; }
.section-title { color: #333; margin-bottom: 20px; border-bottom: 2px solid var(--primary); padding-bottom: 10px; display: inline-block; }

/* =========================================
   Layouts
   ========================================= */
.dashboard-layout { padding: 20px; max-width: 1200px; margin: 0 auto; }
.dashboard-header { margin-bottom: 30px; border-bottom: 2px solid var(--border-light); padding-bottom: 10px; }
.dashboard-main { display: grid; grid-template-columns: 1fr; gap: 40px; }
.dashboard-section { background: var(--bg-card); padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 40px; }
.grid-3-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.viewer-layout { padding: 20px; max-width: 900px; margin: 0 auto; background: var(--bg-card); box-shadow: var(--shadow-sm); min-height: 100vh; }

  [data-viewer="b2c"] .viewer-layout { max-width: 700px; }

  .viewer-header, [data-viewer="b2c"] .viewer-header { text-align: center; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid var(--border-light); }
/* =========================================
   Forms & Inputs
   ========================================= */
input[type="text"], input[type="number"], input[type="tel"], select, textarea {
  width: 100%; padding: 8px 12px; box-sizing: border-box; border: 1px solid #ccc; border-radius: var(--radius-sm); font-family: inherit; font-size: 0.95em; transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; }
label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 0.9em; }
.checkbox-label, .radio-label { display: inline-flex; align-items: center; gap: 8px; font-weight: normal; cursor: pointer; }
.checkbox-label input, .radio-label input { width: 16px; height: 16px; cursor: pointer; }

fieldset { border: 1px solid #ccc; border-radius: var(--radius-sm); padding: 15px; margin-bottom: 15px; background: #fafafa; }
legend { font-weight: bold; padding: 0 8px; background: #fafafa; }
.fieldset-desc { margin: 0 0 10px 0; font-size: 0.85em; color: var(--text-muted); }

/* =========================================
   Buttons
   ========================================= */
button { font-family: inherit; cursor: pointer; transition: background 0.2s, transform 0.1s; }
button:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: white; border: none; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: bold; font-size: 1em; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-whatsapp { display: inline-block; background: #25D366; color: #fff; text-decoration: none; padding: 14px 30px; border-radius: var(--radius-md); font-weight: bold; font-size: 1.1em; box-shadow: 0 4px 6px rgba(37,211,102,0.3); transition: transform 0.2s; }
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(37,211,102,0.4); }

.btn-aprobar, .btn-reabrir, .btn-duplicar, .btn-deploy, .btn-undeploy, .btn-copy { padding: 4px 8px; border-radius: var(--radius-sm); font-size: 0.8em; font-weight: bold; border: 1px solid; }
.btn-aprobar { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.btn-reabrir { background: #f1f3f4; color: #5f6368; border-color: #dadce0; }
.btn-duplicar { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.btn-deploy { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.btn-undeploy { background: var(--error-bg); color: var(--error); border-color: var(--error-border); }
.btn-copy { background: #e0e0e0; border: none; font-size: 1em; padding: 6px; }

/* =========================================
   Badges
   ========================================= */
.badge { padding: 4px 10px; border-radius: 12px; font-size: 0.8em; font-weight: bold; border: 1px solid transparent; display: inline-block; }
.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-error { background: var(--error-bg); color: var(--error); border-color: var(--error-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.badge-b2b { background: #111; color: white; border-radius: 20px; text-transform: uppercase; letter-spacing: 1px; }
.badge-colegio { background: var(--primary); color: white; text-transform: uppercase; }

/* =========================================
   Cards & Lists
   ========================================= */
.colegio-card { border: 1px solid var(--border); padding: 15px; border-radius: var(--radius-sm); background: var(--bg-card); display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.colegio-card h3 { margin: 0 0 5px 0; }
.colegio-info { margin: 0; font-size: 0.9em; color: var(--text-muted); }

.propuesta-card { border: 1px solid var(--border); padding: 14px; border-radius: var(--radius-md); background: #fafafa; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.propuesta-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border-light); }
.propuesta-header .card__title { margin: 0; }
.propuesta-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; row-gap: 6px; }
.propuesta-summary { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }
.propuesta-summary p { margin: 0; font-size: 0.9em; }
.propuesta-actions--primary { margin-bottom: 8px; }
.propuesta-actions--secondary { margin-top: 12px; }
.propuesta-details { border-top: 1px solid var(--border-light); padding-top: 8px; }
.propuesta-details summary { cursor: pointer; font-weight: bold; color: var(--info); }
.propuesta-details__content { padding-top: 10px; }
.propuesta-details__section { margin-bottom: 10px; }
.propuesta-details__section h4 { margin: 0 0 4px; font-size: 0.9em; }
.propuesta-details__section p { margin: 4px 0; font-size: 0.9em; }

.paquete-card { flex: 1; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); display: flex; flex-direction: column; overflow: hidden; position: relative; box-shadow: var(--shadow-sm); min-width: 100px;}
.paquete-card.is-premium { border: 2px solid var(--primary); box-shadow: var(--shadow-md); transform: translateY(-5px); transition: transform 0.2s; }
.paquete-badge { background: var(--primary); color: white; padding: 5px 0; text-align: center; font-weight: bold; font-size: 0.85em; letter-spacing: 1px; }
.paquete-content { padding: 20px; display: flex; flex-direction: column; flex: 1;}
.paquete-nombre { margin: 0 0 10px 0; font-size: 1.4em; color: var(--text-main); }
.paquete-precio { font-size: 1.4em; font-weight: bold; margin: 0 0 8px 0; color: var(--primary); }
.paquete-precio-big { font-size: 2.2em; font-weight: bold; margin-bottom: 15px; color: var(--text-main); }
.paquete-desc { color: var(--text-muted); margin-bottom: 20px; flex: 1; }

.paquete-entregables { border-top: 1px solid var(--border-light); padding-top: 15px; margin-top: auto;}
.paquete-entregables h4 { margin: 0 0 15px 0; color: #444; font-size: 0.9em; text-transform: uppercase; }
.paquete-entregables ul, .entregables-list { list-style: none; padding: 0; margin: 0; }
.entregables-list li { font-size: 0.85em; color: #444; margin-bottom: 5px; padding-left: 15px; position: relative; }
.entregables-list li::before { content: "•"; position: absolute; left: 0; color: var(--primary); }

.entregable-item { margin-bottom: 12px; display: flex; align-items: flex-start; gap: 10px; }
.entregable-icon { font-size: 1.2em; line-height: 1; }
.entregable-title { font-weight: bold; color: #333; }
.entregable-meta { font-size: 0.85em; color: var(--text-light); }
.size-tag { font-size: 0.8em; background: #eee; padding: 2px 6px; border-radius: 4px; color: #555; margin-left: 5px; }

/* =========================================
   Dashboard Forms Specifics
   ========================================= */
.colegio-form, .propuesta-form { display: flex; flex-direction: column; gap: 15px; }
.entregables-container { margin-top: 10px; border-top: 1px dashed #ccc; padding-top: 15px; }
.entregables-title { font-size: 0.85em; font-weight: bold; margin: 0 0 10px 0; color: #444; }
.entregable-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 10px; align-items: end; background: #fff; padding: 10px; border-radius: 4px; border: 1px solid #eee;}
.portafolios-fields, .logistica-fields, .cta-fields { display: flex; flex-direction: column; gap: 8px; }
.portafolio-label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9em; cursor: pointer; }
.portafolio-desc { color: var(--text-muted); }

/* =========================================
   Galleries
   ========================================= */
.gallery-section { margin-top: 50px; border-top: 2px solid var(--border-light); padding-top: 30px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; margin-top: 15px; }
.gallery-item { margin-bottom: 30px; }
.gallery-title { text-align: center; color: #333; margin-bottom: 5px; }
.gallery-desc { text-align: center; color: var(--text-muted); margin-top: 0; margin-bottom: 15px; font-size: 0.9em; }
.gallery-img-container { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.gallery-img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-img-container:hover img { transform: scale(1.05); }

.portafolio-preview { display: flex; align-items: center; gap: 8px; background: #f0fdf4; padding: 4px 8px; border-radius: var(--radius-sm); border: 1px solid #bbf7d0; }
.portafolio-name { color: #166534; font-size: 0.75em; font-weight: bold; }
.portafolio-imgs { display: flex; gap: 4px; }
.portafolio-img-thumb { width: 30px; height: 30px; border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.portafolio-img-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================
   Deploy & Analytics
   ========================================= */
.deploy-container { margin-top: 15px; padding: 15px; background: #f8f9fa; border: 1px solid #e2e8f0; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.deploy-url-group { flex: 1; min-width: 250px; }
.deploy-url-field { display: flex; align-items: center; gap: 8px; }
.deploy-url-label { font-size: 0.85em; font-weight: bold; color: var(--text-muted); white-space: nowrap; }
.deploy-url-input { flex: 1; background: #fff; }
.deploy-actions-group { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.preview-links { display: flex; gap: 10px; }
.preview-link { text-decoration: none; font-size: 0.85em; color: var(--info); font-weight: bold; }
.preview-link:hover { text-decoration: underline; }

/* =========================================
   CTA Sections
   ========================================= */
.cta-section { margin-top: 50px; background: var(--bg-main); padding: 40px 20px; border-radius: var(--radius-lg); text-align: center; border: 1px solid var(--border); }
.cta-title { margin-top: 0; color: var(--text-main); font-size: 1.8em; }
.cta-desc { color: var(--text-muted); margin-bottom: 25px; max-width: 500px; margin-left: auto; margin-right: auto; }
.form-b2b-cta { display: flex; flex-direction: column; gap: 12px; max-width: 450px; margin: 0 auto; text-align: left; }
.paquetes-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.modulos-grid { display: flex; flex-wrap: wrap; gap: 10px; }

/* =========================================
   Onboarding & Reserva Page
   ========================================= */
.reserva-layout {
  max-width: 750px;
  margin: 40px auto;
  padding: 30px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.reserva-header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 20px;
}
.reserva-title {
  margin: 10px 0 5px;
  font-size: 2em;
  color: var(--primary);
}
.reserva-subtitle {
  color: var(--text-muted);
  margin: 0;
}

/* Progress Tracker */
.reserva-progress {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 40px;
  padding: 0 10px;
}
.reserva-progress::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9em;
  transition: all 0.3s;
}
.step-label {
  font-size: 0.8em;
  color: var(--text-light);
  margin-top: 8px;
  font-weight: 500;
}
.progress-step.is-active .step-num {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(0, 112, 243, 0.2);
}
.progress-step.is-active .step-label {
  color: var(--primary);
  font-weight: bold;
}
.progress-step.is-complete .step-num {
  border-color: var(--success);
  background: var(--success);
  color: white;
}
.progress-step.is-complete .step-label {
  color: var(--success);
}

/* Form Steps */
.step-pane {
  display: none;
}
.step-pane.is-active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.step-title {
  font-size: 1.4em;
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}
.step-desc {
  font-size: 0.9em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.step-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

/* Package Options */
.paquetes-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}
.paquete-option-card {
  display: flex;
  flex-direction: column;
  padding: 15px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.paquete-option-card input[type="radio"] {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 18px;
  height: 18px;
}
.paquete-option-card.is-selected {
  border-color: var(--primary);
  background: var(--info-bg);
}
.option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.option-name {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-main);
}
.option-price {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--primary);
  margin-right: 30px; /* Leave space for radio */
}
.option-desc {
  font-size: 0.9em;
  color: var(--text-muted);
  margin: 0;
}

/* Form layouts */
.form-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-field {
  display: flex;
  flex-direction: column;
}
.field-fullwidth {
  grid-column: span 2;
}

/* Students Card Row */
.students-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}
.student-row-card {
  border: 1.5px solid var(--border);
  padding: 20px;
  border-radius: var(--radius-md);
  background: #fafafa;
  position: relative;
}
.row-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
}
.student-card-title {
  margin: 0;
  font-size: 1.1em;
  color: var(--text-main);
}
.btn-remove-student {
  background: none;
  border: none;
  color: var(--error);
  font-weight: bold;
  font-size: 0.85em;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.btn-remove-student:hover {
  background: var(--error-bg);
}
.btn-add-student {
  width: 100%;
  padding: 12px;
  background: none;
  border: 2px dashed var(--primary);
  border-radius: var(--radius-md);
  color: var(--primary);
  font-weight: bold;
  font-size: 0.95em;
  margin-bottom: 20px;
}
.btn-add-student:hover {
  background: var(--info-bg);
}

/* Summary details */
.resumen-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.resumen-section h3 {
  font-size: 1em;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.resumen-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fafafa;
}
.summary-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1em;
}
.summary-price {
  font-weight: bold;
  color: var(--primary);
}
.summary-details-list p {
  margin: 5px 0;
  font-size: 0.95em;
}
.resumen-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-estudiante-row {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  gap: 15px;
}
.estudiante-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: bold;
}
.estudiante-details {
  flex: 1;
}
.est-name {
  margin: 0;
  font-weight: bold;
  font-size: 0.95em;
}
.est-class {
  margin: 2px 0 0;
  font-size: 0.8em;
  color: var(--text-muted);
}
.reserva-error-msg {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-top: 15px;
  font-size: 0.9em;
  font-weight: 500;
}

/* Discovery Questionnaire */
.discovery-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.discovery-student-card {
  background: #fafafa;
  border: 1px solid var(--border);
  padding: 25px;
  border-radius: var(--radius-lg);
}
.discovery-card-title {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--primary);
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 8px;
}
.discovery-finish-buttons {
  display: flex;
  gap: 15px;
}

/* Propuesta B2C page styles */
.btn-reserva-paquete {
  display: block;
  margin-top: 15px;
  padding: 10px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  text-align: center;
  transition: background 0.2s;
}
.btn-reserva-paquete:hover {
  background: var(--primary-hover);
}
.btn-discovery-link {
  display: block;
  text-decoration: none;
  margin-top: 10px;
  font-size: 0.95em;
  font-weight: bold;
}
.cta-text-divider {
  margin: 15px 0 5px;
  font-size: 0.85em;
  color: var(--text-light);
  text-transform: uppercase;
}

/* =========================================
   Discovery Print Styles (F-0014)
   ========================================= */
#discovery-print-area {
  display: none;
}

@media print {
  /* Default print behavior: hide nav, header, etc. for cleaner prints */
  .sidebar, .dashboard-header, .btn-primary, .btn-secondary {
    display: none !important;
  }
  .dashboard-main {
    margin-left: 0;
    padding: 0;
  }

  /* Si el body tiene clases especiales, aislar la impresión */
  body.print-mode-discovery * {
    visibility: hidden;
  }
  body.print-mode-discovery #discovery-print-area,
  body.print-mode-discovery #discovery-print-area * {
    visibility: visible;
  }
  body.print-mode-discovery #discovery-print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  body.print-mode-gafetes * {
    visibility: hidden;
  }
  body.print-mode-gafetes #gafetes-print-area,
  body.print-mode-gafetes #gafetes-print-area * {
    visibility: visible;
  }
  body.print-mode-gafetes #gafetes-print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  body.print-mode-agenda * {
    visibility: hidden;
  }
  body.print-mode-agenda #agenda-result-container,
  body.print-mode-agenda #agenda-result-container * {
    visibility: visible;
  }
  body.print-mode-agenda #agenda-result-container {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }

  .print-page-break {
    page-break-after: always;
  }
  
  /* Tarjetas Discovery para el Fotógrafo */
  .discovery-print-card {
    border: 2px solid #000;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    display: block;
  }
  .print-card-header {
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .print-card-student {
    margin: 0;
    font-size: 1.6em;
    font-weight: bold;
  }
  .print-card-meta {
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
  }
  .print-questions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .print-q-row {
    font-size: 1.05em;
    line-height: 1.4;
  }
  .print-q-label {
    font-weight: bold;
    margin-right: 5px;
  }
  .print-q-val {
    border-bottom: 1px solid #777;
    display: inline;
  }
  .print-q-notes {
    margin-top: 10px;
    border-top: 1px dashed #777;
    padding-top: 10px;
  }
}

/* =========================================
   Dashboard Discovery List Styling
   ========================================= */
.discovery-dashboard-card {
  border: 1px solid var(--border);
  padding: 15px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: 15px;
}
.discovery-dashboard-card-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.discovery-dashboard-card-meta {
  font-size: 0.9em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.discovery-dashboard-card-answers {
  font-size: 0.85em;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.discovery-dashboard-card-answers p {
  margin: 2px 0;
}

/* =========================================
   Agenda Dashboard & Print Styles (F-0015, F-0016)
   ========================================= */

.agenda-form-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius-md);
}

.agenda-config-grid {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.agenda-salones-container {
  margin-top: 20px;
  background: #f9f9f9;
  padding: 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.agenda-salones-label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
}

.agenda-salon-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 10px 15px;
  margin-bottom: 5px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.agenda-salon-controls button {
  background: none;
  border: 1px solid var(--border-light);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
}

.btn-generate-agenda {
  margin-top: 20px;
  width: 100%;
}

.agenda-result-container {
  margin-top: 30px;
}

.agenda-action-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.agenda-table-responsive {
  overflow-x: auto;
}

.agenda-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.agenda-table th {
  padding: 12px;
  border-bottom: 2px solid var(--border);
  background: var(--bg-card);
}

.agenda-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
}

/* =========================================
   Gafetes Print Styles (F-0027)
   ========================================= */

#gafetes-print-area {
  display: none;
}

.gafetes-page-print {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  page-break-after: always;
}

.gafete-card-print {
  border: 2px dashed #ccc;
  padding: 20px;
  text-align: center;
  box-sizing: border-box;
  height: 45vh; /* Ajuste para que quepan 2 filas en una página A4 */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gafete-header {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: #555;
}

.gafete-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gafete-secuencia {
  font-size: 3em;
  margin: 0 0 10px 0;
  color: #000;
}

.gafete-qr {
  width: 150px;
  height: 150px;
}

.gafete-footer {
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.gafete-nombre {
  margin: 0 0 5px 0;
  font-size: 1.4em;
}

.gafete-salon {
  font-size: 1.1em;
  color: #333;
}

/* =========================================
   Agenda extracted styles (Sprint 6)
   ========================================= */
.agenda-config-grid {
  grid-template-columns: repeat(4, 1fr);
}

#btn-generate-slots {
  margin-top: 15px;
  width: 100%;
}

.agenda-th-time {
  width: 150px;
}

.agenda-action-buttons {
  margin-top: 20px;
}

.agenda-action-buttons .btn-primary {
  flex: 1;
}

.agenda-slot-select {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* =========================================
   Produccion extracted styles (Sprint 6)
   ========================================= */
#produccion-reiniciar {
  margin-left: 12px;
}

.produccion-progress-fill {
  height: 100%;
  background: #0070f3;
  border-radius: 4px;
  transition: width 0.3s;
}

.produccion-etapa-fill {
  height: 100%;
  background: #0070f3;
  border-radius: 4px;
  transition: width 0.3s;
}

.produccion-empty-val {
  color: #999;
}

/* =========================================
   Reserva extracted styles (Sprint 6)
   ========================================= */
.reserva-grado-readonly {
  background: #f5f5f5;
}

.reserva-confirmation {
  text-align: center;
  padding: 40px 20px;
}

.reserva-confirm-icon {
  font-size: 3em;
  margin-bottom: 15px;
}

.reserva-confirmation h2 {
  color: #2e7d32;
}

.reserva-confirm-text {
  color: #555;
  margin: 15px 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.reserva-confirm-actions {
  margin-top: 30px;
}

#btn-close-window.btn-secondary {
  padding: 10px 20px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  color: #333;
}

/* =========================================
   Propuestas-list extracted styles (Sprint 6)
   ========================================= */
.prop-grado-line {
  margin-bottom: 3px;
}

.card-section--empty.is-empty {
  margin-top: 8px;
}

.propuesta-grados-salones {
  margin-top: 10px;
  font-size: 0.9em;
  background: #f9f9f9;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #eee;
}

.grados-label {
  display: block;
  margin-bottom: 5px;
  color: #555;
}

@media (max-width: 640px) {
  .propuesta-header {
    flex-direction: column;
  }

  .propuesta-actions {
    align-items: stretch;
  }
}

/* =========================================
   Tracker extracted styles (Sprint 6)
   ========================================= */
.tracker-estado--borrador {
  background-color: #f3f4f6;
  color: #6b7280;
}

.tracker-estado--enviada {
  background-color: #dbeafe;
  color: #2563eb;
}

.tracker-estado--aprobada {
  background-color: #dcfce7;
  color: #16a34a;
}

.tracker-estado--rechazada {
  background-color: #fee2e2;
  color: #dc2626;
}

.tracker-estado--vencida {
  background-color: #fff7ed;
  color: #ea580c;
}

.tracker-estado {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: bold;
}

/* =========================================
   Toast & Modal (Fase 6 — feedback inline)
   ========================================= */
.feedback--toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 0.95em;
  font-weight: 500;
  max-width: 420px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: opacity 0.3s;
}
.feedback--toast.is-hidden {
  opacity: 0;
}
.feedback--success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.feedback--error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}
.feedback--info {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
}
.feedback--warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-message {
  margin: 0 0 24px;
  font-size: 1.05em;
  line-height: 1.5;
  color: #222;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.btn-confirm {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.95em;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}
.btn-confirm:hover {
  background: var(--primary-hover);
}
.btn-cancel {
  padding: 10px 24px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.95em;
  cursor: pointer;
  background: #fff;
  color: #555;
}
.btn-cancel:hover {
  background: #f5f5f5;
}
