/* =========================================================================
 * Nodxo360° · Estilos del núcleo
 * Usuarios Residentes: menú blanco. Administración: menú gris oscuro. Contenido claro en ambos. Regla de contraste:
 * texto oscuro sobre fondos claros y texto claro sobre fondos oscuros.
 * ====================================================================== */

:root {
	--nx-primary: #12D4C9;
	--nx-secondary: #2AA6D1;
	--nx-on-primary: #0F2A33;
	--nx-danger: #D93B4A;
	--nx-warning: #F5B82E;
	--nx-ok: #18A957;
	--nx-radius: 14px;
	--nx-radius-sm: 10px;
	--nx-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
	--nx-sidebar-w: 300px;
	--nx-header-h: 72px;
	/* Tema claro (residente) */
	--nx-bg: #F4F6F8;
	--nx-surface: #FFFFFF;
	--nx-surface-2: #F8FAFB;
	--nx-text: #0F2A33;
	--nx-muted: #5B6F78;
	--nx-border: #E3E9ED;
	--nx-side-bg: #FFFFFF;
	--nx-side-text: #23363E;
	--nx-side-hover: #EEF5F7;
	--nx-shadow: 0 1px 2px rgba(15, 42, 51, .05), 0 6px 20px rgba(15, 42, 51, .06);
}

