:root {
  --cotz-primary:#0c94e9;
  --cotz-text:#111827;
  --cotz-muted:#6b7280;
  --cotz-border:#e5e7eb;
}

#cotizaciones {
  display:block;
  gap:1.5rem;
}

#cotizaciones.full-width {
  display:block;
}

#cotizaciones.hidden {
  display:none !important;
}

#cotizaciones.full-width .cotz-layout {
  display:grid;
  gap:1.5rem;
  grid-template-columns: minmax(280px, 320px) 1fr;
}

#cotizaciones.full-width .cotz-card {
  border:1px solid var(--cotz-border);
  border-radius:16px;
  background:#fff;
  padding:1rem;
  display:flex;
  flex-direction:column;
  gap:.75rem;
}

#cotizaciones.full-width .cotz-title {
  font-size:1.25rem;
  font-weight:700;
}

#cotizaciones.full-width .cotz-list {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:.5rem;
  max-height:480px;
  overflow:auto;
}

#cotizaciones.full-width .cotz-list li {
  border:1px solid var(--cotz-border);
  border-radius:12px;
  padding:.75rem;
  display:flex;
  flex-direction:column;
  gap:.3rem;
  background:#f8fafc;
}

#cotizaciones.full-width .cotz-list li b {
  font-size:.95rem;
}

#cotizaciones.full-width .cotz-list li .muted {
  font-size:.8rem;
  color:var(--cotz-muted);
}

#cotizaciones.full-width .cotz-list-actions {
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}

#cotizaciones.full-width .cotz-list-actions .btn {
  padding:.4rem .8rem;
  border-radius:.6rem;
  border:1px solid transparent;
  background:var(--cotz-primary);
  color:#fff;
  font-size:.85rem;
  cursor:pointer;
}

#cotizaciones.full-width .cotz-list-actions .btn.secondary {
  background:#fff;
  color:var(--cotz-text);
  border-color:var(--cotz-border);
}

#cotizaciones.full-width .cotz-list-actions .btn.danger {
  background:#ef4444;
  border-color:#ef4444;
  color:#fff;
}

#cotizaciones.full-width .cotz-editor-surface {
  border:1px solid var(--cotz-border);
  border-radius:20px;
  background:#fff;
  padding:1.5rem;
  overflow:auto;
  max-height:80vh;
}

#cotizaciones .sheet {
  max-width:900px;
  margin:0 auto;
  padding:32px;
  border:1px solid var(--cotz-border);
  border-radius:16px;
  color:var(--cotz-text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,"Helvetica Neue",Arial,"Noto Sans";
  background:#fff;
  box-sizing:border-box;
}

#cotizaciones header {
  display:flex;
  align-items:center;
  gap:16px;
  justify-content:space-between;
  border-bottom:1px solid var(--cotz-border);
  padding-bottom:16px;
  margin-bottom:20px;
}

#cotizaciones .brand {
  display:flex;
  gap:12px;
  align-items:center;
}

#cotizaciones .logo {
  width:72px;
  height:72px;
  border-radius:12px;
  background:var(--cotz-primary);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:800;
  font-size:20px;
  overflow:hidden;
  border:1px solid transparent;
  position:relative;
}

#cotizaciones .logo.has-image {
  background-color:#fff;
  border-color:var(--cotz-border);
  color:transparent;
  caret-color:#111;
}

#cotizaciones .logo img[data-role="brand-logo"] {
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:inherit;
  image-rendering:auto;
  display:block;
}

#cotizaciones h1 {
  font-size:20px;
  margin:0;
}

#cotizaciones .meta,
#cotizaciones .contact {
  font-size:13px;
  color:var(--cotz-muted);
}

#cotizaciones .grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:12px;
}

#cotizaciones .card {
  padding:12px 14px;
  border:1px solid var(--cotz-border);
  border-radius:12px;
}

#cotizaciones .card h3 {
  margin:0 0 6px;
  font-size:14px;
  color:#111;
}

#cotizaciones table {
  width:100%;
  border-collapse:collapse;
  margin-top:6px;
  border:1px solid var(--cotz-border);
  border-radius:12px;
  overflow:hidden;
}

#cotizaciones thead th {
  text-align:left;
  font-size:13px;
  padding:10px;
  background:#f8fafc;
  border-bottom:1px solid var(--cotz-border);
}

