:root {
  --bg-color: #e0e5ec;
  --card-bg: rgba(224, 229, 236, 0.82);
  --card-solid: #e4e9f0;
  --shadow-light: #ffffff;
  --shadow-dark: rgba(181, 190, 204, 0.9);
  --shadow-outset: 8px 8px 16px #a3b1c6, -8px -8px 16px #ffffff;
  --shadow-inset: inset 4px 4px 8px #a3b1c6, inset -4px -4px 8px #ffffff;
  --shadow-small: 4px 4px 8px #121416;
  --shadow-hover: 4px 4px 8px #1d4ed8;
  --shadow-pressed: inset 2px 2px 5px #a3b1c6, inset -3px -3px 7px #ffffff;
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --light-color: #f8fafc;
  --dark-color: #1e293b;
  --border-color: #c8d0db;
  --transition: all 0.3s ease;
  --text-color: #2d3748;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  min-height: -webkit-fill-available;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: linear-gradient(135deg, #0c2b44, #09152e, #191e25, #021327, #141516);
  background-size: 400% 400%;
  animation: gradientAnimation 12s ease infinite;
  opacity: 0.85;
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#calculadora-barras-app {
  background: transparent;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;

  border: 2px solid rgba(255, 255, 255, 0.1) !important;  /* AGREGA BORDE */
  border-radius: 20px !important;                         /* AGREGA BORDE REDONDEADO */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;  /* CAMBIA BOX-SHADOW */
  /*padding: 1rem !important;    */
}

#app-header {
  background: var(--shadow-dark);
  color: var(--text-color);
  padding: 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-small);
  position: sticky;
  top: 0;
  z-index: 100;
  /*backdrop-filter: blur(10px);*/
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#app-header h1 {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary-color) !important;
}

.header-actions {
  display: flex;
  gap: 1.2rem;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  font-size: 0.9rem;
  background: var(--card-solid);
  color: var(--text-color);
  box-shadow: var(--shadow-small);
  
}

.btn:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn:active {
 /* box-shadow: var(--shadow-pressed);*/
  transform: translateY(0);
}

.btn-primary {
  background: var(--card-solid);
  color: var(--primary-color);
  box-shadow: var(--shadow-small);
}

.btn-primary:hover {
  background: #f0f9ff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

/*.btn-primary:active {
  /*box-shadow: var(--shadow-pressed);
}*/

#btn-add-cut {
  background: var(--shadow-dark);
  color: var(--primary-dark);
  font-weight: bold;
  box-shadow: var(--shadow-small);
  padding: 0.6rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--dark-color);
 
}

#btn-add-cut:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

#btn-add-cut:active {
  box-shadow: var(--shadow-pressed);
}

.btn-secondary {
  background: var(--card-solid);
  color: var(--text-color);
  box-shadow: var(--shadow-small);
}

.btn-secondary:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn-secondary:active {
  box-shadow: var(--shadow-pressed);
}

#btn-print {
  box-shadow: var(--shadow-small);/*boton imprimir*/
}

#btn-print:hover {
  box-shadow: var(--shadow-hover);
  transform: scale(1.05);
}

#btn-new:hover {
  box-shadow: var(--shadow-hover);
  transform: scale(1.05);
}

#btn-config:hover {
  box-shadow: var(--shadow-hover);
  transform: scale(1.05);
}

#btn-manual:hover {
  box-shadow: var(--shadow-hover);
  transform: scale(1.05);
}

#app-main-content {
  display: flex;
  flex: 1;
  padding: 2.5rem 1rem;
  gap: 1.5rem;
  max-width: 2000px;
  margin: 0 auto;
  width: 100%;
}

#main-visualization {
  flex: 2;
  background: var(--bg-color);/*dfdfdfdfdfdf*/
  border-radius: 16px;
  box-shadow: var(--shadow-small);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 450px;
  max-width: 98%;
  backdrop-filter: blur(8px);
}

#interaction-column {
  width: 380px;
  max-width: 98%;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

#stats-column {
  width: 360px;
  max-width: 98%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#stats-column .stats-item strong {
  font-weight: normal;
}