.nx-app {
	/* Menú lateral del residente: blanco */
	--nx-side-muted: #5B6F78;
	--nx-side-border: #E3E9ED;
	--nx-side-input: #F1F4F6;
	--nx-side-active: #E6F8F7;
	--nx-side-active-text: #0F2A33;
	--nx-head-grad: linear-gradient(90deg, #12D4C9 0%, #2AA6D1 100%);
	--nx-head-text: #0F2A33;
	--nx-dark-card: #4A4D52;
}

/* Administración: menú lateral gris oscuro de la marca y contenido claro (como el panel actual). */
.nx-panel--admin {
	--nx-side-bg: #3A3A3A;
	--nx-side-text: #F2F4F5;
	--nx-side-muted: #C4CACD;
	--nx-side-hover: #464646;
	--nx-side-border: #4B4B4B;
	--nx-side-input: #474747;
	--nx-side-active: #4F5356;
	--nx-side-active-text: #FFFFFF;
}

/* ---------- Base ---------- */
body.nx-canvas { margin: 0; background: var(--nx-bg); }
.nx-app, .nx-auth, .nx-center-msg, .nx-standalone {
	font-family: var(--nx-font); color: var(--nx-text); font-size: 15px; line-height: 1.5;
	-webkit-font-smoothing: antialiased; box-sizing: border-box;
}
.nx-app *, .nx-auth *, .nx-center-msg *, .nx-standalone * { box-sizing: border-box; }
.nx-app a, .nx-auth a, .nx-standalone a { color: var(--nx-secondary); text-decoration: none; }
.nx-icon { flex: none; vertical-align: middle; }
.nx-muted { color: var(--nx-muted); }
.nx-help { color: var(--nx-muted); font-size: 13px; margin: 6px 0 12px; }
.nx-upper { text-transform: uppercase; }
[hidden] { display: none !important; }

/* ---------- Botones ---------- */
.nx-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font: 600 14px/1 var(--nx-font); padding: 12px 18px; border-radius: var(--nx-radius-sm);
	border: 1px solid transparent; cursor: pointer; transition: filter .15s, transform .05s;
	text-decoration: none !important; white-space: nowrap;
}
.nx-btn:active { transform: translateY(1px); }
.nx-app .nx-btn--primary, .nx-auth .nx-btn--primary, .nx-center-msg .nx-btn--primary, .nx-btn--primary { background: var(--nx-primary); color: var(--nx-on-primary) !important; }
.nx-btn--primary:hover { filter: brightness(.95); }
.nx-app .nx-btn--ghost, .nx-center-msg .nx-btn--ghost, .nx-btn--ghost { background: transparent; color: var(--nx-text) !important; border-color: var(--nx-border); }
.nx-btn--ghost:hover { background: var(--nx-surface-2); }
.nx-app .nx-btn--danger, .nx-btn--danger { background: var(--nx-danger); color: #fff !important; }
.nx-btn--sm { padding: 8px 12px; font-size: 13px; }
.nx-btn--block { width: 100%; }
.nx-link { background: none; border: 0; padding: 0; color: var(--nx-secondary); font: 500 13px var(--nx-font); cursor: pointer; }
.nx-icon-btn {
	display: inline-flex; align-items: center; justify-content: center; position: relative;
	width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent;
	color: var(--nx-text) !important; cursor: pointer;
}
.nx-icon-btn:hover { background: var(--nx-surface-2); }
.nx-icon-btn--danger { color: var(--nx-danger) !important; }

/* ---------- Formularios ---------- */
.nx-form { display: block; }
.nx-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 500; color: var(--nx-text); }
.nx-field > span { color: var(--nx-muted); }
.nx-field small { color: var(--nx-muted); font-weight: 400; display: flex; align-items: center; gap: 4px; }
.nx-field--inline { flex-direction: row; align-items: center; margin: 0; }
.nx-app input[type=text], .nx-app input[type=email], .nx-app input[type=password], .nx-app input[type=tel],
.nx-app input[type=number], .nx-app input[type=date], .nx-app input[type=search], .nx-app select, .nx-app textarea,
.nx-auth input[type=text], .nx-auth input[type=email], .nx-auth input[type=password], .nx-auth input[type=tel], .nx-auth select,
.nx-input {
	width: 100%; font: 400 15px var(--nx-font); color: var(--nx-text); background: var(--nx-surface);
	border: 1px solid var(--nx-border); border-radius: var(--nx-radius-sm); padding: 11px 13px; outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.nx-app input:focus, .nx-app select:focus, .nx-app textarea:focus, .nx-auth input:focus, .nx-auth select:focus {
	border-color: var(--nx-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nx-primary) 25%, transparent);
}
.nx-app input[type=file] { font: 13px var(--nx-font); color: var(--nx-muted); }
.nx-input--sm { padding: 8px 12px; font-size: 14px; max-width: 260px; }
.nx-field .is-invalid, .nx-auth .is-invalid { border-color: var(--nx-danger) !important; }
.nx-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.nx-check input { width: 18px; height: 18px; accent-color: var(--nx-primary); }
.nx-check--field { margin: 26px 0 14px; }
.nx-pass { position: relative; display: block; }
.nx-pass input { padding-right: 44px !important; }
.nx-pass__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--nx-muted); cursor: pointer; padding: 6px; }
.nx-form--boxed { background: var(--nx-surface-2); border: 1px solid var(--nx-border); border-radius: var(--nx-radius-sm); padding: 16px; margin: 0 0 16px; }
.nx-inline { display: inline; margin: 0; }
.nx-grid-2, .nx-grid-3 { display: grid; gap: 0 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nx-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nx-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nx-row--between { justify-content: space-between; }
.nx-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.nx-filters .nx-field { margin: 0; }

/* ---------- Avisos de formulario ---------- */
.nx-alert { padding: 12px 14px; border-radius: var(--nx-radius-sm); margin: 0 0 14px; font-size: 14px; border: 1px solid; }
.nx-alert--ok { background: #E7F7EE; border-color: #B9E7CC; color: #0D5E30; }
.nx-alert--error { background: #FDECEE; border-color: #F6C3C9; color: #8E1B26; }
.nx-alert--info { background: #E8F5FA; border-color: #BFE3F0; color: #0F4A5E; }
.nx-alert a { color: inherit; text-decoration: underline; }

/* ---------- Ingreso y registro ---------- */
.nx-auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; min-height: 100dvh; background: #fff; }
.nx-auth__hero {
	position: relative; display: flex; align-items: flex-end; padding: 56px;
	background: linear-gradient(135deg, #0F2A33, #12505E) center/cover no-repeat; color: #fff;
}
.nx-auth__hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 24, 30, .25) 0%, rgba(8, 24, 30, .82) 100%); }
.nx-auth__hero-inner { position: relative; max-width: 460px; }
.nx-auth__hero h2 { font-size: 34px; line-height: 1.15; margin: 24px 0 12px; font-weight: 700; color: #fff; }
.nx-auth__hero p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 16px; }
.nx-auth__logo { max-height: 84px; max-width: 260px; display: block; }
.nx-auth__main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.nx-auth__card { width: 100%; max-width: 400px; }
.nx-auth__card--wide { max-width: 560px; }
.nx-auth__card h1 { font-size: 28px; margin: 0 0 4px; font-weight: 700; color: #0F2A33; }
.nx-auth__card > .nx-muted { margin: 0 0 24px; }
.nx-auth__logo-mobile { display: none; max-height: 64px; max-width: 200px; margin: 0 auto 20px; }
.nx-auth__alt { text-align: center; margin: 22px 0 0; font-size: 14px; color: #5B6F78; }
.nx-auth__sello { display: block; margin: 32px auto 0; max-height: 26px; max-width: 180px; opacity: .9; }
.nx-auth .nx-btn--block { margin-top: 18px; padding: 14px; font-size: 15px; }
.nx-auth .nx-row--between { font-size: 14px; }
.nx-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 16px 0 22px; counter-reset: s; }
.nx-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5B6F78; padding-bottom: 10px; border-bottom: 3px solid #E3E9ED; }
.nx-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #E3E9ED; color: #0F2A33; font-weight: 600; font-size: 12px; }
.nx-steps li.is-active, .nx-steps li.is-done { color: #0F2A33; border-color: var(--nx-primary); font-weight: 600; }
.nx-steps li.is-active span, .nx-steps li.is-done span { background: var(--nx-primary); color: var(--nx-on-primary); }
.nx-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.nx-step legend { font-weight: 600; font-size: 16px; margin-bottom: 14px; padding: 0; color: #0F2A33; }
.js-nx .nx-step { display: none; }
.js-nx .nx-step.is-active { display: block; }
.nx-step-actions { margin-top: 10px; }
.nx-step-actions [data-nx-next], .nx-step-actions [data-nx-submit] { margin-left: auto; }
.js-nx .nx-step-actions [data-nx-submit] { display: none; }
.js-nx .nx-step-actions.is-last [data-nx-submit] { display: inline-flex; }
.js-nx .nx-step-actions.is-last [data-nx-next] { display: none; }
.nx-habeas { max-height: 220px; overflow: auto; background: #F8FAFB; border: 1px solid #E3E9ED; border-radius: 10px; padding: 14px 16px; font-size: 13px; color: #23363E; margin-bottom: 14px; }

/* ---------- Mensajes centrados ---------- */
.nx-center-msg { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--nx-bg); }
.nx-center-msg .nx-card { text-align: center; max-width: 460px; }
.nx-center-msg__logo { max-height: 64px; max-width: 200px; margin-bottom: 18px; }
.nx-center-msg h2 { margin: 10px 0 8px; font-size: 22px; }
.nx-center-msg p { color: var(--nx-muted); margin: 0 0 20px; }
.nx-badge-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: color-mix(in srgb, var(--nx-primary) 18%, #fff); color: #0F2A33; }
.nx-badge-icon--error { background: #FDECEE; color: #8E1B26; }

/* ---------- Armazón del panel ---------- */
.nx-app { display: flex; min-height: 100vh; min-height: 100dvh; background: var(--nx-bg); }
.nx-sidebar {
	position: sticky; top: 0; height: 100vh; height: 100dvh; width: var(--nx-sidebar-w); flex: none;
	display: flex; flex-direction: column; background: var(--nx-side-bg); color: var(--nx-side-text);
	border-right: 1px solid var(--nx-side-border); z-index: 40;
}
.nx-sidebar__brand { padding: 18px 18px 14px; border-bottom: 1px solid var(--nx-side-border); }
.nx-sidebar__logo { max-height: 64px; max-width: 230px; display: block; }
.nx-sidebar__sello--top { margin: 8px 0 0 auto !important; max-height: 16px !important; }
.nx-sidebar__search { margin: 4px 16px 12px; position: relative; color: var(--nx-side-muted); }
.nx-sidebar__search .nx-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
.nx-sidebar__search input { padding-left: 36px !important; background: var(--nx-side-input) !important; border-color: transparent !important; color: var(--nx-side-text) !important; font-size: 14px !important; }
.nx-sidebar__search input::placeholder { color: var(--nx-side-muted); }
.nx-menu { flex: 1; overflow-y: auto; padding: 0 0 12px; }
.nx-menu__block { --nx-block: var(--nx-primary); margin-bottom: 2px; }
/* Encabezado de bloque: franja turquesa→azul de la marca (texto oscuro por la regla de contraste). */
.nx-menu__head {
	width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border: 0; background: var(--nx-head-grad);
	color: var(--nx-head-text); font: 700 12px var(--nx-font); text-transform: uppercase; letter-spacing: .03em; cursor: pointer; text-align: left;
}
.nx-menu__head:hover { filter: brightness(1.04); }
.nx-panel--admin .nx-menu__dot { display: none; }
.nx-menu__list { padding: 6px 10px !important; }
.nx-menu__label { flex: 1; }
.nx-menu__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--nx-block); flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.nx-menu__head .nx-icon { transition: transform .2s; }
.nx-menu__block.is-open .nx-menu__head .nx-icon { transform: rotate(180deg); }
.nx-menu__list { list-style: none; margin: 0; padding: 0; display: none; }
.nx-menu__block.is-open .nx-menu__list { display: block; }
.nx-menu__item {
	display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0; border-radius: 10px;
	color: var(--nx-side-text) !important; font-size: 13.5px; font-weight: 500; line-height: 1.3; text-decoration: none !important; padding-top: 8px; padding-bottom: 8px;
}
.nx-menu__item:hover { background: var(--nx-side-hover); }
.nx-menu__item.is-active { background: var(--nx-side-active); color: var(--nx-side-active-text) !important; font-weight: 600; box-shadow: inset 3px 0 0 var(--nx-primary); }
.nx-sidebar__foot { border-top: 1px solid var(--nx-side-border); padding: 10px 12px 16px; }
.nx-sidebar__sello { display: block; max-height: 22px; max-width: 160px; margin: 12px auto 0; opacity: .85; }
.nx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nx-header {
	position: sticky; top: 0; z-index: 30; height: var(--nx-header-h); display: flex; align-items: center; gap: 12px;
	padding: 0 28px; background: color-mix(in srgb, var(--nx-bg) 88%, transparent); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--nx-border);
}
.nx-header__menu { display: none; }
.nx-header { height: 88px; padding: 0 24px; gap: 18px; background: var(--nx-bg); border-bottom: 0; }
.nx-search { position: relative; flex: 1; max-width: 760px; display: flex; align-items: center; background: #fff; border-radius: 12px; box-shadow: var(--nx-shadow); }
.nx-search > .nx-icon { position: absolute; left: 16px; color: var(--nx-secondary); }
.nx-app .nx-search input[type=search] { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 15px 14px 15px 46px !important; font-size: 15px; }
.nx-search__btn { flex: none; align-self: stretch; border: 0; border-radius: 0 12px 12px 0; padding: 0 28px; background: var(--nx-head-grad); color: var(--nx-head-text); font: 700 14px var(--nx-font); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.nx-search__btn:hover { filter: brightness(1.05); }
.nx-search__results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--nx-border); border-radius: 12px; box-shadow: var(--nx-shadow); padding: 6px; z-index: 60; max-height: 340px; overflow: auto; }
.nx-search__results a { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--nx-text) !important; font-size: 14px; }
.nx-search__results a:hover { background: var(--nx-surface-2); }
.nx-search__results p { margin: 0; padding: 12px; color: var(--nx-muted); font-size: 14px; }
.nx-welcome, .nx-where { margin: 0; font-size: 15px; color: var(--nx-text); white-space: nowrap; }
.nx-welcome strong { font-weight: 700; }
.nx-where { font-weight: 600; font-size: 16px; }
.nx-emoji { font-size: 16px; line-height: 1; width: 22px; text-align: center; flex: none; }
.nx-emoji--lg { font-size: 21px; width: auto; }
.nx-header .nx-avatar--ring { width: 64px; height: 64px; padding: 3px; background: conic-gradient(var(--nx-primary), var(--nx-secondary), var(--nx-primary)); }
.nx-header .nx-avatar--ring > img, .nx-header .nx-avatar--ring > span { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--nx-text); object-fit: cover; font-size: 18px; border: 2px solid #fff; }
.nx-page-title { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 24px; font-weight: 700; color: var(--nx-text); }
.nx-header__title { flex: 1; min-width: 0; }
.nx-header__title h1 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--nx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-header__title p { margin: 2px 0 0; font-size: 13px; color: var(--nx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-header__actions { display: flex; align-items: center; gap: 6px; }
.nx-count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--nx-danger); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.nx-avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; overflow: hidden; cursor: pointer; background: var(--nx-primary); color: var(--nx-on-primary); display: inline-grid; place-items: center; font: 600 14px var(--nx-font); flex: none; }
.nx-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nx-avatar--lg { width: 72px; height: 72px; font-size: 24px; cursor: default; }
.nx-content { padding: 12px 28px 32px; flex: 1; max-width: none; width: 100%; box-sizing: border-box; }
.nx-content.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s; }
.nx-backdrop { display: none; }

/* Desplegables */
.nx-dropdown { position: relative; }
.nx-dropdown__menu {
	position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--nx-surface); color: var(--nx-text);
	border: 1px solid var(--nx-border); border-radius: var(--nx-radius); box-shadow: var(--nx-shadow); padding: 6px; z-index: 50;
}
.nx-dropdown__menu > a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--nx-text) !important; font-size: 14px; }
.nx-dropdown__menu > a:hover { background: var(--nx-surface-2); }
.nx-dropdown__who { padding: 10px 12px; border-bottom: 1px solid var(--nx-border); margin-bottom: 4px; display: flex; flex-direction: column; }
.nx-dropdown__who small { color: var(--nx-muted); }
.nx-bell { width: 360px; max-width: calc(100vw - 24px); padding: 0; }
.nx-bell__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--nx-border); }
.nx-bell__list { max-height: 380px; overflow: auto; }
.nx-bell__item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--nx-border); color: var(--nx-text) !important; font-size: 13.5px; }
.nx-bell__item:hover { background: var(--nx-surface-2); }
.nx-bell__item.is-unread { background: color-mix(in srgb, var(--nx-primary) 9%, transparent); }
.nx-bell__item strong { display: block; font-size: 14px; }
.nx-bell__item small { color: var(--nx-muted); }
.nx-bell__item .nx-tag { margin-left: 6px; }
.nx-bell__empty { padding: 24px 16px; text-align: center; color: var(--nx-muted); font-size: 14px; }
.nx-bell__push { width: 100%; border: 0; border-top: 1px solid var(--nx-border); background: none; padding: 12px; font: 600 13px var(--nx-font); color: var(--nx-text); cursor: pointer; display: flex; gap: 8px; justify-content: center; align-items: center; }

