/* Correcciones de estabilidad visual 2.2.1. */
aside > .logo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  min-height: 76px;
  padding-bottom: 20px;
  line-height: 1.08;
  overflow: hidden;
  flex: 0 0 auto;
}
aside > .logo > span { display: inline; margin-left: 0; }
aside > .logo > small { width: 100%; line-height: 1.25; }
aside > nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; }
aside > .profile, aside > .theme-picker { flex: 0 0 auto; }

@media (max-width: 900px) and (min-width: 561px) {
  aside > .logo { min-height: 52px; justify-content: center; padding-inline: 0; }
  aside > .logo > span, aside > .logo > small { display: none; }
}

/* Directorio de clientes: estado inicial útil y acciones siempre visibles. */
.client-kpis { margin-bottom: 18px; }
.client-directory { min-height: 0; padding: 0; overflow: hidden; }
.client-welcome { display: grid; grid-template-columns: 54px 1fr auto; gap: 18px; align-items: center; padding: 24px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, rgba(21,88,102,.08), transparent 72%); }
.client-welcome h2 { margin: 0 0 6px; }
.client-welcome p, .form-help { margin: 0; color: var(--muted); line-height: 1.55; }
.client-welcome-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; color: var(--accent); background: rgba(21,88,102,.12); font-size: 25px; font-weight: 800; }
.client-tools { display: grid; grid-template-columns: minmax(260px,1fr) minmax(260px,420px); gap: 14px; align-items: end; padding: 20px 24px; }
.client-tools form, .client-search { margin: 0; }
.client-tools select, .client-search input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--panel); }
.client-search { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.client-directory .table-wrap { padding: 0 14px 18px; }
.client-type { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: rgba(21,88,102,.10); color: var(--accent); font-size: 12px; font-weight: 750; }
.client-type.type-resident { background: #edf8f0; color: #28733c; }
.client-type.type-guest { background: #fff4d8; color: #8a6514; }
.client-actions .client-view { padding: 7px 10px; color: #fff; background: var(--accent); border-radius: 9px; font-weight: 700; }
.client-actions .danger-link { color: #ad3232; }
.client-no-results { margin: 0 24px 24px; padding: 30px; display: grid; gap: 6px; text-align: center; border: 1px dashed var(--border); border-radius: 15px; color: var(--muted); }
.client-no-results[hidden] { display: none; }
.client-create { margin-top: 18px; }
.client-create .form-help { padding: 0 24px 18px; }
.client-error { margin-bottom: 18px; }
.client-admin-note { min-height: 0; }
.client-admin-note p { color: var(--muted); line-height: 1.55; }
.client-reservations-history .panel-title { align-items: center; }
.client-reservations-history .panel-title p { margin: 4px 0 0; color: var(--muted); }
.client-reservations-history .data-table { min-width: 1180px; }
.client-reservations-history td { vertical-align: top; }
.client-reservations-history td > b,
.client-reservations-history td > span { display: block; }
.client-reservations-history td small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.35; }
.client-reservations-history .status { width: max-content; max-width: 190px; padding: 6px 9px; border-radius: 999px; color: #70530f; background: #fff4d8; font-size: 12px; font-weight: 750; }
.client-reservations-history .status.confirmed,
.client-reservations-history .status.checked_in { color: #28733c; background: #edf8f0; }
.client-reservations-history .status.cancelled { color: #9b3030; background: #feeaea; }
.client-reservations-history .status.checked_out { color: var(--muted); background: rgba(120,130,135,.12); }

@media (max-width: 760px) {
  .client-welcome { grid-template-columns: 48px 1fr; }
  .client-welcome .button { grid-column: 1 / -1; }
  .client-tools { grid-template-columns: 1fr; }
}

/* Ficha visual de colaboradores. */
.employee-photo-field { grid-row: span 3; align-content: start; }
.employee-photo-field img, .employee-photo-placeholder { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 24px; object-fit: cover; color: var(--muted); background: rgba(120,130,135,.10); border: 1px solid var(--border); }
.employee-photo-field small { font-weight: 400; }
.employee-photo-field > span:last-child { display: flex; gap: 7px; align-items: center; color: var(--muted); }
.employee-photo-field > span:last-child input { width: auto; }
.employee-cell { display: flex; gap: 11px; align-items: center; min-width: 190px; }
.employee-cell img, .employee-cell > i { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; object-fit: cover; color: #fff; background: var(--accent); font-size: 12px; font-style: normal; font-weight: 800; }
.employee-cell span { display: grid; gap: 3px; }

/* Administración central de propiedades y unidades. */
.property-manager { min-height: 0; margin: 18px 0; scroll-margin-top: 24px; }
.property-manager .panel-title > div > small { color: var(--muted); }
.property-manager .panel-title p { margin: 5px 0 0; color: var(--muted); }
.property-manager-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.property-manager-forms details { border: 1px solid var(--border); border-radius: 16px; padding: 0 16px 16px; }
.property-manager-forms summary { padding: 17px 0; cursor: pointer; font-weight: 800; }
.property-manager-forms .erp-form { padding: 0; }
.property-registers { margin-top: 22px; }
.property-registers > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 10px; }
.property-registers h3 { margin: 0; }
.property-registers > div:first-child span { color: var(--muted); font-size: 13px; }
.property-registers td small { display: block; margin-top: 4px; color: var(--muted); }
.property-registers .row-actions { min-width: 210px; }
.check-field { align-content: center; grid-template-columns: auto 1fr !important; }
.check-field input { width: auto !important; }

@media (max-width: 900px) {
  .property-manager-forms { grid-template-columns: 1fr; }
}

/* Centro de notificaciones persistente, inspirado en paneles de anfitrión. */
.notification-center { position: fixed; z-index: 70; top: 20px; right: 24px; }
main > header { padding-right: 58px; }
.notification-bell { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--panel); box-shadow: 0 12px 35px rgba(25,40,48,.12); cursor: pointer; }
.notification-bell > span { font-size: 25px; transform: rotate(45deg); }
.notification-bell > b { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--bg); border-radius: 99px; color: #fff; background: #df3f3f; font-size: 11px; }
.notification-panel { position: absolute; top: 58px; right: 0; width: min(420px,calc(100vw - 28px)); overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--panel); box-shadow: 0 30px 90px rgba(18,35,42,.24); backdrop-filter: blur(22px); }
.notification-panel[hidden] { display: none; }
.notification-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.notification-head h2 { margin: 2px 0 0; }
.notification-head small { color: var(--muted); }
.notification-head > span { padding: 6px 9px; border-radius: 99px; color: #8a6514; background: #fff4d8; font-size: 12px; font-weight: 750; }
.notification-list { max-height: min(62vh,540px); overflow: auto; }
.notification-item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 14px 18px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.notification-item:hover { background: rgba(21,88,102,.06); }
.notification-item > i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--accent); background: rgba(21,88,102,.10); font-size: 10px; font-style: normal; font-weight: 800; }
.notification-item > div { display: grid; gap: 4px; }
.notification-item span { color: var(--muted); font-size: 12px; }
.notification-item.is-overdue > i { color: #a52b2b; background: #fee9e9; }
.notification-item.is-overdue span { color: #a52b2b; }
.notification-empty { display: grid; place-items: center; gap: 6px; padding: 38px 20px; text-align: center; }
.notification-empty i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: rgba(46,159,104,.13); font-style: normal; }
.notification-empty span { color: var(--muted); font-size: 13px; }
.notification-footer { display: flex; gap: 14px; padding: 14px 18px; }
.notification-footer a { color: var(--accent); font-size: 12px; font-weight: 750; text-decoration: none; }

@media (max-width: 760px) {
  .notification-center { top: 12px; right: 12px; }
  .notification-bell { width: 44px; height: 44px; }
  main > header { padding-right: 50px; }
}

/* Alertas anticipadas de documentos y mantenciones. */
.due-alert-strip { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px 18px; margin: 0 0 18px; border: 1px solid #f0cf83; border-radius: 15px; color: #725515; background: #fff8e6; }
.due-alert-strip > div { display: grid; gap: 4px; }
.due-alert-strip details { min-width: 160px; }
.due-alert-strip summary { cursor: pointer; font-weight: 750; }
.due-alert-strip ul { margin: 12px 0 0; padding: 0; list-style: none; }
.due-alert-strip li { display: grid; gap: 3px; padding: 9px 0; border-top: 1px solid rgba(114,85,21,.15); }
.dashboard-alerts { min-height: 0; margin-top: 18px; scroll-margin-top: 25px; }
.due-alert-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-top: 20px; }
.due-alert-columns article { padding: 18px; border: 1px solid var(--border); border-radius: 15px; }
.due-alert-columns h3 { display: flex; justify-content: space-between; margin: 0; }
.due-alert-columns h3 span { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 99px; color: #8a6514; background: #fff4d8; }
.due-alert-columns ul { list-style: none; padding: 0; margin: 14px 0 0; }
.due-alert-columns li + li { border-top: 1px solid var(--border); }
.due-alert-columns a { display: grid; gap: 4px; padding: 12px 0; color: var(--text); text-decoration: none; }
.due-alert-columns small, .muted { color: var(--muted); }
.due-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(20,28,32,.38); backdrop-filter: blur(10px); }
.due-modal[hidden] { display: none; }
.due-modal-card { position: relative; width: min(620px,100%); padding: 34px; border: 1px solid rgba(255,255,255,.7); border-radius: 26px; background: var(--panel); box-shadow: 0 35px 100px rgba(20,28,32,.25); }
.due-modal-card h2 { margin: 12px 0 8px; font-size: 30px; }
.due-modal-card > p, .due-modal-card > small { color: var(--muted); }
.due-modal-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 50%; color: #a76d00; background: #fff4d8; font-size: 28px; font-weight: 800; }
.due-modal-close { position: absolute; top: 20px; right: 20px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--text); background: rgba(120,130,135,.12); font-size: 25px; cursor: pointer; }
.due-modal-summary { display: grid; gap: 0; margin: 22px 0; border-block: 1px solid var(--border); }
.due-modal-summary div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; }
.due-modal-summary div + div { border-top: 1px solid var(--border); }
.due-modal-summary span { color: #9a6512; }
.due-modal-actions { flex-wrap: wrap; }
.due-modal-actions .button { border: 1px solid var(--border); cursor: pointer; }
.alert-settings-panel { min-height: 0; margin: 18px 0; }
.alert-settings-panel > p { color: var(--muted); }
.alert-settings-panel .erp-form { padding: 18px 0 0; }

@media (max-width: 760px) {
  .due-alert-strip { align-items: flex-start; flex-direction: column; }
  .due-alert-columns { grid-template-columns: 1fr; }
  .due-modal-card { padding: 27px 22px; }
  .due-modal-card h2 { font-size: 25px; }
  .due-modal-summary div { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* Centro de actividad v2: bandeja compacta, legible y estable incluso con otros temas. */
.notification-center { position: fixed !important; z-index: 300 !important; top: 18px !important; right: 22px !important; width: auto !important; }
.notification-bell { width: 46px !important; height: 46px !important; padding: 0 !important; display: grid !important; place-items: center !important; border: 1px solid rgba(120,130,135,.20) !important; border-radius: 15px !important; color: var(--text) !important; background: color-mix(in srgb,var(--panel) 92%,transparent) !important; box-shadow: 0 12px 32px rgba(20,36,44,.13) !important; backdrop-filter: blur(18px); }
.notification-bell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-bell:hover,.notification-bell[aria-expanded="true"] { transform: translateY(-1px); color: var(--accent) !important; border-color: color-mix(in srgb,var(--accent) 38%,var(--border)) !important; }
.notification-bell > b { top: -7px !important; right: -7px !important; min-width: 23px !important; height: 23px !important; padding: 0 6px !important; border: 3px solid var(--bg) !important; background: #e5484d !important; font-weight: 800; }
.notification-panel { top: 57px !important; right: 0 !important; width: min(430px,calc(100vw - 28px)) !important; padding: 0 !important; overflow: hidden !important; border: 1px solid rgba(120,130,135,.18) !important; border-radius: 24px !important; color: var(--text) !important; background: color-mix(in srgb,var(--panel) 97%,transparent) !important; box-shadow: 0 34px 100px rgba(17,31,39,.25) !important; backdrop-filter: blur(25px); }
.notification-head { padding: 19px 20px 15px !important; border-bottom: 0 !important; }
.notification-head h2 { margin: 3px 0 0 !important; font-size: 22px !important; letter-spacing: -.02em; }
.notification-total { color: #8a6514 !important; background: #fff4d8 !important; white-space: nowrap; }
.notification-intro { display: grid; gap: 3px; padding: 0 20px 15px; border-bottom: 1px solid var(--border); }
.notification-intro b { font-size: 13px; }
.notification-intro span { color: var(--muted); font-size: 12px; }
.notification-list { max-height: min(62vh,560px) !important; padding: 7px !important; }
.notification-item { grid-template-columns: 42px minmax(0,1fr) 16px !important; gap: 12px !important; min-height: 72px; margin: 3px 0; padding: 12px !important; border: 0 !important; border-radius: 16px; }
.notification-item:hover { background: color-mix(in srgb,var(--accent) 7%,transparent) !important; }
.notification-item > i { width: 42px !important; height: 42px !important; border-radius: 14px !important; }
.notification-item > strong { color: var(--muted); font-size: 24px; font-weight: 400; }
.notification-copy { min-width: 0; display: grid !important; gap: 4px !important; }
.notification-copy > div { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.notification-copy em { color: var(--accent); font-size: 11px; font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.notification-copy time { padding: 4px 7px; border-radius: 99px; color: #7a5b15; background: #fff6df; font-size: 10px; font-weight: 750; white-space: nowrap; }
.notification-copy > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.notification-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted) !important; font-size: 12px !important; }
.notification-item.severity-overdue { background: color-mix(in srgb,#e5484d 5%,transparent); }
.notification-item.severity-overdue > i { color: #a52b2b !important; background: #feeaea !important; }
.notification-item.severity-overdue .notification-copy em,.notification-item.severity-overdue .notification-copy time { color: #a52b2b; }
.notification-item.severity-overdue .notification-copy time { background: #feeaea; }
.notification-item.severity-info > i { color: #3266a8 !important; background: #eaf2ff !important; }
.notification-footer { justify-content: space-between; padding: 14px 19px 17px !important; border-top: 1px solid var(--border); background: color-mix(in srgb,var(--bg) 35%,transparent); }
.notification-footer a { padding: 6px 0; }

/* Ficha 360° del colaborador y expediente versionado. */
.row-actions .primary-action { padding: 7px 10px; border-radius: 9px; color: #fff; background: var(--accent); font-weight: 750; }
.employee-profile-hero { min-height: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 20px; align-items: center; padding: 25px; background: linear-gradient(135deg,color-mix(in srgb,var(--accent) 8%,var(--panel)),var(--panel) 62%); }
.employee-profile-photo img,.employee-profile-photo i { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 27px; object-fit: cover; color: #fff; background: var(--accent); font-size: 26px; font-style: normal; font-weight: 800; }
.employee-profile-hero h2 { margin: 4px 0 5px; font-size: clamp(25px,3vw,36px); letter-spacing: -.035em; }
.employee-profile-hero p { margin: 0; color: var(--muted); }
.employee-profile-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.employee-profile-tags > span { padding: 6px 9px; border-radius: 99px; color: var(--muted); background: color-mix(in srgb,var(--bg) 65%,transparent); font-size: 11px; font-weight: 750; }
.employee-profile-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 360px; }
.employee-profile-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 16px 0; }
.employee-profile-kpis article { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); }
.employee-profile-kpis small,.employee-profile-kpis span { display: block; color: var(--muted); }
.employee-profile-kpis b { display: block; margin: 8px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.employee-profile-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; }
.employee-profile-grid > .panel { min-height: 0; }
.employee-data-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 18px 0 0; }
.employee-data-list > div { padding: 12px 0; border-bottom: 1px solid var(--border); }
.employee-data-list > div:nth-child(odd) { padding-right: 18px; }
.employee-data-list dt { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.employee-data-list dd { margin: 5px 0 0; line-height: 1.4; }
.employee-document-upload .erp-form { padding: 18px 0 0; grid-template-columns: 1fr 1fr; }
.employee-document-upload .full-span { grid-column: 1/-1; }
.employee-documents { min-height: 0; margin-top: 16px; }
.employee-document-count { padding: 7px 10px; border-radius: 99px; color: var(--accent); background: color-mix(in srgb,var(--accent) 10%,transparent); font-size: 12px; font-weight: 750; }
.employee-document-card { margin-top: 14px; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; }
.employee-document-current { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 17px; }
.employee-document-current > i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--accent); background: color-mix(in srgb,var(--accent) 10%,transparent); font-size: 11px; font-style: normal; font-weight: 800; }
.employee-document-current h3 { margin: 3px 0; }
.employee-document-current p,.employee-document-current span { margin: 0; color: var(--muted); font-size: 12px; }
.employee-document-actions { display: flex; gap: 8px; align-items: center; }
.employee-document-actions details { position: relative; }
.employee-document-actions summary { padding: 10px 13px; border: 1px solid var(--border); border-radius: 99px; cursor: pointer; font-size: 12px; font-weight: 750; list-style: none; }
.employee-document-actions details form { position: absolute; z-index: 5; right: 0; top: 46px; width: 280px; display: grid; gap: 10px; padding: 15px; border: 1px solid var(--border); border-radius: 15px; background: var(--panel); box-shadow: 0 20px 60px rgba(20,35,42,.2); }
.employee-document-meta { display: grid; grid-template-columns: repeat(4,1fr); padding: 12px 17px; border-top: 1px solid var(--border); background: color-mix(in srgb,var(--bg) 35%,transparent); }
.employee-document-meta span { font-size: 12px; }
.employee-document-meta small { display: block; margin-bottom: 4px; color: var(--muted); }
.employee-version-history { border-top: 1px solid var(--border); }
.employee-version-history > summary { padding: 13px 17px; cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 750; }
.employee-version-history table { margin: 0 14px 14px; width: calc(100% - 28px); }
.employee-documents-empty { display: grid; justify-items: center; gap: 7px; padding: 42px 20px; text-align: center; border: 1px dashed var(--border); border-radius: 18px; }
.employee-documents-empty i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--accent); background: color-mix(in srgb,var(--accent) 10%,transparent); font-style: normal; font-size: 11px; font-weight: 800; }
.employee-documents-empty h3,.employee-documents-empty p { margin: 0; }
.employee-documents-empty p { color: var(--muted); }

@media (max-width: 900px) {
  .employee-profile-hero { grid-template-columns: auto 1fr; }
  .employee-profile-actions { grid-column: 1/-1; justify-content: flex-start; max-width: none; }
  .employee-profile-kpis { grid-template-columns: 1fr 1fr; }
  .employee-profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .notification-center { top: 10px !important; right: 10px !important; }
  .notification-panel { position: fixed !important; top: 66px !important; right: 10px !important; left: 10px !important; width: auto !important; max-height: calc(100vh - 80px); }
  .notification-copy > div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .employee-profile-hero { grid-template-columns: 1fr; text-align: center; }
  .employee-profile-photo { display: grid; justify-content: center; }
  .employee-profile-tags,.employee-profile-actions { justify-content: center; }
  .employee-profile-kpis { grid-template-columns: 1fr; }
  .employee-data-list,.employee-document-upload .erp-form { grid-template-columns: 1fr; }
  .employee-data-list > div:nth-child(odd) { padding-right: 0; }
  .employee-document-current { grid-template-columns: 44px 1fr; }
  .employee-document-actions { grid-column: 1/-1; }
  .employee-document-meta { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* Fichas adaptativas y expediente integral de residentes */
.client-profile-fields{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:4px 0 8px;padding:20px;border:1px solid var(--border);border-radius:20px;background:color-mix(in srgb,var(--panel) 88%,var(--bg))}.client-profile-fields[hidden]{display:none!important}.client-profile-fields legend{padding:0 8px;font-weight:800;font-size:16px}.client-profile-fields .adaptive-check{display:flex;flex-direction:row;align-items:center;gap:10px}.client-profile-fields .adaptive-check input{width:auto}.module-kpis{margin-bottom:22px}.record-profile-link{font-weight:800}
.resident-profile-hero{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:24px;margin-top:24px;padding:26px}.resident-profile-photo{width:112px;height:112px}.resident-profile-photo img,.resident-profile-photo i{width:100%;height:100%;border-radius:28px;object-fit:cover}.resident-profile-photo i{display:grid;place-items:center;background:#111;color:#fff;font:800 30px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.resident-profile-hero h2{margin:4px 0 8px;font-size:30px}.resident-profile-hero p{margin:0;color:var(--muted)}.resident-profile-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.resident-profile-tags span,.resident-document-count{padding:7px 11px;border-radius:999px;background:var(--soft);font-size:12px;font-weight:750}.resident-profile-actions{display:flex;flex-wrap:wrap;gap:9px;justify-content:flex-end}.resident-management-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}.resident-management-grid>.panel{margin:0}.resident-profile-editor .erp-form,.resident-document-upload .erp-form{padding:0}.resident-photo-field{grid-row:span 2}.resident-consumption-history,.resident-documents{margin-top:20px}.resident-document-list{display:grid;gap:12px}.resident-document-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:16px;align-items:center;padding:18px;border:1px solid var(--border);border-radius:18px;background:var(--panel)}.resident-document-card.is-expired{border-color:#e7b3ab;background:color-mix(in srgb,var(--panel) 94%,#c9341c)}.resident-document-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:#111;color:#fff;font-size:12px;font-weight:850}.resident-document-copy>span{color:var(--muted);font-size:12px}.resident-document-copy h3{margin:3px 0 4px}.resident-document-copy p{margin:0;color:var(--muted)}.resident-document-copy>div{display:flex;gap:12px;flex-wrap:wrap;margin-top:8px}.resident-document-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.resident-document-actions details{position:relative}.resident-document-actions details>summary{cursor:pointer;padding:9px 13px;border-radius:999px;background:var(--soft);font-weight:750;list-style:none}.resident-document-edit{position:absolute;right:0;top:44px;z-index:12;width:min(620px,80vw);display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:18px;border:1px solid var(--border);border-radius:18px;background:var(--panel);box-shadow:0 20px 60px #0003}.resident-document-edit button{grid-column:1/-1}.resident-documents-empty{display:grid;place-items:center;text-align:center;padding:42px}.resident-documents-empty i{display:grid;place-items:center;width:60px;height:60px;border-radius:18px;background:var(--soft);font-style:normal;font-weight:850}.resident-feedback{margin-top:20px}
@media(max-width:1100px){.client-profile-fields{grid-template-columns:1fr 1fr}.resident-profile-hero{grid-template-columns:auto 1fr}.resident-profile-actions{grid-column:1/-1;justify-content:flex-start}.resident-management-grid{grid-template-columns:1fr}}
@media(max-width:700px){.client-profile-fields{grid-template-columns:1fr}.module-kpis{grid-template-columns:1fr 1fr}.resident-profile-hero{grid-template-columns:1fr}.resident-document-card{grid-template-columns:auto 1fr}.resident-document-actions{grid-column:1/-1;justify-content:flex-start}.resident-document-edit{position:fixed;inset:10vh 4vw auto;width:auto;max-height:80vh;overflow:auto;grid-template-columns:1fr}.resident-document-copy>div{display:grid;gap:3px}}

/* Indicadores de RR. HH. y permisos granulares */
.employee-stat-cards{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:20px}.employee-stat-cards article{min-height:132px}.employee-insights-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:20px;margin-bottom:20px}.employee-insights-grid>.panel{margin:0;padding:24px}.stat-bar{display:grid;gap:8px;margin:15px 0}.stat-bar>div{display:flex;justify-content:space-between;gap:12px}.stat-bar>div span{font-weight:800}.stat-bar>i{display:block;height:11px;overflow:hidden;border-radius:999px;background:var(--soft)}.stat-bar>i>em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 55%,#62c98e))}.stat-pills{display:grid;grid-template-columns:1fr 1fr;gap:10px}.stat-pills>span{display:grid;gap:3px;padding:15px;border:1px solid var(--border);border-radius:16px;background:color-mix(in srgb,var(--panel) 92%,var(--soft))}.stat-pills i{color:var(--muted);font-size:12px;font-style:normal}.permission-matrix{grid-column:1/-1}.permission-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}.permission-toolbar h3,.permission-toolbar p{margin:0}.permission-toolbar p{color:var(--muted);font-size:13px}.permission-matrix td:not(:first-child),.permission-matrix th:not(:first-child){text-align:center}.permission-matrix input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent)}
@media(max-width:1050px){.employee-stat-cards{grid-template-columns:1fr 1fr}.employee-insights-grid{grid-template-columns:1fr}}@media(max-width:620px){.employee-stat-cards,.stat-pills{grid-template-columns:1fr}.permission-toolbar{align-items:flex-start;flex-direction:column}}
.analytics-chart{padding:26px;margin-bottom:20px}.chart-legend{display:flex;gap:14px;font-size:12px}.chart-legend span:before{content:"";display:inline-block;width:10px;height:10px;margin-right:6px;border-radius:3px}.chart-legend .income:before,.analytics-month i.income{background:#39a96b}.chart-legend .expense:before,.analytics-month i.expense{background:#e45b59}.analytics-bars{display:flex;align-items:flex-end;gap:16px;min-height:245px;padding:22px 8px 0}.analytics-month{display:grid;flex:1;gap:9px;text-align:center}.analytics-month>div{height:190px;display:flex;align-items:flex-end;justify-content:center;gap:5px}.analytics-month i{display:block;width:min(34px,42%);border-radius:9px 9px 3px 3px;transition:filter .2s,transform .2s}.analytics-month i:hover{filter:brightness(.92);transform:translateY(-2px)}.analytics-month b{font-size:12px;color:var(--muted)}


/* v2.9.0 — navegación enlazada de la ficha 360 */
.client-section-nav{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:18px 0 22px}
.client-section-nav a{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid var(--border,#dfe4ea);border-radius:14px;background:var(--panel,#fff);text-decoration:none;color:inherit;box-shadow:0 5px 16px rgba(15,23,42,.05);transition:.18s ease}
.client-section-nav a:hover{transform:translateY(-2px);border-color:var(--primary,#2457d6);box-shadow:0 9px 22px rgba(15,23,42,.09)}
.client-section-nav b{font-size:14px}.client-section-nav span{font-size:12px;opacity:.72}
.client-linked-card{display:block;text-decoration:none;color:inherit}.client-linked-card article{height:100%}
html{scroll-behavior:smooth}section[id],details[id]{scroll-margin-top:18px}
@media(max-width:720px){.client-section-nav{grid-template-columns:1fr 1fr}.client-section-nav a{padding:12px}}

/* v2.9.1 — ficha de cliente más intuitiva */
.client-profile-summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:18px;align-items:center;margin:18px 0;padding:22px}
.client-profile-avatar{display:grid;place-items:center;width:64px;height:64px;border-radius:20px;background:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 55%,#111));color:#fff;font-weight:850;font-size:20px}
.client-profile-main h2{margin:3px 0 5px;font-size:24px}.client-profile-main p,.client-profile-main small{margin:0;color:var(--muted)}
.client-profile-state{display:grid;gap:2px;min-width:145px;padding:12px 15px;border-radius:16px;background:color-mix(in srgb,#f4b942 14%,var(--panel));border:1px solid color-mix(in srgb,#f4b942 35%,var(--border))}
.client-profile-state.ok{background:color-mix(in srgb,#39a96b 12%,var(--panel));border-color:color-mix(in srgb,#39a96b 35%,var(--border))}.client-profile-state span,.client-profile-state small{font-size:11px;color:var(--muted)}.client-profile-state b{font-size:18px}
.client-profile-quick{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.client-section-nav{position:sticky;top:10px;z-index:9;display:flex;overflow-x:auto;gap:8px;padding:9px;margin:18px 0 22px;border:1px solid var(--border);border-radius:18px;background:color-mix(in srgb,var(--panel) 94%,transparent);box-shadow:0 12px 32px #00000012;backdrop-filter:blur(12px);scrollbar-width:thin}
.client-section-nav a{min-width:132px;display:grid;grid-template-columns:28px 1fr;grid-template-rows:auto auto;column-gap:8px;row-gap:1px;padding:10px 12px;box-shadow:none;border-color:transparent;background:transparent}
.client-section-nav a:hover,.client-section-nav a.active{transform:none;border-color:color-mix(in srgb,var(--accent) 35%,var(--border));background:color-mix(in srgb,var(--accent) 10%,var(--panel))}
.client-section-nav i{grid-row:1/3;align-self:center;display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--soft);font-style:normal;color:var(--accent);font-weight:850}.client-section-nav b{align-self:end}.client-section-nav span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-edit-panel>summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 22px;list-style:none;cursor:pointer}.client-edit-panel>summary::-webkit-details-marker{display:none}.client-edit-panel>summary span{display:grid;gap:3px}.client-edit-panel>summary small{color:var(--muted);font-weight:500}.client-edit-panel>summary em{padding:7px 11px;border-radius:999px;background:var(--soft);font-size:12px;font-style:normal}.client-edit-panel[open]>summary em:before{content:'Cerrar'}.client-edit-panel[open]>summary em{font-size:0}.client-edit-panel[open]>summary em:before{font-size:12px}.client-edit-panel.is-dirty{border-color:color-mix(in srgb,#f4b942 60%,var(--border))}.client-edit-panel.is-dirty>summary:after{content:'Cambios sin guardar';color:#9a6a00;font-size:12px;font-weight:750}
#resumen-cliente,section[id],details[id]{scroll-margin-top:118px}
@media(max-width:1050px){.client-profile-summary{grid-template-columns:auto 1fr}.client-profile-state,.client-profile-quick{grid-column:auto}.client-profile-quick{justify-content:flex-start}}
@media(max-width:720px){.client-profile-summary{grid-template-columns:auto 1fr;padding:17px}.client-profile-state,.client-profile-quick{grid-column:1/-1}.client-profile-state{min-width:0}.client-profile-quick .button{flex:1;text-align:center}.client-section-nav{top:6px;margin-inline:-4px}.client-section-nav a{min-width:120px}.client-edit-panel>summary{align-items:flex-start;padding:16px}.client-edit-panel>summary small{font-size:11px}}

/* v3.1.6 · menú lateral compacto y organizado */
.shell > aside{overflow:hidden}
.compact-nav{display:flex;flex-direction:column;gap:.35rem;overflow-y:auto;min-height:0;padding:.15rem .35rem .65rem;scrollbar-width:thin}
.compact-nav .nav-group{border:0;background:transparent;border-radius:14px;margin:0}
.compact-nav .nav-group>summary{list-style:none;display:grid;grid-template-columns:32px 1fr 18px;align-items:center;gap:.55rem;min-height:44px;padding:.42rem .55rem;border-radius:13px;cursor:pointer;font-weight:700;color:var(--text,#263746);user-select:none}
.compact-nav .nav-group>summary::-webkit-details-marker{display:none}
.compact-nav .nav-group>summary:hover,.compact-nav .nav-group[open]>summary{background:color-mix(in srgb,var(--accent,#9a6230) 11%,transparent);color:var(--accent,#9a6230)}
.compact-nav .nav-group>summary i,.compact-nav .nav-group-items a i{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:color-mix(in srgb,var(--accent,#9a6230) 10%,transparent);font-style:normal;font-size:.88rem}
.compact-nav .nav-group>summary b{font-size:.8rem;transition:transform .18s ease;text-align:center}
.compact-nav .nav-group[open]>summary b{transform:rotate(180deg)}
.compact-nav .nav-group-items{display:grid;gap:.18rem;padding:.2rem 0 .25rem 1.05rem}
.compact-nav .nav-group-items a{display:grid;grid-template-columns:28px 1fr;align-items:center;gap:.5rem;min-height:38px;padding:.3rem .5rem;border-radius:11px;font-size:.9rem;line-height:1.15;text-decoration:none;color:var(--text,#263746)}
.compact-nav .nav-group-items a i{width:27px;height:27px;border-radius:9px;font-size:.78rem}
.compact-nav .nav-group-items a:hover{background:color-mix(in srgb,var(--accent,#9a6230) 8%,transparent)}
.compact-nav .nav-group-items a.active{background:color-mix(in srgb,var(--accent,#9a6230) 16%,transparent);color:var(--accent,#9a6230);font-weight:800}
@media(max-width:900px){.compact-nav .nav-group>summary{min-height:42px}.compact-nav .nav-group-items a{min-height:36px}}

/* v3.1.7 · navegación lateral profesional */
.shell > aside{overflow:hidden;padding:26px 16px 18px}
.erp-sidebar-nav{display:flex!important;flex-direction:column;gap:7px;min-height:0;overflow-y:auto;padding:2px 3px 10px;scrollbar-width:thin;scrollbar-color:rgba(120,100,75,.35) transparent}
.erp-sidebar-nav::-webkit-scrollbar{width:5px}.erp-sidebar-nav::-webkit-scrollbar-thumb{background:rgba(120,100,75,.28);border-radius:10px}
.erp-nav-section{margin:0;border:0;border-radius:14px;background:transparent}
.erp-nav-section>summary{appearance:none;-webkit-appearance:none;list-style:none!important;display:flex!important;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:42px;padding:10px 12px;border:1px solid transparent;border-radius:13px;cursor:pointer;color:var(--text);font-size:12px!important;font-weight:800;letter-spacing:.055em;text-transform:uppercase;line-height:1.15;user-select:none;transition:background .16s ease,border-color .16s ease,color .16s ease}
.erp-nav-section>summary::-webkit-details-marker,.erp-nav-section>summary::marker{display:none!important;content:""}
.erp-nav-section>summary:hover{background:rgba(255,255,255,.48);border-color:var(--border)}
.erp-nav-section[open]>summary{background:color-mix(in srgb,var(--accent) 10%,rgba(255,255,255,.62));border-color:color-mix(in srgb,var(--accent) 17%,var(--border));color:var(--accent)}
.erp-nav-section-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.erp-nav-chevron{flex:0 0 8px;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translate(-1px,-1px);transition:transform .18s ease;opacity:.72}
.erp-nav-section[open] .erp-nav-chevron{transform:rotate(225deg) translate(-1px,-1px)}
.erp-nav-links{display:grid;gap:4px;padding:5px 0 3px 8px}
.erp-sidebar-nav .erp-nav-links a{display:grid!important;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:10px;min-height:42px;padding:5px 10px;border:1px solid transparent;border-radius:13px;color:var(--text);font-size:14px!important;font-weight:560;line-height:1.2;text-decoration:none;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}
.erp-sidebar-nav .erp-nav-links a:hover{background:rgba(255,255,255,.58);border-color:var(--border);transform:translateX(2px)}
.erp-sidebar-nav .erp-nav-links a.active{background:color-mix(in srgb,var(--accent) 13%,rgba(255,255,255,.68));border-color:color-mix(in srgb,var(--accent) 18%,var(--border));color:var(--accent);font-weight:780}
.erp-nav-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:color-mix(in srgb,var(--accent) 9%,rgba(255,255,255,.7));color:var(--accent);font-size:10px!important;font-weight:850;letter-spacing:-.02em;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 8%,transparent)}
.erp-sidebar-nav .erp-nav-links a.active .erp-nav-icon{background:var(--accent);color:#fff;box-shadow:none}
@media(max-width:1100px) and (min-width:561px){.shell{grid-template-columns:225px 1fr!important}.shell>aside{padding:22px 12px 16px}.erp-nav-section>summary{font-size:11px!important}.erp-sidebar-nav .erp-nav-links a{font-size:13px!important}}
@media(max-width:900px) and (min-width:561px){.shell{grid-template-columns:220px 1fr!important}.shell>aside{padding:20px 11px!important}.logo{font-size:20px!important;padding:0 10px 20px!important}.logo:first-letter{font-size:inherit!important}.erp-sidebar-nav .erp-nav-links a{justify-content:initial!important}.profile span,.profile a{display:block!important}.profile>a:last-child{margin-left:auto}.erp-nav-section-title{display:block!important}}
@media(max-width:560px){.erp-sidebar-nav{display:none!important}}