.visualization-header {
  padding: 1rem;
  border-bottom: 1px solid var(--bg-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  /*background: rgba(224, 229, 236, 0.5);*/
  background: var(--shadow-dark);
}

.visualization-header h2 {
  font-size: 1.2rem;
  color: var(--text-color);
}

.view-controls {
  display: flex;
  gap: 1rem;
  margin: 0 1rem 0.5rem 1rem;
  padding: 0.3rem 0.5rem;
  background: var(--card-solid);
  border-radius: 10px;
  box-shadow: var(--shadow-inset);
  font-size: 0.75rem;
}

.view-controls .checkbox-container {
  margin-bottom: 0;
  gap: 0.3rem;
}

.view-controls .checkbox-container input {
  width: 12px;
  height: 12px;
  margin: 0;
  transform: scale(0.8);
}

.view-controls .checkbox-container label {
  font-size: 0.75rem;
}

.tabs-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tabs-header {
  display: flex;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 0 0.5rem;
}

.tab-btn {
  padding: 0.35rem 1.2rem;
  background: var(--card-solid);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  border-radius: 10px 10px 0 0;
  color: var(--secondary-color);
  box-shadow: var(--shadow-pressed);
  margin-right: 0.3rem;
  position: relative;
}

.tab-btn:hover {
  background: var(--card-solid);
  color: var(--text-color);
  /*box-shadow: var(--shadow-outset);*/
  box-shadow: var(--shadow-pressed);
}

.tab-btn.active {
  color: var(--primary-color);
  background: var(--card-bg);
  /*box-shadow: var(--shadow-pressed);*/
  border-bottom: 2px solid var(--primary-color);
  box-shadow: var(--shadow-outset);
}

.tabs-content {
  flex: 1;
  overflow: auto;
  padding: 1rem;
}

.tab-pane {
  display: none;
  height: 100%;
}

.tab-pane.active {
  display: block;
}

.config-card {
  background: var(--bg-color);
  border-radius: 16px;
  box-shadow: var(--shadow-small);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.card-header {
  padding: 1rem;
  /*background: var(--bg-color);*/
  background: var(--shadow-dark);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-header h3 {
  font-size: 1rem;
  color: var(--text-color);
}

.card-header i {
  color: var(--text-color);
}

.card-content {
  padding: 1rem ;
}

.form-group {
  margin-bottom: 0.8rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  background: var(--card-solid);
  box-shadow: var(--shadow-inset);
  transition: var(--transition);
  color: var(--text-color);
}

.form-control:focus {
  outline: none;
  box-shadow: inset 2px 2px 5px #a3b1c6, inset -3px -3px 7px #ffffff, 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.form-control:disabled {
  background: rgba(224, 229, 236, 0.5);
  color: var(--secondary-color);
  cursor: not-allowed;
  box-shadow: none;
}

.help-text {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--secondary-color);
}

.stats-box {
  background: var(--card-solid);
  border-radius: 12px;
  padding: 0.8rem;
  margin-top: 0.8rem;
  box-shadow: var(--shadow-inset);
}

.stats-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.stats-item:last-child {
  margin-bottom: 0;
}

.bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bar-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-small);
  background: var(--card-bg);
}

.bar-header {
  padding: 0.8rem;
  background: rgba(224, 229, 236, 0.5);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bar-title {
  font-weight: 700;
  color: var(--text-color);
  font-size: 0.9rem;
}

.bar-stats {
  display: flex;
  gap: 0.6rem;
  font-size: 0.7rem;
  flex-wrap: wrap;
}

.bar-stats span {
  background: var(--card-solid);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  box-shadow: var(--shadow-inset);
}

.stat-margin,
.stat-disco,
.stat-desperdicio {
  color: var(--danger-color);
  font-weight: bold;
}

.stat-sobrante {
  color: #024a86;
  font-weight: bold;
}

.bar-diagram {
  padding: 1rem;
  position: relative;
}

.bar-scale {
  height: 40px;
  background: var(--card-solid);
  border-radius: 8px;
  position: relative;
  margin-bottom: 0rem;
  overflow: hidden;
  box-shadow: var(--shadow-inset);
}

.bar-segment {
  height: 100%;
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  transition: var(--transition);
  overflow: hidden;
}

.bar-segment:hover {
  filter: brightness(1.1);
  z-index: 10;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--secondary-color);
  padding: 0.3rem 0.3rem 0 0.3rem;
}