/* ---------- Tarjetas y piezas ---------- */
.nx-card { background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: var(--nx-radius); padding: 22px; box-shadow: var(--nx-shadow); margin-bottom: 20px; color: var(--nx-text); }
.nx-card--dark { background: var(--nx-dark-card); border-color: var(--nx-dark-card); color: #FFFFFF; }
.nx-card--dark .nx-card__title, .nx-card--dark h2, .nx-card--dark h3 { color: #FFFFFF; }
.nx-card--accent { border-left: 4px solid var(--nx-warning); }
.nx-card--narrow { max-width: 460px; }
.nx-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.nx-card__head .nx-card__title { margin: 0; }
.nx-card__title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; margin: 0 0 14px; color: var(--nx-text); }
.nx-card__title--lg { font-size: 20px; }
.nx-subtitle { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--nx-muted); margin: 22px 0 10px; font-weight: 600; }
.nx-grid { display: grid; gap: 20px; }
.nx-grid > .nx-card { margin: 0; }
.nx-grid--dash { grid-template-columns: 1.3fr 1fr; }
.nx-grid--profile { grid-template-columns: minmax(300px, 400px) 1fr; align-items: start; }
.nx-card--full { grid-column: 1 / -1; }
.nx-stack > .nx-card:last-child { margin-bottom: 0; }
.nx-hero-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg, var(--nx-primary), var(--nx-secondary)); color: var(--nx-on-primary); border: 0; }
.nx-hero-card h2 { margin: 4px 0; font-size: 24px; color: var(--nx-on-primary); }
.nx-hero-card p { margin: 0; color: var(--nx-on-primary); opacity: .9; }
.nx-hero-card .nx-icon { opacity: .5; }
.nx-eyebrow { text-transform: uppercase; font-size: 12px; letter-spacing: .08em; font-weight: 600; }
.nx-empty { padding: 28px; text-align: center; color: var(--nx-muted); background: var(--nx-surface-2); border: 1px dashed var(--nx-border); border-radius: var(--nx-radius-sm); }
.nx-empty--sm { padding: 16px; font-size: 14px; }
.nx-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.nx-shortcut { --nx-block: var(--nx-primary); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border-radius: 12px; background: var(--nx-surface-2); border: 1px solid var(--nx-border); color: var(--nx-text) !important; font-weight: 500; font-size: 14px; transition: transform .1s, box-shadow .15s; }
.nx-shortcut:hover { transform: translateY(-2px); box-shadow: var(--nx-shadow); }
.nx-shortcut__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--nx-block) 18%, transparent); color: var(--nx-text); }
.nx-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.nx-kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--nx-radius); background: var(--nx-surface); border: 1px solid var(--nx-border); color: var(--nx-text) !important; box-shadow: var(--nx-shadow); }
.nx-kpi__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--nx-primary) 18%, transparent); color: var(--nx-primary); margin-bottom: 6px; }
.nx-kpi__value { font-size: 28px; font-weight: 700; line-height: 1; }
.nx-kpi__label { font-size: 13px; color: var(--nx-muted); }
.nx-kpi--alert { border-color: var(--nx-warning); }
.nx-kpi--alert .nx-kpi__icon { background: color-mix(in srgb, var(--nx-warning) 22%, transparent); color: var(--nx-warning); }

