/* AEW Partners — panel de frontend.
   Todo va namespaced bajo .aewp para no pelearse con el tema ni con Elementor.
   Cambia las variables de abajo para adaptarlo a la marca del sitio. */

.aewp {
	--aewp-bg: #101018;
	--aewp-surface: #191922;
	--aewp-surface-2: #21212d;
	--aewp-border: #2c2c3a;
	--aewp-text: #ecebf2;
	--aewp-muted: #8d8ba3;
	--aewp-accent: #e0195b;
	--aewp-ok: #35c98a;
	--aewp-warn: #f2b13c;
	--aewp-radius: 10px;
	--aewp-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	background: var(--aewp-bg);
	color: var(--aewp-text);
	border-radius: var(--aewp-radius);
	padding: 28px;
	font-size: 15px;
	line-height: 1.55;
	box-sizing: border-box;
}

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

.aewp a {
	color: inherit;
}

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

.aewp-head {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	justify-content: space-between;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--aewp-border);
}

.aewp-head__right {
	display: flex;
	align-items: center;
	gap: 14px;
}

.aewp-eyebrow {
	margin: 0 0 4px;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--aewp-muted);
}

.aewp-name {
	margin: 0;
	font-size: 26px;
	line-height: 1.15;
	font-weight: 650;
	letter-spacing: -0.01em;
	color: var(--aewp-text);
}

.aewp-h3 {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 600;
}

.aewp-muted {
	color: var(--aewp-muted);
}

.aewp-accent {
	color: var(--aewp-accent);
}

.aewp-mono {
	font-family: var(--aewp-mono);
	font-variant-numeric: tabular-nums;
}

.aewp-link {
	color: var(--aewp-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.aewp-link:hover,
.aewp-link:focus-visible {
	color: var(--aewp-text);
}

/* --- Pestañas ---------------------------------------------------------- */

.aewp-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 18px 0 24px;
}

.aewp-tab {
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 14px;
	text-decoration: none;
	color: var(--aewp-muted);
	border: 1px solid transparent;
}

.aewp-tab:hover,
.aewp-tab:focus-visible {
	color: var(--aewp-text);
	background: var(--aewp-surface);
}

.aewp-tab.is-active {
	color: var(--aewp-text);
	background: var(--aewp-surface-2);
	border-color: var(--aewp-border);
}

/* --- Tarjetas de cifras ------------------------------------------------ */

.aewp-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin-bottom: 28px;
}

.aewp-card {
	background: var(--aewp-surface);
	border: 1px solid var(--aewp-border);
	border-radius: var(--aewp-radius);
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.aewp-card--accent {
	border-color: var(--aewp-accent);
}

.aewp-card--accent .aewp-card__num {
	color: var(--aewp-accent);
}

.aewp-card__label {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--aewp-muted);
}

.aewp-card__num {
	font-family: var(--aewp-mono);
	font-variant-numeric: tabular-nums;
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.aewp-card__foot {
	font-size: 13px;
	color: var(--aewp-muted);
}

/* --- Gráfica ----------------------------------------------------------- */

.aewp-chart-block {
	background: var(--aewp-surface);
	border: 1px solid var(--aewp-border);
	border-radius: var(--aewp-radius);
	padding: 18px;
}

.aewp-chart-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.aewp-chart-head h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.aewp-chart {
	position: relative;
	min-height: 240px;
}

/* --- Barra de cobro (elemento firma) ----------------------------------- */

.aewp-payline {
	background: var(--aewp-surface);
	border: 1px solid var(--aewp-border);
	border-radius: var(--aewp-radius);
	padding: 18px;
	margin-bottom: 22px;
}

.aewp-payline__nums {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	margin-bottom: 14px;
}

.aewp-payline__nums strong {
	display: block;
	font-size: 22px;
	font-weight: 600;
}

.aewp-bar {
	height: 8px;
	border-radius: 999px;
	background: var(--aewp-surface-2);
	overflow: hidden;
}

.aewp-bar span {
	display: block;
	height: 100%;
	background: var(--aewp-ok);
	border-radius: 999px;
	transition: width 0.6s ease;
}

/* --- Tablas ------------------------------------------------------------ */

.aewp-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--aewp-border);
	border-radius: var(--aewp-radius);
}

.aewp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	background: var(--aewp-surface);
}

.aewp-table th,
.aewp-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--aewp-border);
	vertical-align: top;
}

.aewp-table thead th {
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--aewp-muted);
	font-weight: 500;
	background: var(--aewp-surface-2);
}

.aewp-table tbody tr:last-child td {
	border-bottom: 0;
}

.aewp-num {
	text-align: right;
}

/* --- Chips de estado --------------------------------------------------- */

.aewp-chip {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.6;
	white-space: nowrap;
	border: 1px solid var(--aewp-border);
	background: var(--aewp-surface-2);
	color: var(--aewp-muted);
}

