.ccp-fin-wrapper {
  position: relative;
  min-height: 100vh;
  padding: 24px;
}

.ccp-fin-step h2 { /* Paso 4 */
  font-size: 27px;
}

.ccp-fin-box {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
}

/* Capa Felicidades */
.ccp-felicidades-layer {
  position: fixed;
  inset: 0;
  background: #e4001b;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
  color: #fff;
}



/* Pantalla final */
.ccp-fin-final {
  position: fixed;
  inset: 0;
  background: #e4001b;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0px;
  z-index: 40;
}

.ccp-fin-back-btn {
  margin-top: 24px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #fff;
  color: #e4001b;
  text-decoration: none;
  font-weight: bold;
}

.hidden { display: none; }


.ccp-admin-wrapper {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 20px;
}

.ccp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.ccp-header-subtitle a {
  font-size: 13px;
  color: #666;
  text-decoration: none;
}

.ccp-admin-layout {
  display: flex;
  position: relative;
}

.ccp-admin-left {
  flex: 1;
}

.ccp-admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ccp-admin-search {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ccp-admin-search input {
  padding: 4px 8px;
}

/* Tabla genérica */
.ccp-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.ccp-admin-table th,
.ccp-admin-table td {
  border: 1px solid #eee;
  padding: 6px 8px;
}

.ccp-admin-table th {
  background: #f5f5f5;
  text-align: left;
}

/* Botones */
.ccp-admin-wrapper button {
  border-radius: 4px;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}

.ccp-btn-primary {
  background: #b00020;
  color: #fff;
}

.ccp-btn-success {
  background: #2e7d32;
  color: #fff;
}

.ccp-btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.ccp-btn-edit {
  background: #1976d2;
  color: #fff;
}

.ccp-btn-delete {
  background: #d32f2f;
  color: #fff;
}

/* Inputs */
.ccp-input-compact {
  width: 100%;
  font-size: 11px;
  padding: 3px 4px;
}

.ccp-input-order {
  width: 80px;
}

/* Modal */
.ccp-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
}

.ccp-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  width: 1000px;
  max-width: 95vw;
  max-height: 90vh;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  overflow: hidden;
  flex-direction: column;
}


/* Activar modal cuando hay cliente seleccionado */
.ccp-modal-open .ccp-modal-overlay {
  display: block;
}
.ccp-modal-open .ccp-modal {
  display: flex;
}

.ccp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #b00020;
  color: #fff;
}

.ccp-modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.ccp-modal-header button {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.ccp-modal-body {
  padding: 16px;
  overflow-y: auto;
}

/* Formulario cliente */
.ccp-client-form {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.ccp-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 10px 16px;
}

.ccp-form-grid label input,
.ccp-form-grid label select {
  width: 100%;
  padding: 4px 6px;
  margin-top: 2px;
}

.ccp-modal-section {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.ccp-modal-section h3 {
  margin: 0 0 8px;
}

.ccp-form-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* Planes */
.ccp-client-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.ccp-plan-checkbox {
  font-size: 13px;
}

/* Combos */
.ccp-combo-new-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.ccp-combo-new-row input[type="text"],
.ccp-combo-new-row input[type="number"] {
  padding: 4px 6px;
}

/* Cartas */
.ccp-cartas-block {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 10px;
}

.ccp-carta-col {
  flex: 1;
  min-width: 220px;
}

.ccp-checkbox-inline {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
}

/* QR */
.ccp-qr-preview img {
  display: block;
  max-width: 180px;
  margin: 10px 0;
}

/* Stats */
.ccp-stats-block {
  margin-top: 4px;
}

.ccp-stats-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 13px;
  margin-bottom: 10px;
}

.ccp-stats-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 12px;
}

.ccp-stats-table-small {
  font-size: 12px;
}


.ccp-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.ccp-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 6px 6px 0 0;
}

.ccp-tab-btn.is-active {
  background: #ffffff;
  border: 1px solid #ddd;
  border-bottom-color: #ffffff;
}

.ccp-tabs-content {
  border: 1px solid #ddd;
  border-radius: 0 8px 8px 8px;
  padding: 12px;
  background: #fff;
}

.ccp-tab-panel {
  display: none;
}

.ccp-tab-panel.is-active {
  display: block;
}

/* Toast container */
#ccp-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Toast base */
.ccp-toast {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  padding: 12px 18px;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 220px;
}

/* Estados */
.ccp-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.ccp-toast-info {
  background: #3498db;
}

.ccp-toast-success {
  background: #2ecc71;
}

.ccp-toast-error {
  background: #e74c3c;
}

.ccp-toast-warning {
  background: #f39c12;
}

.ccp-main-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.ccp-main-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 6px 6px 0 0;
}

.ccp-main-tab-btn.is-active {
  background: #ffffff;
  border: 1px solid #ddd;
  border-bottom-color: #ffffff;
}

.ccp-global-layout {
  border-radius: 8px;
  background: #fafafa;
  padding: 16px;
}

.ccp-global-section {
  margin-bottom: 20px;
}
