/* ============================================
   LaserDesign - Dark Industrial Neon Theme
   ============================================ */

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

/* ---- CSS Variables ---- */
:root {
  --bg-0: #080c10;
  --bg-1: #0d1117;
  --bg-2: #111820;
  --bg-3: #161e2b;
  --bg-card: #0f1622;
  --border: rgba(255,107,53,0.18);
  --border-bright: rgba(255,107,53,0.45);

  --neon-orange: #ff6b35;
  --neon-orange-2: #ff8c5a;
  --neon-gold: #ffd166;
  --neon-red: #ff3a3a;
  --neon-cyan: #00d4ff;

  --text-primary: #e8eaf0;
  --text-secondary: #8b96a8;
  --text-muted: #4a5568;

  --font-display: 'Orbitron', monospace;
  --font-body: 'Inter', sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 40px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
  --shadow-glow: 0 0 30px rgba(255,107,53,0.2);
  --shadow-glow-strong: 0 0 60px rgba(255,107,53,0.35);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-0);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 26px;
  zoom: 1;
}

/* ---- Background Grid ---- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,107,53,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,53,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.bg-grid::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 30%, rgba(255,107,53,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 70%, rgba(0,212,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}

/* ---- Header (Mantener tamaño normal original) ---- */
.site-header, #navbarContainer, header, nav, .navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,12,16,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  zoom: 0.82;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 8px rgba(255,107,53,0.5));
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255,107,53,0.4)); }
  50% { filter: drop-shadow(0 0 14px rgba(255,107,53,0.8)); }
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.logo-sub {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--neon-orange);
  letter-spacing: 4px;
  margin-top: 2px;
}

.nav-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255,107,53,0.08);
  border: 1px solid rgba(255,107,53,0.2);
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 32px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--neon-orange);
  background: rgba(255,107,53,0.1);
  border: 1px solid rgba(255,107,53,0.3);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--neon-orange) 0%, var(--neon-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.7;
}

/* ---- Hero Visual / Plate Preview ---- */
.hero-visual {
  display: flex;
  justify-content: center;
}

.scanning-effect {
  position: relative;
  width: 280px;
  height: 220px;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-orange), transparent);
  box-shadow: 0 0 12px var(--neon-orange);
  z-index: 2;
  animation: scan 3s linear infinite;
  top: 0;
}

@keyframes scan {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.plate-preview {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  box-shadow: var(--shadow-glow);
}

.plate-inner {
  width: 100%;
  height: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.plate-grid {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-content: flex-start;
}

.plate-piece-block {
  background: rgba(255,107,53,0.15);
  border: 1px solid rgba(255,107,53,0.5);
  border-radius: 3px;
  animation: fadeInBlock 0.3s ease;
}

@keyframes fadeInBlock {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.plate-label {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 8px;
  font-family: var(--font-display);
}

/* ---- Main Content ---- */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---- Card ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: visible;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,107,53,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.step-number {
  position: absolute;
  top: -14px;
  left: 28px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--neon-orange);
  background: var(--bg-card);
  padding: 2px 12px;
  border: 1px solid var(--border-bright);
  border-radius: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 0;
  flex-wrap: wrap;
}

.card-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,107,53,0.1);
  border: 1px solid rgba(255,107,53,0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-orange);
  flex-shrink: 0;
}