.aewp-chip--nuevo {
	border-color: var(--aewp-accent);
	color: var(--aewp-accent);
}

.aewp-chip--ganado,
.aewp-chip--pagada {
	border-color: var(--aewp-ok);
	color: var(--aewp-ok);
}

.aewp-chip--presupuesto,
.aewp-chip--pendiente,
.aewp-chip--aprobada {
	border-color: var(--aewp-warn);
	color: var(--aewp-warn);
}

/* --- Formularios ------------------------------------------------------- */

.aewp-form__title {
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 600;
}

.aewp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
}

.aewp-field {
	display: block;
	margin-bottom: 14px;
}

.aewp-field > span {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	color: var(--aewp-muted);
}

.aewp-field input,
.aewp-field select,
.aewp-field textarea,
.aewp-filters input,
.aewp-filters select,
.aewp-year select {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--aewp-border);
	background: var(--aewp-surface-2);
	color: var(--aewp-text);
	font: inherit;
}

.aewp-field input:focus,
.aewp-field select:focus,
.aewp-field textarea:focus {
	outline: 2px solid var(--aewp-accent);
	outline-offset: 1px;
	border-color: var(--aewp-accent);
}

.aewp-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 6px 0 18px;
	font-size: 13px;
	color: var(--aewp-muted);
}

.aewp-check input {
	margin-top: 4px;
	accent-color: var(--aewp-accent);
}

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

.aewp-form-wrap {
	position: relative;
}

.aewp-btn {
	display: inline-block;
	padding: 11px 20px;
	border-radius: 8px;
	border: 1px solid var(--aewp-accent);
	background: var(--aewp-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.aewp-btn:hover,
.aewp-btn:focus-visible {
	filter: brightness(1.1);
	color: #fff;
}

.aewp-btn--ghost {
	background: transparent;
	border-color: var(--aewp-border);
	color: var(--aewp-text);
	font-weight: 500;
}

.aewp-btn--ghost:hover,
.aewp-btn--ghost:focus-visible {
	border-color: var(--aewp-text);
	color: var(--aewp-text);
	filter: none;
}

.aewp-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
}

.aewp-filters input[type="search"] {
	flex: 1 1 220px;
}

.aewp-filters select {
	flex: 0 1 200px;
}

.aewp-year select {
	width: auto;
	padding: 6px 10px;
}

/* --- Avisos y vacíos --------------------------------------------------- */

.aewp-alert {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 18px;
	font-size: 14px;
	border: 1px solid var(--aewp-border);
	background: var(--aewp-surface);
}

.aewp-alert--ok {
	border-color: var(--aewp-ok);
	color: var(--aewp-ok);
}

.aewp-alert--err {
	border-color: var(--aewp-accent);
	color: var(--aewp-accent);
}

.aewp-empty {
	padding: 40px 20px;
	text-align: center;
	border: 1px dashed var(--aewp-border);
	border-radius: var(--aewp-radius);
	color: var(--aewp-muted);
}

.aewp-empty p {
	margin: 0 0 14px;
}

/* --- Materiales y perfil ----------------------------------------------- */

.aewp-materials {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
}

.aewp-material {
	background: var(--aewp-surface);
	border: 1px solid var(--aewp-border);
	border-radius: var(--aewp-radius);
	padding: 18px;
}

.aewp-material h4 {
	margin: 0 0 6px;
	font-size: 16px;
}

.aewp-def {
	margin: 0 0 20px;
	display: grid;
	gap: 1px;
	background: var(--aewp-border);
	border: 1px solid var(--aewp-border);
	border-radius: var(--aewp-radius);
	overflow: hidden;
}

.aewp-def > div {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 12px 16px;
	background: var(--aewp-surface);
}

.aewp-def dt {
	flex: 0 0 160px;
	color: var(--aewp-muted);
	font-size: 13px;
}

.aewp-def dd {
	margin: 0;
	flex: 1 1 200px;
	word-break: break-word;
}

/* --- Login ------------------------------------------------------------- */

.aewp-login {
	max-width: 420px;
	margin: 0 auto;
}

.aewp-login .login-username label,
.aewp-login .login-password label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	color: var(--aewp-muted);
}

.aewp-login input[type="text"],
.aewp-login input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid var(--aewp-border);
	background: var(--aewp-surface-2);
	color: var(--aewp-text);
	font: inherit;
	margin-bottom: 14px;
}

.aewp-login input[type="submit"] {
	padding: 11px 20px;
	border-radius: 8px;
	border: 0;
	background: var(--aewp-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.aewp-warn {
	padding: 12px 16px;
	border: 1px dashed #f2b13c;
	border-radius: 8px;
	color: #8a6100;
	background: #fff8e6;
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 600px) {
	.aewp {
		padding: 18px 14px;
	}

	.aewp-name {
		font-size: 22px;
	}

	.aewp-payline__nums {
		gap: 20px;
	}

	.aewp-def dt {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aewp-bar span {
		transition: none;
	}
}