.bar-legend {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.degree-visual {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-weight: bold;
  color: white;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}

.degree-left {
  left: 4px;
}

.degree-right {
  right: 4px;
}

.cuts-list {
  max-height: 250px;
  overflow-y: auto;
  border-radius: 10px;
  margin-top: 0.8rem;
  background: var(--card-solid);
  box-shadow: var(--shadow-inset);
}

.cut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

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

.cut-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cut-length {
  font-weight: 600;
  color: var(--text-color);
}

.cut-quantity {
  background: var(--card-solid);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: bold;
  box-shadow: var(--shadow-inset);
}

.cut-degree {
  background: #dbeafe;
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-size: 0.8rem;
  color: #1d4ed8;
  font-weight: bold;
}

.cut-item button {
  color: var(--danger-color) !important;
  font-size: 16px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--danger-color) !important;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 5px;
  transition: var(--transition);
  font-size: 0.9rem;
}

.btn-icon:hover {
  background: var(--card-solid);
  color: #dc2626 !important;
}

.main-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

#btn-calculate {
  width: 100%;
  padding: 0.9rem;
  font-size: 1.2rem;
  background: var(--shadow-dark);
  color: var(--primary-dark);
  border: 1px solid var(--dark-color);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition);
  box-shadow: var(--shadow-small);
}

#btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

#btn-calculate:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(0);
}

.results-table-container {
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.results-table th {
  background: var(--card-solid);
  padding: 0.7rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
}

.results-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.results-table tr:hover {
  background: rgba(224, 229, 236, 0.5);
}

#app-footer {
  background: var(--shadow-dark);
  /*padding: 5rem 1.5rem;*/
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-small);
  height: 80px;        /* <--- NUEVO */
  min-height: 80px;    /* <--- NUEVO */
}

/* Números/valores del footer */
.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color:var(--primary-color) !important;  /* Cambia a blanco o el color que quieras */
}

/* Etiquetas del footer */
.stat-label {
  font-size: 0.8rem;
  color: #000000 !important;  /* Cambia a gris claro o el color que quieras */
}

.summary-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-box {
  text-align: center;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--shadow-light);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--bg-color);
}

.footer-actions {
  display: flex;
  gap: 0.6rem;
}

.report-content {
  font-size: 14px;
  line-height: 1.5;
}

