/* ============================================
   GAD CORTADOR — main.css
   Estética: industrial / utilitarian
   Tipografía: DM Sans + DM Mono
   ============================================ */

/* ── Variables ── */
:root {
  --c-bg:         #F4F3F0;
  --c-surface:    #FFFFFF;
  --c-border:     #E0DED9;
  --c-text:       #1A1917;
  --c-text-muted: #7A7870;
  --c-accent:     #D4500A;       /* naranja óxido — GAD */
  --c-accent-dim: #F0D5C8;
  --c-success:    #2A7A4B;
  --c-success-bg: #D4EDE0;
  --c-warning:    #C47A00;
  --c-warning-bg: #FFF0CC;

  --step-active:    var(--c-accent);
  --step-done:      var(--c-success);
  --step-pending:   var(--c-border);

  --radius:    6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);

  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  --header-h: 56px;
  --stepper-h: 72px;
  --nav-h: 64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.app-header {
  height: var(--header-h);
  background: var(--c-text);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.brand-name {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--c-accent);
}
.brand-sep {
  color: #444;
  font-weight: 300;
}
.brand-sub {
  font-size: .85rem;
  color: #AAA;
  font-weight: 300;
  letter-spacing: .02em;
}
.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: #888;
  font-family: var(--font-mono);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-success);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── Stepper ── */
.stepper {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  height: var(--stepper-h);
  position: sticky;
  top: var(--header-h);
  z-index: 90;
}
.stepper-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: default;
  user-select: none;
}
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--step-pending);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .25s, background .25s;
  position: relative;
}
.step-num {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
  color: var(--c-text-muted);
  transition: color .25s, opacity .25s;
}
.step-check {
  position: absolute;
  width: 16px;
  height: 16px;
  color: #fff;
  opacity: 0;
  transition: opacity .2s;
}
.step-label {
  font-size: .7rem;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .25s;
}

/* Step states */
.step-item[data-state="active"] .step-circle {
  border-color: var(--step-active);
  background: var(--step-active);
}
.step-item[data-state="active"] .step-num {
  color: #fff;
}
.step-item[data-state="active"] .step-label {
  color: var(--step-active);
}
.step-item[data-state="done"] .step-circle {
  border-color: var(--step-done);
  background: var(--step-done);
}
.step-item[data-state="done"] .step-num {
  opacity: 0;
}
.step-item[data-state="done"] .step-check {
  opacity: 1;
}
.step-item[data-state="done"] .step-label {
  color: var(--step-done);
}

.step-connector {
  flex: 1;
  height: 1px;
  background: var(--c-border);
  margin: 0 8px;
  margin-bottom: 20px; /* align with circles */
  transition: background .3s;
}
.step-connector.done {
  background: var(--step-done);
}

/* ── Main content ── */
.app-main {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-h) + 24px);
}
.step-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Step headings ── */
.step-heading {
  margin-bottom: 28px;
}
.step-tag {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: .1em;
  display: block;
  margin-bottom: 6px;
}
.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.2;
}
.step-desc {
  font-size: .9rem;
  color: var(--c-text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Cards ── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card + .card {
  margin-top: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  height: 40px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background .15s, color .15s, opacity .15s, transform .1s;
  white-space: nowrap;
}
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.btn:active { transform: scale(.98); }
.btn:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--c-accent);
  color: #fff;
}
.btn-primary:not(:disabled):hover {
  background: #BF4509;
}

.btn-ghost {
  background: transparent;
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
}
.btn-ghost:not(:disabled):hover {
  background: var(--c-bg);
  color: var(--c-text);
}

.btn-outline {
  background: transparent;
  color: var(--c-accent);
  border: 1px solid var(--c-accent);
}
.btn-outline:not(:disabled):hover {
  background: var(--c-accent-dim);
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: .8rem;
}

/* ── Nav footer ── */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.step-counter {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--c-text-muted);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--c-text);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 200;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error {
  background: #C0392B;
}

