/* ═══════════════════════════════════════════════
   Church Energy — Contract Wizard CSS
   ═══════════════════════════════════════════════ */

/* ── Wrapper ── */
.cew-wrap {
	max-width: 760px;
	margin: 2rem auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #1d2b3a;
}

/* ── Header ── */
.cew-header {
	text-align: center;
	padding: 1.5rem 1rem 1rem;
	border-bottom: 3px solid #e07b39;
	margin-bottom: 1.75rem;
}
.cew-logo { height: 52px; width: auto; }

/* ── Contract badge ── */
.cew-contract-badge {
	text-align: center;
	font-size: .82rem;
	font-weight: 600;
	color: #e07b39;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin-bottom: 1.75rem;
}

/* ── Progress bar ── */
.cew-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin-bottom: 2rem;
	padding: 0 1rem;
}
.cew-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .35rem;
	flex-shrink: 0;
}
.cew-step-circle {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 2.5px solid #d0d7de;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .9rem;
	font-weight: 700;
	color: #8a95a3;
	transition: all .3s ease;
	position: relative;
}
.cew-step-check { display: none; }
.cew-step-label {
	font-size: .72rem;
	color: #8a95a3;
	font-weight: 500;
	white-space: nowrap;
	transition: color .3s;
}
.cew-step-line {
	flex: 1;
	height: 2.5px;
	background: #d0d7de;
	min-width: 24px;
	max-width: 80px;
	margin-bottom: 1.4rem;
	transition: background .3s;
}
/* Active step */
.cew-step--active .cew-step-circle {
	border-color: #e07b39;
	background: #e07b39;
	color: #fff;
	box-shadow: 0 0 0 4px rgba(224,123,57,.18);
}
.cew-step--active .cew-step-label { color: #e07b39; font-weight: 700; }
/* Completed step */
.cew-step--done .cew-step-circle {
	border-color: #27ae60;
	background: #27ae60;
	color: #fff;
}
.cew-step--done .cew-step-num { display: none; }
.cew-step--done .cew-step-check { display: block; }
.cew-step--done .cew-step-label { color: #27ae60; }
.cew-step--done ~ .cew-step-line { background: #27ae60; }

/* ── Panels ── */
.cew-panel {
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 14px;
	padding: 2rem 2rem 1.5rem;
	box-shadow: 0 2px 16px rgba(0,0,0,.06);
	margin: 0 .5rem;
	animation: cewFadeIn .3s ease;
}
.cew-panel--hidden { display: none !important; }

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

.cew-panel-title {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1d3557;
	margin: 0 0 .4rem;
}
.cew-panel-desc {
	font-size: .9rem;
	color: #5a6a7a;
	margin: 0 0 1.5rem;
}

/* ── AI Step ── */
.cew-ai-intro { text-align: center; padding-bottom: 1.25rem; }
.cew-ai-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.cew-ai-buttons {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 1.25rem;
}
.cew-ai-btn {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .75rem 1.5rem;
	border-radius: 10px;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all .2s;
}
.cew-ai-btn--file {
	background: #1d3557;
	color: #fff;
}
.cew-ai-btn--file:hover { background: #14253d; }
.cew-ai-btn--cam {
	background: #fff;
	color: #1d3557;
	border-color: #1d3557;
}
.cew-ai-btn--cam:hover { background: #f0f4f8; }
.cew-ai-preview {
	position: relative;
	text-align: center;
	margin-bottom: 1rem;
}
.cew-ai-preview img {
	max-height: 180px;
	max-width: 100%;
	border-radius: 8px;
	border: 2px solid #e2e8f0;
}
.cew-ai-clear {
	position: absolute;
	top: 4px; right: 4px;
	background: rgba(0,0,0,.55);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 26px; height: 26px;
	cursor: pointer;
	font-size: .85rem;
	line-height: 1;
}
.cew-ai-msg {
	text-align: center;
	padding: .75rem 1rem;
	border-radius: 8px;
	font-size: .9rem;
	margin-bottom: 1rem;
}
.cew-ai-msg--loading { background: #f0f4ff; color: #1d3557; }
.cew-ai-msg--success { background: #ecfdf5; color: #065f46; }
.cew-ai-msg--error   { background: #fef2f2; color: #991b1b; }
.cew-ai-spinner {
	display: inline-block;
	width: 14px; height: 14px;
	border: 2px solid #1d3557;
	border-top-color: transparent;
	border-radius: 50%;
	animation: cewSpin .7s linear infinite;
	vertical-align: middle;
	margin-right: .4rem;
}
@keyframes cewSpin { to { transform: rotate(360deg); } }
.cew-ai-skip {
	text-align: center;
	padding-top: .75rem;
}

/* ── Form fields ── */
.cew-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .85rem 1.25rem;
	margin-bottom: .5rem;
}
@media (max-width: 540px) { .cew-grid-2 { grid-template-columns: 1fr; } }
.cew-field { display: flex; flex-direction: column; gap: .3rem; }
.cew-field--full { grid-column: 1 / -1; }
.cew-field--grow { flex: 1; }
.cew-label {
	font-size: .8rem;
	font-weight: 600;
	color: #374151;
	letter-spacing: .02em;
}
.cew-req { color: #e07b39; }
.cew-input {
	padding: .65rem .85rem;
	border: 1.5px solid #d1d9e0;
	border-radius: 8px;
	font-size: .95rem;
	color: #1d2b3a;
	background: #fff;
	transition: border-color .2s, box-shadow .2s;
	width: 100%;
	box-sizing: border-box;
}
.cew-input:focus {
	outline: none;
	border-color: #e07b39;
	box-shadow: 0 0 0 3px rgba(224,123,57,.15);
}
.cew-input::placeholder { color: #b0bec5; }
.cew-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2rem; }
.cew-field-hint { font-size: .75rem; color: #8a95a3; margin-top: .1rem; }
.cew-input.cew-input--autofill { background: #fffbf0; border-color: #e07b39; }

/* ── CUPS row ── */
.cew-cups-row {
	display: flex;
	gap: .75rem;
	align-items: flex-end;
	margin-bottom: .75rem;
}
.cew-cups-msg {
	font-size: .82rem;
	margin-top: .35rem;
	min-height: 1.2em;
}
.cew-cups-msg--ok    { color: #065f46; }
.cew-cups-msg--error { color: #991b1b; }
.cew-cups-msg--loading { color: #1d3557; }

/* ── Divider ── */
.cew-divider {
	display: flex;
	align-items: center;
	gap: .75rem;
	color: #b0bec5;
	font-size: .8rem;
	margin: 1rem 0;
}
.cew-divider::before, .cew-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e2e8f0;
}

/* ── Toggle group (persona / empresa) ── */
.cew-toggle-group {
	display: flex;
	gap: .5rem;
	margin-bottom: 1.25rem;
}
.cew-toggle {
	flex: 1;
	padding: .65rem;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	background: #f8fafc;
	font-size: .9rem;
	font-weight: 600;
	cursor: pointer;
	color: #5a6a7a;
	transition: all .2s;
}
.cew-toggle--active {
	border-color: #1d3557;
	background: #1d3557;
	color: #fff;
}

/* ── Same address checkbox ── */
.cew-same-address-row { margin: 1rem 0 .75rem; }
.cew-checkbox-label {
	display: flex;
	align-items: center;
	gap: .6rem;
	font-size: .88rem;
	cursor: pointer;
	color: #374151;
}
.cew-checkbox-label input[type=checkbox] {
	width: 17px; height: 17px;
	accent-color: #e07b39;
	cursor: pointer;
}

/* ── SEPA info ── */
.cew-sepa-info {
	display: flex;
	align-items: center;
	gap: .6rem;
	background: #f0f4ff;
	border-radius: 8px;
	padding: .75rem 1rem;
	font-size: .82rem;
	color: #374151;
	margin: 1.25rem 0;
}

/* ── Powers grid ── */
.cew-powers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: .85rem;
	margin-bottom: 1rem;
}
.cew-power-item { display: flex; flex-direction: column; gap: .3rem; }
.cew-power-price { font-size: .75rem; color: #8a95a3; }
.cew-info-box {
	background: #fffbf0;
	border: 1.5px solid #fde68a;
	border-radius: 8px;
	padding: .85rem 1rem;
	font-size: .85rem;
	color: #78350f;
	margin: 1rem 0;
}

/* ── Summary ── */
.cew-summary {
	background: #f8fafc;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.5rem;
}
.cew-summary-section { margin-bottom: 1.1rem; }
.cew-summary-section:last-child { margin-bottom: 0; }
.cew-summary-title {
	font-size: .75rem;
	font-weight: 700;
	color: #e07b39;
	text-transform: uppercase;
	letter-spacing: .06em;
	margin-bottom: .5rem;
	border-bottom: 1px solid #e2e8f0;
	padding-bottom: .35rem;
}
.cew-summary-row {
	display: flex;
	justify-content: space-between;
	font-size: .88rem;
	padding: .2rem 0;
	gap: 1rem;
}
.cew-summary-key { color: #5a6a7a; flex-shrink: 0; }
.cew-summary-val { color: #1d2b3a; font-weight: 600; text-align: right; word-break: break-all; }

/* ── Legal box ── */
.cew-legal-box {
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	margin-bottom: 1.25rem;
}
.cew-legal-scroll {
	max-height: 220px;
	overflow-y: auto;
	padding: 1rem 1.25rem;
	font-size: .78rem;
	line-height: 1.6;
	color: #4b5563;
}
.cew-legal-scroll h4 { font-size: .82rem; color: #1d3557; margin: 0 0 .75rem; }
.cew-legal-scroll p { margin: 0 0 .6rem; }

/* ── Checks ── */
.cew-checks { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.cew-check-label {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	font-size: .88rem;
	cursor: pointer;
	color: #374151;
	line-height: 1.4;
}
.cew-check-label input[type=checkbox] {
	width: 17px; height: 17px;
	accent-color: #e07b39;
	margin-top: .15rem;
	flex-shrink: 0;
}

/* ── Signature pad ── */
.cew-sign-section { margin-bottom: 1.5rem; }
.cew-sign-hint { font-size: .8rem; color: #8a95a3; margin: .2rem 0 .6rem; }
.cew-sign-wrap {
	position: relative;
	border: 2px dashed #d1d9e0;
	border-radius: 10px;
	background: #fafafa;
	display: inline-block;
	width: 100%;
}
.cew-sign-canvas {
	display: block;
	width: 100%;
	height: 160px;
	cursor: crosshair;
	border-radius: 8px;
	touch-action: none;
}
.cew-sign-clear {
	position: absolute;
	top: 8px; right: 10px;
	font-size: .78rem;
	color: #8a95a3;
	background: none;
	border: none;
	cursor: pointer;
	padding: .2rem .5rem;
}
.cew-sign-clear:hover { color: #e07b39; }

/* ── Navigation buttons ── */
.cew-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 1.5rem;
	margin-top: 1rem;
	border-top: 1px solid #f0f4f8;
	gap: .75rem;
}
.cew-btn-primary {
	background: #e07b39;
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: .8rem 1.75rem;
	font-size: .97rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s, transform .1s;
	white-space: nowrap;
}
.cew-btn-primary:hover { background: #c96a28; }
.cew-btn-primary:active { transform: scale(.98); }
.cew-btn-secondary {
	background: #fff;
	color: #1d3557;
	border: 2px solid #1d3557;
	border-radius: 8px;
	padding: .65rem 1rem;
	font-size: .88rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s;
}
.cew-btn-secondary:hover { background: #f0f4f8; }
.cew-btn-ghost {
	background: none;
	color: #5a6a7a;
	border: none;
	font-size: .9rem;
	cursor: pointer;
	padding: .5rem 0;
}
.cew-btn-ghost:hover { color: #1d3557; }
.cew-btn-submit {
	background: #1d3557;
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: .9rem 2rem;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s;
}
.cew-btn-submit:hover { background: #14253d; }
.cew-btn-submit:disabled { background: #b0bec5; cursor: not-allowed; }

/* ── Message box ── */
.cew-msg {
	padding: .85rem 1rem;
	border-radius: 8px;
	font-size: .9rem;
	margin-bottom: 1rem;
}
.cew-msg--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.cew-msg--success { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.cew-msg--loading { background: #f0f4ff; color: #1d3557; border: 1px solid #bfdbfe; }

/* ── Success screen ── */
.cew-success { text-align: center; padding: 2rem 1rem; }
.cew-success-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.cew-success-title { font-size: 1.6rem; font-weight: 700; color: #1d3557; margin: 0 0 .75rem; }
.cew-success-desc { font-size: .95rem; color: #5a6a7a; max-width: 480px; margin: 0 auto 1.25rem; line-height: 1.6; }
.cew-success-ref {
	display: inline-block;
	background: #f0f4ff;
	border-radius: 8px;
	padding: .6rem 1.25rem;
	font-size: .85rem;
	color: #1d3557;
	font-weight: 600;
}

/* ── Validation errors ── */
.cew-input--error { border-color: #ef4444 !important; }
.cew-field-error {
	font-size: .76rem;
	color: #ef4444;
	margin-top: .2rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
	.cew-panel { padding: 1.5rem 1rem; margin: 0; }
	.cew-step-label { font-size: .65rem; }
	.cew-btn-primary, .cew-btn-submit { padding: .75rem 1.2rem; font-size: .9rem; }
}

/* ── Additional classes for v3.3 ── */
.cew-grid { display:grid; grid-template-columns:1fr 1fr; gap:.8rem 1.1rem; margin-bottom:.5rem; }
.cew-f1 { display:flex; flex-direction:column; gap:.3rem; }
.cew-f2 { display:flex; flex-direction:column; gap:.3rem; grid-column: span 2; }
@media(max-width:540px){ .cew-grid{grid-template-columns:1fr;} .cew-f2{grid-column:span 1;} }

.cew-autofill { background:#fffbf0 !important; border-color:#e07b39 !important; transition:background 1s,border-color 1s; }
.cew-input--err { border-color:#ef4444 !important; }
.cew-ferr { font-size:.76rem; color:#ef4444; margin-top:.15rem; }

.cew-cups-msg { font-size:.82rem; margin-top:.35rem; min-height:1.1em; }
.cew-cups-msg--ok      { color:#065f46; }
.cew-cups-msg--err     { color:#991b1b; }
.cew-cups-msg--loading { color:#1d3557; }

.cew-sepa-box { background:#f0f4ff; border-radius:8px; padding:.75rem 1rem; font-size:.82rem; color:#374151; margin:1.25rem 0; }
.cew-infobox  { background:#fffbf0; border:1.5px solid #fde68a; border-radius:8px; padding:.85rem 1rem; font-size:.85rem; color:#78350f; margin:1rem 0; }
.cew-hint     { font-size:.75rem; color:#8a95a3; margin-top:.15rem; }

.cew-toggle-grp  { display:flex; gap:.5rem; margin-bottom:1.25rem; }
.cew-toggle      { flex:1; padding:.65rem; border:2px solid #e2e8f0; border-radius:8px; background:#f8fafc; font-size:.9rem; font-weight:600; cursor:pointer; color:#5a6a7a; transition:all .2s; }
.cew-toggle--on  { border-color:#1d3557; background:#1d3557; color:#fff; }
.cew-checkbox-lbl { display:flex; align-items:center; gap:.6rem; font-size:.88rem; cursor:pointer; color:#374151; }
.cew-checkbox-lbl input { width:17px; height:17px; accent-color:#e07b39; }

.cew-powers-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:.85rem; margin-bottom:1rem; }
.cew-power-item  { display:flex; flex-direction:column; gap:.3rem; }
.cew-power-price { font-size:.75rem; color:#8a95a3; }

/* Summary */
.cew-ssec  { margin-bottom:1rem; }
.cew-stitle{ font-size:.73rem; font-weight:700; color:#e07b39; text-transform:uppercase; letter-spacing:.06em; border-bottom:1px solid #e2e8f0; padding-bottom:.3rem; margin-bottom:.5rem; }
.cew-srow  { display:flex; justify-content:space-between; font-size:.87rem; padding:.18rem 0; gap:1rem; }
.cew-sk    { color:#5a6a7a; flex-shrink:0; }
.cew-sv    { color:#1d2b3a; font-weight:600; text-align:right; word-break:break-all; }

/* Checks */
.cew-checks { display:flex; flex-direction:column; gap:.6rem; margin-bottom:1.5rem; }
.cew-check-lbl { display:flex; align-items:flex-start; gap:.6rem; font-size:.88rem; cursor:pointer; line-height:1.4; }
.cew-check-lbl input { width:17px; height:17px; accent-color:#e07b39; margin-top:.15rem; flex-shrink:0; }

/* Spinner */
.cew-spinner { display:inline-block; width:13px; height:13px; border:2px solid currentColor; border-top-color:transparent; border-radius:50%; animation:cewSpin .7s linear infinite; vertical-align:middle; margin-right:.3rem; }
@keyframes cewSpin{to{transform:rotate(360deg);}}

/* AI section */
.cew-ai-intro { text-align:center; padding-bottom:1rem; }
.cew-ai-icon  { font-size:2.5rem; margin-bottom:.5rem; }
.cew-ai-btns  { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; margin-bottom:1.25rem; }
.cew-ai-btn   { display:flex; align-items:center; gap:.5rem; padding:.75rem 1.5rem; border-radius:10px; font-size:.95rem; font-weight:600; cursor:pointer; border:2px solid transparent; transition:all .2s; }
.cew-ai-btn--file { background:#1d3557; color:#fff; }
.cew-ai-btn--file:hover { background:#14253d; }
.cew-ai-btn--cam  { background:#fff; color:#1d3557; border-color:#1d3557; }
.cew-ai-btn--cam:hover  { background:#f0f4f8; }
.cew-ai-preview { position:relative; text-align:center; margin-bottom:1rem; }
.cew-ai-preview img { max-height:160px; max-width:100%; border-radius:8px; border:2px solid #e2e8f0; }
.cew-ai-clear { position:absolute; top:4px; right:4px; background:rgba(0,0,0,.55); color:#fff; border:none; border-radius:50%; width:26px; height:26px; cursor:pointer; font-size:.85rem; }
.cew-ai-msg { text-align:center; padding:.75rem 1rem; border-radius:8px; font-size:.9rem; margin-bottom:1rem; }
.cew-ai-msg--loading { background:#f0f4ff; color:#1d3557; }
.cew-ai-msg--ok      { background:#ecfdf5; color:#065f46; }
.cew-ai-msg--err     { background:#fef2f2; color:#991b1b; }
.cew-ai-skip { text-align:center; padding-top:.5rem; }

/* ═══════════════════════════════════════════════
   Contracts Table — Octopus-style cards
   ═══════════════════════════════════════════════ */

.ct-wrap {
	max-width: 1100px;
	margin: 2.5rem auto;
	padding: 0 1rem;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Intro */
.ct-intro { text-align: center; margin-bottom: 2.5rem; }
.ct-title {
	font-size: 2rem;
	font-weight: 800;
	color: #1d3557;
	margin: 0 0 .5rem;
}
.ct-subtitle {
	font-size: 1rem;
	color: #5a6a7a;
	margin: 0 0 1.25rem;
}
.ct-badges-row {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: .6rem;
}
.ct-trust-badge {
	background: #f0f4f8;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: .35rem .9rem;
	font-size: .82rem;
	color: #374151;
	font-weight: 500;
}

/* Grid */
.ct-grid {
	display: grid;
	grid-template-columns: repeat(var(--ct-cols, 3), 1fr);
	gap: 1.5rem;
	margin-bottom: 2rem;
	align-items: start;
}
@media (max-width: 900px) { .ct-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .ct-grid { grid-template-columns: 1fr; } }

/* Card */
.ct-card {
	background: #fff;
	border: 2px solid #e2e8f0;
	border-radius: 16px;
	padding: 1.75rem 1.5rem;
	position: relative;
	transition: box-shadow .2s, border-color .2s;
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
}
.ct-card:hover {
	box-shadow: 0 8px 32px rgba(29,53,87,.12);
	border-color: #e07b39;
}
.ct-card--featured {
	border-color: #e07b39;
	box-shadow: 0 8px 32px rgba(224,123,57,.18);
}

/* Ribbon */
.ct-ribbon {
	position: absolute;
	top: -1px;
	right: 1.5rem;
	background: #e07b39;
	color: #fff;
	font-size: .75rem;
	font-weight: 700;
	padding: .3rem .85rem;
	border-radius: 0 0 10px 10px;
	letter-spacing: .04em;
	text-transform: uppercase;
}

/* Card head */
.ct-card-head { padding-top: .5rem; }
.ct-tarifa-badge {
	display: inline-block;
	background: #f0f4f8;
	color: #1d3557;
	font-size: .72rem;
	font-weight: 700;
	padding: .2rem .6rem;
	border-radius: 6px;
	letter-spacing: .05em;
	margin-bottom: .5rem;
}
.ct-card--featured .ct-tarifa-badge {
	background: rgba(224,123,57,.12);
	color: #e07b39;
}
.ct-name {
	font-size: 1.3rem;
	font-weight: 800;
	color: #1d3557;
	margin: 0 0 .4rem;
	line-height: 1.2;
}
.ct-desc {
	font-size: .88rem;
	color: #5a6a7a;
	margin: 0;
	line-height: 1.5;
}

/* Price block */
.ct-price-block {
	background: #f8fafc;
	border-radius: 10px;
	padding: 1rem 1.1rem;
}
.ct-card--featured .ct-price-block {
	background: rgba(224,123,57,.07);
}
.ct-price-type { margin-bottom: .5rem; }
.ct-price-label {
	display: block;
	font-size: .8rem;
	font-weight: 700;
	color: #1d3557;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.ct-price-sub {
	display: block;
	font-size: .78rem;
	color: #8a95a3;
	margin-top: .15rem;
}
.ct-price-main {
	display: flex;
	align-items: baseline;
	gap: .4rem;
	margin-top: .35rem;
}
.ct-price-fee {
	font-size: 2rem;
	font-weight: 800;
	color: #e07b39;
	line-height: 1;
}
.ct-price-unit {
	font-size: .85rem;
	color: #5a6a7a;
	font-weight: 500;
}

/* Sections (energía, potencia) */
.ct-section { display: flex; flex-direction: column; gap: .1rem; }
.ct-section-title {
	font-size: .78rem;
	font-weight: 700;
	color: #1d3557;
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-bottom: .4rem;
}
.ct-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: .25rem 0;
	border-bottom: 1px solid #f0f4f8;
	font-size: .88rem;
}
.ct-row:last-child { border-bottom: none; }
.ct-row-label { color: #5a6a7a; }
.ct-row-value { font-weight: 700; color: #e07b39; }

/* Features list */
.ct-features { display: flex; flex-direction: column; gap: .45rem; }
.ct-feat {
	display: flex;
	align-items: flex-start;
	gap: .45rem;
	font-size: .86rem;
	color: #374151;
}
.ct-feat > :first-child { color: #27ae60; flex-shrink: 0; font-weight: 700; }
.ct-feat--warn > :first-child { color: #e07b39; }

/* CTA button */
.ct-cta { margin-top: auto; padding-top: .5rem; }
.ct-btn {
	display: block;
	text-align: center;
	padding: .85rem 1rem;
	border-radius: 10px;
	font-size: .97rem;
	font-weight: 700;
	text-decoration: none;
	transition: all .2s;
	cursor: pointer;
}
.ct-btn--primary {
	background: #e07b39;
	color: #fff;
	border: 2px solid #e07b39;
}
.ct-btn--primary:hover { background: #c96a28; border-color: #c96a28; color: #fff; }
.ct-btn--secondary {
	background: #fff;
	color: #1d3557;
	border: 2px solid #1d3557;
}
.ct-btn--secondary:hover { background: #1d3557; color: #fff; }

.ct-shortcode-hint {
	text-align: center;
	font-size: .78rem;
	color: #8a95a3;
	background: #f8fafc;
	padding: .6rem;
	border-radius: 8px;
}
.ct-shortcode-hint code { color: #e07b39; }

/* Footer */
.ct-legal {
	font-size: .75rem;
	color: #9aa5b1;
	text-align: center;
	line-height: 1.5;
	margin-top: 1rem;
}

/* ── Manual fill button ── */
.cew-btn-manual {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .7rem 1.6rem;
	border: 2px solid #1d3557;
	border-radius: 10px;
	background: transparent;
	color: #1d3557;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s;
	margin-top: .25rem;
}
.cew-btn-manual:hover {
	background: #1d3557;
	color: #fff;
}

/* ── API error panel ── */
.cew-api-errors {
	background: #fff5f5;
	border: 2px solid #fc8181;
	border-radius: 10px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
}
.cew-api-errors-title {
	font-size: .9rem;
	font-weight: 700;
	color: #c53030;
	margin: 0 0 .6rem;
}
.cew-api-error-item {
	display: flex;
	align-items: flex-start;
	gap: .5rem;
	font-size: .86rem;
	color: #742a2a;
	margin-bottom: .35rem;
}
.cew-api-error-item:last-child { margin-bottom: 0; }
.cew-api-error-field {
	font-weight: 700;
	background: #fed7d7;
	padding: .1rem .4rem;
	border-radius: 4px;
	white-space: nowrap;
}

/* ── Indexado formula block ── */
.cew-ssec--indexado {
	background: #f8f4ff;
	border: 1px solid #e2d9f3;
	border-radius: 8px;
	padding: .75rem 1rem;
}
.cew-formula {
	font-family: 'Courier New', monospace;
	font-size: .82rem;
	font-weight: 700;
	color: #1d3557;
	background: #fff;
	border: 1px solid #d1c4e9;
	border-radius: 6px;
	padding: .6rem .9rem;
	margin: .5rem 0 .6rem;
	word-break: break-all;
	line-height: 1.5;
}
.cew-sv--fee {
	font-size: 1rem;
	font-weight: 800;
	color: #e07b39;
}
.cew-formula-legend {
	font-size: .72rem;
	color: #7a8695;
	line-height: 1.6;
	margin-top: .5rem;
	border-top: 1px solid #e2d9f3;
	padding-top: .5rem;
}


/* ═══════════════════════════════════════════════
   Contracts Table v2 — Compact 4-col accordion
   ═══════════════════════════════════════════════ */
.ct4-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
	align-items: start;
}
@media (max-width: 1000px) { .ct4-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px)  { .ct4-grid { grid-template-columns: 1fr; } }

/* Card */
.ct4-card {
	background: #fff;
	border: 2px solid #e2e8f0;
	border-radius: 14px;
	padding: 1.25rem 1.1rem 1rem;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .7rem;
	transition: box-shadow .2s, border-color .2s;
}
.ct4-card:hover { box-shadow: 0 6px 24px rgba(29,53,87,.1); border-color: #e07b39; }
.ct4-card--featured { border-color: #e07b39; box-shadow: 0 6px 24px rgba(224,123,57,.15); }

/* Ribbon */
.ct4-ribbon {
	position: absolute;
	top: -1px; right: 1rem;
	background: #e07b39;
	color: #fff;
	font-size: .68rem;
	font-weight: 700;
	padding: .2rem .7rem;
	border-radius: 0 0 8px 8px;
	letter-spacing: .05em;
	text-transform: uppercase;
}

/* Head */
.ct4-head { padding-top: .4rem; }
.ct4-badge {
	display: inline-block;
	background: #f0f4f8;
	color: #1d3557;
	font-size: .7rem;
	font-weight: 700;
	padding: .15rem .5rem;
	border-radius: 5px;
	letter-spacing: .04em;
	margin-bottom: .35rem;
}
.ct4-card--featured .ct4-badge { background: rgba(224,123,57,.12); color: #e07b39; }
.ct4-name {
	font-size: 1rem;
	font-weight: 800;
	color: #1d3557;
	margin: 0 0 .2rem;
	line-height: 1.2;
}
.ct4-type { font-size: .75rem; color: #7a8695; }

/* Price summary */
.ct4-price {
	display: flex;
	align-items: baseline;
	gap: .3rem;
	flex-wrap: wrap;
	background: #f8fafc;
	border-radius: 8px;
	padding: .6rem .8rem;
}
.ct4-card--featured .ct4-price { background: rgba(224,123,57,.07); }
.ct4-price-label { font-size: .72rem; color: #7a8695; width: 100%; }
.ct4-price-val { font-size: 1.6rem; font-weight: 800; color: #e07b39; line-height: 1; }
.ct4-price-unit { font-size: .78rem; color: #7a8695; }

/* Basic info */
.ct4-basic { display: flex; flex-direction: column; gap: .25rem; }
.ct4-info-row { font-size: .82rem; color: #374151; display: flex; gap: .4rem; align-items: center; }

/* Toggle button */
.ct4-toggle {
	background: none;
	border: 1px solid #e2e8f0;
	border-radius: 7px;
	padding: .4rem .7rem;
	font-size: .8rem;
	color: #1d3557;
	cursor: pointer;
	width: 100%;
	text-align: left;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background .15s;
}
.ct4-toggle:hover { background: #f8fafc; }
.ct4-chevron { font-size: .7rem; }

/* Accordion detail */
.ct4-detail { display: flex; flex-direction: column; gap: .6rem; padding-top: .2rem; }
.ct4-detail[hidden] { display: none; }
.ct4-section { font-size: .82rem; }
.ct4-section-title {
	font-size: .72rem;
	font-weight: 700;
	color: #1d3557;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-bottom: .35rem;
}
.ct4-row {
	display: flex;
	justify-content: space-between;
	padding: .18rem 0;
	border-bottom: 1px solid #f0f4f8;
	color: #374151;
}
.ct4-row:last-child { border-bottom: none; }
.ct4-row span:last-child { font-weight: 700; color: #e07b39; }
.ct4-formula {
	font-size: .68rem;
	font-family: monospace;
	background: #f8fafc;
	padding: .4rem .6rem;
	border-radius: 5px;
	color: #1d3557;
	line-height: 1.5;
	word-break: break-all;
}
.ct4-desc { font-size: .8rem; color: #7a8695; margin: 0; }

/* CTA */
.ct4-btn {
	display: block;
	text-align: center;
	padding: .7rem;
	border-radius: 9px;
	font-size: .9rem;
	font-weight: 700;
	text-decoration: none;
	margin-top: auto;
	transition: all .2s;
}
.ct4-btn--primary { background: #e07b39; color: #fff; border: 2px solid #e07b39; }
.ct4-btn--primary:hover { background: #c96a28; color: #fff; }
.ct4-btn--secondary { background: #fff; color: #1d3557; border: 2px solid #1d3557; }
.ct4-btn--secondary:hover { background: #1d3557; color: #fff; }