.card-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.card-subtitle {
  font-size: 22px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.card-body {
  padding: 24px 28px 28px;
}

/* ---- Form Elements ---- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.span-2 {
  grid-column: 1 / -1;
}

label {
  font-size: 26px;
  color: var(--text-secondary);
  font-weight: 700;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all var(--transition);
  outline: none;
}

/* Custom File Uploads */
.file-upload-wrapper {
  position: relative;
  width: 100%;
  height: 45px;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-dummy {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-1);
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  color: var(--text-muted);
  transition: all var(--transition);
  z-index: 1;
}

.file-input:hover + .file-dummy {
  border-color: var(--neon-orange);
  color: var(--neon-orange);
  background: rgba(255,107,53,0.05);
}

.file-input:focus + .file-dummy {
  border-color: var(--neon-orange);
  box-shadow: 0 0 0 2px rgba(255,107,53,0.2);
}

.file-text {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Inputs ---- */
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: rgba(13,17,23,0.8);
  border: 1px solid rgba(255,107,53,0.2);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 28px;
  padding: 13px 16px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input:hover, select:hover {
  border-color: rgba(255,107,53,0.35);
}

input:focus, select:focus {
  border-color: var(--neon-orange);
  box-shadow: 0 0 0 3px rgba(255,107,53,0.12), 0 0 16px rgba(255,107,53,0.1);
  background: rgba(13,17,23,1);
}

input::placeholder { color: var(--text-muted); }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  padding-right: 48px;
}

.input-wrapper .input-prefix + input {
  padding-left: 28px;
  padding-right: 52px;
}

.input-prefix {
  position: absolute;
  left: 12px;
  color: var(--neon-gold);
  font-weight: 600;
  font-size: 14px;
  z-index: 1;
  pointer-events: none;
}

.input-unit {
  position: absolute;
  right: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--neon-orange);
  background: rgba(255,107,53,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

/* ---- Select wrapper ---- */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  padding-right: 36px;
  cursor: pointer;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neon-orange);
  font-size: 10px;
  pointer-events: none;
}

/* ---- Info strip ---- */
.info-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,107,53,0.06);
  border: 1px solid rgba(255,107,53,0.18);
  border-radius: var(--radius-sm);
  margin-top: 20px;
  overflow: hidden;
}

.info-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
}

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

.info-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--neon-orange);
}

.info-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,107,53,0.18);
  flex-shrink: 0;
}

/* ---- Btn Add Piece ---- */
.btn-add {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,107,53,0.1);
  border: 1px solid rgba(255,107,53,0.4);
  color: var(--neon-orange);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-add:hover {
  background: rgba(255,107,53,0.2);
  border-color: var(--neon-orange);
  box-shadow: 0 0 20px rgba(255,107,53,0.25);
  transform: translateY(-1px);
}

.btn-add span {
  font-size: 18px;
  line-height: 1;
  margin-top: -2px;
}

/* ---- Pieces Empty State ---- */
.pieces-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: rgba(255,107,53,0.2);
  display: block;
}

.pieces-empty p { font-size: 14px; line-height: 1.8; }
.pieces-empty strong { color: var(--text-secondary); }

/* ---- Piece Item ---- */
.piece-item {
  border: 1px solid rgba(255,107,53,0.18);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  animation: slideIn 0.3s ease;
  background: rgba(255,107,53,0.03);
}

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

.piece-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,107,53,0.06);
  border-bottom: 1px solid rgba(255,107,53,0.12);
}

.piece-number-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-orange);
  background: rgba(255,107,53,0.1);
  border: 1px solid rgba(255,107,53,0.3);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.piece-name-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-size: 17px !important;
  font-weight: 600;
  color: var(--text-primary) !important;
}

.piece-name-input:focus {
  box-shadow: none !important;
}

.btn-remove-piece {
  background: none;
  border: 1px solid rgba(255,58,58,0.25);
  color: rgba(255,58,58,0.5);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-remove-piece:hover {
  background: rgba(255,58,58,0.15);
  border-color: var(--neon-red);
  color: var(--neon-red);
  box-shadow: 0 0 12px rgba(255,58,58,0.2);
}

.piece-body {
  padding: 16px;
}

/* ---- Piece Summary Bar ---- */
.piece-summary {
  display: flex;
  gap: 0;
  margin-top: 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,107,53,0.12);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ps-item {
  flex: 1;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid rgba(255,107,53,0.1);
}

.ps-item:last-child { border-right: none; }

.ps-item span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.ps-item strong {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--neon-gold);
  font-weight: 600;
}