.report-section {
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.report-bar-header {
  font-weight: bold;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: var(--card-solid);
  border-radius: 8px;
  box-shadow: var(--shadow-inset);
}

.report-cuts-line {
  margin: 0.3rem 0;
  padding-left: 1.2rem;
}

.report-efficiency {
  font-weight: bold;
  color: var(--success-color);
  margin-top: 0.5rem;
}

.report-waste {
  font-weight: bold;
  color: var(--danger-color);
}

.input-group {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.input-group .form-group {
  flex: 1;
  margin-bottom: 0;
}

.quantity-input {
  width: 113px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.checkbox-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.degree-inputs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.degree-inputs select {
  flex: 1;
}

.segment-cut-1 { background-color: #10b981; }
.segment-cut-2 { background-color: #0d9488; }
.segment-cut-3 { background-color: #059669; }
.segment-cut-4 { background-color: #047857; }
.segment-cut-5 { background-color: #065f46; }
.segment-cut-6 { background-color: #064e3b; }
.segment-waste-reusable { background-color: #024a86; }
.segment-waste-disposal { background-color: #ef4444; }
.segment-margin { background-color: #94a3b8; }

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stats-list-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.2rem 0;
  border-bottom: 1px dashed var(--border-color);
}

.stats-list-item:last-child {
  border-bottom: none;
}

.stats-list-label {
  font-weight: 600;
  color: var(--text-color);
}

.stats-list-value {
  font-weight: 700;
  color: var(--primary-color);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  overflow: auto;
}

.modal-content {
  background: var(--card-bg);
  margin: 5% auto;
  padding: 1.5rem;
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  box-shadow: var(--shadow-outset);
  animation: modalFadeIn 0.3s ease;
  backdrop-filter: blur(10px);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
  font-size: 1.3rem;
  color: var(--text-color);
}

.modal-close {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--secondary-color);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger-color);
}

.modal-body {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.modal-column {
  flex: 1;
  min-width: 250px;
}

.modal-footer {
  display: flex !important;
  justify-content: center !important;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 0 0 0;
  border-top: 1px solid var(--border-color);
}

.unlock-checkbox {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border-color);
}

.manual-section {
  margin-bottom: 1.5rem;
}

.manual-section h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.manual-section p {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.manual-section ul {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.manual-section li {
  margin-bottom: 0.3rem;
}

.manual-icon {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.example-box {
  background: var(--card-solid);
  padding: 0.8rem;
  border-radius: 10px;
  border-left: 3px solid var(--primary-color);
  margin-top: 0.5rem;
  box-shadow: var(--shadow-inset);
}

@media (max-width: 768px) {
  .modal-body { flex-direction: column; }
  .modal-content { margin: 10% auto; width: 95%; }
  .view-controls { flex-wrap: wrap; gap: 1rem; }
}

@media (min-width: 769px) {
  .edge-tab,
  .edge-panel,
  .edge-overlay {
    display: none !important;
  }
}

/* === TABLET/iPad (769px - 1024px) === */
@media (max-width: 1024px) {
  #app-main-content {
    flex-wrap: wrap;
    padding: 1.5rem;
    gap: 1.2rem;
  }
  #main-visualization { flex: 100%; order: 1; min-height: 400px; }
  #interaction-column { width: 48%; order: 2; }
  #stats-column { width: 48%; order: 3; }
  #app-header { padding: 0.6rem 1rem; }
  #app-header h1 { font-size: 1.3rem; }
  #app-footer {
    height: auto !important;
    padding: 0.8rem 1rem !important;
    flex-direction: column !important;
    gap: 0.8rem !important;
    text-align: center !important;  /* <--- YA ESTÁ */
    align-items: center !important; /* <--- AGREGA ESTO */
    justify-content: center !important; /* <--- AGREGA ESTO */
    }/*0.6*/
  .btn { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
}

@media (max-width: 1400px) {
  #app-main-content { flex-wrap: wrap; }
  #main-visualization { flex: 100%; order: 1; }
  #interaction-column { width: 48%; order: 2; }
  #stats-column { width: 48%; order: 3; }
}

@media (max-width: 768px) {
  #app-header {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
    padding: 0.8rem;
  }
  .header-actions {
    width: 100%;
    justify-content: center;
  }
  #app-main-content {
    padding: 0.8rem;
    flex-direction: column;
  }
  #main-visualization,
  #interaction-column,
  #stats-column {
    width: 100%;
  }
  .tabs-header { overflow-x: auto; }
  #app-footer {
    height: auto !important;
    padding: 0.8rem 1rem !important;
    flex-direction: column !important;
    gap: 0.8rem !important;
    text-align: center !important;  /* <--- YA ESTÁ */
    align-items: center !important; /* <--- AGREGA ESTO */
    justify-content: center !important; /* <--- AGREGA ESTO */
  }
  .summary-stats { justify-content: center; flex-wrap: wrap; }
  .footer-actions { justify-content: center; }
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: white !important;
    font-size: 11pt;
    line-height: 1.4;
    margin: 0;
    padding: 0;
  }

  body::before {
    display: none !important;
  }

  #app-header,
  #interaction-column,
  #stats-column,
  .tabs-header,
  #app-footer,
  .btn,
  .form-control,
  select,
  input,
  .visualization-actions,
  .header-actions,
  .footer-actions,
  .modal,
  .view-controls,
  .visualization-header,
  #neuralCanvas,
  #neuralCanvasSplash {
    display: none !important;
  }

  #main-visualization {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    position: relative;
  }

  .tab-pane {
    display: none !important;
  }

  #report-view {
    display: block !important;
  }

  #graphic-view,
  #table-view {
    display: none !important;
  }

  @page {
    size: A4;
    margin: 0.8cm;
  }

  .tabs-content,
  #report-view,
  .report-container,
  #printable-report {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
  }

  #printable-report {
    font-size: 11pt !important;
    line-height: 1.5 !important;
    padding: 0.5cm !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    background: white !important;
    box-sizing: border-box !important;
  }

  #printable-report div:first-child {
    margin-bottom: 0.8rem !important;
    padding-bottom: 0.5rem !important;
  }

  #printable-report h1 {
    font-size: 16pt !important;
    margin: 0 !important;
  }

  .report-section {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 0.8rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid #ccc;
  }

  .report-bar-header {
    font-weight: bold;
    margin-bottom: 0.3rem !important;
    padding: 0.3rem !important;
    background: #f0f0f0 !important;
    border-radius: 4px;
    page-break-after: avoid;
    break-after: avoid;
  }

  .report-cuts-line {
    margin: 0.2rem 0 !important;
    padding-left: 0.8rem !important;
    font-size: 10pt !important;
  }

  #printable-report div[style*="margin: 0.5rem 0"] {
    margin: 0.3rem 0 !important;
    padding: 0.3rem !important;
    background: #f9f9f9 !important;
    border-radius: 4px;
    font-size: 10pt !important;
  }

  ::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .segment-cut-1, .segment-cut-2, .segment-cut-3,
  .segment-cut-4, .segment-cut-5, .segment-cut-6 {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .report-section:last-child { page-break-after: auto; }

  #printable-report div[style*="margin-top: 2.5rem"] {
    margin-top: 1rem !important;
  }

  .report-efficiency, [style*="color: var(--success-color)"] {
    color: black !important;
  }

  .bars-container, .report-container, .report-content,
  #printable-report, .tabs-container, #main-visualization {
    overflow: visible !important;
    overflow-y: visible !important;
    max-height: none !important;
    height: auto !important;
    flex: none !important;
    display: block !important;
  }
}

