/**
 * Canal de Denuncias Escolar — estilos públicos.
 * Mobile first. Todo el layout escala de 320 px a 1920 px.
 */

.cde-app {
	--cde-primary: #f39200;
	--cde-secondary: #e2001a;
	--cde-tertiary: #c1005d;
	--cde-header: #000;
	--cde-header-text: #fff;
	--cde-text: #1a1a1a;
	--cde-muted: #6b6b6b;
	--cde-line: #e2e2e2;
	--cde-line-soft: #efefef;
	--cde-bg: #fff;
	--cde-bg-soft: #fafafa;
	--cde-radius: 4px;
	--cde-focus: #005fcc;
	--cde-error: #c0142b;
	--cde-success: #1c7c3f;

	box-sizing: border-box;
	color: var(--cde-text);
	font-size: 16px;
	line-height: 1.55;
	background: var(--cde-bg);
	-webkit-text-size-adjust: 100%;
}

.cde-app *,
.cde-app *::before,
.cde-app *::after {
	box-sizing: inherit;
}

.cde-app img {
	max-width: 100%;
	height: auto;
}

/*
 * Blindaje de legibilidad.
 *
 * Muchos temas colorean de forma agresiva button, label y los elementos de
 * formulario —a menudo con !important— y dejan ilegibles textos como
 * «Relación con la organización», que va dentro de un <button>, o los propios
 * botones de acción. Aquí se fija color y fondo de forma explícita para todo
 * el componente, sin depender de la herencia del tema.
 *
 * El uso de !important está deliberadamente acotado a la propiedad `color` de
 * las clases propias del plugin: es la única forma de ganar a un tema que
 * declare `button { color: #fff !important }`.
 */
.cde-app,
.cde-app p,
.cde-app span,
.cde-app label,
.cde-app li,
.cde-app dt,
.cde-app dd,
.cde-app h1,
.cde-app h2,
.cde-app h3,
.cde-app input,
.cde-app select,
.cde-app textarea {
	color: var(--cde-text);
}

.cde-app button {
	text-transform: none;
	letter-spacing: normal;
	text-shadow: none;
	box-shadow: none;
}

/* Botones que deben ser transparentes (no todos: los de acción llevan fondo). */
.cde-app .cde-accordion__toggle,
.cde-app .cde-circlebtn,
.cde-app .cde-collapse,
.cde-app .cde-filelist__remove {
	background-color: transparent;
}

/* Texto sobre fondo claro. */
.cde-app .cde-accordion__toggle,
.cde-app .cde-accordion__toggle .cde-field__label,
.cde-app .cde-radio__text,
.cde-app .cde-check__text,
.cde-app .cde-field__label,
.cde-app .cde-circlebtn,
.cde-app .cde-collapse,
.cde-app .cde-pillbtn,
.cde-app .cde-pillbtn span,
.cde-app .cde-pillbtn__icon,
.cde-app .cde-toggle__opt span,
.cde-app .cde-btn--ghost,
.cde-app .cde-btn--ghost span {
	color: var(--cde-text) !important;
	opacity: 1;
	visibility: visible;
}

/* Texto sobre superficies de color: usa el contraste calculado. */
.cde-app .cde-panel__head,
.cde-app .cde-panel__head span,
.cde-app .cde-btn--primary,
.cde-app .cde-btn--primary span,
.cde-app .cde-toggle__opt input:checked + span,
.cde-app .cde-pillbtn--solid,
.cde-app .cde-pillbtn--solid span,
.cde-app .cde-pillbtn--solid .cde-pillbtn__icon,
.cde-app .cde-pillbtn[aria-expanded="true"],
.cde-app .cde-pillbtn[aria-expanded="true"] span,
.cde-app .cde-pillbtn[aria-expanded="true"] .cde-pillbtn__icon {
	color: var(--cde-header-text) !important;
}

.cde-app .cde-pillbtn.is-recording,
.cde-app .cde-pillbtn.is-recording span,
.cde-app .cde-pillbtn.is-recording .cde-pillbtn__icon {
	color: #fff !important;
}

/* Los fondos de los botones de acción no deben depender del tema. */
.cde-app .cde-btn--primary,
.cde-app .cde-pillbtn--solid,
.cde-app .cde-pillbtn[aria-expanded="true"] {
	background-color: var(--cde-header);
}

.cde-app .cde-btn--ghost,
.cde-app .cde-pillbtn,
.cde-app .cde-toggle__opt span {
	background-color: #fff;
}

.cde-app .cde-toggle__opt input:checked + span {
	background-color: var(--cde-header);
}

/* Textos de énfasis y secundarios. */
.cde-app .cde-required-note,
.cde-app .cde-req,
.cde-app .cde-error { color: var(--cde-error) !important; }

.cde-app .cde-hint,
.cde-app .cde-counter,
.cde-app .cde-empty,
.cde-app .cde-doc__date,
.cde-app .cde-card__foot,
.cde-app .cde-dropzone,
.cde-app .cde-control label { color: var(--cde-muted) !important; }

.cde-app .cde-dropzone strong { color: var(--cde-text) !important; }
.cde-app a { color: var(--cde-tertiary); }
.cde-app .cde-doc__link { color: #1a5fd0 !important; }

.cde-app .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------- */
/* Cabecera                                                               */
/* --------------------------------------------------------------------- */

.cde-topbar {
	background: #fff;
}

.cde-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 1400px;
	margin: 0 auto;
	padding: 14px 16px;
}

.cde-topbar__logo {
	max-height: 44px;
	width: auto;
}

.cde-topbar__name {
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: .01em;
}

.cde-gradient {
	height: 6px;
	background: linear-gradient(
		90deg,
		var(--cde-primary) 0%,
		var(--cde-primary) 22%,
		var(--cde-secondary) 55%,
		var(--cde-tertiary) 100%
	);
}

.cde-lang__select {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	background: transparent;
	color: var(--cde-text);
	font-size: .95rem;
	font-family: inherit;
	padding: 8px 26px 8px 8px;
	min-height: 40px;
	cursor: pointer;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.6'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 2px center;
	background-size: 18px;
}

.cde-lang__select:focus-visible {
	outline: 2px solid var(--cde-focus);
	outline-offset: 2px;
}

.cde-lang {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

/* Mientras se recarga la página en el nuevo idioma. */
.cde-lang.is-loading {
	opacity: .55;
	pointer-events: none;
}

/* Sólo visible sin JavaScript: el JS lo oculta y envía al cambiar. */
.cde-app .cde-lang__go {
	min-height: 40px;
	padding: 6px 14px;
	border: 1px solid #cfcfcf;
	border-radius: 999px;
	background: #fff;
	font-family: inherit;
	font-size: .85rem;
	cursor: pointer;
}

/* --------------------------------------------------------------------- */
/* Contenedor y rejilla                                                   */
/* --------------------------------------------------------------------- */

.cde-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 24px 16px 56px;
}