/* ---- Breakdown Table ---- */
.breakdown-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 12px;
  padding: 16px 20px;
  font-size: 26px;
  transition: background var(--transition);
}

.breakdown-row.header-row {
  background: rgba(255,107,53,0.08);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-orange);
}

.breakdown-row:not(.header-row):hover {
  background: rgba(255,107,53,0.04);
}

.breakdown-placeholder {
  padding: 24px 18px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  font-style: italic;
}

/* ---- Totals ---- */
.totals-block {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,107,53,0.06);
}

.total-row.grand {
  border-top: 1px solid rgba(255,107,53,0.35);
  border-bottom: none;
  margin-top: 8px;
  padding-top: 16px;
}

.total-label {
  font-size: 24px;
  color: var(--text-secondary);
}

.total-row.grand .total-label {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.total-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-secondary);
}

.grand-value {
  font-size: 44px;
  color: var(--neon-orange);
  text-shadow: 0 0 20px rgba(255,107,53,0.5);
}

@keyframes totalPop {
  0%   { transform: scale(0.85); opacity: 0.4; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1);    opacity: 1; }
}

/* ---- Action Buttons ---- */
.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-export {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 700;
  padding: 16px 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-orange), #e84d1c);
  color: #fff;
  border-color: var(--neon-orange);
  box-shadow: 0 4px 20px rgba(255,107,53,0.35);
  flex: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,107,53,0.5);
  background: linear-gradient(135deg, #ff7d4a, var(--neon-orange));
}

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.1);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.btn-export {
  background: rgba(0,212,255,0.08);
  color: var(--neon-cyan);
  border-color: rgba(0,212,255,0.25);
}

.btn-export:hover {
  background: rgba(0,212,255,0.15);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0,212,255,0.2);
  transform: translateY(-1px);
}

.btn-save {
  background: rgba(255,209,102,0.08);
  color: var(--neon-gold);
  border-color: rgba(255,209,102,0.25);
}

.btn-save:hover {
  background: rgba(255,209,102,0.15);
  border-color: var(--neon-gold);
  box-shadow: 0 0 20px rgba(255,209,102,0.2);
  transform: translateY(-1px);
}

/* ---- Summary card accent ---- */
.summary-card {
  border-color: rgba(255,107,53,0.3);
  background: linear-gradient(135deg, rgba(255,107,53,0.04) 0%, var(--bg-card) 50%);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--bg-3);
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--shadow-glow);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
  max-width: 320px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 20px 32px;
  }
  .hero-visual { display: none; }
  .header-inner { padding: 14px 20px; }
  .main-content { padding: 0 20px 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }
  .breakdown-row { grid-template-columns: 1fr 1fr; }
  .breakdown-row.header-row span:nth-child(3),
  .breakdown-row.header-row span:nth-child(4),
  .breakdown-row span:nth-child(3),
  .breakdown-row span:nth-child(4) { display: none; }
  .action-buttons { flex-direction: column; }
  .btn-primary, .btn-secondary, .btn-export { flex: none; width: 100%; justify-content: center; }
}

@media (max-width: 600px) {
  .card-header { flex-wrap: wrap; }
  .btn-add { order: 3; width: 100%; justify-content: center; }
  .piece-summary { flex-direction: column; }
  .ps-item { border-right: none; border-bottom: 1px solid rgba(255,107,53,0.1); }
  .ps-item:last-child { border-bottom: none; }
  .info-strip { flex-direction: column; }
  .info-divider { width: 100%; height: 1px; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: rgba(255,107,53,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,107,53,0.5); }

/* ===== QUOTES MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-1);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  width: 92%;
  max-width: 900px;
  max-height: 87vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 40px rgba(255,107,53,0.08);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.5px;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  transition: color 0.2s;
  padding: 0;
}

.btn-close:hover { color: var(--neon-orange); }

/* ---- Product Card Grid ---- */
.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-content: start;
}