.nx-list { list-style: none; margin: 0; padding: 0; }
.nx-list__item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--nx-border); }
.nx-list__item:last-child { border-bottom: 0; }
.nx-list__item--wrap { flex-wrap: wrap; }
.nx-list__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nx-list__body small { color: var(--nx-muted); font-size: 13px; }
.nx-list__actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nx-thumb { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--nx-surface-2); color: var(--nx-muted); flex: none; }
.nx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nx-plate { display: inline-block; background: #F7D417; color: #111; border: 2px solid #111; border-radius: 5px; padding: 0 8px; font-weight: 700; letter-spacing: .05em; font-size: 14px; }
.nx-tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--nx-surface-2); color: var(--nx-text); border: 1px solid var(--nx-border); white-space: nowrap; }
.nx-tag--primary { background: color-mix(in srgb, var(--nx-primary) 20%, transparent); border-color: transparent; }
.nx-tag--activo { background: #E7F7EE; color: #0D5E30; border-color: transparent; }
.nx-tag--nuevo { background: #E8F5FA; color: #0F4A5E; border-color: transparent; }
.nx-tag--desocupado { background: #FFF4DB; color: #6B4A00; border-color: transparent; }
.nx-profile-card__top { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.nx-profile-card__top h2 { margin: 0; font-size: 19px; }
.nx-profile-card__top p { margin: 2px 0 6px; font-size: 13px; }
.nx-profile-card .nx-grid-2 { grid-template-columns: 1fr; }
.nx-dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.nx-dl dt { color: var(--nx-muted); }
.nx-dl dd { margin: 0; word-break: break-word; }
.nx-details, .nx-reject { margin-top: 12px; }
.nx-details summary { cursor: pointer; color: var(--nx-primary); font-size: 14px; font-weight: 500; }
.nx-reject summary { list-style: none; }
.nx-reject summary::-webkit-details-marker { display: none; }
.nx-reject[open] { flex-basis: 100%; }
.nx-reject .nx-form--boxed { margin-top: 10px; }
.nx-back { display: inline-block; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.nx-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; font-size: 14px; color: var(--nx-muted); }
.nx-subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.nx-subtabs a { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--nx-border); color: var(--nx-text) !important; font-size: 14px; font-weight: 500; }
.nx-subtabs a.is-active { background: var(--nx-primary); color: var(--nx-on-primary) !important; border-color: transparent; }

/* Tablas */
.nx-table-wrap { overflow-x: auto; }
.nx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nx-table th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--nx-muted); padding: 10px 12px; border-bottom: 1px solid var(--nx-border); white-space: nowrap; }
.nx-table td { padding: 12px; border-bottom: 1px solid var(--nx-border); vertical-align: middle; color: var(--nx-text); }
.nx-table tr:last-child td { border-bottom: 0; }
.nx-table tbody tr:hover td { background: var(--nx-surface-2); }

/* Ajustes (panel del administrador) */
.nx-form-table { width: 100%; border-collapse: collapse; }
.nx-form-table th { text-align: left; width: 34%; padding: 14px 16px 14px 0; font-weight: 500; font-size: 14px; color: var(--nx-text); vertical-align: top; }
.nx-form-table td { padding: 10px 0; border-bottom: 1px solid var(--nx-border); }
.nx-form-table tr:last-child td { border-bottom: 0; }
.nx-brand-slot { width: 220px; height: 90px; display: grid; place-items: center; background: #fff; border: 1px solid #E3E9ED; border-radius: 10px; margin-bottom: 8px; padding: 10px; color: #5B6F78; font-size: 12px; text-align: center; }
.nx-brand-slot--dark { background: #0F2A33; border-color: #0F2A33; color: #CFDDE2; }
.nx-brand-note { margin: 0 0 8px !important; font-size: 12px; }
.nx-brand-note.is-set { color: var(--nx-ok); font-weight: 600; }
.nx-brand-slot img { max-width: 200px; max-height: 70px; width: auto; height: auto; object-fit: contain; }
.nx-brand-preview { display: grid; grid-template-columns: 1fr 1fr; padding: 0; overflow: hidden; }
.nx-brand-preview > div { padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; justify-content: center; }
.nx-brand-preview__light { background: #fff; }
.nx-brand-preview__dark { background: #0F2A33; }
.nx-brand-preview img { max-height: 70px; max-width: 220px; }
.nx-brand-preview .nx-brand-preview__sello { max-height: 22px; }

/* Pestaña suelta (shortcode por pestaña) */
.nx-standalone { background: var(--nx-bg); padding: 16px; border-radius: var(--nx-radius); }

/* ---------- Responsive: celular y tableta ---------- */
@media (max-width: 1300px) { .nx-app .nx-welcome { font-size: 15px; } .nx-app .nx-where { font-size: 15px; } .nx-refresh__tx { display: none; } }
@media (max-width: 1100px) { .nx-hello { display: none !important; } }
@media (max-width: 1100px) {
	.nx-grid--dash, .nx-grid--profile { grid-template-columns: 1fr; }
	.nx-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
	.nx-auth { grid-template-columns: 1fr; }
	.nx-auth__hero { display: none; }
	.nx-auth__logo-mobile { display: block; }
	.nx-auth__card h1, .nx-auth__card > .nx-muted { text-align: center; }
	.nx-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--nx-shadow); }
	.nx-app.is-menu-open .nx-sidebar { transform: none; }
	.nx-app.is-menu-open .nx-backdrop { display: block; position: fixed; inset: 0; background: rgba(8, 20, 25, .45); z-index: 35; }
	.nx-header { padding: 0 14px; padding-top: env(safe-area-inset-top); height: calc(var(--nx-header-h) + env(safe-area-inset-top)); }
	.nx-header__menu { display: inline-flex; }
	.nx-header { height: auto; min-height: 72px; flex-wrap: wrap; padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; gap: 10px; }
	.nx-welcome, .nx-where { display: none; }
	.nx-search { order: 3; flex-basis: 100%; max-width: none; }
	.nx-search__btn { padding: 0 16px; letter-spacing: .05em; }
	.nx-header .nx-avatar--ring { width: 48px; height: 48px; margin-left: auto; }
	.nx-header__title h1 { font-size: 17px; }
	.nx-content { padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); }
	.nx-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	.nx-grid-2, .nx-grid-3, .nx-filters { grid-template-columns: 1fr; }
	.nx-card { padding: 16px; }
	.nx-hero-card .nx-icon { display: none; }
	.nx-kpis { grid-template-columns: 1fr 1fr; }
	.nx-brand-preview { grid-template-columns: 1fr; }
	.nx-form-table, .nx-form-table tbody, .nx-form-table tr, .nx-form-table th, .nx-form-table td { display: block; width: 100%; }
	.nx-form-table th { padding: 12px 0 4px; }
	.nx-table thead { display: none; }
	.nx-table, .nx-table tbody, .nx-table tr, .nx-table td { display: block; width: 100%; }
	.nx-table tr { border-bottom: 1px solid var(--nx-border); padding: 8px 0; }
	.nx-table td { border: 0; padding: 4px 0; display: flex; gap: 10px; }
	.nx-table td[data-label]::before { content: attr(data-label); color: var(--nx-muted); font-size: 12px; min-width: 90px; }
	.nx-dl { grid-template-columns: 1fr; gap: 2px; }
	.nx-dl dd { margin-bottom: 8px; }
	.nx-steps li { font-size: 0; justify-content: center; }
	.nx-steps li span { font-size: 12px; }
	.nx-dropdown__menu { position: fixed; left: 12px; right: 12px; top: calc(var(--nx-header-h) + env(safe-area-inset-top)); min-width: 0; }
	.nx-bell { width: auto; }
}

/* =========================================================================
 * Dashboards (maqueta del núcleo; nodxo-dashboard y los módulos la llenan)
 * ====================================================================== */
.nx-dash { display: grid; gap: 22px; grid-template-columns: 1.15fr 1fr 1.15fr; align-items: stretch; }
.nx-dash--adm { grid-template-columns: 1fr 1.35fr 1fr; margin-bottom: 26px; }
.nx-dash-card { background: var(--nx-surface); border-radius: 16px; padding: 22px; box-shadow: var(--nx-shadow); color: var(--nx-text); min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.nx-dash-card__title { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.nx-dash-card__title--lg { font-size: 19px; }
.nx-dash-soon { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 600; color: #6B4A00; background: #FFF4DB; border-radius: 99px; padding: 4px 10px; margin-top: auto; }
.nx-dash-soon--dark { color: #FFE7A8; background: rgba(255, 255, 255, .12); align-self: center; }
.nx-tag--soon { background: #FFF4DB; color: #6B4A00; border-color: transparent; }

/* Estado de cuenta (residente): franja de la marca, texto oscuro por contraste */
.nx-dash-account { background: var(--nx-head-grad); color: #0F2A33; align-items: center; justify-content: center; text-align: center; min-height: 300px; }
.nx-dash-account h2, .nx-dash-cartera h2 { margin: 0; font-size: 26px; font-weight: 700; color: inherit; }
.nx-dash-account__icon { font-size: 54px; line-height: 1; }
.nx-dash-account__amount { margin: 6px 0; font-size: 34px; font-weight: 700; }
/* Cartera (administración): gris oscuro, texto blanco */
.nx-dash-cartera { background: #4A4D52; color: #FFFFFF; align-items: center; justify-content: center; text-align: center; min-height: 260px; }

/* Banner */
.nx-dash-banner { padding: 0; overflow: hidden; }
.nx-dash-banner__ph { flex: 1; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 24px; color: #FFFFFF;
	background: linear-gradient(160deg, #0F2A33 0%, #12505E 55%, #12D4C9 140%); }
.nx-dash-banner__ph strong { font-size: 24px; }
.nx-dash-banner__ph .nx-dash-soon { margin-top: 8px; }

/* Accesos directos grandes */
.nx-dash-title { grid-column: 1 / -1; margin: 8px 0 0; font-size: 28px; font-weight: 600; color: var(--nx-text); }
.nx-dash-shortcuts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.nx-dash-shortcut { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 128px; padding: 18px 22px; border-radius: 16px; background: var(--nx-surface); box-shadow: var(--nx-shadow); color: var(--nx-text) !important; transition: transform .12s, box-shadow .15s; }
.nx-dash-shortcut:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15, 42, 51, .12); }
.nx-dash-shortcut__emoji { font-size: 58px; line-height: 1; }
.nx-dash-shortcut__label { font-size: 26px; font-weight: 600; line-height: 1.1; max-width: 260px; }

/* Calendario de muestra */
.nx-cal { display: flex; flex-direction: column; gap: 10px; }
.nx-cal__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nx-cal__bar strong { flex: 1; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-cal__btns { display: inline-flex; border-radius: 8px; overflow: hidden; background: var(--nx-head-grad); }
.nx-cal__btns button { border: 0; background: transparent; color: #0F2A33; font: 700 12px var(--nx-font); padding: 8px 11px; }
.nx-cal__btn-soft { background: color-mix(in srgb, var(--nx-secondary) 30%, #fff); color: #0F2A33; font-weight: 700; font-size: 12px; padding: 8px 11px; border-radius: 8px; }
.nx-cal table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.nx-cal th { font-weight: 700; padding: 6px 0; border: 1px solid var(--nx-border); color: var(--nx-text); }
.nx-cal td { border: 1px solid var(--nx-border); text-align: center; height: 34px; color: var(--nx-text); }
.nx-cal td.is-out { background: var(--nx-surface-2); }
.nx-cal td.is-today { background: color-mix(in srgb, var(--nx-secondary) 12%, #fff); }
.nx-cal td.is-today span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1C7FA6; color: #fff; font-weight: 700; }
.nx-cal__legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; }
.nx-cal__legend span { display: inline-flex; align-items: center; gap: 6px; background: var(--nx-surface-2); border-radius: 99px; padding: 3px 10px; }
.nx-cal__legend span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.nx-cal__legend .c-red { color: #D93B4A; } .nx-cal__legend .c-orange { color: #E0891B; } .nx-cal__legend .c-green { color: #18A957; } .nx-cal__legend .c-purple { color: #8E5BD8; }

/* Ranking de mora (maqueta) */
.nx-bars { flex: 1; min-height: 170px; display: flex; align-items: flex-end; gap: 18px; padding: 10px 12px 0; border-bottom: 1px solid var(--nx-border); }
.nx-bars i { flex: 1; background: color-mix(in srgb, var(--nx-secondary) 45%, #fff); border-radius: 4px 4px 0 0; }

/* Resumen PQRS */
.nx-pqrs { list-style: none; margin: 4px 0 8px; padding: 0 8px; }
.nx-pqrs li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--nx-border); font-size: 14px; }
.nx-pqrs li span:nth-child(2) { text-align: center; }
.nx-pqrs__ic { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.nx-pqrs__ic.is-blue { background: #1C7FA6; } .nx-pqrs__ic.is-red { background: #C62A38; } .nx-pqrs__ic.is-yellow { background: #F5B82E; color: #0F2A33; } .nx-pqrs__ic.is-green { background: #13884A; }

/* Recaudo y pendientes */
.nx-progress { height: 14px; border-radius: 99px; background: var(--nx-surface-2); overflow: hidden; border: 1px solid var(--nx-border); }
.nx-progress span { display: block; height: 100%; background: var(--nx-head-grad); }
.nx-pend { list-style: none; margin: 0; padding: 0; }
.nx-pend a { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--nx-border); color: var(--nx-text) !important; font-size: 14px; }
.nx-pend a:hover { background: var(--nx-surface-2); }
.nx-pend strong { font-size: 16px; }

/* Secciones en construcción */
.nx-soon { margin-left: auto; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 99px; background: rgba(245, 184, 46, .22); color: inherit; opacity: .8; }
.nx-menu__item.is-soon > span:not(.nx-soon):not(.nx-emoji) { opacity: .85; }
.nx-soon-card { text-align: center; padding: 48px 28px; max-width: 760px; margin: 0 auto; }
.nx-soon-card__emoji { font-size: 64px; line-height: 1; margin-bottom: 12px; }
.nx-soon-card h2 { margin: 12px 0 8px; font-size: 24px; }
.nx-soon-card p { margin: 0 auto 10px; max-width: 560px; }

@media (max-width: 1200px) {
	.nx-dash, .nx-dash--adm { grid-template-columns: 1fr 1fr; }
	.nx-dash-shortcut__label { font-size: 20px; }
	.nx-dash-shortcut__emoji { font-size: 44px; }
}
@media (max-width: 700px) {
	.nx-dash, .nx-dash--adm { grid-template-columns: 1fr; }
	.nx-dash-shortcuts { grid-template-columns: 1fr 1fr; gap: 12px; }
	.nx-dash-shortcut { flex-direction: column; min-height: 120px; gap: 8px; text-align: center; padding: 14px; }
	.nx-dash-shortcut__label { font-size: 15px; }
	.nx-dash-shortcut__emoji { font-size: 38px; }
	.nx-dash-account__amount { font-size: 28px; }
	.nx-dash-title { font-size: 22px; }
}

/* Blindaje contra los estilos genéricos del tema (Woodmart/Elementor) */
.nx-app .nx-cal table { border-collapse: collapse !important; border-spacing: 0 !important; margin: 0 !important; }
.nx-app .nx-cal th, .nx-app .nx-cal td { padding: 4px 0 !important; font-size: 11px !important; line-height: 1.2 !important; vertical-align: middle !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 600; }
.nx-app .nx-cal td { height: 30px !important; font-weight: 500; }
.nx-app .nx-header button.nx-avatar--ring { padding: 3px !important; min-height: 0 !important; line-height: 1 !important; border: 0 !important; box-shadow: none !important; }
.nx-app .nx-header button.nx-avatar--ring > span, .nx-app .nx-header button.nx-avatar--ring > img { width: 100% !important; height: 100% !important; border-radius: 50% !important; margin: 0 !important; }
.nx-app .nx-dash-card { margin: 0 !important; }
.nx-app .nx-dash-card h2, .nx-app .nx-dash-card h3 { margin: 0 !important; line-height: 1.25 !important; }
.nx-app .nx-dash-card p { margin: 0; }
.nx-app button, .nx-app .nx-btn, .nx-app .nxm-btn, .nx-app input[type=submit] { text-transform: none !important; letter-spacing: normal; border-radius: 10px; }
.nx-app .nx-search__btn { text-transform: uppercase !important; letter-spacing: .12em !important; border-radius: 0 12px 12px 0 !important; }
.nx-app .nx-icon-btn, .nx-app .nx-avatar { border-radius: 12px; }
.nx-app .nx-avatar { border-radius: 50% !important; }
.nx-app .nx-menu__head { border-radius: 0 !important; min-height: 0 !important; }
@media (max-width: 700px) {
	.nx-dash-account, .nx-dash-cartera { min-height: 0; }
}

/* Encabezado: bienvenida, unidad y foto más grandes y bien distribuidas */
.nx-app .nx-header { height: 104px; gap: 20px; }
.nx-app .nx-search { flex: 0 1 720px; }
.nx-header__tools { display: flex; align-items: center; gap: 10px; flex: none; }
.nx-app .nx-refresh { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px !important; border: 1px solid #D7E3E8; background: #FFFFFF; color: #0F2A33; font: 600 14px var(--nx-font); cursor: pointer; box-shadow: var(--nx-shadow); }
.nx-app .nx-refresh:hover { border-color: var(--nx-primary); }
.nx-refresh__ic { font-size: 17px; line-height: 1; display: inline-block; }
.nx-refresh.is-spinning .nx-refresh__ic { animation: nx-spin .8s linear infinite; }
@keyframes nx-spin { to { transform: rotate(360deg); } }
.nx-app .nx-bell-btn { width: 48px; height: 48px; background: #FFFFFF; border-radius: 12px !important; box-shadow: var(--nx-shadow); }
.nx-hello { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-evenly; gap: 24px; }
.nx-app .nx-welcome { font-size: 19px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-app .nx-where { font-size: 20px; font-weight: 700; margin: 0; white-space: nowrap; }
.nx-app .nx-header button.nx-avatar--ring { width: 78px; height: 78px; padding: 4px !important; }
.nx-app .nx-header button.nx-avatar--ring > span { font-size: 22px; }

/* Usuarios Residentes: títulos de bloque del menú en blanco */
.nx-panel--residente .nx-menu__head { color: #FFFFFF; text-shadow: 0 1px 2px rgba(15, 42, 51, .35); }
.nx-panel--residente .nx-menu__head .nx-icon { color: #FFFFFF; }
/* Estado de cuenta: texto blanco */
.nx-app .nx-dash-account { color: #FFFFFF; }
.nx-app .nx-dash-account h2, .nx-app .nx-dash-account .nx-dash-account__amount { color: #FFFFFF; text-shadow: 0 1px 3px rgba(15, 42, 51, .35); }
@media (max-width: 900px) {
	.nx-app .nx-header { height: auto; }
	.nx-header__tools { margin-left: auto; }
	.nx-app .nx-header button.nx-avatar--ring { width: 48px; height: 48px; margin-left: 0; }
	.nx-app .nx-refresh { padding: 0 12px; height: 40px; }
	.nx-app .nx-bell-btn { width: 40px; height: 40px; }
}
.nx-help--lead { font-size: 14px; margin: 0 0 18px; color: #3C5058; }
.nx-organ-form { display: grid; grid-template-columns: 2fr 1.4fr 1.2fr auto; gap: 12px; align-items: end; }
.nx-organ-form .nx-field { margin: 0; }
.nx-grid--two { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .nx-organ-form, .nx-grid--two { grid-template-columns: 1fr; } }
/* Primera fila del dashboard más baja: tarjetas centradas, sin espacio vacío */
.nx-app .nx-dash-card { padding: 18px; }
.nx-app .nx-dash-account, .nx-app .nx-dash-cartera { min-height: 0; justify-content: center; position: relative; padding-bottom: 54px; }
.nx-app .nx-dash-account .nx-dash-soon, .nx-app .nx-dash-cartera .nx-dash-soon { position: absolute; left: 18px; bottom: 16px; margin: 0; }
.nx-app .nx-dash-account__icon { font-size: 46px; }
.nx-app .nx-dash-banner .ndash-swiper--fill, .nx-app .nx-dash-banner .ndash-banner-empty { min-height: 260px; }
.nx-app .nx-bars { min-height: 150px; }

/* Barra inferior propia en celular (la del tema se oculta en las páginas del sistema) */
.nx-bottom { display: none; }
body.nx-canvas .wd-toolbar, body.nx-canvas .wd-toolbar-label-show, body.nx-canvas .woodmart-toolbar { display: none !important; }
@media (max-width: 900px) {
	.nx-app .wd-toolbar { display: none !important; }
	.nx-bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #FFFFFF; border-top: 1px solid #E3E9ED; box-shadow: 0 -6px 20px rgba(15, 42, 51, .08); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
	.nx-panel--admin .nx-bottom { background: #3A3A3A; border-top-color: #4B4B4B; }
	.nx-app .nx-bottom__item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 !important; border: 0 !important; background: none !important; color: #3C5058 !important; font: 600 11px var(--nx-font); text-decoration: none !important; min-height: 0 !important; box-shadow: none !important; border-radius: 10px !important; }
	.nx-panel--admin .nx-bottom__item { color: #DDE4E7 !important; }
	.nx-bottom__ic { position: relative; font-size: 21px; line-height: 1.1; }
	.nx-bottom__ic .nx-count { top: -6px; right: -12px; }
	.nx-app .nx-bottom__item.is-active { color: #0F2A33 !important; }
	.nx-panel--admin .nx-bottom__item.is-active { color: #FFFFFF !important; }
	.nx-bottom__item.is-active .nx-bottom__ic::after { content: ''; position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); width: 22px; height: 3px; border-radius: 3px; background: var(--nx-head-grad); }
	.nx-app .nx-content { padding-bottom: calc(86px + env(safe-area-inset-bottom)) !important; }
	.nx-header__menu { display: none !important; }
	.nx-sidebar { z-index: 50; }
	.nx-app.is-menu-open .nx-backdrop { z-index: 48; }
}
.nx-app .nx-menu__head { text-transform: uppercase !important; letter-spacing: .03em !important; }
.nx-app .nx-sidebar__logo { max-height: 96px; max-width: 240px; }
.nx-app details > summary { text-transform: none !important; background: none !important; padding-left: 0; }

/* =========================================================================
 * Botones de color sólido: texto blanco en todo el sistema.
 * (Los fondos claritos, como la etiqueta "Usuario principal", siguen con texto oscuro.)
 * ====================================================================== */
:root, .nx-app { --nx-on-primary: #FFFFFF; --nx-head-text: #FFFFFF; }
.nx-app .nx-btn--primary, .nx-auth .nx-btn--primary, .nx-center-msg .nx-btn--primary,
.nx-app .nx-search__btn, .nx-app .nx-subtabs a.is-active, .nx-app .nx-menu__head,
.nx-app .nx-cal__btns button { color: #FFFFFF !important; text-shadow: 0 1px 2px rgba(15, 42, 51, .28); }
.nx-app .nx-menu__head .nx-icon { color: #FFFFFF; }
.nx-steps li.is-active span, .nx-steps li.is-done span { color: #FFFFFF; }
.nx-app .nx-avatar, .nx-app .nx-hero-card, .nx-app .nx-hero-card h2, .nx-app .nx-hero-card p { color: #FFFFFF; }

/* Foto de perfil más grande en PC */
@media (min-width: 901px) {
	.nx-app .nx-header { height: 116px; }
	.nx-app .nx-header button.nx-avatar--ring { width: 92px; height: 92px; }
	.nx-app .nx-header button.nx-avatar--ring > span { font-size: 26px; }
}

/* Celular: bienvenida y unidad visibles arriba, a la izquierda de Actualizar, campana y foto */
@media (max-width: 1100px) {
	.nx-app .nx-hello { display: flex !important; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; order: 1; flex: 1 1 auto; }
	.nx-app .nx-welcome { display: block !important; font-size: 14px; white-space: normal; line-height: 1.25; }
	.nx-app .nx-where { display: block !important; font-size: 14px; }
}
@media (max-width: 900px) {
	.nx-app .nx-header { flex-wrap: wrap; row-gap: 10px; }
	.nx-app .nx-hello { order: 1; flex: 1 1 0; min-width: 0; }
	.nx-app .nx-header__tools { order: 2; margin-left: 0; }
	.nx-app .nx-header > .nx-dropdown { order: 3; }
	.nx-app .nx-search { order: 4; flex: 1 1 100%; }
	.nx-app .nx-welcome { font-size: 13px; }
	.nx-app .nx-welcome strong { display: block; font-size: 14px; }
	.nx-app .nx-where { font-size: 13px; margin-top: 2px; }
}

/* PC: la bienvenida nunca se corta; va en dos líneas (saludo + unidad) y el buscador cede espacio. */
@media (min-width: 1101px) {
	.nx-app .nx-search { flex: 1 1 360px; max-width: 680px; }
	.nx-app .nx-hello { flex: 0 1 auto; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-width: 170px; max-width: 340px; }
	.nx-app .nx-welcome { white-space: normal; overflow: visible; font-size: 17px; line-height: 1.25; }
	.nx-app .nx-where { font-size: 18px; }
}

/* PC: encabezado alineado — buscador ocupa el espacio libre; herramientas, saludo y foto quedan juntos a la derecha con espacios iguales. */
@media (min-width: 1101px) {
	.nx-app .nx-header { padding: 0 28px; gap: 16px; justify-content: flex-start; }
	.nx-app .nx-search { flex: 1 1 auto; min-width: 280px; max-width: none; }
	.nx-app .nx-header__tools { flex: none; gap: 10px; }
	.nx-app .nx-hello { flex: 0 1 auto; min-width: 0; max-width: 420px; margin: 0 0 0 8px; padding-left: 18px; border-left: 1px solid var(--nx-border); align-items: flex-start; gap: 4px; }
	.nx-app .nx-welcome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 17px; line-height: 1.25; }
	.nx-app .nx-where { font-size: 18px; line-height: 1.2; }
	.nx-app .nx-header > .nx-dropdown { flex: none; display: flex; align-items: center; }
}
@media (min-width: 1101px) and (max-width: 1600px) {
	.nx-app .nx-welcome { white-space: normal; overflow: visible; max-width: 300px; font-size: 15.5px; text-wrap: balance; }
	.nx-app .nx-hello { flex-shrink: 0; min-width: 190px; }
	.nx-app .nx-where { font-size: 16px; }
	.nx-app .nx-search { min-width: 220px; }
}

/* PC (versión final): saludo y unidad en una sola línea, junto a la foto. */
@media (min-width: 1101px) {
	.nx-app .nx-hello { flex: 0 1 auto; flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px; min-width: 0; max-width: none; margin: 0 0 0 6px; padding-left: 0; border-left: 0; }
	.nx-app .nx-welcome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: none; min-width: 0; font-size: 19px; line-height: 1.2; text-wrap: nowrap; }
	.nx-app .nx-where { white-space: nowrap; font-size: 18px; flex: none; }
	.nx-app .nx-header > .nx-dropdown { margin-left: 2px; }
}
@media (min-width: 1101px) {
	.nx-app .nx-hello { flex: none; }
	.nx-app .nx-search { flex: 1 1 auto; min-width: 170px; }
}
@media (min-width: 1101px) and (max-width: 1440px) {
	.nx-app .nx-welcome { font-size: 16px; }
	.nx-app .nx-where { font-size: 16px; }
	.nx-app .nx-hello { gap: 12px; }
	.nx-app .nx-header { gap: 12px; padding: 0 20px; }
	.nx-app .nx-search__btn { padding: 0 18px; }
}

/* Dashboard compacto (0.1.15): fila superior más baja y accesos directos más pequeños para que todo quepa sin desplazarse. */
@media (min-width: 1101px) {
	.nx-app .nx-dash { gap: 18px; }
	.nx-app .nx-dash--res { grid-template-columns: .95fr 1fr 1.35fr; }
	.nx-app .nx-dash-card { padding: 16px; }
	.nx-app .nx-dash-account, .nx-app .nx-dash-cartera { min-height: 0; padding-bottom: 46px; }
	.nx-app .nx-dash-account h2 { font-size: 32px !important; line-height: 1.15 !important; }
	.nx-app .nx-dash-account .nx-dash-account__amount { font-size: 30px; margin: 4px 0 0; }
	.nx-app .nx-dash-account .nx-dash-soon { left: 14px; bottom: 12px; }
	.nx-app .nx-dash-title { font-size: 22px; margin: 2px 0 -4px; }
	.nx-app .nx-dash-shortcuts { gap: 14px; }
	.nx-app .nx-dash-shortcut { min-height: 74px; padding: 10px 16px; gap: 14px; border-radius: 14px; justify-content: flex-start; }
	.nx-app .nx-dash-shortcut__emoji { font-size: 36px; }
	.nx-app .nx-dash-shortcut__label { font-size: 18px; max-width: none; }
}

/* Dashboard residente en PC (0.1.15b): fila superior de 300 px, columnas con mínimo para que la agenda quepa
   en una sola fila y el banner cubra toda la altura. Imagen recomendada del banner: 1200 × 700 px. */
@media (min-width: 1101px) {
	.nx-app .nx-dash--res { grid-template-columns: minmax(220px, .9fr) minmax(330px, 1.1fr) minmax(0, 1.3fr); grid-template-rows: 300px; grid-auto-rows: auto; }
	.nx-app .nx-dash--res > .nx-dash-card { height: 300px; max-height: 300px; overflow: hidden; }
	.nx-app .nx-dash-account h2 { font-size: clamp(24px, 2.1vw, 36px) !important; line-height: 1.12 !important; }
	.nx-app .nx-dash-account .nx-dash-account__amount { font-size: clamp(20px, 1.6vw, 28px); }
	.nx-app .nx-dash-title { font-size: 21px; margin: 0 0 -6px; }
	.nx-app .nx-dash-shortcut { min-height: 68px; }
	.nx-app .nx-dash-shortcut__emoji { font-size: 32px; }
	.nx-app .nx-dash-shortcut__label { font-size: 17px; }
}
@media (min-width: 1101px) {
	.nx-app .nx-dash--adm { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(330px, 1fr); }
}