/* ── Form elements ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-dim);
}
.form-input::placeholder {
  color: #C0BEB9;
}

/* ── Utility ── */
.text-muted  { color: var(--c-text-muted); }
.text-mono   { font-family: var(--font-mono); }
.text-sm     { font-size: .8rem; }
.text-accent { color: var(--c-accent); }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ── Step 1: Catálogo de materiales ── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.material-card {
  border: 2px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  background: var(--c-surface);
}
.material-card:hover {
  border-color: #C0BEB9;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.material-card.selected {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-dim);
}
.material-swatch {
  height: 100px;
  border-bottom: 2px solid transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
}
.material-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s, transform .2s;
}
.material-check svg { width: 12px; height: 12px; }
.material-card.selected .material-check {
  opacity: 1;
  transform: scale(1);
}
.material-swatch-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.material-name {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.material-finish {
  font-size: .7rem;
  font-weight: 400;
}
.material-price {
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--c-text);
  font-weight: 500;
}

/* Selected info bar */
.selected-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.selected-swatch {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 2px solid var(--c-border);
  flex-shrink: 0;
}
.selected-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.selected-price {
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Step 2: Import y tabla de piezas ── */

/* Zona import */
.import-zone { padding: 0; overflow: hidden; }

.drop-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  border-bottom: 1px solid var(--c-border);
  text-align: center;
  transition: background .15s;
  cursor: default;
}
.drop-area.drag-over {
  background: var(--c-accent-dim);
}
.drop-area.import-ok {
  background: var(--c-success-bg);
}
.drop-area.import-err {
  background: #FEE8E7;
}
.drop-icon {
  color: var(--c-text-muted);
  margin-bottom: 4px;
}
.drop-title {
  font-weight: 600;
  font-size: .95rem;
  color: var(--c-text);
}
.drop-sub {
  font-size: .82rem;
  color: var(--c-text-muted);
  margin-bottom: 4px;
}

.import-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  flex-wrap: wrap;
}
.import-cols {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--c-text);
  background: var(--c-bg);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--c-border);
  flex: 1;
}

/* Tabla */
.pieces-section {}
.pieces-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pieces-title {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--c-accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.table-wrap {
  padding: 0;
  overflow-x: auto;
}
.pieces-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.pieces-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: .7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.pieces-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
.piece-row:last-child td { border-bottom: none; }

.col-name  { min-width: 160px; }
.col-dim   { width: 110px; }
.col-qty   { width: 80px; }
.col-area  { width: 110px; white-space: nowrap; }
.col-del   { width: 40px; text-align: center; }

/* Inputs inside table */
.form-input.input-dim,
.form-input.input-qty {
  text-align: right;
  font-family: var(--font-mono);
  font-size: .82rem;
}
.form-input.input-name { width: 100%; }

/* Delete button */
.btn-delete-row {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--c-text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-delete-row:hover {
  background: #FEE8E7;
  color: #C0392B;
}

.table-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--c-text-muted);
  font-size: .875rem;
}

.pieces-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--c-bg);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  font-size: .82rem;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .step-label { display: none; }
  .stepper-inner { padding: 0 16px; }
  .step-content { padding: 20px 16px; }
  .nav-inner { padding: 0 16px; }
  .step-counter { display: none; }
}

/* ── Step 3: Canteado ── */

.edge-global {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.edge-global-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.edge-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
}
.edge-card + .edge-card { margin-top: 8px; }

.edge-card-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.edge-piece-index {
  font-size: .72rem;
  color: var(--c-text-muted);
  flex-shrink: 0;
}
.edge-piece-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.edge-piece-name {
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.edge-piece-dims { font-size: .75rem; }

.edge-sides-count {
  font-size: .75rem;
  font-weight: 500;
  color: var(--c-text-muted);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 99px;
  padding: 3px 10px;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
  flex-shrink: 0;
}
.edge-sides-count.has-sides {
  background: var(--c-accent-dim);
  color: var(--c-accent);
  border-color: var(--c-accent);
}

.edge-diagram-wrap { flex-shrink: 0; }
.edge-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}
.edge-middle-row {
  display: flex;
  align-items: center;
}

.edge-preview {
  width: 72px;
  height: 56px;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edge-preview-dims {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--c-text-muted);
  text-align: center;
  line-height: 1.4;
}

.edge-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.edge-btn:hover { opacity: .7; }

.edge-line {
  display: block;
  background: var(--c-border);
  border-radius: 3px;
  transition: background .2s;
}