.quote-list-item {
  background: var(--bg-card);
  border: 1px solid rgba(255,107,53,0.15);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.quote-list-item:hover {
  border-color: var(--neon-orange);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(255,107,53,0.22);
}

/* Photo zone */
.quote-card-image {
  width: 100%;
  height: 155px;
  background: linear-gradient(135deg, rgba(255,107,53,0.06) 0%, rgba(0,0,0,0.3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,107,53,0.1);
}

.quote-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.quote-list-item:hover .quote-card-image img {
  transform: scale(1.07);
}

/* Placeholder (no photo) */
.quote-no-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255,107,53,0.35);
  width: 100%;
  height: 100%;
}

.quote-no-image svg {
  width: 46px;
  height: 46px;
  stroke: rgba(255,107,53,0.35);
}

.quote-no-image span {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,107,53,0.3);
}

/* DXF badges overlay */
.quote-dxf-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dxf-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0,212,255,0.55);
  color: var(--neon-cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  transition: all var(--transition);
}

.dxf-badge:hover {
  background: rgba(0,212,255,0.15);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0,212,255,0.3);
  transform: translateY(-1px);
}

/* Info area below photo */
.btn-delete-quote {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,58,58,0.55);
  color: var(--neon-red);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  z-index: 10;
}

.btn-delete-quote:hover {
  background: rgba(255,58,58,0.25);
  box-shadow: 0 0 12px rgba(255,58,58,0.4);
  transform: scale(1.1);
  color: #fff;
}

.quote-card-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.quote-card-info h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-card-info .quote-date {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.quote-card-price {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--neon-orange);
  font-weight: 700;
  margin-top: 10px;
  text-shadow: 0 0 14px rgba(255,107,53,0.35);
}

/* ---- Lamina elements styles ---- */
.lamina-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.btn-add-lamina {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 209, 102, 0.1) 100%);
  border: 1px dashed rgba(255, 107, 53, 0.5);
  color: var(--neon-orange);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-add-lamina:hover {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.25) 0%, rgba(255, 209, 102, 0.2) 100%);
  border-color: var(--neon-orange);
  border-style: solid;
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.35);
  transform: translateY(-2px);
}

.btn-add-lamina span {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.lamina-item {
  position: relative;
  background: rgba(15, 22, 34, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  transition: all var(--transition);
}

.lamina-item:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow-glow);
}

.lamina-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px stroke rgba(255, 255, 255, 0.08);
}

.lamina-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--neon-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-remove-lamina {
  background: rgba(255, 58, 58, 0.12);
  border: 1px solid rgba(255, 58, 58, 0.4);
  color: var(--neon-red);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  line-height: 1;
}

.btn-remove-lamina:hover {
  background: rgba(255, 58, 58, 0.3);
  border-color: var(--neon-red);
  box-shadow: 0 0 12px rgba(255, 58, 58, 0.5);
  transform: scale(1.1);
  color: #fff;
}

/* ---- Rendimiento de Lámina y Piezas por Lámina ---- */
.piece-yield-card {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.04) 0%, rgba(255, 184, 0, 0.03) 100%);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.piece-yield-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-gold));
  border-radius: 4px 0 0 4px;
}

.piece-yield-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.piece-yield-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.piece-yield-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.piece-yield-lamina-tag {
  font-size: 12px;
  color: #fff;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.yield-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 12px;
}

