/* Serplo Portal Clientes — estilos del área de clientes (tema oscuro) */

.spc {
	--spc-accent: var(--e-global-color-primary, #8fba37);
	--spc-on-accent: #0a0a0a;
	--spc-text: #f5f5f5;
	--spc-muted: #b8b8b8;
	--spc-line: rgba(255, 255, 255, 0.2);
	--spc-card: rgba(255, 255, 255, 0.06);
	--spc-radius: 10px;

	max-width: 760px;
	margin: 0 auto;
	padding: 8px 0 24px;
	color: var(--spc-text);
	font-family: inherit;
	line-height: 1.45;
}

.spc *,
.spc *::before,
.spc *::after {
	box-sizing: border-box;
}

.spc [hidden] {
	display: none !important;
}

/* Carga y avisos */
.spc-loading,
.spc-note,
.spc-empty {
	color: var(--spc-muted);
	margin: 0 0 16px;
}

.spc-warn {
	display: block;
	margin: 12px 0 0;
	padding-left: 12px;
	color: #ffffff;
	border-left: 3px solid var(--spc-accent);
}

.spc-diag {
	margin: 16px 0 0;
	padding: 10px 12px;
	font-size: 0.85rem;
	color: #ffffff;
	overflow-wrap: anywhere;
	border: 1px dashed rgba(255, 255, 255, 0.5);
	border-radius: 8px;
}

/* Acceso */
.spc-login {
	max-width: 440px;
	margin: 0 auto;
	padding: 28px;
	background: var(--spc-card);
	border: 1px solid var(--spc-line);
	border-radius: var(--spc-radius);
}

.spc-title {
	margin: 0 0 8px;
	font-size: 1.5rem;
}

.spc-intro {
	margin: 0 0 20px;
	color: var(--spc-muted);
}

.spc-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #ffffff;
}

.spc-input {
	display: block;
	width: 100%;
	padding: 12px 14px;
	font-size: 1.1rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #ffffff;
	background: #161616;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 8px;
}

.spc-input::placeholder {
	color: #8c8c8c;
	letter-spacing: normal;
	text-transform: none;
}

.spc-input:focus {
	outline: 2px solid var(--spc-accent);
	outline-offset: 1px;
	border-color: var(--spc-accent);
}

.spc-error {
	margin: 10px 0 0;
	color: #ff9a92;
	font-size: 0.95rem;
}

.spc-btn {
	display: inline-block;
	margin-top: 16px;
	padding: 12px 22px;
	font: inherit;
	font-weight: 700;
	color: var(--spc-on-accent);
	background: var(--spc-accent);
	border: 1px solid var(--spc-accent);
	border-radius: 8px;
	cursor: pointer;
}

.spc-btn:hover {
	filter: brightness(1.1);
}

.spc-btn[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.spc-btn--ghost {
	margin-top: 0;
	padding: 8px 16px;
	color: var(--spc-accent);
	background: transparent;
}

.spc-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.08);
	filter: none;
}

/* Cabecera de resultados */
.spc-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}

.spc-hello {
	margin: 0;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--spc-muted);
}

.spc-client {
	margin: 2px 0 0;
	font-size: 1.8rem;
	line-height: 1.15;
}

.spc-meta {
	margin: 0 0 24px;
	font-size: 0.9rem;
	color: var(--spc-muted);
}

.spc-link {
	padding: 0;
	margin-left: 4px;
	font: inherit;
	color: var(--spc-accent);
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}

.spc-meta .spc-link:first-child {
	margin-left: 0;
}

.spc-h {
	margin: 0;
	font-size: 1.1rem;
}

/* Barra de orden */
.spc-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 28px 0 14px;
}

.spc-sort {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.9rem;
	color: #ffffff;
}

/* Selector: relleno negro y borde verde en todos los estados (el tema de la web
   intenta pintarlo de blanco al enfocarlo, por eso se fuerza). */
.spc .spc-select,
.spc .spc-select:hover,
.spc .spc-select:focus,
.spc .spc-select:active {
	max-width: 100%;
	padding: 9px 12px;
	font: inherit;
	font-size: 0.95rem;
	color: #ffffff !important;
	background-color: #000000 !important;
	border: 1px solid var(--spc-accent) !important;
	border-radius: 8px;
	color-scheme: dark;
	box-shadow: none;
}

.spc .spc-select:focus {
	outline: 2px solid var(--spc-accent);
	outline-offset: 1px;
}

.spc .spc-select option {
	color: #ffffff;
	background-color: #000000;
}

/* La caja del código, igual de protegida frente al tema */
.spc .spc-input:hover,
.spc .spc-input:focus,
.spc .spc-input:active {
	color: #ffffff !important;
	background-color: #161616 !important;
	color-scheme: dark;
}

/* Bloques por cliente (cuando se ven los trabajos de más de un cliente) */
.spc-group {
	margin-top: 26px;
}

.spc-group:first-of-type {
	margin-top: 0;
}

.spc-group-title {
	margin: 0 0 12px;
	padding-bottom: 8px;
	font-size: 1rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--spc-accent);
	border-bottom: 1px solid var(--spc-line);
}

.spc-foot {
	margin: 14px 0 0;
	font-size: 0.85rem;
	color: var(--spc-muted);
}

/* Lista de trabajos */
.spc-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.spc-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	margin-bottom: 10px;
	color: var(--spc-text);
	background: var(--spc-card);
	border: 1px solid var(--spc-line);
	border-radius: var(--spc-radius);
}

.spc-item-main {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.spc-item-title {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.spc-date {
	font-size: 0.85rem;
	color: var(--spc-muted);
}

.spc-item--done {
	background: rgba(255, 255, 255, 0.03);
}

/* Etiquetas de estado */
.spc-chip {
	flex: 0 0 auto;
	padding: 5px 12px;
	font-size: 0.85rem;
	font-weight: 600;
	white-space: nowrap;
	color: #ececec;
	background: rgba(255, 255, 255, 0.14);
	border-radius: 999px;
}

.spc-chip--en-preparacion {
	color: #ececec;
	background: rgba(255, 255, 255, 0.14);
}

.spc-chip--en-produccion {
	color: #ffd48f;
	background: rgba(245, 176, 65, 0.2);
}

.spc-chip--taller {
	color: #b2cdff;
	background: rgba(90, 150, 255, 0.22);
}

.spc-chip--listo-para-recoger {
	color: #94e6b3;
	background: rgba(80, 200, 120, 0.22);
}

.spc-chip--entregado {
	color: #b8b8b8;
	background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 520px) {
	.spc-login {
		padding: 20px;
	}

	.spc-client {
		font-size: 1.5rem;
	}

	.spc-sort {
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.spc-select {
		width: 100%;
	}

	.spc-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}