@media (max-width: 768px) {
  #app-header { display: none !important; }
  #btn-calculate { display: none !important; }

  .bars-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-bottom: 0.5rem;
  }
  .bar-card {
    display: inline-block;
    width: 90vw;
    min-width: 320px;
    max-width: 600px;
  }
  .results-table-container { overflow-x: auto; }
  .results-table { min-width: 600px; }

  .edge-tab {
    position: fixed;
    right: 0;
    top: 42%;
    transform: translateY(-50%);
    width: 26px;
    height: 80px;
    background: #c1c9d8d3;
    border: #2c475e solid 2px;
    border-radius: 16px 0 0 16px ;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-small);
    z-index: 5;
  }

  .edge-tab::after {
    content: "\2630";
    color: var(--text-color);
    font-size: 18px;
    font-weight: bold;
  }

  .edge-panel {
    position: fixed;
    top: 50%;
    right: -320px;
    transform: translateY(-50%);
    width: auto;
    max-width: 85vw;
    min-width: 200px;
    min-height: auto;
    max-height: 70vh;
    background: var(--card-bg);
    border-radius: 16px 0 0 16px;
    box-shadow: var(--shadow-small);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 0.9rem;
    overflow-y: auto;
    backdrop-filter: blur(10px);
  }

  .edge-panel.open { right: 0; }

  .edge-buttons {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }

  .edge-btn {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: var(--card-solid);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.7rem;
    box-shadow: var(--shadow-small);
    color: var(--text-color);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .edge-btn:active {
    box-shadow: var(--shadow-pressed);
    transform: scale(0.95);
  }

  .edge-btn span { font-size: 0.65rem; font-weight: 500; color: var(--secondary-color); }

  #edge-calculate { background: transparent; box-shadow: none; }
  #edge-print { background: transparent; box-shadow: none; }
  #edge-config { background: transparent; box-shadow: none; }
  #edge-new { background: transparent; box-shadow: none; }

  .edge-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.664);
    z-index: 998;
    display: none;
  }

  .edge-overlay.show { display: block; }
}