#cotizaciones tbody td {
  padding:10px;
  font-size:14px;
  border-bottom:1px solid var(--cotz-border);
}

#cotizaciones tfoot td {
  padding:10px;
  font-size:14px;
}

#cotizaciones .right {
  text-align:right;
}

#cotizaciones .muted {
  color:var(--cotz-muted);
}

#cotizaciones .section-title {
  margin:16px 0 6px;
  font-weight:700;
}

#cotizaciones .pill {
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border:1px solid var(--cotz-border);
  border-radius:999px;
  font-size:12px;
  color:#111;
  white-space:nowrap;
}

#cotizaciones .note {
  font-size:13px;
  color:var(--cotz-muted);
}

#cotizaciones .signature {
  margin-top:40px;
}

#cotizaciones .divider {
  height:1px;
  background:var(--cotz-border);
  margin:16px 0;
}

#cotizaciones .editor-toolbar {
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin-bottom:1rem;
}

#cotizaciones .editor-toolbar .btn {
  padding:.55rem 1.1rem;
  border-radius:.75rem;
  border:1px solid var(--cotz-border);
  background:#fff;
  color:var(--cotz-text);
  cursor:pointer;
  font-weight:600;
}

#cotizaciones .editor-toolbar .btn.primary {
  background:var(--cotz-primary);
  color:#fff;
  border-color:var(--cotz-primary);
}

#cotizaciones .editor-toolbar .btn.danger {
  background:#ef4444;
  border-color:#ef4444;
  color:#fff;
}

#cotizaciones .items-actions {
  margin-top:.75rem;
}

#cotizaciones .items-actions .btn {
  padding:.4rem .9rem;
  border-radius:.65rem;
  border:1px solid var(--cotz-border);
  background:#fff;
  cursor:pointer;
}

#cotizaciones .empty-state {
  text-align:center;
  padding:1rem;
  color:var(--cotz-muted);
  font-size:.9rem;
}

#cotizaciones .item-actions {
  text-align:right;
}

#cotizaciones .item-actions .btn {
  padding:.3rem .65rem;
  border-radius:.55rem;
  font-size:.8rem;
}

#cotizaciones .item-actions .btn.light {
  background:#fff;
  color:var(--cotz-primary);
  border-color:var(--cotz-border);
}

.cotz-catalog-overlay {
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1.5rem;
  z-index:2500;
}

.cotz-catalog-dialog {
  background:#fff;
  border-radius:16px;
  box-shadow:0 25px 60px rgba(15,23,42,.35);
  width:min(960px, 95vw);
  max-height:90vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.cotz-catalog-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1rem 1.25rem 0.5rem 1.25rem;
}

.cotz-catalog-header h3 {
  margin:0;
  font-size:1.1rem;
}

.cotz-catalog-search {
  padding:0 1.25rem 0.75rem 1.25rem;
}

.cotz-catalog-body {
  flex:1;
  overflow:auto;
  padding:0 1.25rem 1.25rem 1.25rem;
}

.cotz-catalog-body table {
  width:100%;
  border-collapse:collapse;
}

.cotz-catalog-body th,
.cotz-catalog-body td {
  padding:0.55rem 0.5rem;
  border-bottom:1px solid var(--cotz-border);
  vertical-align:top;
}

.cotz-catalog-body th {
  background:#f1f5f9;
  font-size:.9rem;
  text-align:left;
}

.cotz-catalog-body td.right {
  text-align:right;
}

.cotz-catalog-body .muted {
  color:var(--cotz-muted);
}

.cotz-catalog-body .btn {
  white-space:nowrap;
}

@media (max-width: 720px) {
  .cotz-catalog-dialog {
    width:95vw;
  }

  .cotz-catalog-body table {
    font-size:.85rem;
  }
}

@media (max-width: 1024px) {
  #cotizaciones.full-width .cotz-layout {
    grid-template-columns:1fr;
  }
  #cotizaciones.full-width .cotz-editor-surface {
    max-height:none;
  }
}

@media print {
  #cotizaciones .cotz-card:first-child,
  #cotizaciones .cotz-layout > :not(.cotz-editor-surface),
  #cotizaciones .editor-toolbar,
  #cotizaciones .items-actions {
    display:none !important;
  }
  #cotizaciones .cotz-editor-surface {
    border:none;
    padding:0;
  }
  #cotizaciones .sheet {
    border:none;
    border-radius:0;
    margin:0;
  }
}