.edge-top, .edge-bottom {
  width: 72px;
  height: 14px;
  padding: 4px 0;
}
.edge-top .edge-line, .edge-bottom .edge-line {
  width: 100%;
  height: 6px;
}

.edge-left, .edge-right {
  width: 14px;
  height: 56px;
  padding: 0 4px;
}
.edge-left .edge-line, .edge-right .edge-line {
  width: 6px;
  height: 100%;
}

.edge-btn.active .edge-line { background: var(--c-accent); }
.edge-btn:not(.active):hover .edge-line { background: var(--c-accent-dim); }

@media (max-width: 600px) {
  .edge-card { flex-direction: column; align-items: flex-start; }
  .step-label { display: none; }
  .stepper-inner { padding: 0 16px; }
  .step-content { padding: 20px 16px; }
  .nav-inner { padding: 0 16px; }
  .step-counter { display: none; }
}

/* ── Step 4: Distribución de cortes ── */

.layout-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.layout-stat {
  flex: 1;
  min-width: 100px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.layout-stat.accent {
  border-color: var(--c-accent);
  background: var(--c-accent-dim);
}
.layout-stat-num {
  font-size: 1.5rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--c-text);
  line-height: 1;
}
.layout-stat.accent .layout-stat-num {
  font-size: 1rem;
  color: var(--c-accent);
}
.layout-stat-label {
  font-size: .72rem;
  color: var(--c-text-muted);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sheets-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sheet-wrap {
  padding: 12px;
  overflow: hidden;
}
.sheet-canvas {
  display: block;
  width: 100%;
  border-radius: 4px;
}

/* Leyenda */
.legend { padding: 16px 20px; }
.legend-title {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  margin-bottom: 12px;
}
.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.legend-dims { white-space: nowrap; }

/* ── Step 5: Resumen ── */

.summary-header { padding: 20px; }
.summary-order-info {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.summary-material-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.summary-material-dot {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.1);
  flex-shrink: 0;
}

/* Precios */
.pricing-card { padding: 20px; }
.section-title {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--c-text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pricing-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pricing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--c-border);
}
.pricing-row:last-child { border-bottom: none; }
.pricing-label {
  font-weight: 500;
  min-width: 110px;
}
.pricing-detail {
  flex: 1;
}
.pricing-value {
  font-weight: 500;
}
.pricing-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: var(--c-text);
  border-radius: var(--radius);
  margin-top: 10px;
  color: #fff;
  font-weight: 600;
}
.pricing-total-value {
  font-size: 1.15rem;
  color: #fff;
}

/* Tabla resumen de piezas */
.pieces-list { padding: 20px; }
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.summary-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: .7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
}
.summary-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
.summary-table tr:last-child td { border-bottom: none; }


/* Tags de canteado en el resumen */
.edge-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.edge-tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  background: var(--c-accent-dim);
  color: var(--c-accent);
  border: 1px solid var(--c-accent);
  border-radius: 3px;
  padding: 1px 5px;
}

/* Acciones finales */
.summary-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.summary-actions .btn { min-width: 160px; justify-content: center; }

/* ── Modal de confirmación ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,25,23,.5);
  backdrop-filter: blur(3px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s;
}
.modal-overlay.show { opacity: 1; }

.modal-box {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-md);
  transform: translateY(8px);
  transition: transform .25s;
  text-align: center;
}
.modal-overlay.show .modal-box { transform: translateY(0); }

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-success-bg);
  color: var(--c-success);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.modal-body {
  font-size: .875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.modal-actions .btn { min-width: 120px; justify-content: center; }

/* ── Step 1: Datos del cliente ── */
.client-form {
  display: flex;
  flex-direction: column;
  padding: 24px;
  max-width: 480px;
}
.phone-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}
.phone-prefix {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--c-border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--c-bg);
  font-family: var(--font-mono);
  font-size: .875rem;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.input-phone {
  border-radius: 0 var(--radius) var(--radius) 0 !important;
  flex: 1;
}

/* Import colapsable */
.import-details {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  overflow: hidden;
}
.import-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.import-summary:hover { color: var(--c-text); }
.import-details[open] .import-summary { color: var(--c-text); }