.modal-confirm {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-confirm-content {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 1.5rem;
  width: 90%;
  max-width: 300px;
  text-align: center;
  box-shadow: var(--shadow-outset);
  backdrop-filter: blur(10px);
}

.modal-confirm-content h3 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.modal-confirm-content p {
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

.modal-confirm-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-confirm-cancel {
  padding: 0.5rem 1rem;
  background: var(--danger-color);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: white;
  box-shadow: var(--shadow-small);
}

.btn-confirm-ok {
  padding: 0.5rem 1rem;
  background: #2d3748;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: white;
  box-shadow: var(--shadow-small);
}

 #app-footer {
    height: auto !important;
    padding: 0.8rem 1rem !important;
    flex-direction: column !important;
    gap: 0.8rem !important;
    text-align: center !important;  /* <--- YA ESTÁ */
    align-items: center !important; /* <--- AGREGA ESTO */
    justify-content: center !important; /* <--- AGREGA ESTO */
  }

@media (max-width: 768px) {
  #modal-duplicado .modal-content {
    justify-content: flex-start;
    padding: 1rem !important;
    min-height: 500px !important;
    max-height: 500px;
  }
  #modal-duplicado #mensaje-duplicado {
    margin-bottom: 0.8rem !important;
    padding: 0.7rem !important;
  }
  #modal-duplicado .modal-content div[style*="flex-direction: column"] {
    gap: 0.6rem !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  #modal-duplicado .modal-content button {
    padding: 0.6rem !important;
  }
}

@media (max-width: 480px) {
  #modal-duplicado .modal-content {
    margin: 5% auto !important;
    padding: 0.9rem !important;
  }
}

#modal-duplicado .modal-content {
  min-height: 500px !important;
  max-height: 500px;
}

@keyframes modalConfigEntrada {
  from { opacity: 0; transform: scale(0.9) translateY(-20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 480px) {
  #modal-config-exito .modal-content {
    width: 90%;
    padding: 1.2rem;
  }
  #modal-config-exito .modal-content h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  #interaction-column { order: 1; width: 100%; }
  #main-visualization { order: 2; width: 100%; }
  #stats-column { order: 3; width: 100%; }
}

#btn-manual-footer,
#btn-fullscreen {
  background: var(--card-solid);
  color: var(--text-color);
  border: none;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-small);
}

#btn-manual-footer:hover,
#btn-fullscreen:hover {
  box-shadow: var(--shadow-outset);
}

@media (min-width: 769px) {
  #btn-manual-footer,
  #btn-fullscreen {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .report-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .report-content {
    min-width: 650px;
    width: max-content;
  }
}

#bodyAnimax {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

#overlay-animacionAnimax {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
}

#corte-animadoAnimax {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1e293b;
  border-radius: 24px;
  padding: 0.75rem;
  z-index: 20000;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.maquina-areaAnimax {
  background: #0f172a;
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  border: 2px solid #334155;
}

.regla-superiorAnimax {
  background: #fbbf24;
  border-radius: 8px 8px 0 0;
  padding: 0.3rem 0.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  overflow-x: auto;
}

.regla-marcasAnimax {
  display: flex;
  width: 100%;
  position: relative;
  height: 30px;
}

.marcaAnimax {
  position: absolute;
  top: 0;
  width: 2px;
  background: #1e293b;
  height: 15px;
}

.marcaAnimax.principalAnimax {
  height: 25px;
  background: #dc2626;
}

.marca-labelAnimax {
  position: absolute;
  top: 20px;
  font-size: 0.65rem;
  color: #1e293b;
  font-weight: bold;
  transform: translateX(-50%);
  white-space: nowrap;
}

.barra-containerAnimax {
  position: relative;
  margin-top: 0.5rem;
}