.cde-container--narrow {
	max-width: 820px;
}

.cde-title {
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 400;
	line-height: 1.25;
	margin: 8px 0 14px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--cde-primary);
	color: var(--cde-text);
}

.cde-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	align-items: start;
}

@media (min-width: 900px) {
	.cde-grid {
		grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
		gap: 28px;
	}

	.cde-layout-single .cde-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.cde-container {
		padding: 32px 24px 72px;
	}
}

@media (min-width: 1200px) {
	.cde-grid {
		grid-template-columns: 380px minmax(0, 1fr);
		gap: 34px;
	}
}

.cde-aside {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
	order: 2;
}

.cde-main {
	min-width: 0;
	order: 1;
}

@media (min-width: 900px) {
	.cde-aside { order: 0; position: sticky; top: 20px; }
	.cde-main { order: 0; }
}

/* --------------------------------------------------------------------- */
/* Tarjetas laterales                                                     */
/* --------------------------------------------------------------------- */

.cde-card {
	border: 1px solid var(--cde-line);
	border-radius: var(--cde-radius);
	background: #fff;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.cde-card__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 16px 18px 12px;
	font-size: 1.12rem;
	font-weight: 400;
	line-height: 1.3;
	border-bottom: 2px solid var(--cde-primary);
	color: var(--cde-text);
}

.cde-card__icon {
	display: inline-flex;
	flex: 0 0 auto;
	color: var(--cde-text);
}

.cde-card__title {
	flex: 1 1 auto;
	min-width: 0;
}

.cde-card__plus {
	display: inline-flex;
	flex: 0 0 auto;
	color: var(--cde-muted);
}

.cde-card__body {
	padding: 14px 18px 6px;
	overflow: hidden;
	transition: max-height .25s ease, opacity .2s ease, padding .2s ease;
}

.cde-card.is-collapsed .cde-card__body {
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
	opacity: 0;
}

.cde-card__subtitle {
	font-size: .95rem;
	font-weight: 600;
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--cde-line);
}

.cde-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding: 10px 18px 14px;
	border-top: 1px solid var(--cde-line-soft);
	font-size: .9rem;
	color: var(--cde-muted);
}

.cde-card__foot--right {
	justify-content: flex-end;
}

/* Botón circular expandir / colapsar (cuatro flechas diagonales) */

.cde-circlebtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 2.5px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: var(--cde-text);
	cursor: pointer;
	transition: color .18s ease, background .18s ease, transform .18s ease;
	-webkit-tap-highlight-color: transparent;
}

.cde-circlebtn--sm {
	width: 34px;
	height: 34px;
	border-width: 2px;
	color: #555;
}

.cde-circlebtn:hover {
	color: var(--cde-primary);
	background: color-mix(in srgb, var(--cde-primary) 8%, transparent);
}

.cde-circlebtn:active { transform: scale(.94); }

.cde-circlebtn:focus-visible {
	outline: 2px solid var(--cde-focus);
	outline-offset: 3px;
}

.cde-circlebtn__icon {
	display: none;
	line-height: 0;
}

.cde-circlebtn--sm .cde-circlebtn__icon svg {
	width: 19px;
	height: 19px;
}

/* Contenido desplegado → se ofrece colapsar (flechas hacia dentro). */
.cde-circlebtn[aria-expanded="true"] .cde-circlebtn__icon--in { display: block; }

/* Contenido colapsado → se ofrece expandir (flechas hacia fuera). */
.cde-circlebtn[aria-expanded="false"] .cde-circlebtn__icon--out { display: block; }

.cde-prose {
	font-size: .93rem;
	line-height: 1.6;
	color: #3a3a3a;
	overflow-wrap: break-word;
}

.cde-prose p { margin: 0 0 .8em; }
.cde-prose a { color: var(--cde-tertiary); }
.cde-prose--small { font-size: .85rem; color: var(--cde-muted); }

/* Documentos */

.cde-doclist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cde-doc {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	font-size: .92rem;
	min-height: 44px;
}

.cde-doc__icon { color: var(--cde-secondary); flex: 0 0 auto; display: inline-flex; }

