/* Shared administrative design system, isolated from public and resident pages. */
body.backoffice { --dc-web-muted:#536174; --dc-muted:#536174; --dc-text:#172b3a; --dc-border:#dce3e8; --dc-card:#fff; --muted:#536174; --bo-green:#08795a; color-scheme:light; font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:#172b3a; background:#f4f6f8; font-size:14px; line-height:1.5; }
.backoffice * { box-sizing:border-box; }
.backoffice .bo-icon { width:20px; height:20px; flex-shrink:0; vertical-align:middle; }
.backoffice .bo-sidebar { position:fixed; inset:0 auto 0 0; width:240px; background:#142c2a; color:#dbe8e5; padding:28px 16px 20px; display:flex; flex-direction:column; z-index:30; overflow-y:auto; }
.backoffice .bo-brand { display:flex; gap:12px; align-items:center; color:white; text-decoration:none; font-size:23px; font-weight:700; padding:0 12px 28px; }
.backoffice .bo-brand>span { background:#72e6b6; color:#123d30; width:34px; height:36px; border-radius:9px; display:grid; place-items:center; font-size:22px; }
.backoffice .bo-nav-heading { font-size:11px; letter-spacing:.09em; text-transform:uppercase; color:#adc5bf; padding:20px 12px 8px; margin:0; }
.backoffice .bo-nav-link { display:flex; align-items:center; gap:12px; padding:11px 12px; margin:3px 0; border-radius:8px; text-decoration:none; color:#dbe8e5; font-weight:500; }
.backoffice .bo-nav-link:hover { background:#25413d; }
.backoffice .bo-nav-link.is-active { color:#a0f4cf; background:#265047; }
.backoffice .bo-user { margin-top:auto; border-top:1px solid #38504b; padding:24px 12px 0; display:grid; gap:4px; overflow-wrap:anywhere; }
.backoffice .bo-user small { color:#b6ccc6; }
.backoffice .bo-user a { color:#dbe8e5; margin-top:8px; font-size:12px; }
.backoffice .bo-page { margin-left:240px; min-width:0; }
.backoffice .bo-topbar { min-height:80px; padding:16px 32px; border-bottom:1px solid #dce3e8; display:flex; align-items:center; gap:20px; background:white; }
.backoffice .bo-breadcrumb { color:#536174; margin-right:auto; }
.backoffice .bo-context { font-size:11px; display:grid; gap:2px; color:#536174; min-width:0; }
.backoffice .bo-context select { width:240px; max-width:100%; min-height:36px; padding:4px 8px; }
.backoffice #pageContent { max-width:1600px; margin:auto; padding:36px 32px 64px; outline:none; }
.backoffice h1 { font-size:30px; line-height:1.2; letter-spacing:-.035em; color:#172b3a; margin:6px 0 10px; }
.backoffice h2 { font-size:19px; letter-spacing:-.02em; color:#172b3a; margin:0 0 8px; }
.backoffice h3 { font-size:16px; color:#172b3a; margin:0 0 8px; }
.backoffice .eyebrow { color:#08795a; font-size:11px; letter-spacing:.1em; margin:0 0 6px; }
.backoffice .lead, .backoffice .admin-help-text, .backoffice .panel-caption { color:#536174; font-size:14px; line-height:1.6; }
.backoffice .page-heading, .backoffice .bo-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:0 0 28px; }
.backoffice .page-heading .lead, .backoffice .bo-heading p { margin-bottom:0; }
.backoffice .card, .backoffice .bo-panel { width:100%; min-width:0; padding:24px; border:1px solid #dce3e8; border-radius:12px; background:#fff; box-shadow:none; color:#172b3a; }
.backoffice .button { display:inline-flex; align-items:center; justify-content:center; gap:8px; flex:0 1 auto; min-width:0; min-height:40px; padding:9px 16px; font:600 14px/1.4 system-ui,sans-serif; border-radius:8px; text-decoration:none; cursor:pointer; letter-spacing:normal; box-shadow:none; }
.backoffice .primary { background:#08795a; color:white; border:1px solid #08795a; }
.backoffice .primary:hover { background:#056048; }
.backoffice .secondary { background:#fff; color:#344558; border:1px solid #c6d1d9; }
.backoffice .secondary:hover { background:#f1f5f6; }
.backoffice .danger { background:#fff3f2; color:#b42318; border:1px solid #f0b8b3; }
.backoffice button:disabled { opacity:.55; cursor:wait; }
.backoffice :is(input,select,textarea) { color:#172b3a; background:white; border:1px solid #b8c6d0; border-radius:8px; padding:10px 12px; font:inherit; min-width:0; max-width:100%; }
.backoffice :is(input,textarea)::placeholder { color:#697889; }
.backoffice :is(input,select,textarea):focus { border-color:#08795a; }
.backoffice :focus-visible { outline:3px solid #178269; outline-offset:3px; }
.backoffice label { color:#344558; font-weight:500; }
.backoffice .bo-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:28px; }
.backoffice .bo-metric { display:grid; gap:8px; padding:22px; }
.backoffice .bo-metric .bo-icon { color:#08795a; }
.backoffice .bo-metric strong { font-size:30px; font-weight:650; line-height:1.2; }
.backoffice .bo-metric span { color:#536174; }
.backoffice .bo-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:24px; align-items:start; }
.backoffice .bo-panel-head { display:flex; justify-content:space-between; gap:12px; align-items:center; padding-bottom:16px; border-bottom:1px solid #e5eaee; margin-bottom:4px; }
.backoffice .bo-action { display:flex; align-items:center; gap:16px; padding:20px 0; text-decoration:none; color:#172b3a; border-bottom:1px solid #e5eaee; }
.backoffice .bo-action:last-child { border:0; padding-bottom:0; }
.backoffice .bo-action>span { display:grid; gap:3px; flex:1; }
.backoffice .bo-action small { color:#536174; }
.backoffice .bo-action>.bo-icon:first-child { width:40px; height:40px; padding:10px; color:#08795a; background:#eaf6f0; border-radius:8px; }
.backoffice .bo-state { padding:36px 16px; color:#536174; text-align:center; display:grid; justify-items:center; gap:8px; }
.backoffice .bo-state strong { color:#344558; font-size:15px; }
.backoffice .bo-state p { margin:0; }
.backoffice .bo-state.is-error { color:#b42318; }
.backoffice .bo-updated { font-size:12px; color:#536174; display:block; margin-top:12px; }
.backoffice .bo-event { padding:16px 0; display:grid; grid-template-columns:20px minmax(0,1fr); gap:12px; border-bottom:1px solid #e5eaee; }
.backoffice .bo-event small, .backoffice .bo-event time { display:block; color:#536174; font-size:12px; }
.backoffice .bo-event .bo-icon { color:#08795a; }
.backoffice .bo-icon-button { border:1px solid #c6d1d9; border-radius:8px; background:white; padding:8px; color:#344558; }
.backoffice #boMenu { display:none; }
.backoffice .bo-skip { position:fixed; top:-100px; z-index:100; background:white; padding:12px; color:#08795a; }
.backoffice .bo-skip:focus { top:8px; left:8px; }
.backoffice .condo-manager-layout { grid-template-columns:1fr; gap:24px; }
.backoffice .condo-directory-panel { display:none; }
.backoffice .condo-detail-panel { padding:24px; }
.backoffice .detail-header { border-bottom:1px solid #e5eaee; padding-bottom:20px; gap:20px; flex-wrap:wrap; }
.backoffice .detail-actions { gap:8px; flex-wrap:wrap; }
.backoffice .unit-filter-bar { margin:24px 0; gap:12px; }
.backoffice .admin-search { background:#fff; border:1px solid #b8c6d0; border-radius:8px; color:#536174; }
.backoffice .admin-search input { border:0; background:transparent; color:#172b3a; }
.backoffice .unit-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.backoffice .unit-management-card { background:#fff; border:1px solid #dce3e8; border-radius:10px; box-shadow:none; color:#172b3a; padding:20px; }
.backoffice .unit-management-card p, .backoffice .unit-resident small { color:#536174; }
.backoffice .unit-type-icon { background:#eaf6f0; color:#08795a; border-radius:8px; }
.backoffice .unit-card-actions { gap:8px; }
.backoffice .unit-card-actions .button { font-size:12px; padding:7px 10px; min-height:34px; }
.backoffice .unit-resident { border-color:#e5eaee; }
.backoffice .badge { background:#f0f3f6; color:#536174; font-size:12px; font-weight:500; padding:4px 10px; }
.backoffice .badge.online { background:#eaf6f0; color:#08795a; }
.backoffice .resident-list-section { margin-top:32px; border-top:1px solid #dce3e8; padding-top:24px; }
.backoffice .admin-table-wrap { overflow-x:auto; max-width:100%; border:1px solid #dce3e8; border-radius:8px; }
.backoffice table { width:100%; border-collapse:collapse; color:#172b3a; background:white; }
.backoffice th { text-align:left; color:#536174; background:#f7f9fa; font-weight:600; }
.backoffice :is(td,th) { padding:12px 16px; border-bottom:1px solid #e5eaee; font-size:13px; }
.backoffice td small { display:block; color:#536174; }
.backoffice .admin-dialog { color:#172b3a; color-scheme:light; border:1px solid #dce3e8; border-radius:12px; background:white; max-width:min(640px,calc(100vw - 32px)); box-shadow:0 20px 70px #142c2a30; }
.backoffice .admin-dialog::backdrop { background:#142c2a70; }
.backoffice .admin-dialog form { background:white; padding:24px; color:#172b3a; }
.backoffice .dialog-close { color:#536174; background:#f4f6f8; border-radius:8px; }
.backoffice .error-text { color:#b42318; }
.backoffice .admin-toast { background:#fff; color:#172b3a; border:1px solid #c6d1d9; border-left:4px solid #08795a; }
.backoffice .admin-toast.error { border-left-color:#b42318; }
.backoffice .skeleton-row { background:linear-gradient(90deg,#eef2f5,#f8fafb,#eef2f5); }
.backoffice .bo-filter { display:grid; gap:8px; margin:20px 0; }
.backoffice .bo-filter input { width:100%; }
.backoffice .community-create-panel { margin-bottom:24px; }
.backoffice .community-create-form { gap:16px; }
.backoffice .community-create-form label { display:grid; gap:6px; }
.backoffice [hidden], .backoffice .hidden { display:none!important; }
@media(min-width:768px) and (max-width:1199px) {
 .backoffice .bo-sidebar { width:80px; padding-inline:12px; }
 .backoffice .bo-brand { padding-inline:10px; font-size:0; }
 .backoffice .bo-brand>span { flex-shrink:0; }
 .backoffice .bo-nav-link { justify-content:center; padding:12px; }
 .backoffice .bo-nav-link span,.backoffice .bo-nav-heading,.backoffice .bo-user { display:none; }
 .backoffice .bo-page { margin-left:80px; }
 .backoffice .unit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:1000px) { .backoffice .bo-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .backoffice .bo-grid { grid-template-columns:1fr; } }
@media(max-width:767px) {
 .backoffice .bo-sidebar { transform:translateX(-100%); width:260px; box-shadow:10px 0 40px #142c2a30; }
 .backoffice.bo-menu-open .bo-sidebar { transform:translateX(0); }
 .backoffice .bo-page { margin-left:0; }
 .backoffice #boMenu { display:inline-flex; }
 .backoffice .bo-topbar { padding:12px 16px; gap:12px; flex-wrap:wrap; }
 .backoffice .bo-breadcrumb { font-size:12px; }
 .backoffice .bo-context { order:4; flex:1 0 100%; }
 .backoffice .bo-context select { width:100%; }
 .backoffice #pageContent { padding:24px 16px 48px; }
 .backoffice h1 { font-size:26px; }
 .backoffice .bo-heading,.backoffice .page-heading { align-items:flex-start; flex-direction:column; gap:12px; }
 .backoffice .bo-metrics { gap:12px; }
 .backoffice .bo-metric { padding:16px; }
 .backoffice .bo-metric strong { font-size:26px; }
 .backoffice .card,.backoffice .bo-panel { padding:20px; }
 .backoffice .unit-grid { grid-template-columns:1fr; }
 .backoffice .detail-actions { display:flex; }
 .backoffice .detail-header .button { width:auto; }
 .backoffice .unit-filter-bar { grid-template-columns:1fr; }
 .backoffice .bo-topbar .button { font-size:12px; padding:8px 10px; }
}
@media(prefers-reduced-motion:reduce) { .backoffice * { animation:none!important; transition:none!important; } }

.backoffice .admin-empty { background:#f7f9fa; border:1px dashed #c6d1d9; border-radius:8px; color:#536174; }
.backoffice .command-empty-state p { color:#536174; }
.backoffice .bo-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:20px 0; }
.backoffice .bo-summary>div { padding:16px; background:#f7f9fa; border-radius:8px; display:grid; gap:4px; }
.backoffice .bo-summary strong { font-size:24px; line-height:1.2; }
.backoffice .bo-summary span { font-size:12px; color:#536174; }
.backoffice .bo-more { position:relative; }
.backoffice .bo-more summary { list-style:none; cursor:pointer; }
.backoffice .bo-more summary::-webkit-details-marker { display:none; }
.backoffice .bo-more[open]>div { position:absolute; right:0; z-index:5; width:200px; background:white; box-shadow:0 6px 24px #142c2a20; border:1px solid #dce3e8; border-radius:8px; padding:8px; display:grid; gap:8px; }
.backoffice .bo-more[open]>div .button { justify-content:flex-start; }
.backoffice .bo-table-action { text-align:right; }
.backoffice .bo-directory-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
@media(max-width:767px) { .backoffice .bo-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } }

.backoffice .unit-resident strong,.backoffice .unit-resident small { display:block; }
.backoffice caption { caption-side:top; text-align:left; padding:12px 16px; }
@media(max-width:767px) { .backoffice .bo-sidebar { visibility:hidden; } .backoffice.bo-menu-open .bo-sidebar { visibility:visible; } }

/* Complete administrative surface. Public and personal resident styles stay isolated. */
body.backoffice { --dc-web-canvas:#f4f6f8; --dc-web-surface:#fff; --dc-web-raised:#f7f9fa; --dc-web-text:#172b3a; --dc-web-border:#dce3e8; --dc-web-border-strong:#c6d1d9; --dc-web-success:#08795a; --dc-web-danger:#b42318; --dc-web-warning:#975b06; --dc-web-info:#2463a0; --dc-web-shadow:none; }
.backoffice #pageContent > .card + .card { margin-top:24px; }
.backoffice .summary-card,.backoffice .metric-card { border:1px solid #dce3e8; border-radius:12px; background:#fff; box-shadow:none; padding:24px; color:#172b3a; }
.backoffice .metric-card strong { color:#172b3a; font-size:30px; }
.backoffice .metric-icon { color:#08795a; background:#eaf6f0; border-radius:8px; }
.backoffice .metric-icon-danger { color:#b42318; background:#fff3f2; }
.backoffice .metric-icon-warning { color:#975b06; background:#fff6e5; }
.backoffice .metric-icon-info { color:#2463a0; background:#edf4fc; }
.backoffice .metric-icon .bo-icon { width:20px; height:20px; }
.backoffice .status-badge,.backoffice .device-status-badge,.backoffice .audit-status { background:#f0f3f6; color:#536174; border:1px solid #dce3e8; font-weight:500; }
.backoffice .status-badge-success,.backoffice .device-status-badge.active,.backoffice .audit-status.success,.backoffice .assignment-badge.assigned,.backoffice .table-protected { background:#eaf6f0; color:#08795a; border-color:#b7dfcb; }
.backoffice .status-badge-warning,.backoffice .audit-status.warning,.backoffice .assignment-badge.unassigned { background:#fff6e5; color:#975b06; border-color:#ecd2a4; }
.backoffice .status-badge-danger,.backoffice .audit-status.danger,.backoffice .danger-badge,.backoffice .delete-button { background:#fff3f2; color:#b42318; border-color:#f0b8b3; }
.backoffice .protected-badge,.backoffice .user-avatar { color:#08795a; background:#eaf6f0; }
.backoffice .table-secondary { color:#536174; }
.backoffice .community-toolbar { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:24px; }
.backoffice .community-search { background:#fff; border:1px solid #b8c6d0; border-radius:8px; color:#536174; }
.backoffice .community-search input { background:transparent; border:0; }
.backoffice .community-table-panel { overflow:visible; }
.backoffice .community-table-panel table { min-width:700px; }
.backoffice .admin-actions { min-width:240px; }
.backoffice .admin-actions .button { margin:3px; }
.backoffice .profile-section + .profile-section { margin-top:32px; }
.backoffice .admin-switch { display:flex; align-items:center; gap:10px; font-weight:400; }
.backoffice input[type=checkbox] { accent-color:#08795a; width:18px; height:18px; min-height:18px; padding:0; flex-shrink:0; }
.backoffice fieldset { border:1px solid #dce3e8; border-radius:8px; padding:16px; min-width:0; }
.backoffice legend { color:#344558; font-weight:600; padding:0 6px; }
.backoffice .security-summary-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); }
.backoffice .security-block-row,.backoffice .security-guidance-note { background:#f7f9fa; border:1px solid #dce3e8; border-radius:8px; }
.backoffice .security-guidance ul,.backoffice .security-guidance p,.backoffice .security-block-identity small { color:#536174; }
.backoffice .security-error { padding:24px; border:1px solid #f0b8b3; border-radius:8px; color:#b42318; background:#fff9f8; }
.backoffice .security-error p { color:#7b3b36; }
.backoffice .audit-control-panel { margin-bottom:24px; }
.backoffice .audit-category { background:#edf4fc; color:#2463a0; }
.backoffice .audit-table { min-width:900px; }
.backoffice .audit-table td small { color:#536174; }
.backoffice .device-metrics-grid { gap:16px; }
.backoffice .device-metric-card strong { font-size:30px; }
.backoffice .device-workspace-tabs { background:#fff; border-color:#dce3e8; border-radius:10px; }
.backoffice .device-workspace-tab { color:#536174; border-radius:8px; }
.backoffice .device-workspace-tab.active { background:#eaf6f0; color:#08795a; border-color:#b7dfcb; }
.backoffice .device-workspace-heading { flex-wrap:wrap; }
.backoffice .device-workspace-heading>div,.backoffice .device-table-heading>div { min-width:0; }
.backoffice .device-table-card { padding:24px; }
.backoffice .device-maintenance-filters { grid-template-columns:minmax(180px,1fr) minmax(120px,.45fr) minmax(140px,.5fr) auto; }
.backoffice .iot-inventory-filters { grid-template-columns:minmax(180px,1fr) minmax(140px,.4fr) auto; }
.backoffice .device-filter,.backoffice .audit-filters { flex-wrap:wrap; }
.backoffice .filter-chip { color:#536174; border-color:#c6d1d9; font-weight:500; }
.backoffice .filter-chip.active,.backoffice .filter-chip:hover { color:#08795a; border-color:#8ecab4; background:#eaf6f0; }
.backoffice .device-status-badge.inactive { color:#536174; }
.backoffice .device-table tr:hover { background:#f7f9fa; }
.backoffice .iot-users-list { background:#f7f9fa; border-color:#dce3e8; border-radius:8px; }
.backoffice .maintenance-preview { background:#f7f9fa; border-color:#dce3e8; color:#536174; }
.backoffice .settings-nav { top:20px; }
.backoffice .settings-nav-link { color:#536174; }
.backoffice .settings-nav-link.active,.backoffice .settings-nav-link:hover { color:#08795a; background:#eaf6f0; border-color:#b7dfcb; }
.backoffice .roles-grid div { background:#f7f9fa; border-color:#dce3e8; }
.backoffice .policy-row { border-bottom-color:#dce3e8; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; }
.backoffice .resident-policy-card { border-radius:10px; }
.backoffice .campaign-layout { gap:24px; }
.backoffice .campaign-preview-panel iframe { border-radius:8px; }
.backoffice .campaign-brand-preview { background:#f7f9fa; border-color:#dce3e8; color:#344558; }
.backoffice .campaign-brand-preview .brand-mark { background:#08795a; color:white; }
.backoffice .bo-request { width:min(520px,calc(100vw - 32px)); padding:0; }
.backoffice .bo-request form { display:grid; gap:16px; }
.backoffice .bo-request form>label { display:grid; gap:8px; }
.backoffice .bo-request-message { margin:0; white-space:pre-line; overflow-wrap:anywhere; }
.backoffice .bo-request .dialog-header { margin:0; }
.backoffice .bo-request .dialog-actions { margin:0; padding-top:12px; }
.backoffice .bo-empty-page { min-height:100vh; display:grid; place-items:center; padding:24px; }
.backoffice .bo-empty-page>.bo-panel { max-width:600px; }
body.backoffice-auth:has(#dashboardView) { background:#f4f6f8; color:#172b3a; background-image:none; font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.backoffice-auth .shell { min-height:100vh; }
.backoffice-auth #authView { max-width:460px; border:1px solid #dce3e8; border-radius:12px; background:white; box-shadow:0 8px 32px #142c2a08; padding:32px; }
.backoffice-auth #authView .brand-small { color:#172b3a; }
.backoffice-auth #authView .brand-small span { background:#08795a; color:white; }
.backoffice-auth #authView h1 { font-size:28px; }
.backoffice-auth #authView .auth-intro { text-align:left; }
.backoffice-auth #authView :is(.auth-legal,.auth-intro p,.back-link) { color:#536174; }
.backoffice-auth #authView .tabs { background:#f7f9fa; border:1px solid #dce3e8; border-radius:8px; }
.backoffice-auth #authView .tab { color:#536174; }
.backoffice-auth #authView .tab.active { color:#08795a; background:#eaf6f0; border-radius:6px; }
.backoffice-auth #authView input { color:#172b3a; background:white; border:1px solid #b8c6d0; border-radius:8px; }
.backoffice-auth #authView .form-stack { gap:20px; }
.backoffice-auth #authView .auth-legal { border-color:#dce3e8; }
@media(max-width:1199px) { .backoffice .campaign-layout { grid-template-columns:1fr; } .backoffice .device-maintenance-filters { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .backoffice .device-maintenance-filters .admin-search { grid-column:1/-1; } }
@media(max-width:767px) {
 .backoffice .community-toolbar { align-items:stretch; flex-direction:column; }
 .backoffice .community-search { width:100%; }
 .backoffice .device-maintenance-filters,.backoffice .iot-inventory-filters { grid-template-columns:minmax(0,1fr); }
 .backoffice .device-metrics-grid { grid-template-columns:minmax(0,1fr); }
 .backoffice .device-table-card { padding:20px; }
 .backoffice .device-workspace-tabs { display:grid; grid-template-columns:minmax(0,1fr); }
 .backoffice .policy-row { grid-template-columns:minmax(0,1fr); }
 .backoffice .settings-layout { grid-template-columns:minmax(0,1fr); }
 .backoffice .roles-grid { grid-template-columns:minmax(0,1fr); }
 .backoffice .admin-dialog .dialog-actions { flex-wrap:wrap; }
 .backoffice .admin-dialog form { padding:20px; }
 .backoffice .admin-dialog form>* { min-width:0; }
 .backoffice .community-create-panel,.backoffice .community-create-form { grid-template-columns:minmax(0,1fr); }
 .backoffice-auth #authView { padding:24px; }
}

.backoffice .admin-actions .bo-more { display:inline-block; vertical-align:top; }
.backoffice .admin-actions .bo-more[open]>div { position:static; width:auto; margin:6px 0; box-shadow:none; }
.backoffice .campaign-layout .brand-mark { width:36px; height:36px; font-size:20px; }
.backoffice .admin-dialog { max-height:calc(100dvh - 32px); overflow-y:auto; }

.backoffice .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.backoffice .resident-policy-grid { align-items:start; }
.backoffice .resident-policy-card { align-content:start; grid-auto-rows:max-content; }
.backoffice-auth #authView .button.primary { background:#08795a; color:white; border:1px solid #08795a; }
.backoffice-auth #authView .button.primary:hover { background:#056048; }

.backoffice .bo-field-error { display:block; color:#b42318; font-size:12px; margin:6px 0 0; }
.backoffice [aria-invalid=true] { border-color:#b42318; }

.backoffice-auth #authView .tabs { display:none; }

.backoffice #iotTableWrap table { min-width:960px; }
.backoffice .profile-section table { min-width:0; }
.backoffice .profile-section td:last-child { white-space:nowrap; }
.backoffice .campaign-brand-preview { display:flex; align-items:center; gap:12px; margin:16px 0 24px; padding:12px; border:1px solid #dce3e8; border-radius:8px; flex-wrap:wrap; }
.backoffice .campaign-brand-preview .brand-mark { flex-shrink:0; margin:0; }
.backoffice .campaign-brand-preview small { flex-basis:100%; color:#536174; }

/* Optional condominium structures: keep every action visible on small screens. */
.backoffice :is(#structureForm,#accessPointForm,#accessDeviceForm) label { display:grid; gap:6px; margin-bottom:12px; }
.backoffice :is(#condominiumStructures,#condominiumAccessPoints) td .actions { margin:0; gap:8px; }
@media (max-width:600px) {
 .backoffice :is(#condominiumStructures,#condominiumAccessPoints) :is(table,tbody,tr) { display:block; width:100%; }
 .backoffice :is(#condominiumStructures,#condominiumAccessPoints) thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .backoffice :is(#condominiumStructures,#condominiumAccessPoints) tr { padding:12px; border-bottom:1px solid #e5eaee; }
 .backoffice :is(#condominiumStructures,#condominiumAccessPoints) td { display:grid; grid-template-columns:72px minmax(0,1fr); gap:8px; padding:8px 0; border:0; overflow-wrap:anywhere; }
 .backoffice :is(#condominiumStructures,#condominiumAccessPoints) td::before { content:attr(data-label); font-weight:700; }
 .backoffice :is(#condominiumStructures,#condominiumAccessPoints) td .actions { flex-direction:row; }
}

.backoffice #condominiumAccessPoints td :is(strong,small) { display:block; overflow-wrap:anywhere; }

.audit-filter-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-top:18px}.audit-filter-form label{display:flex;flex-direction:column;gap:6px;min-width:0}.audit-filter-form input,.audit-filter-form select{width:100%;min-width:0;box-sizing:border-box}.audit-filter-actions{display:flex;gap:8px;flex-wrap:wrap;grid-column:1/-1}

/* Keep audit controls in clear, full-width rows. */
.backoffice .audit-control-panel { display:grid; grid-template-columns:minmax(0,1fr); align-items:stretch; gap:20px; padding:24px; }
.backoffice .audit-panel-intro { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:24px; min-width:0; }
.backoffice .audit-panel-intro > div:first-child { min-width:0; }
.backoffice .audit-panel-intro .admin-help-text { max-width:78ch; margin-bottom:0; }
.backoffice .audit-panel-intro .device-filter { justify-content:flex-end; }
.backoffice .audit-filter-form { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:0; }
.backoffice .audit-filter-actions { grid-column:auto; align-items:center; }
.backoffice .audit-filter-form > .audit-filter-actions { grid-column:1/-1; padding-top:2px; }
.backoffice .audit-export-row { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:20px; padding-top:16px; border-top:1px solid #e2e8ed; }
.backoffice .audit-export-row .audit-filter-actions { flex-wrap:nowrap; }
.backoffice .audit-export-row .admin-help-text { max-width:78ch; margin:0; }
.backoffice .audit-feedback-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 20px; min-height:0; }
.backoffice .audit-feedback-row .admin-help-text { margin:0; }
@media (max-width:1000px) {
  .backoffice .audit-panel-intro { grid-template-columns:minmax(0,1fr); align-items:start; gap:14px; }
  .backoffice .audit-panel-intro .device-filter { justify-content:flex-start; }
  .backoffice .audit-filter-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .backoffice .audit-control-panel { gap:16px; padding:18px; }
  .backoffice .audit-filter-form { grid-template-columns:minmax(0,1fr); gap:12px; }
  .backoffice .audit-filter-form > .audit-filter-actions { grid-column:auto; }
  .backoffice .audit-filter-form > .audit-filter-actions .button { flex:1 1 140px; }
  .backoffice .audit-export-row { grid-template-columns:minmax(0,1fr); gap:8px; }
  .backoffice .audit-export-row .audit-filter-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .backoffice .audit-export-row .button { width:100%; }
}

/* Portal operation, statistics and account directory workspaces. */
.backoffice :is(.workspace-operation,.workspace-statistics,.workspace-users) { --workspace-gap:24px; }
.backoffice :is(.workspace-operation,.workspace-statistics,.workspace-users) .lead { max-width:72ch; }
.backoffice .workspace-filters { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:18px 0; }
.backoffice .workspace-filters label { display:grid; gap:6px; flex:1 1 160px; min-width:0; }
.backoffice .workspace-filters label:first-child { flex:2 1 240px; }
.backoffice .workspace-filters :is(input,select) { width:100%; box-sizing:border-box; }
.backoffice .workspace-heading-actions,.backoffice .workspace-periods { display:flex; flex-wrap:wrap; gap:8px; }
.backoffice .operation-layout { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr); gap:var(--workspace-gap); align-items:start; }
.backoffice .operation-feed { grid-column:1; grid-row:1; }
.backoffice .operation-sidebar { grid-column:2; grid-row:1; display:grid; gap:var(--workspace-gap); min-width:0; }
.backoffice .operation-sidebar .detail-actions { display:grid; grid-template-columns:minmax(0,1fr); justify-content:stretch; gap:8px; margin-top:16px; }
.backoffice .device-summary { display:flex; align-items:center; gap:24px; margin-bottom:24px; }
.backoffice .device-summary h2 { margin:0; }
.backoffice .device-summary-values { display:flex; flex-wrap:wrap; gap:20px 32px; }
.backoffice .device-summary-values>div { display:flex; align-items:center; gap:10px; }
.backoffice .device-summary-values strong { font-size:24px; }
.backoffice .device-summary-values span { color:#536174; font-size:13px; }
.backoffice .workspace-operation .bo-event { grid-template-columns:minmax(0,1fr); overflow-wrap:anywhere; }
.backoffice .workspace-operation .bo-event>div { min-width:0; }
.backoffice .operation-sidebar .detail-actions .button { width:100%; }
.backoffice .workspace-statistics .statistics-controls { margin-bottom:24px; }
.backoffice .workspace-statistics .audit-filter-form { grid-template-columns:repeat(4,minmax(0,1fr)); }
.backoffice .workspace-statistics .bo-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.backoffice .workspace-statistics .bo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.backoffice .statistics-option { display:grid; align-content:start; gap:8px; min-width:0; }
.backoffice .workspace-statistics svg { display:block; width:100%; min-height:180px; }
.backoffice .workspace-statistics :is(#statisticsPending,#statisticsApplied):empty { display:none; }
.backoffice .workspace-users .user-identity { flex:1; display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
.backoffice .workspace-users .community-table { width:100%; min-width:700px; }
.backoffice .workspace-users .user-cell { min-width:220px; }
.backoffice .workspace-users .user-avatar { flex-shrink:0; }
.backoffice .workspace-pagination { display:flex; justify-content:space-between; flex-wrap:wrap; align-items:center; gap:16px; margin-top:20px; }
.backoffice .workspace-pagination label,.backoffice .workspace-pagination>div { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
@media(max-width:1000px) {
 .backoffice .workspace-statistics .audit-filter-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .backoffice .operation-layout,.backoffice .workspace-statistics .bo-grid { grid-template-columns:1fr; }
 .backoffice .operation-sidebar,.backoffice .operation-feed { grid-column:auto; grid-row:auto; }
 .backoffice .device-summary { align-items:flex-start; flex-direction:column; gap:12px; }
}
@media(max-width:600px) {
 .backoffice .workspace-statistics .audit-filter-form { grid-template-columns:1fr; }
 .backoffice .workspace-statistics .bo-metrics { grid-template-columns:1fr; }
 .backoffice .workspace-filters>button { width:100%; }
 .backoffice .workspace-operation .bo-panel-head { align-items:flex-start; flex-wrap:wrap; }
 .backoffice .workspace-users .users-directory { padding:16px; }
}

.backoffice .workspace-operation #operationState { margin-bottom:12px; }
.backoffice .workspace-users td.admin-actions { display:table-cell; vertical-align:middle; }

/* Explicit event widths also support an already-open operation page. */
.backoffice .workspace-operation { --workspace-gap:28px; }
.backoffice .workspace-operation #operationKpis { gap:20px; }
.backoffice #operationActivity { display:grid; gap:14px; margin:20px 0; }
.backoffice #operationActivity .bo-event { display:block; width:100%; min-width:0; padding:18px; border:1px solid #dce3e8; border-radius:10px; background:#f8fafb; overflow-wrap:anywhere; }
.backoffice #operationActivity .bo-event>div { width:100%; min-width:0; }
.backoffice #operationActivity .operation-event-content { display:grid; grid-template-columns:minmax(0,1fr) minmax(150px,190px); gap:20px; align-items:start; }
.backoffice .operation-event-copy { display:grid; justify-items:start; gap:8px; min-width:0; }
.backoffice .operation-event-copy strong { font-size:15px; line-height:1.5; }
.backoffice .operation-event-meta { display:grid; gap:8px; text-align:right; min-width:0; }
.backoffice .operation-event-result { color:#344558; font-size:12px; font-weight:600; }
.backoffice #operationAlerts .bo-event { grid-template-columns:minmax(0,1fr); }
.backoffice #operationAlerts .bo-event>div { min-width:0; }
.backoffice #pageContent:has(#operationActivity)>section.bo-panel+section.bo-panel { margin-top:28px; }
@media(max-width:767px) {
 .backoffice #operationActivity .operation-event-content { grid-template-columns:minmax(0,1fr); gap:12px; }
 .backoffice .operation-event-meta { text-align:left; }
 .backoffice #operationActivity .bo-event { padding:16px; }
}

/* Keep account actions outside the scrollable table without changing row height. */
.backoffice #usersTable .users-more summary { display:inline-flex; align-items:center; gap:12px; white-space:nowrap; }
.backoffice #usersTable .users-more summary::after { content:'⌄'; font-size:16px; line-height:1; }
.backoffice #usersTable .users-more[open] summary { background:#eaf6f0; border-color:#08795a; color:#056048; }
.backoffice #usersTable .users-more[open]>.users-action-menu { position:fixed; right:auto; z-index:60; width:232px; max-width:calc(100vw - 24px); margin:0; padding:8px; display:grid; gap:4px; overflow-y:auto; background:#fff; border:1px solid #c6d1d9; border-radius:10px; box-shadow:0 8px 28px #142c2a26; }
.backoffice #usersTable .users-action-menu .button { width:100%; margin:0; min-height:42px; padding:10px 12px; justify-content:flex-start; text-align:left; white-space:normal; border:0; background:transparent; font-weight:500; }
.backoffice #usersTable .users-action-menu .button:hover { background:#f1f5f6; }
.backoffice #usersTable .users-action-menu .delete-button { margin-top:4px; border-top:1px solid #e5eaee; border-radius:0 0 6px 6px; color:#b42318; }
.backoffice #usersTable .users-action-menu .delete-button:hover { background:#fff3f2; }

/* Condominium assignment actions and readable audit snapshots. */
.backoffice #detailPanel .detail-actions,.backoffice #detailPanel .unit-card-actions { gap:12px; }
.backoffice #assignmentManagement>section { margin-top:24px; padding:24px; background:#fff; border:1px solid #dce3e8; border-radius:12px; min-width:0; }
.backoffice #assignmentManagement .section-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.backoffice #assignmentManagement .community-table { min-width:960px; }
.backoffice #assignmentManagement .assignment-actions { display:flex; flex-wrap:wrap; gap:10px; min-width:270px; max-width:360px; }
.backoffice #assignmentManagement .assignment-actions .button { flex:1 1 120px; margin:0; font-size:12px; }
.backoffice #assignmentManagement .assignment-actions [data-assignment-audit] { order:-1; flex-basis:100%; background:#eaf6f0; color:#056048; border-color:#a7d8c8; }
.backoffice .assignment-history-dialog { width:760px; max-width:calc(100vw - 32px); }
.backoffice .assignment-history-dialog [data-history] { display:grid; gap:20px; }
.backoffice .assignment-history-event { padding:20px; border:1px solid #dce3e8; border-radius:10px; min-width:0; }
.backoffice .assignment-history-event h3 { margin:0 0 16px; }
.backoffice .assignment-history-event dl { margin:0; display:grid; gap:12px; }
.backoffice .assignment-history-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
.backoffice .assignment-history-event dl>div { min-width:0; }
.backoffice .assignment-history-event dt { color:#536174; font-size:12px; margin-bottom:4px; }
.backoffice .assignment-history-event dd { margin:0; overflow-wrap:anywhere; }
.backoffice .assignment-history-reason { margin:16px 0; overflow-wrap:anywhere; }
.backoffice .assignment-history-states { margin-top:20px; border-top:1px solid #e5eaee; padding-top:16px; }
.backoffice .assignment-history-states summary { cursor:pointer; color:#08795a; font-weight:600; padding:6px 0; }
.backoffice .assignment-history-comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:16px; }
.backoffice .assignment-history-comparison>section { min-width:0; padding:16px; background:#f4f6f8; border-radius:8px; }
.backoffice .assignment-history-comparison h4 { margin:0 0 12px; }
@media(max-width:600px) {
 .backoffice #assignmentManagement>section { padding:16px; }
 .backoffice .assignment-history-meta,.backoffice .assignment-history-comparison { grid-template-columns:1fr; }
 .backoffice .assignment-history-event { padding:16px; }
}

/* Device workspaces: stable tables and separated, usable controls. */
.backoffice .workspace-devices .device-refresh-controls { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.backoffice .workspace-devices .device-refresh-controls label { display:flex; align-items:center; gap:8px; font-size:13px; }
.backoffice .workspace-devices .device-workspace-tabs { margin-bottom:28px; gap:12px; }
.backoffice .workspace-devices .device-table-heading { display:flex; flex-wrap:wrap; align-items:start; justify-content:space-between; gap:20px; margin-bottom:24px; }
.backoffice .workspace-devices .device-table-heading .dialog-actions { display:flex; flex-wrap:wrap; gap:12px; margin:0; }
.backoffice .workspace-devices .device-maintenance-filters { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:20px 0; }
.backoffice .workspace-devices .device-maintenance-filters .admin-search { flex:2 1 260px; min-width:0; }
.backoffice .workspace-devices .device-maintenance-filters select { flex:1 1 160px; }
.backoffice .workspace-devices .device-metrics-grid { margin:24px 0 28px; gap:20px; }
.backoffice .workspace-devices .device-row-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; min-width:270px; }
.backoffice .workspace-devices .device-row-actions .button { margin:0; width:100%; white-space:normal; }
.backoffice .workspace-devices .device-row-actions [data-edit-iot] { grid-column:1/-1; }
.backoffice .workspace-devices #iotTableWrap table { min-width:1100px; }
.backoffice .workspace-devices #iotTableBody td:first-child { min-width:200px; }
.backoffice .workspace-devices #iotTableBody td:nth-child(4) { min-width:200px; }
.backoffice .workspace-devices #iotTableBody .device-status-badge { margin:0 6px 8px 0; }
.backoffice .workspace-devices :is(#iotUpdateStatus,#installationsUpdateStatus) { margin:16px 0; }
.backoffice .workspace-devices :is(#iotUpdateStatus,#installationsUpdateStatus):empty { display:none; }
@media(max-width:600px) {
 .backoffice .workspace-devices .device-refresh-controls { align-items:stretch; flex-direction:column; width:100%; }
 .backoffice .workspace-devices .device-table-heading .dialog-actions { width:100%; }
 .backoffice .workspace-devices .device-table-heading .dialog-actions .button { flex:1 1 100%; }
 .backoffice .workspace-devices .device-maintenance-filters>* { flex:1 1 100%; width:100%; }
}

/* Profile directory filters and permission cards. */
.backoffice .workspace-profiles .lead { max-width:72ch; }
.backoffice .workspace-profiles .profiles-controls { margin-bottom:20px; }
.backoffice .workspace-profiles .workspace-filters { align-items:end; }
.backoffice .workspace-profiles .workspace-filters label:nth-child(2) { flex:2 1 240px; }
.backoffice .workspace-profiles #profiles { display:grid; gap:28px; }
.backoffice .workspace-profiles .profile-section+.profile-section { margin-top:0; }
.backoffice .workspace-profiles .profile-card-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:start; gap:16px; margin-bottom:20px; }
.backoffice .workspace-profiles .profile-card-heading p { margin:0; }
.backoffice .workspace-profiles .profile-permissions-table { width:100%; min-width:580px; }
.backoffice .workspace-profiles .profile-permissions-table td { padding:16px; }
.backoffice .workspace-profiles .profile-permissions-table td:first-child { min-width:220px; }
.backoffice .workspace-profiles .profile-permission-key { display:block; color:#536174; font-size:12px; margin-top:6px; overflow-wrap:anywhere; }
.backoffice .workspace-profiles .admin-switch { display:flex; align-items:center; gap:12px; min-height:32px; }
.backoffice .workspace-profiles #profilesMessage { margin-bottom:20px; }
@media(max-width:600px) {
 .backoffice .workspace-profiles .profile-section { padding:16px; }
 .backoffice .workspace-profiles .workspace-filters>label { flex-basis:100%; }
}
@media(max-width:600px) {
 .backoffice .workspace-profiles .profile-permissions-table { min-width:0; }
 .backoffice .workspace-profiles .profile-permissions-table :is(tbody,tr,td) { display:block; width:100%; }
 .backoffice .workspace-profiles .profile-permissions-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .backoffice .workspace-profiles .profile-permissions-table tr { padding:16px; border-bottom:1px solid #e5eaee; }
 .backoffice .workspace-profiles .profile-permissions-table td { min-width:0; padding:6px 0; border:0; white-space:normal; }
 .backoffice .workspace-profiles .profile-permissions-table td:nth-child(2) { color:#536174; font-size:12px; }
 .backoffice .workspace-profiles .profile-permissions-table td:nth-child(2)::before { content:'Área: '; }
 .backoffice .workspace-profiles .profile-permissions-table .admin-switch { min-height:40px; }
}

/* Shared collection filters and the alternate unit view. */
.bo-list-filters { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:16px 0; }
.bo-list-filters label { display:flex; flex-direction:column; gap:6px; min-width:150px; flex:1; }
.bo-list-filters input,.bo-list-filters select { width:100%; min-width:0; }
.bo-list-filters .panel-caption { padding:10px 0; }
.bo-filter-empty[hidden],.backoffice tr[hidden],.backoffice article[hidden],.backoffice .security-block-row[hidden],.backoffice .unit-invitation-row[hidden] { display:none !important; }
.unit-filter-bar { flex-wrap:wrap; }
.unit-view-switch { display:flex; gap:4px; }
.unit-view-switch [aria-pressed="true"] { background:var(--brand,#087f65); color:#fff; border-color:var(--brand,#087f65); }
.bo-units-table { overflow-x:auto; }
.bo-units-table table { min-width:950px; width:100%; }
.bo-units-table .unit-resident { border:0; padding:0; margin:0; min-width:200px; }
.bo-units-table h3,.bo-units-table p { margin:0; }
.bo-units-table .unit-card-actions { margin:0; }
@media(max-width:640px) {
  .bo-list-filters { align-items:stretch; }
  .bo-list-filters label { flex-basis:100%; }
  .bo-list-filters > button { width:100%; }
  .unit-view-switch { width:100%; }
  .unit-view-switch button { flex:1; }
}
.bo-list-filters[hidden] { display:none; }
/* Keep menus inside the scrollable table's height, including its last row. */
.backoffice .bo-units-table .bo-more[open]>div { position:static; width:190px; margin-top:8px; }
.bo-lookup-filters { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:8px 0; }
.unit-qr-row h3 { overflow-wrap:anywhere; font-size:1rem; }
/* Condominium detail directories: align metadata, filters and actions as clear rows. */
.backoffice #detailPanel .detail-header { display:grid; grid-template-columns:minmax(260px,1fr) minmax(0,auto); align-items:start; }
.backoffice #detailPanel .detail-actions { justify-content:flex-end; max-width:820px; }
.backoffice #detailPanel .resident-list-section .section-heading { align-items:end; }
.backoffice #detailPanel .resident-list-section .section-heading>div { display:grid; gap:4px; }
.backoffice #detailPanel .condo-list-filters { display:grid; grid-template-columns:minmax(220px,2fr) repeat(2,minmax(150px,1fr)) auto; align-items:end; margin:16px 0; }
.backoffice #detailPanel .condo-list-filters label { display:grid; gap:6px; min-width:0; }
.backoffice #detailPanel .condo-list-filters input,.backoffice #detailPanel .condo-list-filters select { width:100%; min-width:0; }
.backoffice #detailPanel .condo-list-filters .button { white-space:nowrap; }
@media(max-width:1050px) {
 .backoffice #detailPanel .detail-header { grid-template-columns:1fr; }
 .backoffice #detailPanel .detail-actions { justify-content:flex-start; max-width:none; }
 .backoffice #detailPanel .condo-list-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .backoffice #detailPanel .condo-list-filters label:first-child { grid-column:1/-1; }
}
@media(max-width:640px) {
 .backoffice #detailPanel .condo-list-filters { grid-template-columns:minmax(0,1fr); }
 .backoffice #detailPanel .condo-list-filters label:first-child { grid-column:auto; }
 .backoffice #detailPanel .condo-list-filters .button { width:100%; }
 .backoffice #detailPanel .resident-list-section .section-heading { align-items:flex-start; }
}