.barra-horizontalAnimax {
  background: linear-gradient(90deg, #10b981, #059669);
  height: 36px;
  width: 100%;
  border-radius: 8px;
  position: relative;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.barra-progreso-corteAnimax {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6b7280, #4b5563);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  left: 0;
}

.disco-corteAnimax {
  position: absolute;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, #ef4444, #b91c1c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), top 0.3s ease;
  left: 0%;
  top: -65px;
  transform: translateX(-50%);
  z-index: 20;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  animation: girarDiscoAnimax 0.3s linear infinite;
}

@keyframes girarDiscoAnimax {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

.texto-medidaAnimax {
  position: absolute;
  background: #fbbf24;
  color: #1e293b;
  padding: 2px 8px;
  border-radius: 16px;
  font-size: 0.7rem;
  font-weight: bold;
  white-space: nowrap;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  top: -30px;
  transform: translateX(-50%);
  z-index: 25;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.texto-medidaAnimax::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 5px solid #fbbf24;
}

@keyframes chispaAnimAnimax {
  0% { opacity: 1; transform: scale(1); background: #f59e0b; }
  100% { opacity: 0; transform: scale(2); background: #fbbf24; }
}

.chispaAnimax {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  animation: chispaAnimAnimax 0.3s ease-out forwards;
  z-index: 30;
}

.info-corteAnimax {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin: 0.5rem 0;
  background: #0f172a;
  padding: 0.8rem;
  border-radius: 14px;
}

.info-corteAnimax span {
  font-size: 1rem;
  font-weight: bold;
  color: #94a3b8;
  animation: cambioColorAnimax 1s linear infinite;
}

.info-corteAnimax strong {
  font-size: 1.5rem;
  color: #fbbf24;
  display: inline;
}

.reloj-containerAnimax {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0rem;
  padding: 0.8rem;
  background: #0f172a;
  border-radius: 12px;
}

.relojAnimax {
  font-size: 1.5rem;
  animation: girarRelojAnimax 1s linear infinite;
}

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

.texto-animadoAnimax {
  font-size: 1rem;
  font-weight: bold;
  animation: cambioColorAnimax 1.5s ease infinite;
}

@keyframes cambioColorAnimax {
  0% { color: #60a5fa; }
  33% { color: #f59e0b; }
  66% { color: #10b981; }
  100% { color: #60a5fa; }
}

.leyendaAnimax {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.65rem;
  color: #64748b;
  flex-wrap: wrap;
}

.leyendaAnimax span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

@media (max-width: 768px) {
  .marca-labelAnimax { font-size: 0.5rem; }
  .regla-marcasAnimax { height: 25px; }
  .marcaAnimax { height: 10px; }
  .marcaAnimax.principalAnimax { height: 18px; }
  .marca-labelAnimax { top: 15px; }
}

@media (max-width: 768px) {
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
  }

  .btn-keyboard-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--card-solid);
    border: none;
    border-radius: 10px;
    padding: 6px 12px;
    color: var(--text-color);
    font-size: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: var(--shadow-small);
  }

  .btn-keyboard-inline:active {
    transform: scale(0.95);
    box-shadow: var(--shadow-pressed);
  }

  .keyboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(3px);
  }

  .keyboard-overlay.active { display: block; }

  .keyboard-panel {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    height: auto;
    min-height: 380px;
    max-height: 80vh;
    width: 90vw;
    max-width: 320px;
    min-width: 260px;
    background: var(--card-bg);
    border-radius: 20px;
    z-index: 10001;
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding: 0.75rem;
    box-shadow: var(--shadow-small);
    opacity: 0;
    pointer-events: none;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    backdrop-filter: blur(10px);
  }

  .keyboard-panel.open {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .keyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
  }

  .keyboard-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .keyboard-field-label {
    font-size: 11px;
    color: var(--secondary-color);
  }

  .keyboard-field-label b {
    color: var(--primary-color);
  }

  .keyboard-dots {
    display: flex;
    gap: 5px;
  }

  .keyboard-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--shadow-dark);
    transition: all 0.2s ease;
  }

  .keyboard-dot.active { background: var(--primary-color); }
  .keyboard-dot.done { background: var(--success-color); }

  .keyboard-close {
    background: var(--danger-color);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 14px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.1s ease;
    flex-shrink: 0;
  }

  .keyboard-close:active { transform: scale(0.95); }

  .keyboard-display {
    background: var(--card-solid);
    border-radius: 17px;
    padding: 8px 10px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: right;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-family: monospace;
    min-height: 40px;
    letter-spacing: 1px;
    flex-shrink: 0;
    box-shadow: var(--shadow-inset);
  }

  .keyboard-display.err { color: var(--danger-color); }

  .keyboard-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex: 1;
    align-content: center;
  }

  .keyboard-grados {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
    flex: 1;
    align-content: center;
  }

  .key-btn {
    background: var(--card-solid);
    border: none;
    border-radius: 12px;
    padding: 0.7rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.1s ease;
    text-align: center;
    box-shadow: var(--shadow-small);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .key-btn:active {
    transform: scale(0.96);
    box-shadow: var(--shadow-pressed);
  }

  .key-btn.del, .key-btn.clr {
    background: var(--card-solid);
    font-size: 0.75rem;
  }

  .grados-btn {
    background: var(--card-solid);
    border: none;
    border-radius: 12px;
    padding: 0.8rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.1s ease;
    text-align: center;
    box-shadow: var(--shadow-small);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .grados-btn:active {
    transform: scale(0.96);
    box-shadow: var(--shadow-pressed);
  }

  .grados-btn.selected {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-pressed);
  }

  .grados-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .current-degree-value {
    background: var(--card-solid);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-inset);
  }

  .current-degree-value span {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
  }

  .validation-msg-key {
    font-size: 0.7rem;
    text-align: center;
    color: var(--success-color);
    margin: 0.25rem 0;
    min-height: 1.2rem;
    flex-shrink: 0;
  }

  .validation-msg-key.err { color: var(--danger-color); }

  .keyboard-apply-btn {
    width: 100%;
    background: var(--card-solid);
    border: none;
    border-radius: 12px;
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.1s ease;
    flex-shrink: 0;
    box-shadow: var(--shadow-small);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .keyboard-apply-btn:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-pressed);
  }

  .keyboard-apply-btn.finish {
    background: var(--success-color);
    color: white;
  }

  #kb-grados-section .current-degree-value {
    margin-top: 0.5rem;
    margin-bottom: 2rem;
  }

  #kb-grados-section .keyboard-grados {
    margin-top: 0.2rem;
    margin-bottom: 0.3rem;
  }

  #kb-grados-section .keyboard-apply-btn {
    margin-top: 1.5rem;
  }
}