.cde-doc__link {
	flex: 1 1 auto;
	min-width: 0;
	color: #1a5fd0;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cde-doc__link:hover,
.cde-doc__link:focus { text-decoration: underline; }

.cde-doc__date {
	flex: 0 0 auto;
	color: var(--cde-muted);
	font-size: .85rem;
	font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------- */
/* Formulario                                                             */
/* --------------------------------------------------------------------- */

.cde-required-note {
	margin: 0 0 8px;
	text-align: right;
	font-size: .88rem;
	color: var(--cde-error);
}

.cde-panel {
	border: 1px solid var(--cde-line);
	border-radius: var(--cde-radius);
	background: #fff;
	overflow: hidden;
	margin-bottom: 18px;
}

.cde-panel__head {
	margin: 0;
	padding: 16px 18px;
	background: var(--cde-header);
	color: var(--cde-header-text);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
}

.cde-field {
	padding: 14px 16px;
	border-bottom: 1px solid var(--cde-line-soft);
}

.cde-field:last-child { border-bottom: 0; }

@media (min-width: 700px) {
	.cde-field { padding: 16px 20px; }
}

.cde-field__label {
	display: block;
	font-size: .95rem;
	font-weight: 400;
	color: #2b2b2b;
	margin-bottom: 8px;
	line-height: 1.4;
}

.cde-field__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.cde-field__row .cde-field__label { margin-bottom: 6px; flex: 1 1 auto; }

.cde-req {
	color: var(--cde-error);
	text-decoration: none;
	border: 0;
	margin-left: 2px;
	font-size: 1.05em;
	line-height: 1;
}

.cde-hint {
	margin: 10px 0 0;
	font-size: .85rem;
	color: var(--cde-muted);
	line-height: 1.5;
}

.cde-error {
	margin: 6px 0 0;
	font-size: .85rem;
	color: var(--cde-error);
	min-height: 0;
}

.cde-error:empty { display: none; }

.cde-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Campos de texto */

.cde-app input[type="text"],
.cde-app input[type="email"],
.cde-app input[type="tel"],
.cde-app input[type="url"],
.cde-app input[type="date"],
.cde-app input[type="search"],
.cde-app input[type="password"],
.cde-app textarea,
.cde-app select {
	width: 100%;
	max-width: 100%;
	font-family: inherit;
	font-size: 1rem;
	color: var(--cde-text);
	background: #fff;
	border: 1px solid var(--cde-line);
	border-radius: var(--cde-radius);
	padding: 12px 14px;
	min-height: 48px;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.cde-app textarea {
	resize: vertical;
	min-height: 140px;
}

.cde-app input:focus,
.cde-app textarea:focus,
.cde-app select:focus {
	outline: 0;
	border-color: var(--cde-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cde-primary) 25%, transparent);
}

.cde-app input:focus-visible,
.cde-app textarea:focus-visible,
.cde-app select:focus-visible {
	outline: 2px solid var(--cde-focus);
	outline-offset: 1px;
}

.cde-app input.has-error,
.cde-app textarea.has-error {
	border-color: var(--cde-error);
}

.cde-app ::placeholder { color: #9a9a9a; opacity: 1; }

.cde-mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: .06em;
}

.cde-cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

@media (min-width: 640px) {
	.cde-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cde-cols .cde-control:first-child { grid-column: 1 / -1; }
}

.cde-control { margin: 0; }

.cde-control label {
	display: block;
	font-size: .85rem;
	color: var(--cde-muted);
	margin-bottom: 5px;
}

.cde-date { max-width: 220px; }

/* Acordeones */

.cde-field--accordion { padding: 0; }

.cde-accordion__toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	border: 0;
	background: none;
	padding: 16px;
	min-height: 56px;
	font-family: inherit;
	font-size: 1rem;
	text-align: left;
	color: inherit;
	cursor: pointer;
}

@media (min-width: 700px) {
	.cde-accordion__toggle { padding: 16px 20px; }
}

.cde-accordion__toggle .cde-field__label {
	margin: 0;
	flex: 1 1 auto;
}

.cde-accordion__value {
	flex: 0 0 auto;
	font-size: .9rem;
	color: var(--cde-muted);
	max-width: 45%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cde-accordion__toggle:focus-visible {
	outline: 2px solid var(--cde-focus);
	outline-offset: -2px;
}

.cde-accordion__body {
	padding: 0 16px 16px;
}

@media (min-width: 700px) {
	.cde-accordion__body { padding: 0 20px 18px; }
}

.cde-chevron {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23444' stroke-width='1.5'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E") no-repeat center / 22px;
	transition: transform .2s ease;
}

[aria-expanded="true"] .cde-chevron { transform: rotate(180deg); }

/* Buscador de tipologías */

.cde-search {
	position: relative;
	margin-bottom: 4px;
}

.cde-search__input {
	padding-right: 46px !important;
	border: 0 !important;
	border-bottom: 1px solid var(--cde-line) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.cde-search__input:focus {
	border-bottom-color: var(--cde-primary) !important;
	box-shadow: 0 1px 0 0 var(--cde-primary) !important;
}

.cde-search__icon {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cde-muted);
	pointer-events: none;
	padding-left: 10px;
	border-left: 1px solid var(--cde-line);
	display: flex;
}

/* Radios */

.cde-radios {
	display: flex;
	flex-direction: column;
}

.cde-radios--scroll {
	max-height: 340px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding-right: 4px;
}

@media (min-width: 900px) {
	.cde-radios--scroll { max-height: 430px; }
}

.cde-radios--scroll::-webkit-scrollbar { width: 8px; }
.cde-radios--scroll::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 8px; }
.cde-radios--scroll::-webkit-scrollbar-track { background: #f4f4f4; }

.cde-radio {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 11px 4px;
	min-height: 48px;
	cursor: pointer;
	border-radius: var(--cde-radius);
	transition: background .12s ease;
}

.cde-radio:hover { background: var(--cde-bg-soft); }

.cde-radio input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.cde-radio__mark {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border: 1.5px solid #8a8a8a;
	border-radius: 50%;
	background: #fff;
	position: relative;
	transition: border-color .15s ease;
}

.cde-radio__mark::after {
	content: "";
	position: absolute;
	inset: 4px;
	border-radius: 50%;
	background: var(--cde-primary);
	transform: scale(0);
	transition: transform .15s ease;
}

.cde-radio input:checked + .cde-radio__mark {
	border-color: var(--cde-primary);
	border-width: 2px;
}

.cde-radio input:checked + .cde-radio__mark::after { transform: scale(1); }

.cde-radio input:focus-visible + .cde-radio__mark {
	outline: 2px solid var(--cde-focus);
	outline-offset: 2px;
}

.cde-radio__text {
	font-size: .95rem;
	line-height: 1.45;
	color: #2b2b2b;
	overflow-wrap: break-word;
}

.cde-radio.is-hidden { display: none; }

.cde-empty {
	padding: 16px 4px;
	color: var(--cde-muted);
	font-size: .9rem;
	margin: 0;
}

/* Casilla de verificación */

.cde-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	padding: 4px 0;
}

.cde-check input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.cde-check__mark {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	border: 1.5px solid #8a8a8a;
	border-radius: 3px;
	background: #fff;
	position: relative;
}

.cde-check__mark::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 3px;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform .15s ease;
}

.cde-check input:checked + .cde-check__mark {
	background: var(--cde-primary);
	border-color: var(--cde-primary);
}

.cde-check input:checked + .cde-check__mark::after { transform: rotate(45deg) scale(1); }

.cde-check input:focus-visible + .cde-check__mark {
	outline: 2px solid var(--cde-focus);
	outline-offset: 2px;
}

.cde-check__text { font-size: .9rem; line-height: 1.5; }
.cde-check__text a { color: var(--cde-tertiary); }

/* Toggle Sí/No */

.cde-field--inline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.cde-field--inline .cde-field__label { margin: 0; flex: 1 1 220px; }

.cde-toggle {
	display: inline-flex;
	gap: 8px;
	flex: 0 0 auto;
}

.cde-toggle__opt input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.cde-toggle__opt span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 52px;
	min-height: 44px;
	padding: 8px 18px;
	border: 1px solid #cfcfcf;
	border-radius: 999px;
	font-size: .95rem;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.cde-toggle__opt input:checked + span {
	background: var(--cde-header);
	border-color: var(--cde-header);
	color: var(--cde-header-text);
}

.cde-toggle__opt input:focus-visible + span {
	outline: 2px solid var(--cde-focus);
	outline-offset: 2px;
}

/* Botones tipo píldora (mismo lenguaje visual que el toggle Sí/No) */

.cde-tools {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	flex: 0 0 auto;
}