.yield-metric-box {
  background: rgba(15, 22, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all var(--transition);
}

.yield-metric-box:hover {
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(15, 22, 34, 0.9);
  transform: translateY(-2px);
}

.yield-metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.yield-metric-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.yield-metric-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.yield-tag-laser {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}

/* Yield summary block in quotes */
.yield-summary-container {
  margin-top: 24px;
  background: rgba(15, 22, 34, 0.6);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  padding: 18px 20px;
}

.yield-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.yield-summary-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.yield-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.yield-summary-table th {
  color: var(--text-muted);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.yield-summary-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.yield-summary-table tr:last-child td {
  border-bottom: none;
}

/* ---- Catálogo de Láminas (Preset Selector) ---- */
.lamina-catalog-group {
  transition: border-color var(--transition), box-shadow var(--transition);
}
.lamina-catalog-group:hover {
  border-color: rgba(255, 107, 53, 0.6) !important;
}
.select-lamina-catalog {
  height: 46px !important;
  border-color: rgba(255, 107, 53, 0.4) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  background-color: rgba(13, 17, 23, 0.85) !important;
}
.select-lamina-catalog:focus {
  border-color: var(--neon-orange) !important;
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.28) !important;
}
.btn-save-lamina-to-catalog {
  height: 46px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  background: rgba(255, 107, 53, 0.15) !important;
  color: var(--neon-orange, #ff6b35) !important;
  border: 1.5px solid rgba(255, 107, 53, 0.5) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
}
.btn-save-lamina-to-catalog:hover {
  background: rgba(255, 107, 53, 0.3) !important;
  border-color: var(--neon-orange, #ff6b35) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 16px rgba(255, 107, 53, 0.35) !important;
}

/* ---- Catálogo de Piezas (Barra Rápida) ---- */
.piece-catalog-row {
  background: rgba(0, 212, 255, 0.07) !important;
  padding: 12px 18px !important;
  border-radius: 10px !important;
  border: 1.5px dashed rgba(0, 212, 255, 0.45) !important;
  margin: 10px 14px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3) !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
}
.piece-catalog-row:hover {
  border-color: rgba(0, 212, 255, 0.75) !important;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15) !important;
}
.piece-catalog-label {
  color: var(--neon-cyan, #00d4ff) !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.select-piece-catalog {
  height: 46px !important;
  border: 1.5px solid rgba(0, 212, 255, 0.4) !important;
  background: #0f1622 !important;
  color: #ffffff !important;
  padding: 8px 36px 8px 14px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
  width: 100% !important;
}
.select-piece-catalog:focus {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.3) !important;
}
.btn-save-piece-to-catalog {
  height: 46px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  background: rgba(34, 197, 94, 0.15) !important;
  color: #22c55e !important;
  border: 1.5px solid rgba(34, 197, 94, 0.5) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
}
.btn-save-piece-to-catalog:hover {
  background: rgba(34, 197, 94, 0.3) !important;
  border-color: #22c55e !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3) !important;
}

.btn-save-lamina-to-catalog {
  height: 46px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  background: rgba(255, 107, 53, 0.15) !important;
  color: var(--neon-orange, #ff6b35) !important;
  border: 1.5px solid rgba(255, 107, 53, 0.5) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
}
.btn-save-lamina-to-catalog:hover {
  background: rgba(255, 107, 53, 0.3) !important;
  border-color: #ff6b35 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 16px rgba(255, 107, 53, 0.35) !important;
}
.select-lamina-catalog {
  height: 46px !important;
  border: 1.5px solid rgba(255, 107, 53, 0.4) !important;
  background: #0f1622 !important;
  color: #ffffff !important;
  padding: 8px 36px 8px 14px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  outline: none !important;
  width: 100% !important;
}
.select-lamina-catalog:focus {
  border-color: var(--neon-orange, #ff6b35) !important;
  box-shadow: 0 0 16px rgba(255, 107, 53, 0.3) !important;
}

.custom-material-group {
  animation: fadeIn 0.25s ease-out;
}
.custom-material-input {
  height: 44px !important;
  border: 1.5px solid rgba(255, 107, 53, 0.5) !important;
  background: #0f1622 !important;
  color: #ffffff !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}
.custom-material-input:focus {
  border-color: var(--neon-orange, #ff6b35) !important;
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.35) !important;
  outline: none !important;
}