/* === SMALL PHONE (<= 480px) === */
@media (max-width: 480px) {
  .modal-content { margin: 5% auto !important; padding: 0.9rem !important; }
  #modal-duplicado .modal-content { margin: 5% auto !important; padding: 0.9rem !important; }
  #modal-config-exito .modal-content { width: 90%; padding: 1.2rem; }
  #modal-config-exito .modal-content h3 { font-size: 1.1rem; }
  .edge-panel { max-width: 80vw; min-width: 160px; }
  .edge-btn { width: 46px; height: 46px; font-size: 1.4rem; }
  .keyboard-panel { max-width: 240px; min-width: 220px; top: 8%; min-height: 340px; }
  .key-btn { padding: 0.6rem 0; font-size: 1rem; }
  .grados-btn { padding: 0.7rem 0; font-size: 1rem; }
  .bar-card { min-width: 280px; }
  #corte-animadoAnimax { padding: 0.5rem; width: 95%; }
  .maquina-areaAnimax { padding: 0.8rem; }
  .info-corteAnimax { flex-direction: column; align-items: center; gap: 6px; padding: 0.5rem; }
  .info-corteAnimax span { font-size: 0.85rem; }
  .info-corteAnimax strong { font-size: 1.2rem; }
  .barra-horizontalAnimax { height: 28px; }
  .disco-corteAnimax { width: 38px; height: 38px; font-size: 1rem; top: -52px; }
  .texto-medidaAnimax { font-size: 0.6rem; top: -26px; }
  .relojAnimax { font-size: 1.2rem; }
  .texto-animadoAnimax { font-size: 0.85rem; }
  .leyendaAnimax { font-size: 0.55rem; gap: 0.5rem; }
  .btn { padding: 0.6rem 0.8rem; font-size: 0.8rem; }
  #app-main-content { padding: 0.6rem; gap: 0.8rem; }
  .card-content { padding: 0.8rem; }
  #cut-quantity,
  .quantity-input,
  input[name="cantidad"],
  input[id*="cantidad"] {
    width: 100px !important; 
  } /* Reduce el ancho */

}

@media (min-width: 769px) {
  .keyboard-panel,
  .keyboard-overlay,
  .edge-keyboard-btn,
  .btn-keyboard-inline {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .casa-movil {
    display: inline-block !important;
    color: #0379ff;
   
  }
}

@media (max-width: 768px) {
  .keyboard-panel { display: flex; }
  .keyboard-overlay { display: none; }
  .keyboard-overlay.active { display: block; }
  .btn-keyboard-inline { display: inline-flex; }
}

#neuralCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

#neuralCanvasSplash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}