.cde-app .cde-pillbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid #cfcfcf;
	border-radius: 999px;
	background: #fff;
	color: var(--cde-text);
	font-family: inherit;
	font-size: .9rem;
	font-weight: 400;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
	-webkit-tap-highlight-color: transparent;
}

.cde-pillbtn__icon { flex: 0 0 auto; }

.cde-app .cde-pillbtn:hover {
	background: var(--cde-bg-soft);
	border-color: #a9a9a9;
	color: var(--cde-text);
}

.cde-app .cde-pillbtn:focus-visible {
	outline: 2px solid var(--cde-focus);
	outline-offset: 2px;
}

/* Estado activo: mismo relleno que la opción marcada del toggle Sí/No. */
.cde-app .cde-pillbtn--solid,
.cde-app .cde-pillbtn[aria-expanded="true"],
.cde-app .cde-pillbtn.is-active {
	background: var(--cde-header);
	border-color: var(--cde-header);
	color: var(--cde-header-text);
}

.cde-app .cde-pillbtn--solid:hover,
.cde-app .cde-pillbtn[aria-expanded="true"]:hover,
.cde-app .cde-pillbtn.is-active:hover {
	background: var(--cde-header);
	border-color: var(--cde-header);
	color: var(--cde-header-text);
	opacity: .88;
}

.cde-app .cde-pillbtn.is-recording {
	background: var(--cde-secondary);
	border-color: var(--cde-secondary);
	color: #fff;
	animation: cde-pulse 1.4s ease-in-out infinite;
}

@keyframes cde-pulse {
	0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cde-secondary) 45%, transparent); }
	50% { box-shadow: 0 0 0 8px transparent; }
}

/* El icono mostrado en el botón Ampliar/Reducir depende del estado. */
.cde-pillbtn .cde-pillbtn__icon--in,
.cde-pillbtn[aria-expanded="true"] .cde-pillbtn__icon--out { display: none; }
.cde-pillbtn[aria-expanded="true"] .cde-pillbtn__icon--in { display: block; }

/* Ayuda contextual en línea (sustituye a los tooltips flotantes) */

.cde-hint--box {
	margin: 12px 0 0;
	padding: 12px 14px;
	background: var(--cde-bg-soft);
	border-left: 3px solid var(--cde-primary);
	border-radius: var(--cde-radius);
	color: #3a3a3a;
	font-size: .87rem;
}

/* Grabador de voz */

.cde-recorder {
	margin: 12px 0 0;
	padding: 14px 16px;
	border: 1px solid var(--cde-secondary);
	border-radius: var(--cde-radius);
	background: color-mix(in srgb, var(--cde-secondary) 5%, #fff);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cde-recorder__status {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: .95rem;
}

.cde-recorder__dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--cde-secondary);
	flex: 0 0 auto;
	animation: cde-blink 1.1s ease-in-out infinite;
}

@keyframes cde-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: .25; }
}

.cde-app .cde-recorder__label { font-weight: 600; }

.cde-recorder__time {
	margin-left: auto;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1.05rem;
	font-variant-numeric: tabular-nums;
}

.cde-recorder__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cde-app .cde-recorder__note {
	margin: 0;
	font-size: .82rem;
	color: var(--cde-muted) !important;
}

.cde-filelist__row {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}

.cde-filelist li { flex-direction: column; align-items: stretch; }

.cde-filelist__audio {
	width: 100%;
	margin-top: 8px;
	height: 40px;
}

.cde-counter {
	margin: 6px 0 0;
	text-align: right;
	font-size: .78rem;
	color: var(--cde-muted);
	font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------- */
/* Editor de la descripción a pantalla completa                           */
/* --------------------------------------------------------------------- */

.cde-app.is-expanded .cde-field--textarea {
	position: fixed;
	inset: 0;
	z-index: 99999;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
}

/* Barra superior del editor: etiqueta a la izquierda, acciones a la derecha. */
.cde-app.is-expanded .cde-field--textarea .cde-field__row {
	flex: 0 0 auto;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--cde-line);
	background: #fff;
}

.cde-app.is-expanded .cde-field--textarea .cde-field__label {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
}

.cde-app.is-expanded .cde-hint--box {
	flex: 0 0 auto;
	margin: 12px 16px 0;
}

.cde-app.is-expanded .cde-field--textarea textarea {
	flex: 1 1 auto;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	min-height: 0;
	height: auto;
	padding: 20px 18px 24px;
	border: 0;
	border-radius: 0;
	font-size: 1.05rem;
	line-height: 1.7;
	resize: none;
}

.cde-app.is-expanded .cde-field--textarea textarea:focus {
	box-shadow: none;
	border-color: transparent;
}

/*
 * El anillo de foco se dibuja hacia dentro: de lo contrario asoma como una
 * línea suelta bajo la barra del editor, al recortarlo el contenedor.
 */
.cde-app.is-expanded .cde-field--textarea textarea:focus-visible {
	outline: 2px solid var(--cde-focus);
	outline-offset: -3px;
}

.cde-app.is-expanded .cde-counter,
.cde-app.is-expanded .cde-field--textarea .cde-error {
	flex: 0 0 auto;
	margin: 0;
	padding: 12px 16px;
	border-top: 1px solid var(--cde-line);
	background: var(--cde-bg-soft);
}

@media (min-width: 700px) {
	.cde-app.is-expanded .cde-field--textarea .cde-field__row { padding: 14px 24px; }
	.cde-app.is-expanded .cde-field--textarea textarea { padding: 28px 24px 32px; }
	.cde-app.is-expanded .cde-counter { padding: 12px 24px; }
}

/* En móvil la barra apila etiqueta y acciones para no comprimir los botones. */
@media (max-width: 559px) {
	.cde-field__row {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	/*
	 * También dentro del editor a pantalla completa: en 375 px la etiqueta más
	 * las tres píldoras no caben en una línea y «Reducir» quedaba cortado.
	 */
	.cde-app.is-expanded .cde-field--textarea .cde-field__row {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		padding: 10px 14px;
	}

	.cde-tools {
		justify-content: flex-end;
		gap: 8px;
	}

	.cde-app .cde-pillbtn {
		flex: 1 1 auto;
		justify-content: center;
		padding: 8px 10px;
	}

	.cde-app.is-expanded .cde-field--textarea .cde-field__label { font-size: 1rem; }
	.cde-app.is-expanded .cde-field--textarea textarea { padding: 16px 14px 20px; }
	.cde-app.is-expanded .cde-counter { padding: 10px 14px; }
}

/* Adjuntos */

.cde-file-input {
	position: absolute !important;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.cde-dropzone {
	border: 1.5px dashed #c9c9c9;
	border-radius: var(--cde-radius);
	padding: 22px 16px;
	text-align: center;
	color: var(--cde-muted);
	cursor: pointer;
	background: var(--cde-bg-soft);
	transition: border-color .15s ease, background .15s ease;
}

.cde-dropzone p { margin: 0; font-size: .92rem; }
.cde-dropzone strong { color: var(--cde-text); }
.cde-dropzone__meta { margin-top: 6px !important; font-size: .8rem !important; }

.cde-dropzone:hover,
.cde-dropzone:focus-visible,
.cde-dropzone.is-over {
	border-color: var(--cde-primary);
	background: color-mix(in srgb, var(--cde-primary) 6%, #fff);
	outline: none;
}

.cde-filelist {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cde-filelist li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--cde-line);
	border-radius: var(--cde-radius);
	font-size: .88rem;
	background: #fff;
}

.cde-filelist__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cde-filelist__size { flex: 0 0 auto; color: var(--cde-muted); font-size: .8rem; }

.cde-filelist__remove {
	flex: 0 0 auto;
	border: 0;
	background: none;
	color: var(--cde-error);
	font-size: .82rem;
	cursor: pointer;
	min-height: 40px;
	padding: 0 6px;
}

/* Acciones */

.cde-actions {
	display: flex;
	flex-direction: column-reverse;
	gap: 10px;
	margin-top: 18px;
}

@media (min-width: 560px) {
	.cde-actions {
		flex-direction: row;
		justify-content: flex-end;
		gap: 12px;
	}
}

.cde-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 12px 30px;
	border-radius: var(--cde-radius);
	border: 1px solid var(--cde-header);
	background: #fff;
	color: var(--cde-header);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, opacity .15s ease;
	width: 100%;
}

@media (min-width: 560px) {
	.cde-btn { width: auto; min-width: 130px; }
}

.cde-btn--primary {
	background: var(--cde-header);
	color: var(--cde-header-text);
}

.cde-btn--primary:hover { opacity: .88; color: var(--cde-header-text); }
.cde-btn--ghost:hover { background: var(--cde-bg-soft); }
.cde-btn--block { width: 100%; }

.cde-btn:focus-visible {
	outline: 2px solid var(--cde-focus);
	outline-offset: 2px;
}

.cde-btn[disabled] { opacity: .6; cursor: progress; }

.cde-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: cde-spin .7s linear infinite;
}

.cde-btn.is-loading .cde-spinner { display: inline-block; }

@keyframes cde-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.cde-app *,
	.cde-app *::before,
	.cde-app *::after {
		animation-duration: .001ms !important;
		transition-duration: .001ms !important;
	}
}

/* Mensajes de formulario */

.cde-formmsg {
	margin: 14px 0 0;
	padding: 14px 16px;
	border-radius: var(--cde-radius);
	font-size: .93rem;
	border-left: 4px solid var(--cde-error);
	background: #fdf1f2;
	color: #7a0d1c;
}

.cde-formmsg.is-success {
	border-left-color: var(--cde-success);
	background: #f0f8f2;
	color: #14572c;
}

/* Éxito */

.cde-success {
	border: 1px solid var(--cde-line);
	border-top: 4px solid var(--cde-success);
	border-radius: var(--cde-radius);
	padding: 28px 20px;
	text-align: center;
	background: #fff;
}

.cde-success__icon { color: var(--cde-success); }

.cde-success h2 {
	font-size: 1.35rem;
	margin: 10px 0 12px;
	font-weight: 600;
}

.cde-success > p { color: #444; font-size: .95rem; max-width: 60ch; margin: 0 auto 20px; }

.cde-creds {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	max-width: 520px;
	margin: 0 auto 22px;
}

@media (min-width: 560px) {
	.cde-creds { grid-template-columns: repeat(2, 1fr); }
}

.cde-cred {
	border: 1px dashed var(--cde-primary);
	border-radius: var(--cde-radius);
	padding: 14px;
	background: color-mix(in srgb, var(--cde-primary) 6%, #fff);
}

.cde-cred__label {
	display: block;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--cde-muted);
	margin-bottom: 6px;
}

.cde-cred__value {
	display: block;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1.15rem;
	letter-spacing: .08em;
	overflow-wrap: break-word;
}

.cde-success__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 18px;
}

.cde-success__legal {
	font-size: .84rem;
	color: var(--cde-muted);
	max-width: 62ch;
	margin: 0 auto;
}

/* --------------------------------------------------------------------- */
/* Seguimiento                                                            */
/* --------------------------------------------------------------------- */

.cde-summary {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	margin: 0;
	padding: 4px 0;
}

@media (min-width: 640px) {
	.cde-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cde-summary > div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--cde-line-soft);
}

.cde-summary dt { font-size: .8rem; color: var(--cde-muted); text-transform: uppercase; letter-spacing: .04em; }
.cde-summary dd { margin: 0; font-size: .98rem; }

.cde-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: .85rem;
	background: #eee;
	color: #333;
}

.cde-badge--received { background: #fff3e0; color: #9a5b00; }
.cde-badge--acknowledged,
.cde-badge--admitted { background: #e8f1fd; color: #14488f; }
.cde-badge--investigating,
.cde-badge--info_required { background: #f3ecfb; color: #5a2d92; }
.cde-badge--resolved { background: #e9f7ee; color: #14572c; }
.cde-badge--inadmissible,
.cde-badge--archived { background: #f0f0f0; color: #555; }

.cde-thread {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px;
}

.cde-msg {
	border: 1px solid var(--cde-line);
	border-radius: var(--cde-radius);
	padding: 14px 16px;
	background: #fff;
}

.cde-msg--manager { background: var(--cde-bg-soft); border-left: 3px solid var(--cde-primary); }
.cde-msg--reporter { border-left: 3px solid var(--cde-line); }

.cde-msg header {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
	font-size: .85rem;
	color: var(--cde-muted);
}

.cde-msg__body { font-size: .95rem; }
.cde-msg__body p { margin: 0 0 .7em; }
.cde-msg__body p:last-child { margin-bottom: 0; }

.cde-reply { padding: 0 16px 18px; }
.cde-reply .cde-field__label { margin-bottom: 8px; }

.cde-track__panel { margin-top: 4px; }



/* ===================================================================== */
/* REDISEÑO PREMIUM                                                       */
/* Composición, superficies, controles y movimiento. Respeta los colores  */
/* de Ajustes (--cde-primary, --cde-header, --cde-secondary…).            */
/* ===================================================================== */

.cde-app {
	--cde-ease: cubic-bezier(0.23, 1, 0.32, 1);
	--cde-ink: #0f172a;
	--cde-sub: #526074;
	--cde-canvas: #f3f4f8;
	--cde-line: #e3e6ee;
	--cde-line-soft: #eef0f5;
	--cde-bg-soft: #f7f8fb;
	--cde-muted: #526074;
	--cde-tint: rgba(243, 146, 0, 0.10);
	--cde-tint-strong: rgba(243, 146, 0, 0.18);
	--cde-hero-b: var(--cde-header);
	--cde-r-md: 14px;
	--cde-r-lg: 22px;
	--cde-shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(15, 23, 42, 0.05);
	--cde-shadow-2: 0 2px 4px rgba(15, 23, 42, 0.04), 0 14px 32px -10px rgba(15, 23, 42, 0.16);
	--cde-shadow-3: 0 6px 12px -4px rgba(15, 23, 42, 0.10), 0 32px 64px -20px rgba(15, 23, 42, 0.28);
	--cde-ring: rgba(0, 95, 204, 0.25);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	color: var(--cde-ink);
	background:
		radial-gradient(1100px 420px at 85% -80px, var(--cde-tint-strong), transparent 70%),
		linear-gradient(180deg, #eceef5 0, var(--cde-canvas) 520px);
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
	.cde-app {
		--cde-tint: color-mix(in srgb, var(--cde-primary) 10%, #fff);
		--cde-tint-strong: color-mix(in srgb, var(--cde-primary) 22%, transparent);
		--cde-hero-b: color-mix(in srgb, var(--cde-header) 86%, var(--cde-primary));
		--cde-ring: color-mix(in srgb, var(--cde-focus) 26%, transparent);
	}
}

.cde-app h1,
.cde-app h2,
.cde-app h3 {
	font-family: inherit;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.cde-app p,
.cde-app li { text-wrap: pretty; }

/* Barra superior ------------------------------------------------------- */
.cde-app .cde-topbar {
	background: rgba(255, 255, 255, 0.82);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid var(--cde-line);
}

.cde-app .cde-topbar__inner { padding: 12px 20px; }

.cde-app .cde-topbar__name {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 1.02rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.cde-app .cde-topbar__name::before {
	content: "";
	width: 34px;
	height: 34px;
	border-radius: 11px;
	background: var(--cde-header) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 2.6v5.6c0 4.4-3 8.2-7 9.8-4-1.6-7-5.4-7-9.8V5.6L12 3z'/%3E%3Cpath d='M9 12.2l2.2 2.2L15.2 10'/%3E%3C/svg%3E") center / 20px no-repeat;
	box-shadow: 0 6px 14px -6px rgba(15, 23, 42, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.cde-app .cde-gradient { height: 3px; }

.cde-app .cde-lang__select {
	border-radius: 999px;
	border: 1px solid var(--cde-line);
	background-color: #fff;
	box-shadow: var(--cde-shadow-1);
	font-weight: 600;
}

/* Cabecera / hero ------------------------------------------------------ */
.cde-app .cde-container { padding-top: 32px; }

.cde-app .cde-title {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	margin: 0 0 32px;
	padding: clamp(26px, 4.4vw, 48px) clamp(22px, 4vw, 48px) clamp(26px, 4.4vw, 48px) clamp(22px, 4vw, 48px);
	border: 0;
	border-radius: 28px;
	font-size: clamp(1.75rem, 4.6vw, 3rem);
	font-weight: 750;
	line-height: 1.08;
	letter-spacing: -0.035em;
	color: var(--cde-header-text);
	background:
		radial-gradient(520px 260px at 92% 0%, var(--cde-tint-strong), transparent 70%),
		linear-gradient(125deg, var(--cde-header) 0%, var(--cde-hero-b) 100%);
	box-shadow: var(--cde-shadow-3);
}

.cde-app .cde-title::before {
	content: "";
	display: block;
	width: 52px;
	height: 52px;
	margin-bottom: 20px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 2.6v5.6c0 4.4-3 8.2-7 9.8-4-1.6-7-5.4-7-9.8V5.6L12 3z'/%3E%3Cpath d='M9 12.2l2.2 2.2L15.2 10'/%3E%3C/svg%3E") center / 28px no-repeat;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.cde-app .cde-title::after {
	content: "";
	position: absolute;
	z-index: -1;
	right: -90px;
	bottom: -120px;
	width: 340px;
	height: 340px;
	border-radius: 50%;
	border: 56px solid rgba(255, 255, 255, 0.05);
}

/* Rejilla --------------------------------------------------------------- */
.cde-app .cde-grid { gap: 28px; }

@media (min-width: 900px) {
	.cde-app .cde-grid { grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); gap: 32px; }
}

.cde-app .cde-required-note {
	margin: 0 0 14px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--cde-sub);
}

/* Tarjetas laterales ---------------------------------------------------- */
.cde-app .cde-card {
	border: 1px solid var(--cde-line);
	border-radius: var(--cde-r-lg);
	background: #fff;
	box-shadow: var(--cde-shadow-1);
	overflow: hidden;
	transition: box-shadow 0.25s var(--cde-ease), transform 0.25s var(--cde-ease);
}

.cde-app .cde-card:hover { box-shadow: var(--cde-shadow-2); }

.cde-app .cde-card__head {
	padding: 18px 20px 14px;
	border-bottom: 1px solid var(--cde-line-soft);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--cde-ink);
}

.cde-app .cde-card__icon {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 11px;
	background: var(--cde-tint);
	color: var(--cde-ink);
}

.cde-app .cde-card__body { padding-top: 14px; }

/* Panel del formulario -------------------------------------------------- */
.cde-app .cde-panel {
	border: 1px solid var(--cde-line);
	border-radius: 26px;
	background: #fff;
	box-shadow: var(--cde-shadow-2);
	overflow: hidden;
}

.cde-app .cde-panel__head {
	margin: 0;
	padding: 22px clamp(20px, 3vw, 32px);
	font-size: 1.08rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	background:
		radial-gradient(420px 160px at 100% 0%, var(--cde-tint-strong), transparent 70%),
		linear-gradient(120deg, var(--cde-header), var(--cde-hero-b));
	border-bottom: 0;
}

.cde-app .cde-field {
	border-bottom: 1px solid var(--cde-line-soft);
}

.cde-app .cde-field:last-child { border-bottom: 0; }

.cde-app .cde-field__label {
	font-weight: 650;
	letter-spacing: -0.005em;
	color: var(--cde-ink) !important;
}

.cde-app .cde-hint { color: var(--cde-sub); }

.cde-app .cde-req { color: var(--cde-secondary); text-decoration: none; }

/* Acordeones ------------------------------------------------------------ */
.cde-app .cde-accordion__toggle {
	border-radius: 0;
	transition: background-color 0.18s var(--cde-ease);
}

.cde-app .cde-accordion__toggle:hover { background-color: var(--cde-bg-soft); }

/* Opciones como tarjetas seleccionables -------------------------------- */
.cde-app .cde-radios { display: grid; gap: 8px; }

.cde-app .cde-radio {
	padding: 12px 14px;
	border: 1.5px solid var(--cde-line);
	border-radius: 14px;
	background: #fff;
	transition: border-color 0.16s var(--cde-ease), background-color 0.16s var(--cde-ease), box-shadow 0.16s var(--cde-ease), transform 0.16s var(--cde-ease);
}

.cde-app .cde-radio:hover {
	border-color: #b9c0cf;
	background: var(--cde-bg-soft);
}

.cde-app .cde-radio:active { transform: scale(0.992); }

.cde-app .cde-radio:has(input:checked) {
	border-color: var(--cde-primary);
	background: var(--cde-tint);
	box-shadow: 0 0 0 3px var(--cde-tint-strong);
}

.cde-app .cde-radio:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--cde-ring); }

.cde-app .cde-radios--scroll {
	padding: 10px;
	border: 1px solid var(--cde-line);
	border-radius: 18px;
	background: var(--cde-bg-soft);
	scrollbar-width: thin;
	scrollbar-color: #c3c9d6 transparent;
}

.cde-app .cde-check {
	padding: 10px 12px;
	border-radius: 12px;
	transition: background-color 0.16s var(--cde-ease);
}

.cde-app .cde-check:hover { background: var(--cde-bg-soft); }

/* Campos de texto -------------------------------------------------------- */
.cde-app input[type="text"],
.cde-app input[type="email"],
.cde-app input[type="tel"],
.cde-app input[type="url"],
.cde-app input[type="password"],
.cde-app input[type="search"],
.cde-app input[type="date"],
.cde-app select,
.cde-app textarea {
	min-height: 50px;
	padding: 12px 16px;
	border: 1.5px solid #d3d8e3;
	border-radius: 14px;
	background-color: #fff;
	font-size: 16px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: border-color 0.18s var(--cde-ease), box-shadow 0.18s var(--cde-ease);
}

.cde-app textarea { min-height: 150px; line-height: 1.6; }

.cde-app input:hover,
.cde-app select:hover,
.cde-app textarea:hover { border-color: #a3acbf; }

.cde-app input:focus,
.cde-app select:focus,
.cde-app textarea:focus,
.cde-app input:focus-visible,
.cde-app select:focus-visible,
.cde-app textarea:focus-visible {
	border-color: var(--cde-focus);
	box-shadow: 0 0 0 4px var(--cde-ring);
	outline: none;
}

.cde-app input.has-error,
.cde-app textarea.has-error {
	border-color: var(--cde-error);
	box-shadow: 0 0 0 4px rgba(192, 20, 43, 0.12);
}

.cde-app ::placeholder { color: #94a0b4; }

.cde-app .cde-search__input { border-radius: 999px; padding-left: 44px; background-color: #fff; }

/* Botones ---------------------------------------------------------------- */
.cde-app .cde-btn,
.cde-app .cde-pillbtn,
.cde-app .cde-circlebtn,
.cde-app .cde-toggle__opt span {
	transition: transform 0.16s var(--cde-ease), box-shadow 0.2s var(--cde-ease), background-color 0.2s var(--cde-ease), border-color 0.2s var(--cde-ease);
}

.cde-app .cde-btn {
	min-height: 52px;
	padding: 14px 30px;
	border-radius: 16px;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.cde-app .cde-btn--primary {
	background-image: linear-gradient(135deg, var(--cde-header) 0%, var(--cde-hero-b) 100%);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2), 0 12px 24px -8px rgba(15, 23, 42, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.cde-app .cde-btn--primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(15, 23, 42, 0.2), 0 18px 30px -10px rgba(15, 23, 42, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.cde-app .cde-btn--ghost {
	border: 1.5px solid var(--cde-line);
	box-shadow: var(--cde-shadow-1);
}

.cde-app .cde-btn--ghost:hover { transform: translateY(-1px); box-shadow: var(--cde-shadow-2); }

.cde-app .cde-btn:active,
.cde-app .cde-pillbtn:active,
.cde-app .cde-circlebtn:active { transform: scale(0.98); transition-duration: 0.08s; }

.cde-app .cde-btn:focus-visible,
.cde-app .cde-pillbtn:focus-visible,
.cde-app .cde-circlebtn:focus-visible,
.cde-app .cde-accordion__toggle:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--cde-ring); }

.cde-app .cde-pillbtn {
	border: 1.5px solid var(--cde-line);
	border-radius: 999px;
	box-shadow: var(--cde-shadow-1);
	font-weight: 600;
}

.cde-app .cde-pillbtn:hover { transform: translateY(-1px); box-shadow: var(--cde-shadow-2); }

/* Adjuntos y grabadora --------------------------------------------------- */
.cde-app .cde-dropzone {
	border: 2px dashed #c3cadb;
	border-radius: 20px;
	background: var(--cde-bg-soft);
	transition: background-color 0.2s var(--cde-ease), border-color 0.2s var(--cde-ease), box-shadow 0.2s var(--cde-ease);
}

.cde-app .cde-dropzone:hover,
.cde-app .cde-dropzone.is-over {
	border-color: var(--cde-primary);
	background: var(--cde-tint);
	box-shadow: 0 0 0 5px var(--cde-tint-strong);
}

.cde-app .cde-filelist__row,
.cde-app .cde-recorder {
	border: 1px solid var(--cde-line);
	border-radius: 16px;
	background: #fff;
	box-shadow: var(--cde-shadow-1);
}

.cde-app .cde-hint--box,
.cde-app .cde-summary,
.cde-app .cde-creds,
.cde-app .cde-cred { border-radius: 16px; }

/* Insignias, mensajes, éxito --------------------------------------------- */
.cde-app .cde-badge { border-radius: 999px; font-weight: 700; letter-spacing: 0.01em; }

.cde-app .cde-msg__body { border-radius: 20px; box-shadow: var(--cde-shadow-1); }
.cde-app .cde-msg--reporter .cde-msg__body { border-bottom-right-radius: 6px; }
.cde-app .cde-msg--manager .cde-msg__body { border-bottom-left-radius: 6px; }

.cde-app .cde-formmsg {
	border: 1px solid var(--cde-line);
	border-radius: 22px;
	background: #fff;
	box-shadow: var(--cde-shadow-2);
}

.cde-app .cde-success__icon {
	box-shadow: 0 0 0 10px rgba(28, 124, 63, 0.10), 0 16px 30px -10px rgba(28, 124, 63, 0.5);
}

.cde-app .cde-cred__value { font-feature-settings: "tnum"; letter-spacing: 0.05em; }

/* Entrada suave ---------------------------------------------------------- */
@keyframes cde-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}

.cde-app .cde-title { animation: cde-rise 0.6s var(--cde-ease) both; }
.cde-app .cde-aside .cde-card { animation: cde-rise 0.6s var(--cde-ease) both; }
.cde-app .cde-aside .cde-card:nth-child(1) { animation-delay: 0.08s; }
.cde-app .cde-aside .cde-card:nth-child(2) { animation-delay: 0.14s; }
.cde-app .cde-aside .cde-card:nth-child(3) { animation-delay: 0.20s; }
.cde-app .cde-aside .cde-card:nth-child(4) { animation-delay: 0.26s; }
.cde-app .cde-panel { animation: cde-rise 0.6s var(--cde-ease) 0.12s both; }

@media (prefers-reduced-motion: reduce) {
	.cde-app *,
	.cde-app *::before,
	.cde-app *::after {
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
		transition-duration: 0.01ms !important;
	}

	.cde-app .cde-btn--primary:hover,
	.cde-app .cde-btn--ghost:hover,
	.cde-app .cde-pillbtn:hover { transform: none; }
}

/* Móvil -------------------------------------------------------------------- */
@media (max-width: 640px) {
	.cde-app .cde-container { padding: 20px 14px 44px; }
	.cde-app .cde-title { border-radius: 22px; margin-bottom: 22px; }
	.cde-app .cde-title::before { width: 44px; height: 44px; margin-bottom: 16px; }
	.cde-app .cde-panel { border-radius: 20px; }
	.cde-app .cde-card { border-radius: 18px; }
	.cde-app .cde-btn { width: 100%; }
}

/* El atributo hidden debe ganar siempre a las reglas display de los componentes. */
.cde-app [hidden] { display: none !important; }


/* ===================================================================== */
/* ESPACIADO DEL PANEL Y PÁGINA DE SEGUIMIENTO                            */
/* Una única sangría lateral (--cde-pad) para cabecera, campos y notas.   */
/* ===================================================================== */

.cde-app { --cde-pad: clamp(18px, 3.2vw, 30px); }

.cde-app .cde-container--narrow {
	width: 100%;
	max-width: 780px;
	margin-inline: auto;
}

.cde-app .cde-panel + .cde-panel,
.cde-app .cde-track__login + .cde-track__panel .cde-panel,
.cde-app .cde-track__panel .cde-panel + .cde-panel { margin-top: 24px; }

.cde-app .cde-panel__head { padding-inline: var(--cde-pad); }

.cde-app .cde-field:not(.cde-field--accordion) { padding: 20px var(--cde-pad); }

.cde-app .cde-field:not(.cde-field--accordion) > .cde-field__label,
.cde-app .cde-track__login .cde-field__label {
	display: block;
	margin-bottom: 10px;
}

.cde-app .cde-track__login input.cde-mono {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 1.05rem;
	letter-spacing: 0.08em;
}

/* Notas sueltas dentro del panel (p. ej. «Son las credenciales…»). */
.cde-app .cde-panel > .cde-hint,
.cde-app .cde-panel > p {
	margin: 0;
	padding: 16px var(--cde-pad) 22px;
	border-top: 1px solid var(--cde-line-soft);
	background: var(--cde-bg-soft);
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--cde-sub);
}

/* Mensaje de error / aviso y acciones del formulario de acceso. */
.cde-app .cde-track .cde-formmsg { margin: 20px 0 0; padding: 14px var(--cde-pad); }

.cde-app .cde-track .cde-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 22px;
}

@media (max-width: 559px) {
	.cde-app .cde-track .cde-actions { flex-direction: column; }
	.cde-app .cde-track .cde-actions .cde-btn { width: 100%; }
}

/* Resumen del expediente ----------------------------------------------- */
.cde-app .cde-summary { padding: 6px 0; }

.cde-app .cde-summary > div {
	gap: 6px;
	padding: 16px var(--cde-pad);
}

.cde-app .cde-summary dt {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--cde-sub);
}

.cde-app .cde-summary dd {
	font-size: 1rem;
	font-weight: 600;
	color: var(--cde-ink);
}

.cde-app .cde-summary dd.cde-mono {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	letter-spacing: 0.06em;
}

@media (min-width: 640px) {
	.cde-app .cde-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
}

.cde-app .cde-badge { padding: 5px 14px; font-size: 0.82rem; }

/* Conversación ----------------------------------------------------------- */
.cde-app .cde-thread {
	gap: 18px;
	padding: 24px var(--cde-pad);
}

.cde-app .cde-msg {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 88%;
	padding: 0;
	border: 0;
	background: transparent;
}

.cde-app .cde-msg--reporter { align-self: flex-end; }
.cde-app .cde-msg--manager { align-self: flex-start; }

.cde-app .cde-msg header {
	margin: 0;
	padding: 0 6px;
	font-size: 0.78rem;
}

.cde-app .cde-msg header strong { color: var(--cde-ink); font-weight: 700; }

.cde-app .cde-msg__body {
	padding: 14px 18px;
	border: 1px solid var(--cde-line);
	background: #fff;
}

.cde-app .cde-msg__body p { margin: 0 0 0.7em; }
.cde-app .cde-msg__body p:last-child { margin-bottom: 0; }

.cde-app .cde-msg--reporter .cde-msg__body {
	background: var(--cde-tint);
	border-color: var(--cde-tint-strong);
}

@media (max-width: 559px) {
	.cde-app .cde-msg { max-width: 100%; }
}

.cde-app .cde-empty {
	margin: 0;
	padding: 20px;
	border: 1.5px dashed var(--cde-line);
	border-radius: 16px;
	text-align: center;
	color: var(--cde-sub);
	background: var(--cde-bg-soft);
}

/* Aportar información adicional ---------------------------------------- */
.cde-app .cde-reply {
	padding: 22px var(--cde-pad) 26px;
	border-top: 1px solid var(--cde-line-soft);
	background: var(--cde-bg-soft);
}

.cde-app .cde-reply .cde-field__label { display: block; margin-bottom: 10px; }
.cde-app .cde-reply .cde-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
