:root {
  --ink: #07142f;
  --muted: #53617b;
  --line: #dde5f0;
  --panel: #ffffff;
  --page: #f4f8fd;
  --nav: #06162f;
  --blue: #1559dd;
  --blue-dark: #0d3fb2;
  --green: #19a337;
  --orange: #ff7417;
  --purple: #7a3ff2;
  --teal: #0ba8bb;
  --red: #f43f4d;
  --shadow: 0 14px 45px rgba(13, 43, 87, 0.1);
}

/* Product polish layer: keep workflows stable while giving Signacula a calmer production finish. */
:root {
  --ink: #081733;
  --muted: #66738c;
  --line: #d9e3ef;
  --panel: #ffffff;
  --page: #f3f7fb;
  --nav: #061428;
  --blue: #1857d8;
  --blue-dark: #113f9f;
  --green: #149a45;
  --orange: #ef7a1a;
  --purple: #6846d9;
  --teal: #0796a8;
  --red: #dc3548;
  --surface-soft: #f8fbff;
  --surface-tint: #eef5ff;
  --shadow: 0 18px 55px rgba(13, 35, 66, 0.12);
  --shadow-soft: 0 10px 28px rgba(21, 45, 82, 0.08);
  --focus-ring: 0 0 0 4px rgba(24, 87, 216, 0.16);
}

html {
  background: var(--page);
  -webkit-tap-highlight-color: transparent;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(24, 87, 216, 0.08), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, var(--page) 48%, #eef4fb 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

html.standalone-app,
html.standalone-app body {
  min-height: 100%;
  background: var(--nav);
}

html.standalone-app body {
  padding-top: env(safe-area-inset-top);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.nav-item,
.link-button,
.primary-button,
.secondary-button,
.icon-button,
.manager-metrics button,
.command-card,
.global-search-result,
.calendar-actions button {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

input,
select,
textarea,
.date-control input,
input[type="search"] {
  border-color: #d5dfed;
  border-radius: 10px;
  background: #fff;
}

input:hover,
select:hover,
textarea:hover,
.date-control input:hover,
input[type="search"]:hover {
  border-color: #bdcce0;
}

textarea {
  line-height: 1.45;
}

.desktop-auth {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.34), transparent 26%),
    linear-gradient(135deg, rgba(5, 16, 34, 0.54), rgba(8, 44, 84, 0.2)),
    url("assets/royal-mile-high-street.jpg") center / cover;
}

.desktop-auth-card,
.auth-brand,
.resident-auth-brand {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 80px rgba(4, 16, 35, 0.22);
  backdrop-filter: blur(16px);
}

.desktop-auth-card {
  gap: 16px;
  padding: 26px;
}

.desktop-role-tabs,
.segmented {
  border-radius: 12px;
  background: #edf3fb;
}

.desktop-role-tabs button,
.segmented button {
  border-radius: 10px;
}

.sidebar {
  background:
    radial-gradient(circle at 18% 0%, rgba(42, 124, 255, 0.3), transparent 28%),
    linear-gradient(180deg, #071b37 0%, #051126 54%, #030914 100%);
  box-shadow: 16px 0 44px rgba(4, 18, 39, 0.16);
}

.brand-mark {
  filter: drop-shadow(0 10px 18px rgba(42, 124, 255, 0.18));
}

.nav-item,
.profile {
  border-radius: 10px;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, rgba(42, 124, 255, 0.92), rgba(20, 74, 165, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px rgba(21, 89, 221, 0.18);
}

.workspace {
  padding-top: 30px;
}

.topbar {
  align-items: flex-start;
}

.topbar h1 {
  color: #06142d;
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.08;
}

.eyebrow {
  display: block;
  color: #748098;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.top-actions {
  align-items: center;
}

.desktop-logout,
.secondary-button,
.calendar-actions button {
  border-color: #cdd9e9;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 0 rgba(12, 32, 61, 0.04);
}

.desktop-logout:hover,
.secondary-button:hover,
.calendar-actions button:hover {
  border-color: #b8c8dd;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.primary-button {
  border-radius: 10px;
  background: linear-gradient(180deg, #236df1 0%, var(--blue) 100%);
  box-shadow: 0 12px 26px rgba(24, 87, 216, 0.22);
}

.primary-button:hover {
  background: linear-gradient(180deg, #2c76fa 0%, #164fc5 100%);
  transform: translateY(-1px);
}

.primary-button:active,
.command-card:active,
.manager-metrics button:active,
.global-search-result:active {
  transform: translateY(1px);
}

.desktop-theme-toggle {
  min-width: 78px;
  font-weight: 900;
}

body.manager-desktop-dark {
  --dark-page: #050b16;
  --dark-panel: rgba(8, 20, 36, 0.94);
  --dark-panel-strong: rgba(10, 26, 48, 0.98);
  --dark-line: rgba(88, 152, 232, 0.28);
  --dark-text: #edf7ff;
  --dark-muted: #9ab2d0;
  --dark-cyan: #21dff6;
  --dark-blue: #3d8bff;
  color: var(--dark-text);
  background:
    radial-gradient(circle at 82% 4%, rgba(33, 223, 246, 0.18), transparent 34%),
    radial-gradient(circle at 18% 0%, rgba(61, 139, 255, 0.22), transparent 30%),
    linear-gradient(180deg, #06111f 0%, var(--dark-page) 55%, #030712 100%);
}

body.manager-desktop-dark .app-shell {
  background:
    linear-gradient(rgba(5, 11, 22, 0.68), rgba(5, 11, 22, 0.9)),
    linear-gradient(rgba(33, 223, 246, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 223, 246, 0.035) 1px, transparent 1px),
    var(--dark-page);
  background-size: auto, 28px 28px, 28px 28px, auto;
}

body.manager-desktop-dark .workspace {
  background: transparent;
}

body.manager-desktop-dark .sidebar {
  border-right: 1px solid rgba(33, 223, 246, 0.22);
  background:
    radial-gradient(circle at 20% 0%, rgba(33, 223, 246, 0.22), transparent 28%),
    linear-gradient(180deg, #071b37 0%, #06111f 50%, #030712 100%);
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.34), inset -1px 0 0 rgba(33, 223, 246, 0.08);
}

body.manager-desktop-dark .brand strong,
body.manager-desktop-dark .topbar h1,
body.manager-desktop-dark .panel-header h2,
body.manager-desktop-dark .panel-header h3,
body.manager-desktop-dark .section-head h2,
body.manager-desktop-dark .metric-card strong,
body.manager-desktop-dark .table-panel strong,
body.manager-desktop-dark .record-card strong,
body.manager-desktop-dark .accordion-card summary strong,
body.manager-desktop-dark .desktop-report-row strong,
body.manager-desktop-dark .desktop-calendar-layout .calendar-title-row h3,
body.manager-desktop-dark .desktop-calendar-layout .calendar-event strong {
  color: var(--dark-text);
}

body.manager-desktop-dark .eyebrow,
body.manager-desktop-dark .brand small,
body.manager-desktop-dark .metric-card span,
body.manager-desktop-dark .metric-card small,
body.manager-desktop-dark .panel-header,
body.manager-desktop-dark .table-panel span,
body.manager-desktop-dark .record-card span,
body.manager-desktop-dark .accordion-card small,
body.manager-desktop-dark .task-photo-strip-header small,
body.manager-desktop-dark .task-photo-empty,
body.manager-desktop-dark .desktop-report-row span,
body.manager-desktop-dark .desktop-calendar-layout .calendar-legend,
body.manager-desktop-dark .desktop-calendar-layout .calendar-event span,
body.manager-desktop-dark .desktop-calendar-layout .calendar-event small,
body.manager-desktop-dark label {
  color: var(--dark-muted);
}

body.manager-desktop-dark .metric-card,
body.manager-desktop-dark .panel,
body.manager-desktop-dark .table-panel,
body.manager-desktop-dark .desktop-calendar-layout .calendar-panel,
body.manager-desktop-dark .report-kpi-card,
body.manager-desktop-dark .report-card,
body.manager-desktop-dark .record-card,
body.manager-desktop-dark .desktop-reno-card,
body.manager-desktop-dark .global-search-panel,
body.manager-desktop-dark .accordion-card,
body.manager-desktop-dark .manager-panel,
body.manager-desktop-dark .edit-form,
body.manager-desktop-dark .calendar-panel,
body.manager-desktop-dark .profile-section,
body.manager-desktop-dark .confirmation-preview,
body.manager-desktop-dark .record-timeline {
  border-color: var(--dark-line);
  background: linear-gradient(145deg, var(--dark-panel-strong), rgba(5, 12, 24, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 18px 42px rgba(0, 0, 0, 0.24),
    0 0 22px rgba(33, 223, 246, 0.06);
}

body.manager-desktop-dark .task-photo-strip {
  border-color: rgba(33, 223, 246, 0.24);
  background: rgba(4, 14, 28, 0.84);
  box-shadow: inset 0 0 0 1px rgba(33, 223, 246, 0.04);
}

body.manager-desktop-dark .task-photo-strip-header strong {
  color: var(--dark-text);
}

body.manager-desktop-dark .task-photo-thumb {
  border-color: rgba(33, 223, 246, 0.34);
  background: linear-gradient(135deg, rgba(33, 223, 246, 0.16), rgba(61, 139, 255, 0.14));
}

body.manager-desktop-dark .task-completion-photo-field {
  border-color: rgba(33, 223, 246, 0.42);
  color: var(--dark-cyan);
  background: rgba(33, 223, 246, 0.08);
}

body.manager-desktop-dark .metric-card:hover,
body.manager-desktop-dark .panel:hover,
body.manager-desktop-dark .table-panel:hover,
body.manager-desktop-dark .record-card:hover,
body.manager-desktop-dark .global-search-result:hover {
  border-color: rgba(33, 223, 246, 0.46);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), 0 0 22px rgba(33, 223, 246, 0.12);
}

body.manager-desktop-dark .topbar {
  color: var(--dark-text);
}

body.manager-desktop-dark input,
body.manager-desktop-dark select,
body.manager-desktop-dark textarea,
body.manager-desktop-dark input[type="search"],
body.manager-desktop-dark .date-control input {
  border-color: rgba(88, 152, 232, 0.32);
  background: rgba(3, 10, 20, 0.88);
  color: var(--dark-text);
  box-shadow: inset 0 0 14px rgba(33, 223, 246, 0.04);
}

body.manager-desktop-dark input::placeholder,
body.manager-desktop-dark textarea::placeholder {
  color: rgba(154, 178, 208, 0.76);
}

body.manager-desktop-dark .secondary-button,
body.manager-desktop-dark .desktop-logout,
body.manager-desktop-dark .calendar-actions button,
body.manager-desktop-dark .link-button,
body.manager-desktop-dark .desktop-theme-toggle {
  border-color: rgba(33, 223, 246, 0.32);
  background: rgba(6, 19, 36, 0.82);
  color: var(--dark-cyan);
  box-shadow: 0 0 14px rgba(33, 223, 246, 0.08);
}

body.manager-desktop-dark .danger-action-button,
.manager-frame:not(.manager-light-theme) .building-list .danger-action-button {
  border-color: rgba(255, 93, 124, 0.36);
  background: rgba(96, 10, 30, 0.72);
  color: #ff9aaf;
  box-shadow: 0 0 14px rgba(255, 55, 96, 0.1);
}

body.manager-desktop-dark .primary-button {
  background: linear-gradient(180deg, #35a2ff 0%, #1764df 100%);
  box-shadow: 0 14px 30px rgba(33, 111, 255, 0.28), 0 0 18px rgba(33, 223, 246, 0.1);
}

body.manager-desktop-dark .nav-item {
  color: #d8ecff;
}

body.manager-desktop-dark .nav-item:hover,
body.manager-desktop-dark .nav-item.active {
  background: linear-gradient(90deg, rgba(33, 223, 246, 0.22), rgba(61, 139, 255, 0.32));
  box-shadow: inset 3px 0 0 var(--dark-cyan), 0 0 20px rgba(33, 223, 246, 0.12);
}

body.manager-desktop-dark .profile {
  border-color: rgba(33, 223, 246, 0.22);
  background: rgba(5, 16, 30, 0.82);
}

body.manager-desktop-dark .progress,
body.manager-desktop-dark .desktop-report-row i,
body.manager-desktop-dark .report-bar i {
  background: rgba(88, 152, 232, 0.18);
}

body.manager-desktop-dark .donut::before {
  background: radial-gradient(circle, rgba(8, 20, 36, 0.98) 0 55%, transparent 56%);
}

body.manager-desktop-dark .donut strong,
body.manager-desktop-dark .report-kpi-card strong {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(33, 223, 246, 0.34);
}

body.manager-desktop-dark .shift-row,
body.manager-desktop-dark .incident-row,
body.manager-desktop-dark .compliance-list article,
body.manager-desktop-dark .manager-list article,
body.manager-desktop-dark .desktop-calendar-layout .calendar-event,
body.manager-desktop-dark .desktop-calendar-layout .calendar-day,
body.manager-desktop-dark .global-search-result,
body.manager-desktop-dark #detail-content article {
  border-color: rgba(88, 152, 232, 0.22);
  background: rgba(4, 14, 28, 0.78);
  color: var(--dark-text);
}

body.manager-desktop-dark .audit-page-hero,
body.manager-desktop-dark .audit-guidance-card,
body.manager-desktop-dark .reminder-centre-hero,
body.manager-desktop-dark .reminder-command-strip {
  border-color: rgba(88, 152, 232, 0.26);
  background:
    radial-gradient(circle at 100% 0%, rgba(33, 223, 246, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(8, 20, 36, 0.98), rgba(4, 14, 28, 0.9));
}

body.manager-desktop-dark .audit-page-hero h3,
body.manager-desktop-dark .audit-guidance-card strong,
body.manager-desktop-dark .reminder-centre-hero h2,
body.manager-desktop-dark .reminder-command-strip strong,
body.manager-desktop-dark .reminder-row-main strong,
body.manager-desktop-dark .audit-page-row-main strong,
body.manager-desktop-dark .audit-page-row-meta em {
  color: var(--dark-text);
}

body.manager-desktop-dark .audit-page-hero span,
body.manager-desktop-dark .audit-guidance-card p,
body.manager-desktop-dark .audit-guidance-card small,
body.manager-desktop-dark .reminder-centre-hero span,
body.manager-desktop-dark .reminder-command-strip span,
body.manager-desktop-dark .reminder-row-main p,
body.manager-desktop-dark .reminder-row-main small,
body.manager-desktop-dark .audit-page-row-main p,
body.manager-desktop-dark .audit-page-row-main small,
body.manager-desktop-dark .audit-page-row-meta time,
body.manager-desktop-dark .audit-kpi-grid span,
body.manager-desktop-dark .reminder-centre-metrics span {
  color: var(--dark-muted);
}

body.manager-desktop-dark .audit-guidance-card span {
  color: #1ee7ff;
}

body.manager-desktop-dark .audit-module-pill {
  border: 1px solid rgba(33, 223, 246, 0.24);
  background: rgba(33, 223, 246, 0.1);
  color: var(--dark-cyan);
}

body.manager-desktop-dark .desktop-calendar-layout .calendar-day.today {
  border-color: var(--dark-cyan);
  box-shadow: inset 0 0 0 1px rgba(33, 223, 246, 0.2), 0 0 14px rgba(33, 223, 246, 0.14);
}

body.manager-desktop-dark .desktop-report-row em,
body.manager-desktop-dark .pill,
body.manager-desktop-dark .badge {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.manager-desktop-dark .desktop-building-profile-accordion,
body.manager-desktop-dark .building-profile-hero,
body.manager-desktop-dark .building-profile-stats span,
body.manager-desktop-dark .building-profile-last-activity,
body.manager-desktop-dark .building-safety-list div,
body.manager-desktop-dark .building-profile-timeline,
body.manager-desktop-dark .floor-plan-editor,
body.manager-desktop-dark .floor-plan-viewer,
body.manager-desktop-dark .floor-plan-toolbar select,
body.manager-desktop-dark .resident-invite-entry,
body.manager-desktop-dark .resident-invite-desktop-panel .resident-invite-output,
body.manager-desktop-dark .resident-invite-summary-grid article {
  color: #071a39;
}

body.manager-desktop-dark .desktop-building-profile-accordion strong,
body.manager-desktop-dark .building-profile-hero strong,
body.manager-desktop-dark .building-profile-stats strong,
body.manager-desktop-dark .building-safety-list dt,
body.manager-desktop-dark .building-profile-last-activity strong,
body.manager-desktop-dark .building-profile-timeline strong,
body.manager-desktop-dark .floor-plan-editor-heading strong,
body.manager-desktop-dark .floor-plan-toolbar strong,
body.manager-desktop-dark .resident-invite-entry strong,
body.manager-desktop-dark .resident-invite-output strong,
body.manager-desktop-dark .resident-invite-summary-grid strong {
  color: #071a39;
}

body.manager-desktop-dark .desktop-building-profile-accordion span,
body.manager-desktop-dark .building-profile-hero span,
body.manager-desktop-dark .building-profile-stats span,
body.manager-desktop-dark .building-safety-list dd,
body.manager-desktop-dark .building-profile-last-activity span,
body.manager-desktop-dark .building-profile-timeline span,
body.manager-desktop-dark .floor-plan-editor label,
body.manager-desktop-dark .floor-plan-toolbar label,
body.manager-desktop-dark .resident-invite-entry span,
body.manager-desktop-dark .resident-invite-output label,
body.manager-desktop-dark .resident-invite-output span,
body.manager-desktop-dark .resident-invite-summary-grid span {
  color: #334766;
}

body.manager-desktop-dark .floor-plan-toolbar .floor-plan-view-select {
  border-color: rgba(88, 152, 232, 0.32);
  background: rgba(3, 10, 20, 0.88);
  color: #edf7ff;
}

.metric-card,
.panel,
.table-panel,
.desktop-calendar-layout .calendar-panel,
.report-kpi-card,
.report-card,
.record-card,
.desktop-reno-card,
.global-search-panel {
  border-color: #dce6f2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  align-items: center;
}

.metric-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 18px rgba(13, 35, 66, 0.16);
}

.metric-card strong,
.report-kpi-card strong,
.manager-metrics strong {
  letter-spacing: 0;
}

.progress {
  height: 8px;
  background: #e2e9f2;
}

.metric-progress-row {
  overflow: hidden;
}

.panel-header {
  border-bottom-color: #edf2f7;
}

.panel-header h2,
.panel-header h3,
.section-head h2 {
  color: #07142f;
}

.global-search-panel {
  margin-top: -8px;
}

.global-search-result {
  border-color: #dce6f2;
  border-radius: 12px;
  background: #fff;
}

.global-search-result:hover {
  border-color: #bdd0e7;
  box-shadow: var(--shadow-soft);
}

.accordion-card,
.resident-section,
.manager-panel,
.incident-control-card,
.package-form,
.edit-form,
.profile-section,
.announcement-banner,
.confirmation-preview,
.record-timeline,
.resident-profile-summary article {
  border-color: #dce6f2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 38, 70, 0.06);
}

.announcement-banner .announcement-image-banner {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  aspect-ratio: 1600 / 420;
  min-height: 118px;
  border: 1px solid #c7d8f4;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: #eef5ff;
}

.announcement-banner .announcement-image-banner img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  background: #eef5ff;
}

.announcement-image-caption {
  grid-column: 1 / -1;
}

.resident-duty-heading,
.support-register-card summary,
.support-register-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.resident-duty-heading h3 {
  margin: 0;
}

.resident-duty-empty {
  margin: 8px 0 0;
  color: #5d6f89;
  line-height: 1.45;
}

.resident-duty-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.resident-duty-list article {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #dce6f2;
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.resident-duty-list img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #e7eef7;
}

.resident-duty-list strong,
.resident-duty-list span {
  display: block;
}

.resident-duty-list span {
  color: #61728a;
  font-size: 0.88rem;
}

.support-register-card details,
.support-register-panel {
  width: 100%;
}

.support-register-card summary,
.support-register-panel summary {
  cursor: pointer;
  list-style: none;
}

.support-register-card summary::-webkit-details-marker,
.support-register-panel summary::-webkit-details-marker {
  display: none;
}

.support-register-form,
.desktop-support-register-form {
  margin: 14px 0;
}

.support-register-item.inactive {
  opacity: 0.72;
}

body.manager-desktop-dark .support-register-card,
body.manager-desktop-dark .support-register-card details,
.manager-frame:not(.manager-light-theme) .support-register-panel,
.manager-frame:not(.manager-light-theme) .resident-duty-list article {
  background: rgba(2, 17, 34, 0.88);
  border-color: rgba(35, 214, 255, 0.36);
  color: #e9fbff;
}

body.resident-route-active .resident-duty-list article {
  background: rgba(255, 255, 255, 0.9);
}

.accordion-card summary,
.manager-panel-title,
.staff-banner-accordion summary {
  min-height: 44px;
}

.pill,
.badge {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@media (max-width: 760px) {
  body {
    background: #f3f7fb;
  }

  .workspace {
    padding: 18px 14px 90px;
  }

  .topbar {
    display: grid;
    gap: 14px;
  }

  .top-actions {
    width: 100%;
  }

  .desktop-auth {
    padding: 18px;
  }

  .desktop-auth-card {
    width: 100%;
    border-radius: 18px;
    padding: 22px;
  }

  .auth-body {
    align-content: center;
    padding: calc(28px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.3), transparent 28%),
      linear-gradient(135deg, rgba(5, 16, 34, 0.5), rgba(8, 44, 84, 0.18)),
      url("assets/royal-mile-high-street.jpg") center / cover;
  }

  .resident-auth-screen .auth-body {
    background:
      radial-gradient(circle at 28% 16%, rgba(255, 255, 255, 0.36), transparent 30%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(244, 248, 253, 0.72)),
      url("assets/royal-mile-high-street.jpg") center / cover;
  }

  .phone-frame {
    background:
      linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
  }

  .phone-frame header {
    min-height: calc(58px + env(safe-area-inset-top));
    background:
      linear-gradient(180deg, rgba(5, 18, 38, 0.98), rgba(7, 24, 51, 0.96));
    box-shadow: 0 10px 24px rgba(5, 18, 38, 0.14);
  }

  .phone-frame header strong {
    font-size: 15px;
    letter-spacing: 0;
  }

  .phone-body {
    padding: 18px 16px 22px;
  }

  .phone-frame footer {
    border-top-color: rgba(205, 217, 233, 0.9);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -12px 26px rgba(14, 34, 62, 0.08);
    backdrop-filter: blur(14px);
  }

  .phone-frame footer button {
    border-radius: 12px;
    font-weight: 850;
  }

  .phone-frame footer .active {
    background: #eef5ff;
    color: var(--blue);
  }

  .mobile-progress,
  .manager-progress,
  .property-summary,
  .command-card,
  .manager-metrics button,
  .report-meter,
  .calendar-event,
  .resident-news-card,
  .resident-brand-card,
  .resident-action-accordion,
  .request-row,
  .task-card,
  .incident-card {
    border-color: #dce6f2;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(13, 35, 66, 0.07);
  }

  .manager-frame.manager-light-theme .command-card,
  .manager-frame.manager-light-theme .manager-metrics button {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .manager-frame.manager-light-theme .command-card strong,
  .manager-frame.manager-light-theme .command-card span,
  .manager-frame.manager-light-theme .command-card small {
    justify-self: start;
    text-align: left;
  }

  .command-card {
    border-radius: 16px;
  }

  .command-card::before {
    width: 5px;
  }

  .manager-metrics button {
    padding: 14px;
  }

  .resident-frame .resident-brand-card {
    border-radius: 20px;
  }

  .resident-home-actions button {
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(13, 35, 66, 0.08);
  }

  .announcement-banner,
  .confirmation-preview {
    border-radius: 16px;
  }

  .toast {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
    border-radius: 14px;
    background: rgba(5, 18, 38, 0.92);
    box-shadow: 0 16px 40px rgba(5, 18, 38, 0.22);
  }
}

@media (min-width: 761px) {
  .content-grid,
  .desktop-calendar-layout,
  .desktop-report-grid,
  .renovations-desktop {
    animation: signaculaFadeIn 220ms ease both;
  }

  .metric-card:hover,
  .panel:hover,
  .table-panel:hover,
  .report-kpi-card:hover,
  .report-card:hover {
    border-color: #ccdaeb;
    box-shadow: var(--shadow);
  }
}

@keyframes signaculaFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.global-search-control {
  flex: 1 1 220px;
  min-width: min(220px, 100%);
  max-width: 280px;
}

.global-search-control input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.global-search-panel {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 14px;
  box-shadow: var(--shadow);
}

.global-search-results {
  display: grid;
  gap: 8px;
}

.global-search-result {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 4px 12px;
  width: 100%;
  border: 1px solid #dce6f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
  text-align: left;
}

.global-search-result span {
  grid-row: span 2;
  align-self: center;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.global-search-result strong,
.global-search-result small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-timeline {
  display: grid;
  gap: 7px;
  border-left: 3px solid #9fb6d8;
  background: #f8fbff;
  border-radius: 8px;
  padding: 9px 10px;
}

.record-timeline > strong {
  color: #0b1b36;
  font-size: 12px;
}

.record-timeline article {
  display: grid;
  gap: 2px;
}

.record-timeline span {
  font-weight: 900;
}

.record-timeline small {
  color: var(--muted);
  line-height: 1.35;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.calendar-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--blue);
  padding: 7px 10px;
  font-weight: 900;
}

.calendar-actions .calendar-delete-event {
  color: #b42318;
}

.resident-profile-summary {
  display: grid;
  gap: 8px;
}

.resident-profile-summary article {
  display: grid;
  grid-template-columns: minmax(132px, max-content) minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  row-gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.resident-profile-summary article strong,
.resident-profile-summary article span {
  min-width: 0;
}

.resident-profile-summary article span {
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .resident-profile-summary article {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .top-actions {
    grid-template-columns: 1fr;
  }

  .global-search-control {
    min-width: 100%;
  }

  .global-search-result {
    grid-template-columns: 1fr;
  }

  .global-search-result span {
    grid-row: auto;
    justify-self: start;
  }
}

.desktop-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.desktop-calendar-layout .calendar-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  box-shadow: var(--shadow);
}

.desktop-calendar-board,
.desktop-calendar-events {
  margin-bottom: 0;
}

.desktop-calendar-board {
  min-height: 560px;
}

.desktop-calendar-layout .calendar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.desktop-calendar-layout .calendar-title-row h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.desktop-calendar-layout .calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.desktop-calendar-layout .calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.desktop-calendar-layout .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.desktop-calendar-layout .calendar-weekday {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.desktop-calendar-layout .calendar-day {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 72px;
  border: 1px solid #e0e7f1;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  padding: 10px;
  text-align: left;
}

.desktop-calendar-layout .calendar-day.empty {
  border-color: transparent;
  background: transparent;
}

.desktop-calendar-layout .calendar-day.today {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24, 92, 214, 0.12);
}

.desktop-calendar-layout .calendar-day strong {
  font-size: 14px;
}

.desktop-calendar-layout .calendar-day span {
  display: flex;
  gap: 4px;
  min-height: 8px;
}

.desktop-calendar-layout .calendar-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

.desktop-calendar-layout .calendar-dot.visit { background: var(--purple); }
.desktop-calendar-layout .calendar-dot.delivery { background: var(--blue); }
.desktop-calendar-layout .calendar-dot.leave { background: var(--orange); }
.desktop-calendar-layout .calendar-dot.service { background: var(--green); }
.desktop-calendar-layout .calendar-dot.holiday { background: var(--red); }

.desktop-calendar-side {
  position: sticky;
  top: 18px;
}

.desktop-calendar-events {
  grid-column: 1 / -1;
}

.desktop-calendar-layout .calendar-event-list {
  display: grid;
  gap: 10px;
}

.desktop-calendar-layout .calendar-event {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
}

.desktop-calendar-layout .calendar-event strong,
.desktop-calendar-layout .calendar-event span,
.desktop-calendar-layout .calendar-event small {
  display: block;
}

.desktop-calendar-layout .calendar-event span,
.desktop-calendar-layout .calendar-event small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.desktop-calendar-form {
  display: grid;
  gap: 12px;
}

.desktop-calendar-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.desktop-calendar-form input,
.desktop-calendar-form select,
.desktop-calendar-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
}

body.resident-route-active {
  background: white;
}

body.resident-route-active .desktop-auth,
body.resident-route-active .sidebar,
body.resident-route-active .topbar,
body.resident-route-active .mobile-tabs,
body.resident-route-active .content-grid,
body.resident-route-active .view-section,
body.resident-route-active .renovations-desktop {
  display: none !important;
}

body.resident-route-active .app-shell {
  display: block;
  min-height: 100svh;
  pointer-events: auto;
  user-select: auto;
}

body.resident-route-active .workspace {
  width: 100%;
  min-height: 100svh;
  padding: 0;
}

body.resident-route-active .phone-stage {
  display: grid;
  min-height: 100svh;
  padding: 0;
}

body.resident-route-active .phone-frame {
  display: none;
  width: 100%;
  min-height: 100svh;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body.resident-route-active .phone-frame.active {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

body.resident-route-active .auth-screen.active {
  grid-template-rows: 1fr;
}

body.resident-route-active .phone-status {
  display: none;
}

body.resident-route-active .phone-frame header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(50px, 0.7fr) minmax(0, 1.6fr) minmax(38px, 0.7fr);
  align-items: center;
  min-height: calc(52px + env(safe-area-inset-top));
  color: white;
  background: var(--nav);
  padding: env(safe-area-inset-top) 12px 0;
}

body.resident-route-active .phone-frame header strong {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.resident-route-active .phone-frame header button {
  border: 0;
  color: white;
  background: transparent;
  text-align: left;
}

body.resident-route-active .phone-frame header button:last-child {
  text-align: right;
}

body.resident-route-active .phone-body {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 20px;
}

body.resident-route-active .auth-body {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 100svh;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 25% 14%, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(241, 246, 252, 0.7)),
    var(--tenant-login-background, url("assets/royal-mile-high-street.jpg")) center / cover;
}

body.resident-route-active .auth-brand,
body.resident-route-active .resident-auth-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--tenant-primary, var(--blue)) 32%, #dce6f2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 14px;
  text-align: center;
  backdrop-filter: blur(8px);
}

body.resident-route-active .auth-form,
body.resident-route-active .resident-form {
  display: grid;
  gap: 12px;
}

body.resident-route-active .auth-form label,
body.resident-route-active .resident-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

body.resident-route-active .auth-form input,
body.resident-route-active .resident-form input,
body.resident-route-active .resident-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
}

body.resident-route-active .resident-form textarea {
  min-height: 82px;
  padding-top: 10px;
}

body.resident-route-active .resident-brand-card,
body.resident-route-active .resident-alert,
body.resident-route-active .resident-section,
body.resident-route-active .resident-action-accordion,
body.resident-route-active .resident-preview-banner {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(20, 39, 66, 0.07);
}

body.resident-route-active .resident-brand-card {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 128px;
  overflow: hidden;
  border: 0;
  color: white;
  background:
    linear-gradient(90deg, rgba(7, 27, 52, 0.86), rgba(7, 27, 52, 0.38)),
    url("assets/royal-mile-high-street.jpg") center / cover;
  box-shadow: 0 16px 30px rgba(20, 39, 66, 0.18);
}

body.resident-route-active .resident-brand-card strong,
body.resident-route-active #resident-dashboard-phone .resident-brand-card strong {
  color: white;
  font-size: 20px;
}

body.resident-route-active .resident-brand-card span,
body.resident-route-active #resident-dashboard-phone .resident-brand-card span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 800;
}

body.resident-route-active .building-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid #bdd2f4;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--blue);
  font-weight: 950;
}

body.resident-route-active #resident-dashboard-phone .resident-brand-card .building-logo {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

body.resident-route-active .resident-preview-banner {
  grid-template-columns: 1fr;
  border-color: #80dfff;
  background: linear-gradient(135deg, rgba(5, 20, 40, 0.94), rgba(11, 80, 103, 0.9));
  color: white;
  box-shadow: 0 14px 28px rgba(9, 45, 76, 0.18);
}

body.resident-route-active .resident-preview-banner strong {
  color: white;
  font-size: 14px;
}

body.resident-route-active .resident-preview-banner span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
}

body.resident-route-active .resident-preview-banner.hidden {
  display: none;
}

body.resident-route-active .resident-home-actions,
body.resident-route-active .resident-filter-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

body.resident-route-active .resident-home-actions button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border: 1px solid #d5e2f1;
  border-radius: 8px;
  background: white;
  color: #17304f;
  padding: 10px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(20, 39, 66, 0.08);
}

body.resident-route-active .resident-home-actions button strong {
  justify-self: center;
  text-align: center;
}

body.resident-route-active .resident-home-actions button span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 18px;
  font-weight: 950;
}

body.resident-route-active .resident-alert {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: #ffc8cf;
  background: linear-gradient(135deg, #fff8f9, #ffffff 64%);
  box-shadow: 0 12px 24px rgba(184, 0, 24, 0.08);
}

body.resident-route-active .resident-alert #resident-buzzer {
  grid-column: 2;
  grid-row: 1 / span 2;
}

body.resident-route-active .resident-list {
  display: grid;
  gap: 8px;
}

body.resident-route-active .resident-list article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

body.resident-route-active .resident-task-carousel {
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

body.resident-route-active .resident-task-carousel article {
  scroll-snap-align: start;
}

body:not(.dark-mode).resident-route-active .resident-task-carousel article strong {
  color: #0b1933;
  text-shadow: none;
}

body:not(.dark-mode).resident-route-active .resident-task-carousel article span {
  color: #42516a;
  text-shadow: none;
}

body.resident-route-active .resident-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

body.resident-route-active .resident-carousel-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #b8c7de;
  padding: 0;
}

body.resident-route-active .resident-carousel-dots button.active {
  width: 20px;
  background: var(--blue);
}

body.resident-route-active .resident-request-search {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(17, 32, 56, 0.08);
}

body.resident-route-active .resident-request-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c7d8f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 0 13px;
}

body.resident-route-active .resident-request-scroll {
  max-height: 240px;
  min-height: 96px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 6px;
}

body.resident-route-active .phone-frame footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  border-top: 1px solid var(--line);
  background: white;
  padding: 8px 4px calc(10px + env(safe-area-inset-bottom));
}

body.resident-route-active .phone-frame footer button {
  height: 36px;
  border: 0;
  color: #5a6a86;
  background: transparent;
}

body.resident-route-active .phone-frame footer .active {
  color: var(--blue);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

form[aria-busy="true"] {
  cursor: wait;
}

button.is-busy,
input[type="submit"].is-busy {
  cursor: wait;
  opacity: 0.78;
  pointer-events: none;
  filter: saturate(0.9);
}

button.is-complete:disabled,
input[type="submit"].is-complete:disabled {
  opacity: 1;
  filter: saturate(1);
}

button.is-error:disabled,
input[type="submit"].is-error:disabled {
  opacity: 1;
  filter: saturate(1);
}

.password-reset-request.is-complete button[type="submit"],
form.is-complete button.is-complete:disabled,
form.is-complete input[type="submit"].is-complete:disabled,
button.is-complete:disabled {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.96), rgba(20, 184, 166, 0.94));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.22);
  cursor: default;
}

button.is-error:disabled {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.96), rgba(249, 115, 22, 0.94));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.18);
  cursor: default;
}

form.is-complete input[type="email"][readonly] {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(236, 253, 245, 0.95);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.desktop-auth {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(135deg, rgba(6, 22, 47, 0.46), rgba(10, 48, 99, 0.22)),
    var(--tenant-login-background, url("assets/royal-mile-high-street.jpg")) center / cover;
  padding: 24px;
}

body[data-tenant-style-preset="midnight"] .desktop-auth {
  background:
    radial-gradient(circle at 20% 12%, rgba(31, 215, 255, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(3, 10, 24, 0.92), rgba(10, 31, 68, 0.9)),
    var(--tenant-login-background, none) center / cover;
}

body[data-tenant-style-preset="emerald"] .desktop-auth {
  background:
    radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.34), transparent 30%),
    linear-gradient(135deg, rgba(9, 88, 64, 0.86), rgba(16, 148, 90, 0.76)),
    var(--tenant-login-background, none) center / cover;
}

body[data-tenant-style-preset="copper"] .desktop-auth {
  background:
    radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.3), transparent 30%),
    linear-gradient(135deg, rgba(111, 54, 23, 0.88), rgba(194, 105, 42, 0.72)),
    var(--tenant-login-background, none) center / cover;
}

body[data-tenant-style-preset="plain"] .desktop-auth {
  background: linear-gradient(135deg, var(--tenant-primary, var(--blue)), var(--tenant-accent, var(--green)));
}

.desktop-auth-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(2, 10, 24, 0.24);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 22px;
}

.desktop-auth-brand {
  display: grid;
  justify-items: center;
  color: var(--ink);
  padding: 0 0 12px;
  text-align: center;
}

.tenant-logo-image {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  object-fit: contain;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.brand-logo-wordmark {
  width: min(330px, 100%);
  height: auto;
  object-fit: contain;
  background: transparent;
}

.auth-wordmark {
  display: block;
  width: min(260px, 100%);
  height: auto;
  object-fit: contain;
  background: transparent;
}

.desktop-auth-brand small {
  color: var(--muted);
  margin-top: -6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.desktop-auth-card label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.desktop-auth-card input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  padding: 0 14px;
}

.desktop-auth-card form {
  display: grid;
  gap: 14px;
}

.secure-login-loader {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 22%, rgba(35, 214, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(1, 10, 24, 0.48), rgba(2, 18, 40, 0.76));
  backdrop-filter: blur(10px);
}

.secure-login-loader.hidden {
  display: none;
}

.secure-login-loader-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(360px, calc(100vw - 36px));
  border: 1px solid rgba(35, 214, 255, 0.34);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(3, 18, 40, 0.94), rgba(6, 36, 68, 0.9)),
    rgba(3, 18, 40, 0.92);
  color: #eafcff;
  padding: 22px;
  text-align: center;
  box-shadow:
    0 0 42px rgba(35, 214, 255, 0.22),
    0 28px 80px rgba(0, 0, 0, 0.38);
}

.secure-loader-scene {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 28px);
  align-items: end;
  justify-content: center;
  gap: 9px;
  width: 220px;
  height: 122px;
  border: 1px solid rgba(35, 214, 255, 0.22);
  border-radius: 16px;
  background:
    repeating-linear-gradient(90deg, rgba(35, 214, 255, 0.1) 0 1px, transparent 1px 12px),
    linear-gradient(rgba(35, 214, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 214, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(35, 214, 255, 0.12), transparent 58%);
  background-size: auto, 18px 18px, 18px 18px, auto;
  overflow: hidden;
}

.secure-loader-binary {
  position: absolute;
  inset: 8px 10px auto;
  color: rgba(142, 223, 255, 0.34);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-shadow: 0 0 14px rgba(35, 214, 255, 0.42);
  white-space: nowrap;
  animation: secureBinaryDrift 4s linear infinite;
}

.secure-loader-label {
  position: absolute;
  inset: 34px 0 auto;
  z-index: 3;
  color: #eaffff;
  font-size: 28px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow:
    0 0 8px rgba(35, 214, 255, 0.9),
    0 0 22px rgba(35, 214, 255, 0.72);
}

.secure-loader-tower {
  display: block;
  width: 28px;
  height: 42px;
  border: 1px solid rgba(173, 244, 255, 0.76);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background:
    repeating-linear-gradient(to bottom, rgba(35, 214, 255, 0.58) 0 4px, rgba(35, 214, 255, 0.16) 4px 10px),
    linear-gradient(180deg, rgba(35, 214, 255, 0.3), rgba(23, 101, 242, 0.18));
  box-shadow: 0 0 18px rgba(35, 214, 255, 0.32);
  animation: secureTowerPulse 1.4s ease-in-out infinite;
}

.secure-loader-tower:nth-child(4) {
  height: 66px;
  animation-delay: 0.16s;
}

.secure-loader-tower:nth-child(5) {
  height: 52px;
  animation-delay: 0.32s;
}

.secure-loader-shield {
  position: absolute;
  inset: 24px auto auto 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px 16px 18px 18px;
  background: linear-gradient(135deg, rgba(35, 214, 255, 0.96), rgba(23, 101, 242, 0.94));
  color: #031328;
  font-size: 20px;
  font-weight: 1000;
  box-shadow: 0 0 28px rgba(35, 214, 255, 0.44);
}

.secure-loader-scan {
  position: absolute;
  inset: -24px 0 auto;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(35, 214, 255, 0.54), transparent);
  animation: secureScan 1.8s linear infinite;
}

.secure-login-loader-card strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.secure-login-loader-card p {
  margin: 6px 0 0;
  color: #aadff0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.secure-loader-progress {
  width: 100%;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(173, 244, 255, 0.22);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(173, 244, 255, 0.18) 0 18px, transparent 18px 24px),
    rgba(173, 244, 255, 0.08);
}

.secure-loader-progress span {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #23d6ff, #1765f2, #36f4b1);
  box-shadow: 0 0 18px rgba(35, 214, 255, 0.42);
  animation: secureProgress 1.25s ease-in-out infinite;
}

@keyframes secureTowerPulse {
  0%, 100% { opacity: 0.72; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

@keyframes secureScan {
  from { transform: translateY(-24px); }
  to { transform: translateY(146px); }
}

@keyframes secureProgress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(250%); }
}

@keyframes secureBinaryDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-54px); }
}

.tenant-welcome-panel {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(21, 89, 221, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(21, 89, 221, 0.08), rgba(31, 215, 255, 0.08)),
    #fff;
  color: var(--ink);
  padding: 12px 14px;
  text-align: center;
}

.tenant-welcome-panel.hidden {
  display: none;
}

.tenant-welcome-panel small {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tenant-welcome-panel strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.tenant-welcome-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.tenant-welcome-steps {
  display: grid;
  gap: 7px;
}

.tenant-welcome-steps span {
  position: relative;
  border: 1px solid rgba(21, 89, 221, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
  color: #061224;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 850;
}

.help-tip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-left: 4px;
  border: 1px solid rgba(21, 89, 221, 0.26);
  border-radius: 999px;
  color: var(--blue);
  background: #eef5ff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  vertical-align: middle;
}

.help-tip::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: min(240px, 78vw);
  border-radius: 9px;
  background: #061224;
  color: #fff;
  content: attr(data-tooltip);
  opacity: 0;
  padding: 9px 10px;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
}

.help-tip:hover::after,
.help-tip:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.desktop-auth-card label:has(.help-tip),
.edit-form label:has(.help-tip) {
  grid-template-columns: minmax(0, max-content) auto;
  align-items: center;
  justify-content: start;
  column-gap: 6px;
}

.desktop-auth-card label:has(.help-tip) input,
.edit-form label:has(.help-tip) input,
.edit-form label:has(.help-tip) select,
.edit-form label:has(.help-tip) textarea {
  grid-column: 1 / -1;
  width: 100%;
}

.tenant-entry-active .desktop-role-tabs [data-desktop-role="staff"],
.tenant-entry-active .role-tabs [data-login-role="staff"],
.tenant-entry-active .auth-tabs [data-auth-mode="signup"] {
  display: none;
}

.auth-link-button {
  align-self: center;
  justify-self: center;
  border: 0;
  background: transparent;
  color: #0b2f66;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.desktop-auth-card .auth-link-button,
.auth-card .auth-link-button {
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #082a5c;
  padding: 8px 14px;
  box-shadow: 0 8px 18px rgba(15, 42, 82, 0.1);
}

.auth-routing-hint {
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0f2d59;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.42;
  text-align: center;
}

.auth-screen .auth-routing-hint {
  border: 0;
  background: transparent;
  color: #f8fbff;
  box-shadow: none;
}

.auth-link-button:hover,
.auth-link-button:focus-visible {
  text-decoration: underline;
}

.auth-status {
  margin: 0;
  border: 1px solid rgba(21, 89, 221, 0.2);
  border-radius: 10px;
  background: rgba(21, 89, 221, 0.08);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-status.error {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.08);
}

.auth-status.success {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.1);
  color: var(--ink);
}

.password-reset-request,
.password-reset-complete {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.resident-invite-verified {
  display: grid;
  gap: 4px;
  border: 1px solid #b9e7ca;
  border-radius: 10px;
  background: linear-gradient(135deg, #effcf4 0%, #f8fffb 100%);
  color: #105d2c;
  padding: 12px;
}

.resident-invite-verified span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.resident-invite-verified strong {
  color: #0b3b20;
  font-size: 15px;
}

.resident-invite-verified small {
  color: #237447;
  font-weight: 750;
}

.manual-invite-code {
  border: 1px solid #dbe6f4;
  border-radius: 10px;
  background: #f8fbff;
  padding: 0;
}

.manual-invite-code summary {
  min-height: 42px;
  padding: 11px 12px;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  list-style: none;
}

.manual-invite-code summary::-webkit-details-marker {
  display: none;
}

.manual-invite-code summary::after {
  content: "＋";
  float: right;
}

.manual-invite-code[open] summary::after {
  content: "×";
}

.manual-invite-code label {
  margin: 0 12px 12px;
}

.manual-invite-code-collapsed {
  background: transparent;
}

.resident-password-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #c7d8f4;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px;
}

.resident-password-panel strong {
  color: var(--ink);
  font-size: 14px;
}

.resident-password-panel small {
  color: var(--muted);
  line-height: 1.35;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 76px;
  width: 100%;
}

.password-visibility-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  min-height: 34px;
  border: 1px solid rgba(21, 89, 221, 0.18);
  border-radius: 999px;
  background: #eef5ff;
  color: #0b2146;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0 10px;
  transform: translateY(-50%);
}

.password-visibility-toggle:focus-visible {
  outline: 3px solid rgba(21, 89, 221, 0.22);
  outline-offset: 2px;
}

#mfa-auth-modal {
  width: min(92vw, 440px);
  border: 0;
  border-radius: 14px;
  background: transparent;
  padding: 0;
}

#mfa-auth-modal::backdrop {
  background: rgba(3, 10, 24, 0.66);
  backdrop-filter: blur(8px);
}

.mfa-auth-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(22, 99, 235, 0.18);
  box-shadow: 0 24px 70px rgba(3, 10, 24, 0.28);
}

.mfa-auth-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mfa-auth-card label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 850;
}

.mfa-auth-card input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  letter-spacing: 0.08em;
  padding: 0 13px;
}

.security-settings-card > details > summary {
  align-items: center;
}

.security-shield {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background:
    radial-gradient(circle at 74% 24%, rgba(33, 223, 246, 0.3), transparent 34%),
    linear-gradient(135deg, #07182f, var(--tenant-primary, var(--blue)));
  color: #21dff6;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(21, 89, 221, 0.18);
}

.mfa-settings-body,
.mfa-setup-panel,
.mfa-recovery-panel {
  display: grid;
  gap: 12px;
}

.mfa-state-panel,
.mfa-setup-panel,
.mfa-recovery-panel {
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 101, 242, 0.08), rgba(19, 200, 230, 0.05)),
    #fbfdff;
  color: var(--ink);
  padding: 12px;
}

.mfa-state-panel.enabled {
  border-color: #bfe7ca;
  background: linear-gradient(135deg, #effcf4 0%, #f8fffb 100%);
}

.mfa-state-panel strong,
.mfa-setup-panel strong,
.mfa-recovery-panel strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.mfa-state-panel span,
.mfa-setup-panel span,
.mfa-recovery-panel span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.mfa-setup-panel label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.mfa-secret-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 7px;
}

.mfa-secret-row input,
.mfa-setup-panel > label > input {
  min-height: 44px;
  border: 1px solid #cfdced;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  padding: 0 12px;
}

.mfa-secret-row input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.mfa-recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mfa-recovery-grid code {
  border: 1px solid #cfdced;
  border-radius: 8px;
  background: #fff;
  color: #0b2146;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 8px 10px;
  text-align: center;
}

.danger-outline {
  border-color: rgba(220, 38, 38, 0.28);
  color: #b91c1c;
}

.desktop-role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f5fa;
  padding: 2px;
}

.desktop-role-tabs button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 9px;
  color: var(--ink);
  font-weight: 800;
}

.desktop-role-tabs button.active {
  color: white;
  background: var(--blue);
}

body.desktop-locked .desktop-auth {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  min-height: 100svh;
  min-height: 100dvh;
}

body.resident-route-active.desktop-locked .desktop-auth,
body.resident-route-active .desktop-auth {
  display: none !important;
}

body.desktop-locked .app-shell {
  display: none !important;
  pointer-events: none;
  user-select: none;
}

body.resident-route-active.desktop-locked .app-shell {
  display: block !important;
  pointer-events: auto;
  user-select: auto;
}

body.desktop-locked {
  overflow: hidden;
}

body.resident-route-active.desktop-locked {
  overflow: auto;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 260px;
  height: 100vh;
  padding: 22px 14px 14px;
  color: white;
  background: radial-gradient(circle at 20% 0%, #103971 0, var(--nav) 42%, #020a19 100%);
  flex: 0 0 auto;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px 24px;
}

.brand-logo-badge,
.auth-logo-badge {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(18, 124, 255, 0.28);
}

.sidebar .brand-logo-badge {
  border: 1px solid rgba(102, 201, 255, 0.42);
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: #d7e5ff;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.desktop-auth .desktop-auth-brand {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 0 0 14px;
  text-align: center;
}

.desktop-auth .desktop-auth-brand small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 50px;
  border-bottom: 4px solid #2a7cff;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  bottom: 0;
  width: 12px;
  border: 3px solid #1681ff;
  border-bottom: 0;
  content: "";
}

.brand-mark::before {
  left: 3px;
  height: 26px;
}

.brand-mark::after {
  left: 18px;
  height: 38px;
}

.brand-mark span {
  left: 33px;
  height: 30px;
}

.nav-list {
  display: grid;
  gap: 6px;
  padding-right: 4px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  flex: 1 1 auto;
}

.nav-list::-webkit-scrollbar {
  width: 7px;
}

.nav-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(191, 243, 255, 0.28);
}

.nav-item,
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 8px;
  color: white;
  background: transparent;
  padding: 10px 11px;
  text-align: left;
}

body.manager-desktop-dark .sidebar {
  isolation: isolate;
  border-right: 1px solid rgba(33, 223, 246, 0.28);
  background:
    linear-gradient(180deg, rgba(3, 9, 20, 0.98), rgba(3, 9, 20, 0.98)),
    radial-gradient(circle at 20% 0%, rgba(33, 223, 246, 0.2), transparent 34%),
    linear-gradient(180deg, #071b37 0%, #06111f 50%, #030712 100%);
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.34), inset -1px 0 0 rgba(33, 223, 246, 0.08);
}

body.manager-desktop-dark .brand,
body.manager-desktop-dark .nav-list,
body.manager-desktop-dark .profile {
  position: relative;
  z-index: 1;
}

body.manager-desktop-dark .nav-list {
  padding-right: 8px;
}

.nav-item {
  position: relative;
  overflow: hidden;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  background:
    linear-gradient(90deg, rgba(35, 109, 241, 0.92), rgba(18, 61, 139, 0.86)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(188, 231, 255, 0.2),
    0 10px 22px rgba(2, 12, 28, 0.22);
}

body.manager-desktop-dark .nav-item {
  border: 1px solid transparent;
  color: #effbff;
  text-shadow: none;
}

body.manager-desktop-dark .nav-item .nav-label {
  color: inherit;
}

body.manager-desktop-dark .nav-item:not(.active):not(:hover) .icon {
  border-color: rgba(93, 222, 255, 0.28);
  background: rgba(7, 25, 45, 0.78);
  color: #9feeff;
}

body.manager-desktop-dark .nav-item:hover,
body.manager-desktop-dark .nav-item.active {
  border-color: rgba(114, 239, 255, 0.38);
  background:
    linear-gradient(90deg, rgba(16, 57, 113, 0.94), rgba(24, 85, 174, 0.9)),
    rgba(7, 20, 47, 0.82);
  color: #ffffff;
  box-shadow:
    inset 3px 0 0 #25e6ff,
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

.nav-item.active {
  transform: none;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 999px;
  background: #1fd7ff;
  box-shadow: 0 0 14px rgba(31, 215, 255, 0.84);
}

.nav-item.with-badge {
  justify-content: space-between;
}

.nav-item.with-badge > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgba(162, 219, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #bff3ff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 12px rgba(31, 215, 255, 0.05);
}

.nav-item.active .icon,
.nav-item:hover .icon {
  border-color: rgba(213, 245, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.profile {
  flex: 0 0 auto;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  padding-top: 16px;
}

body.manager-desktop-dark .profile {
  border: 1px solid rgba(33, 223, 246, 0.2);
  border-radius: 12px;
  background: rgba(5, 16, 30, 0.94);
  cursor: pointer;
  padding: 12px;
}

body.manager-desktop-dark .profile:hover,
body.manager-desktop-dark .profile.active {
  border-color: rgba(114, 239, 255, 0.38);
  background: linear-gradient(135deg, rgba(16, 57, 113, 0.78), rgba(5, 16, 30, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.profile img,
.shift-row img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.profile strong,
.profile small {
  display: block;
}

.profile small {
  color: #cad8ef;
}

body.manager-desktop-dark .profile strong {
  color: #f2fbff;
}

body.manager-desktop-dark .profile small {
  color: #a8c6e2;
}

.settings-detail-grid {
  align-items: start;
}

.settings-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-shortcut-grid .secondary-button {
  width: 100%;
}

.chevron {
  margin-left: auto;
}

.workspace {
  width: min(100%, calc(100vw - 260px));
  max-width: calc(100vw - 260px);
  box-sizing: border-box;
  padding: 24px 32px 38px;
  min-width: 0;
}

.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  display: none;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
}

h3 {
  margin-bottom: 12px;
  font-size: 15px;
}

.menu-button {
  display: none;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
}

.desktop-logout {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 14px;
  font-weight: 800;
}

.date-control input,
select,
input[type="search"] {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  padding: 0 14px;
}

@media (max-width: 1120px) {
  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.primary-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: linear-gradient(180deg, #1765f2, var(--blue));
  box-shadow: 0 8px 20px rgba(21, 89, 221, 0.2);
  padding: 0 20px;
  font-weight: 750;
}

.primary-button span {
  margin-right: 8px;
  font-weight: 900;
}

.mobile-tabs {
  display: none;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(320px, 0.82fr);
  gap: 18px;
}

.metric-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 18px;
}

.metric-card,
.panel,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(15, 37, 68, 0.02);
}

.metric-card {
  display: flex;
  gap: 18px;
  min-height: 128px;
  padding: 22px;
  min-width: 0;
}

.metric-card > div:last-child {
  min-width: 0;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 7px 0 10px;
  font-size: 30px;
  line-height: 1;
}

.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  font-size: 23px;
  font-weight: 900;
  flex: 0 0 auto;
}

.blue { background: var(--blue); }
.green { background: var(--green); }
.orange { background: var(--orange); }
.purple { background: var(--purple); }
.teal { background: var(--teal); }
.green-text { color: var(--green) !important; }
.purple-text { color: var(--purple) !important; }

.progress {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6e8ed;
}

.metric-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

.progress span {
  display: block;
  width: 67%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.link-button {
  border: 0;
  color: var(--blue);
  background: transparent;
  padding: 0;
  font-weight: 700;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.desktop-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
}

.desktop-report-card {
  grid-column: span 2;
}

.audit-report-card {
  grid-column: 1 / -1;
}

.report-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.audit-toggle-row {
  cursor: pointer;
}

.audit-title-row {
  min-width: 0;
}

.audit-title-row h3 {
  white-space: nowrap;
}

.audit-trail-note {
  margin: 0 0 12px;
  color: var(--muted);
}

.report-card-header h3,
.report-card-header p {
  margin: 0;
}

.audit-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.audit-actions-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.audit-launch-header {
  align-items: flex-start;
}

.audit-launch-header .audit-trail-note {
  margin: 4px 0 0;
}

.audit-launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.audit-launch-tile {
  border: 1px solid #d9e5f3;
  border-radius: 12px;
  background: #f8fbff;
  color: #081936;
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.audit-launch-tile strong {
  color: #081936;
  font-size: 14px;
  line-height: 1.15;
}

.audit-launch-tile span {
  color: #50617c;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.audit-report-card-open {
  padding: 12px;
}

.report-collapse-card {
  display: block;
  overflow: hidden;
}

.report-collapse-summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding-right: 34px;
}

.report-collapse-summary::-webkit-details-marker {
  display: none;
}

.report-collapse-summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #d9e5f3;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--blue);
  font-weight: 900;
  transform: translateY(-50%);
}

.report-collapse-card[open] > .report-collapse-summary::after {
  content: "−";
}

.report-collapse-body {
  padding-top: 12px;
}

.report-collapse-card:not([open]) > .report-collapse-body {
  display: none;
}

.report-collapse-card:not([open]) {
  padding-bottom: 12px;
}

.report-collapse-card:not([open]) .audit-trail-note {
  margin-bottom: 0;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px 14px;
}

.audit-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.audit-row strong,
.audit-row em {
  color: var(--ink);
}

.audit-row span,
.audit-row small,
.audit-row time,
.report-card-header p {
  color: var(--muted);
}

.audit-row em,
.audit-row time {
  text-align: right;
}

.audit-row em {
  font-style: normal;
  font-weight: 800;
}

.mobile-audit-list {
  max-height: 360px;
}

.mobile-audit-panel {
  display: grid;
  gap: 12px;
}

.mobile-audit-panel > header,
.mobile-register-header,
.mobile-audit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-register-header {
  border-bottom: 1px solid rgba(126, 148, 176, 0.22);
  padding-bottom: 10px;
}

.mobile-audit-panel h3,
.mobile-audit-panel span,
.mobile-audit-row p {
  margin: 0;
}

.mobile-register-header h3 {
  font-size: 18px;
  line-height: 1.15;
}

.mobile-register-header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mobile-audit-panel > header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mobile-audit-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-audit-metrics article {
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #f8fbff;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px;
}

.mobile-audit-metrics strong {
  color: #0b1933;
  font-size: 18px;
  line-height: 1;
}

.mobile-audit-metrics span {
  color: #50617c;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.mobile-audit-actions {
  justify-content: stretch;
}

.mobile-audit-actions button {
  flex: 1;
}

.mobile-audit-search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mobile-audit-search input {
  width: 100%;
  border: 1px solid #cfddef;
  border-radius: 10px;
  background: white;
  color: #0b1933;
  padding: 11px 12px;
  font: inherit;
}

.mobile-audit-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.mobile-audit-row {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #fbfdff;
  padding: 12px;
}

.mobile-audit-row strong {
  color: var(--ink);
  font-size: 14px;
}

.mobile-audit-row small,
.mobile-audit-row span,
.mobile-audit-row p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manager-frame:not(.manager-light-theme) .mobile-audit-search,
.manager-frame:not(.manager-light-theme) .mobile-audit-panel > header span,
.manager-frame:not(.manager-light-theme) .mobile-register-header small,
.manager-frame:not(.manager-light-theme) .mobile-audit-row small,
.manager-frame:not(.manager-light-theme) .mobile-audit-row span,
.manager-frame:not(.manager-light-theme) .mobile-audit-row p {
  color: #b8cee5;
}

.manager-frame:not(.manager-light-theme) .audit-launch-tile {
  border-color: rgba(106, 229, 255, 0.24);
  background: rgba(2, 14, 28, 0.82);
  color: #eff9ff;
}

.manager-frame:not(.manager-light-theme) .audit-launch-tile strong {
  color: #eff9ff;
}

.manager-frame:not(.manager-light-theme) .audit-launch-tile span {
  color: #b8cee5;
}

.manager-frame:not(.manager-light-theme) .mobile-audit-search input,
.manager-frame:not(.manager-light-theme) .mobile-audit-metrics article,
.manager-frame:not(.manager-light-theme) .mobile-audit-row {
  border-color: rgba(106, 229, 255, 0.24);
  background: rgba(2, 14, 28, 0.82);
  color: #eff9ff;
}

.manager-frame:not(.manager-light-theme) .mobile-audit-metrics strong,
.manager-frame:not(.manager-light-theme) .mobile-audit-row strong {
  color: #eff9ff;
}

.manager-frame:not(.manager-light-theme) .mobile-audit-metrics span {
  color: #b8cee5;
}

.audit-page {
  display: grid;
  gap: 16px;
}

.audit-page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
  padding: 18px;
}

.audit-page-hero h3,
.audit-page-hero p,
.audit-page-hero span {
  margin: 0;
}

.audit-page-hero h3 {
  color: var(--ink);
  font-size: 22px;
}

.audit-page-hero span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.audit-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.audit-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.audit-kpi-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.audit-kpi-grid strong {
  display: block;
  color: var(--blue);
  font-size: 30px;
  line-height: 1;
}

.audit-kpi-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.audit-guidance-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
  padding: 14px 16px;
  box-shadow: 0 10px 22px rgba(15, 42, 82, 0.08);
}

.audit-guidance-card span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audit-guidance-card strong {
  color: var(--ink);
  font-size: 18px;
}

.audit-guidance-card p,
.audit-guidance-card small {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.audit-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.audit-filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.resident-ticket-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  border: 1px solid #d7e5f7;
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.94);
  padding: 10px;
}

.resident-ticket-filter-bar label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.resident-ticket-filter-bar label.wide {
  grid-column: span 2;
}

.resident-ticket-filter-bar select,
.resident-ticket-filter-bar input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfddef;
  border-radius: 8px;
  background: white;
  color: #0b1b3b;
  padding: 9px 10px;
  font: inherit;
  font-size: 12px;
}

.resident-ticket-filter-bar .secondary-button {
  min-height: 38px;
}

body.manager-desktop-dark .resident-ticket-filter-bar,
.manager-frame:not(.manager-light-theme) .resident-ticket-filter-bar {
  border-color: rgba(106, 229, 255, 0.22);
  background: rgba(5, 19, 35, 0.72);
}

body.manager-desktop-dark .resident-ticket-filter-bar label,
.manager-frame:not(.manager-light-theme) .resident-ticket-filter-bar label {
  color: #c2d8f0;
}

body.manager-desktop-dark .resident-ticket-filter-bar select,
body.manager-desktop-dark .resident-ticket-filter-bar input,
.manager-frame:not(.manager-light-theme) .resident-ticket-filter-bar select,
.manager-frame:not(.manager-light-theme) .resident-ticket-filter-bar input {
  border-color: rgba(106, 229, 255, 0.24);
  background: rgba(2, 14, 28, 0.82);
  color: #eff9ff;
}

.audit-page-list {
  display: grid;
  gap: 10px;
  max-height: 68vh;
  overflow: auto;
  padding-right: 4px;
}

.audit-page-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, max-content);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.audit-page-row-main,
.audit-page-row-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.audit-page-row-main strong {
  color: var(--ink);
  font-size: 16px;
}

.audit-page-row-main p,
.audit-page-row-main small,
.audit-page-row-meta time {
  margin: 0;
  color: var(--muted);
}

.audit-page-row-meta {
  justify-items: end;
  text-align: right;
}

.audit-page-row-meta em {
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
}

.audit-module-pill {
  width: fit-content;
  border-radius: 999px;
  background: #e9f1ff;
  color: #1554c7;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.reminder-centre {
  display: grid;
  gap: 16px;
}

.reminder-centre-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
  padding: 18px;
}

.reminder-centre-hero h2,
.reminder-centre-hero p,
.reminder-centre-hero span {
  margin: 0;
}

.reminder-centre-hero h2 {
  color: var(--ink);
  font-size: 28px;
}

.reminder-centre-hero span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.reminder-centre-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reminder-centre-metrics article {
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.reminder-centre-metrics strong {
  display: block;
  color: var(--blue);
  font-size: 26px;
  line-height: 1;
}

.reminder-centre-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.reminder-command-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}

.reminder-command-strip div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reminder-command-strip strong {
  color: var(--ink);
  font-size: 14px;
}

.reminder-command-strip span {
  color: var(--muted);
  font-size: 13px;
}

.reminder-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.reminder-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reminder-filter-pills button {
  border: 1px solid #c9d9f2;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 900;
}

.reminder-filter-pills button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.reminder-list {
  display: grid;
  gap: 10px;
}

.reminder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.reminder-row.overdue {
  border-color: #fecdd3;
  background: #fff7f8;
}

.reminder-row.resolved {
  opacity: 0.75;
}

.reminder-row-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.reminder-row-main strong {
  color: var(--ink);
  font-size: 16px;
}

.reminder-row-main small,
.reminder-row-main p {
  margin: 0;
  color: var(--muted);
}

.reminder-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 900px) {
  .audit-page-hero,
  .audit-page-row,
  .reminder-centre-hero,
  .reminder-command-strip,
  .reminder-row {
    grid-template-columns: 1fr;
  }

  .reminder-command-strip {
    display: grid;
  }

  .audit-page-hero {
    display: grid;
  }

  .audit-page-actions,
  .reminder-command-actions,
  .reminder-row-actions,
  .audit-page-row-meta {
    justify-content: start;
    justify-items: start;
    text-align: left;
  }

  .audit-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-filter-bar {
    grid-template-columns: 1fr;
  }
}

.desktop-report-list {
  display: grid;
  gap: 12px;
}

.desktop-report-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
}

.desktop-report-row > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 4px 16px;
  align-items: center;
}

.desktop-report-row strong {
  color: var(--ink);
  font-size: 15px;
}

.desktop-report-row span {
  grid-column: 1;
  color: var(--muted);
  font-size: 13px;
}

.desktop-report-row b {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.desktop-report-row i {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf6;
}

.desktop-report-row em {
  display: block;
  width: calc(var(--value, 0) * 1%);
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.report-kpi-card,
.report-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.report-kpi-card span,
.report-kpi-card small,
.report-bar span,
.report-insight-list span {
  color: var(--muted);
}

.report-kpi-card strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.report-bars,
.report-insight-list {
  display: grid;
  gap: 10px;
}

.report-export-row {
  display: grid;
  margin: 10px 0 2px;
}

.report-export-row button {
  width: 100%;
}

.report-bar {
  display: grid;
  gap: 7px;
}

.report-bar > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.report-bar i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eaf2;
}

.report-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.report-bar.green b { background: var(--green); }
.report-bar.orange b { background: var(--orange); }
.report-bar.red b { background: var(--red); }
.report-bar.purple b { background: var(--purple); }
.desktop-report-row.green em { background: var(--green); }
.desktop-report-row.orange em { background: var(--orange); }
.desktop-report-row.red em { background: var(--red); }
.desktop-report-row.purple em { background: var(--purple); }

.platform-usage-card {
  grid-column: 1 / -1;
}

.platform-insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.platform-insight-kpi {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.platform-insight-kpi span,
.platform-insight-kpi small,
.platform-insight-list span,
.platform-insight-footnote {
  color: var(--muted);
}

.platform-insight-kpi strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.assistant-summary-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(23, 101, 242, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fbff, #eef7ff);
  padding: 14px;
}

.assistant-score-ring {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--assistant-ring, conic-gradient(var(--blue) 252deg, #e4edf8 0deg));
  color: var(--ink);
  position: relative;
  box-shadow: 0 12px 26px rgba(23, 101, 242, 0.14);
}

.assistant-score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}

.assistant-score-ring strong,
.assistant-score-ring span {
  position: relative;
  z-index: 1;
}

.assistant-score-ring strong {
  font-size: 23px;
  line-height: 1;
}

.assistant-score-ring span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.assistant-summary-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.assistant-summary-copy > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.assistant-summary-copy h4 {
  margin: 0;
  color: var(--ink);
}

.assistant-summary-copy p {
  margin: 0;
  color: var(--muted);
}

.assistant-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-summary-metrics small {
  border-radius: 999px;
  background: #fff;
  color: #41526f;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.platform-action-prompts {
  display: grid;
  gap: 10px;
}

.platform-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.platform-section-heading h4 {
  margin: 0;
  color: var(--ink);
}

.platform-section-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-action-prompt-list {
  display: grid;
  gap: 10px;
}

.platform-action-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.platform-action-prompt.high {
  border-left-color: var(--red);
}

.platform-action-prompt.medium {
  border-left-color: var(--orange);
}

.platform-action-prompt.low {
  border-left-color: var(--green);
}

.platform-action-prompt-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.platform-prompt-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.platform-action-prompt strong {
  color: var(--ink);
}

.platform-action-prompt p {
  margin: 0;
  color: var(--muted);
}

.platform-prompt-severity {
  width: fit-content;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-action-prompt.high .platform-prompt-severity {
  background: #ffe8e8;
  color: var(--red);
}

.platform-action-prompt.medium .platform-prompt-severity {
  background: #fff3dd;
  color: #a85f00;
}

.platform-action-prompt.low .platform-prompt-severity {
  background: #e8f8ee;
  color: var(--green);
}

.platform-prompt-action-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-prompt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-prompt-meta span {
  border-radius: 999px;
  background: #eef4ff;
  color: #41526f;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.platform-prompt-detail {
  border: 1px solid rgba(23, 101, 242, 0.14);
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 10px;
}

.platform-prompt-detail summary {
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.platform-prompt-detail p {
  margin: 7px 0 0;
  color: #41526f;
  font-size: 13px;
}

.platform-prompt-detail p strong {
  color: var(--ink);
}

.platform-prompt-detail small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-weight: 800;
  text-transform: capitalize;
}

.platform-prompt-button {
  min-width: 116px;
}

.assistant-command-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: linear-gradient(135deg, #061a32, #0b3554);
  color: #f8fbff;
  padding: 14px;
}

.assistant-command-card.high {
  border-left-color: var(--red);
}

.assistant-command-card.medium {
  border-left-color: var(--orange);
}

.assistant-command-card.low {
  border-left-color: var(--green);
}

.assistant-command-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), transparent 45%);
  pointer-events: none;
}

.assistant-command-visual,
.assistant-command-copy,
.assistant-command-button,
.assistant-command-queue {
  position: relative;
  z-index: 1;
}

.assistant-command-visual {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.08);
}

.assistant-command-visual span {
  position: absolute;
  --assistant-rotation: 0deg;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: #22d3ee;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.8);
  animation: assistantPulse 1.8s ease-in-out infinite;
}

.assistant-command-visual span:nth-child(2) {
  --assistant-rotation: 90deg;
  animation-delay: 0.2s;
}

.assistant-command-visual span:nth-child(3) {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation-delay: 0.4s;
}

@keyframes assistantPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: rotate(var(--assistant-rotation)) scaleX(0.75);
  }

  50% {
    opacity: 1;
    transform: rotate(var(--assistant-rotation)) scaleX(1);
  }
}

.assistant-command-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.assistant-command-copy > span {
  color: #67e8f9;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.assistant-command-copy h4 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.assistant-command-copy p {
  margin: 0;
  color: #c8f6ff;
}

.assistant-command-meta,
.assistant-command-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.assistant-command-meta small,
.assistant-command-queue span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #eefcff;
  padding: 4px 8px;
  font-weight: 900;
}

.assistant-command-queue {
  grid-column: 2 / -1;
}

.assistant-command-queue span {
  color: #c8f6ff;
  font-size: 12px;
}

.assistant-command-button {
  min-width: 120px;
  box-shadow: 0 12px 28px rgba(23, 101, 242, 0.24);
}

.dashboard-assistant-slot {
  grid-column: 1 / -1;
}

.dashboard-assistant-slot:empty,
.manager-home-assistant:empty {
  display: none;
}

.manager-home-assistant {
  margin: 12px 0;
}

.dashboard-assistant-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(6, 26, 50, 0.96), rgba(8, 54, 76, 0.92)),
    radial-gradient(circle at 12% 15%, rgba(34, 211, 238, 0.22), transparent 34%);
  box-shadow: 0 18px 40px rgba(2, 12, 27, 0.18);
  color: #f8fbff;
  padding: 14px;
}

.dashboard-assistant-card.high {
  border-left-color: var(--red);
}

.dashboard-assistant-card.medium {
  border-left-color: var(--orange);
}

.dashboard-assistant-card.low {
  border-left-color: var(--green);
}

.dashboard-assistant-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), transparent 42%);
  pointer-events: none;
}

.dashboard-assistant-visual,
.dashboard-assistant-copy,
.dashboard-assistant-card .assistant-command-button,
.dashboard-assistant-card .secondary-button {
  position: relative;
  z-index: 1;
}

.dashboard-assistant-visual {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.08);
  box-shadow: inset 0 0 22px rgba(34, 211, 238, 0.12);
}

.dashboard-assistant-visual strong {
  color: #f8fbff;
  font-size: 16px;
  line-height: 1;
}

.dashboard-assistant-visual span {
  position: absolute;
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: #22d3ee;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.72);
  animation: assistantPulse 1.8s ease-in-out infinite;
}

.dashboard-assistant-visual span:nth-child(2) {
  transform: translateY(-17px);
}

.dashboard-assistant-visual span:nth-child(3) {
  transform: translateY(17px);
  animation-delay: 0.22s;
}

.dashboard-assistant-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dashboard-assistant-copy > span {
  color: #67e8f9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-assistant-copy h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
}

.dashboard-assistant-copy p {
  margin: 0;
  color: #d8f8ff;
}

.dashboard-assistant-why {
  border-left: 3px solid rgba(34, 211, 238, 0.46);
  padding-left: 10px;
  color: #c9f7ff;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-assistant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-assistant-meta small {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #eefcff;
  padding: 4px 8px;
  font-weight: 900;
}

.dashboard-assistant-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-assistant-queue span {
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  color: #d8f8ff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-assistant-card .assistant-command-button,
.dashboard-assistant-card .secondary-button {
  min-width: 126px;
}

.dashboard-assistant-card.mobile.dashboard-assistant-collapsible {
  display: block;
  padding: 0;
}

.dashboard-assistant-toggle {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  cursor: pointer;
  list-style: none;
  padding: 12px;
}

.dashboard-assistant-toggle::-webkit-details-marker {
  display: none;
}

.dashboard-assistant-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-assistant-title span {
  color: #67e8f9;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-assistant-title strong {
  color: #f8fbff;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-assistant-indicator {
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  min-width: 34px;
  padding: 5px 8px;
  text-align: center;
}

.dashboard-assistant-chevron {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #eaffff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.18s ease;
}

.dashboard-assistant-card.mobile[open] .dashboard-assistant-chevron {
  transform: rotate(45deg);
}

.dashboard-assistant-expanded {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.dashboard-assistant-card.mobile .dashboard-assistant-visual {
  width: 48px;
  height: 48px;
}

.dashboard-assistant-card.mobile .dashboard-assistant-visual span {
  display: none;
}

.platform-insight-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.platform-insight-columns h4 {
  margin: 0 0 8px;
  color: var(--ink);
}

.platform-insight-list {
  display: grid;
  gap: 8px;
}

.platform-insight-list article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}

.platform-insight-list strong {
  color: var(--ink);
}

.manager-frame.manager-light-theme .platform-usage-card,
body.manager-desktop-light .platform-usage-card {
  color: var(--ink);
  background: #fbfdff;
}

.manager-frame.manager-light-theme .platform-insight-kpi,
.manager-frame.manager-light-theme .platform-insight-list article,
.manager-frame.manager-light-theme .platform-action-prompt,
.manager-frame.manager-light-theme .usage-analytics-list .audit-row,
body.manager-desktop-light .platform-insight-kpi,
body.manager-desktop-light .platform-insight-list article,
body.manager-desktop-light .platform-action-prompt,
body.manager-desktop-light .usage-analytics-list .audit-row {
  border-color: var(--line);
  background: #fbfdff;
  color: var(--ink);
  box-shadow: none;
}

.manager-frame.manager-light-theme .platform-section-heading h4,
.manager-frame.manager-light-theme .platform-action-prompt strong,
.manager-frame.manager-light-theme .platform-insight-kpi strong,
.manager-frame.manager-light-theme .platform-insight-list strong,
.manager-frame.manager-light-theme .platform-insight-columns h4,
.manager-frame.manager-light-theme .usage-analytics-list .audit-row strong,
.manager-frame.manager-light-theme .usage-analytics-list .audit-row em,
body.manager-desktop-light .platform-section-heading h4,
body.manager-desktop-light .platform-action-prompt strong,
body.manager-desktop-light .platform-insight-kpi strong,
body.manager-desktop-light .platform-insight-list strong,
body.manager-desktop-light .platform-insight-columns h4,
body.manager-desktop-light .usage-analytics-list .audit-row strong,
body.manager-desktop-light .usage-analytics-list .audit-row em {
  color: var(--ink);
  text-shadow: none;
}

.manager-frame.manager-light-theme .platform-section-heading span,
.manager-frame.manager-light-theme .platform-action-prompt p,
.manager-frame.manager-light-theme .platform-insight-kpi span,
.manager-frame.manager-light-theme .platform-insight-kpi small,
.manager-frame.manager-light-theme .platform-insight-list span,
.manager-frame.manager-light-theme .platform-insight-footnote,
.manager-frame.manager-light-theme .usage-analytics-list .audit-row span,
.manager-frame.manager-light-theme .usage-analytics-list .audit-row small,
.manager-frame.manager-light-theme .usage-analytics-list .audit-row time,
body.manager-desktop-light .platform-section-heading span,
body.manager-desktop-light .platform-action-prompt p,
body.manager-desktop-light .platform-insight-kpi span,
body.manager-desktop-light .platform-insight-kpi small,
body.manager-desktop-light .platform-insight-list span,
body.manager-desktop-light .platform-insight-footnote,
body.manager-desktop-light .usage-analytics-list .audit-row span,
body.manager-desktop-light .usage-analytics-list .audit-row small,
body.manager-desktop-light .usage-analytics-list .audit-row time {
  color: var(--muted);
  text-shadow: none;
}

.manager-frame.manager-light-theme .assistant-command-card,
body.manager-desktop-light .assistant-command-card,
.manager-frame.manager-light-theme .dashboard-assistant-card,
body.manager-desktop-light .dashboard-assistant-card {
  border-color: rgba(23, 101, 242, 0.2);
  background: linear-gradient(135deg, #eef7ff, #fbfdff);
  color: var(--ink);
}

.manager-frame.manager-light-theme .assistant-command-copy h4,
body.manager-desktop-light .assistant-command-copy h4,
.manager-frame.manager-light-theme .dashboard-assistant-copy h3,
body.manager-desktop-light .dashboard-assistant-copy h3 {
  color: var(--ink);
}

.manager-frame.manager-light-theme .assistant-command-copy p,
.manager-frame.manager-light-theme .platform-prompt-action-hint,
body.manager-desktop-light .assistant-command-copy p,
body.manager-desktop-light .platform-prompt-action-hint,
.manager-frame.manager-light-theme .dashboard-assistant-copy p,
body.manager-desktop-light .dashboard-assistant-copy p {
  color: var(--muted);
}

.manager-frame.manager-light-theme .dashboard-assistant-why,
body.manager-desktop-light .dashboard-assistant-why {
  border-left-color: rgba(23, 101, 242, 0.28);
  color: #41526f;
}

.manager-frame.manager-light-theme .assistant-command-meta small,
.manager-frame.manager-light-theme .assistant-command-queue span,
body.manager-desktop-light .assistant-command-meta small,
body.manager-desktop-light .assistant-command-queue span,
.manager-frame.manager-light-theme .dashboard-assistant-meta small,
body.manager-desktop-light .dashboard-assistant-meta small,
.manager-frame.manager-light-theme .dashboard-assistant-queue span,
body.manager-desktop-light .dashboard-assistant-queue span {
  border-color: var(--line);
  background: #fff;
  color: #41526f;
}

.platform-insight-footnote {
  align-self: center;
  font-weight: 800;
  text-align: center;
}

body.dark-mode .platform-insight-kpi,
body.dark-mode .platform-insight-list article,
body.dark-mode .platform-action-prompt {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(2, 13, 26, 0.74);
}

body.dark-mode .assistant-summary-card {
  border-color: rgba(34, 211, 238, 0.3);
  background: linear-gradient(135deg, rgba(2, 13, 26, 0.9), rgba(8, 35, 56, 0.78));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.12);
}

body.dark-mode .assistant-score-ring {
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.2);
}

body.dark-mode .assistant-score-ring::before {
  background: #02101f;
}

body.dark-mode .assistant-score-ring strong,
body.dark-mode .assistant-summary-copy h4 {
  color: #f8fbff;
}

body.dark-mode .assistant-score-ring span,
body.dark-mode .assistant-summary-copy p {
  color: #b8d3e8;
}

body.dark-mode .assistant-summary-copy > span {
  color: #22d3ee;
}

body.dark-mode .assistant-summary-metrics small {
  background: rgba(34, 211, 238, 0.12);
  color: #c8f6ff;
}

body.dark-mode .platform-insight-kpi strong,
body.dark-mode .platform-insight-list strong,
body.dark-mode .platform-insight-columns h4,
body.dark-mode .platform-section-heading h4,
body.dark-mode .platform-action-prompt strong {
  color: #f8fbff;
}

body.dark-mode .platform-insight-kpi span,
body.dark-mode .platform-insight-kpi small,
body.dark-mode .platform-insight-list span,
body.dark-mode .platform-insight-footnote,
body.dark-mode .platform-section-heading span,
body.dark-mode .platform-action-prompt p {
  color: #b8d3e8;
}

body.dark-mode .platform-prompt-meta span {
  background: rgba(34, 211, 238, 0.12);
  color: #c8f6ff;
}

body.dark-mode .platform-prompt-action-hint {
  color: #93cde2;
}

body.dark-mode .platform-prompt-detail {
  border-color: rgba(34, 211, 238, 0.22);
  background: rgba(2, 13, 26, 0.68);
}

body.dark-mode .platform-prompt-detail summary {
  color: #22d3ee;
}

body.dark-mode .platform-prompt-detail p,
body.dark-mode .platform-prompt-detail small {
  color: #b8d3e8;
}

body.dark-mode .platform-prompt-detail p strong {
  color: #f8fbff;
}

.report-insight-list article,
.report-insight-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 11px 12px;
}

.report-insight-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.report-insight-link small {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.report-insight-link:active {
  transform: translateY(1px);
}

.report-insight-link:focus-visible {
  outline: 3px solid rgba(23, 101, 242, 0.24);
  outline-offset: 2px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.shift-list,
.incident-list,
.compliance-list {
  display: grid;
}

.shift-row,
.incident-row,
.compliance-list article {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.shift-row:last-child,
.incident-row:last-child,
.compliance-list article:last-child {
  border-bottom: 0;
}

.shift-row {
  grid-template-columns: auto minmax(130px, 1fr) auto auto;
}

.shift-row strong,
.incident-row strong,
.compliance-list strong {
  display: block;
}

.shift-row span,
.incident-row span,
.compliance-list small {
  display: block;
  color: #31517f;
  font-size: 13px;
}

.pill {
  display: inline-block;
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  font-style: normal;
  line-height: 1.2;
  text-align: center;
}

.pill.green {
  color: #14702b;
  background: #e6f6e9;
}

.pill.blue-soft {
  color: #24528f;
  background: #edf4ff;
}

.pill.high {
  color: #fa1f35;
  background: #fff0f1;
}

.pill.medium {
  color: #e46800;
  background: #fff1e6;
}

.pill.low {
  color: #b06a00;
  background: #fff7dd;
}

.incident-row {
  grid-template-columns: 66px minmax(190px, 1fr) auto auto;
}

.thumb {
  width: 66px;
  height: 54px;
  border: 0;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
}

.incident-photo-trigger {
  cursor: zoom-in;
  box-shadow: inset 0 0 0 1px rgba(15, 37, 68, 0.08);
}

.incident-photo-trigger:focus-visible {
  outline: 3px solid rgba(23, 101, 242, 0.35);
  outline-offset: 2px;
}

.task-photo-strip {
  display: grid;
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(15, 37, 68, 0.12);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.88);
}

.task-photo-strip-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.task-photo-strip-header strong {
  color: var(--text);
}

.task-photo-strip-header small,
.task-photo-empty {
  color: var(--muted);
  font-size: 12px;
}

.task-photo-items {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.task-photo-thumb {
  position: relative;
  flex: 0 0 116px;
  width: 116px;
  height: 78px;
  overflow: hidden;
  border: 1px solid rgba(23, 101, 242, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(23, 101, 242, 0.12), rgba(20, 163, 51, 0.12));
  background-position: center;
  background-size: cover;
  cursor: zoom-in;
}

.task-photo-thumb span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #fff;
  background: rgba(5, 15, 28, 0.76);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.task-photo-thumb.empty {
  cursor: default;
}

.task-completion-photo-field {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px dashed rgba(23, 101, 242, 0.38);
  border-radius: 8px;
  color: #1559dd;
  background: rgba(23, 101, 242, 0.08);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.task-completion-photo-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.incident-open-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 0;
  color: inherit;
  background: transparent;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.incident-open-text:focus-visible {
  border-radius: 6px;
  outline: 3px solid rgba(23, 101, 242, 0.28);
  outline-offset: 3px;
}

.thumb.glass {
  background-image: linear-gradient(90deg, rgba(5, 15, 28, 0.55), rgba(5, 15, 28, 0.05)), url("assets/royal-mile-high-street.jpg");
}

.thumb.wall,
.photo.wall {
  background-image: radial-gradient(circle at 44% 42%, #6f6258 0 9%, #a59181 10% 15%, transparent 16%), linear-gradient(120deg, #d7d0c8, #f3f1ed 52%, #c9beb4);
}

.thumb.ceiling {
  background-image: radial-gradient(circle at 35% 28%, rgba(111, 78, 55, 0.35) 0 12%, transparent 13%), linear-gradient(160deg, #e5ded5, #b9aa9c 48%, #f5f1eb);
}

.thumb.exit {
  background-image: linear-gradient(135deg, #0f172a, #14532d 45%, #22c55e 46% 54%, #052e16 55%);
}

.incident-photo-modal-card {
  width: min(640px, calc(100vw - 28px));
  padding: 0;
  overflow: hidden;
}

.incident-photo-large {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}

.incident-photo-large.glass {
  background-image: linear-gradient(90deg, rgba(5, 15, 28, 0.4), rgba(5, 15, 28, 0.02)), url("assets/royal-mile-high-street.jpg");
}

.incident-photo-large.wall {
  background-image: radial-gradient(circle at 44% 42%, #6f6258 0 9%, #a59181 10% 15%, transparent 16%), linear-gradient(120deg, #d7d0c8, #f3f1ed 52%, #c9beb4);
}

.incident-photo-large.ceiling {
  background-image: radial-gradient(circle at 35% 28%, rgba(111, 78, 55, 0.35) 0 12%, transparent 13%), linear-gradient(160deg, #e5ded5, #b9aa9c 48%, #f5f1eb);
}

.incident-photo-large.exit {
  background-image: linear-gradient(135deg, #0f172a, #14532d 45%, #22c55e 46% 54%, #052e16 55%);
}

.incident-photo-copy {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
}

.incident-photo-copy div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.incident-photo-copy p,
.incident-photo-copy small {
  color: var(--muted);
}

.resident-incident-update {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.resident-incident-update .pill {
  margin-top: 6px;
  justify-self: start;
}

.resident-news-feed {
  display: grid;
  gap: 10px;
}

.resident-update-heading {
  width: 100%;
  border: 1px solid #d7e3f2;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  padding: 12px;
  text-align: left;
  font: inherit;
  font-weight: 900;
}

.resident-update-heading::after {
  content: "Open";
  float: right;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.resident-news-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 250, 255, 0.94)),
    white;
  padding: 11px;
}

.resident-news-card .thumb {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 8px;
}

.resident-news-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(145deg, #ff4f6d, #ff9a3c);
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(255, 79, 109, 0.2);
}

.resident-news-card.resident-report .resident-news-icon {
  background: linear-gradient(145deg, #1d7cff, #15d1ff);
  box-shadow: 0 10px 18px rgba(29, 124, 255, 0.18);
}

.resident-news-card strong,
.resident-news-card span,
.resident-news-card small {
  display: block;
}

.resident-news-card span,
.resident-news-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.resident-news-card .pill {
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.incident-status {
  color: #fa001f;
  font-weight: 750;
}

.incident-status.progress-status {
  color: var(--blue);
}

.right-column {
  display: grid;
  gap: 18px;
}

.desktop-buzzer-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-color: #ffc8cf;
  background: #fff7f8;
}

.desktop-buzzer-panel:not(.has-active-buzzers) {
  border-color: var(--line);
  background: var(--panel);
}

.desktop-buzzer-panel .panel-header {
  padding: 0;
}

.donut-area {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 26px;
  padding: 22px 28px;
}

.donut {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 67%, var(--blue) 67% 88%, #a9b9d2 88% 100%);
  position: relative;
}

.donut::before {
  position: absolute;
  inset: 24px;
  border-radius: inherit;
  background: white;
  content: "";
}

.donut strong,
.donut span {
  position: relative;
  z-index: 1;
}

.donut strong {
  align-self: end;
  font-size: 27px;
}

.donut span {
  align-self: start;
  color: var(--muted);
  font-size: 13px;
}

.legend {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.legend li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.green-dot { background: var(--green); }
.blue-dot { background: var(--blue); }
.grey-dot { background: #a8b9d2; }

.compliance-list article {
  grid-template-columns: auto 1fr auto;
  padding: 12px 20px;
}

.compliance-list > article > span {
  color: #23456e;
}

.compliance-list em {
  border-radius: 7px;
  color: #ec6400;
  background: #fff1e6;
  padding: 7px 10px;
  font-size: 12px;
  font-style: normal;
}

.hidden {
  display: none !important;
}

.view-section {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.table-panel {
  padding: 18px;
  min-width: 0;
}

.table-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.table-toolbar input {
  flex: 1;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
  min-width: 0;
}

.record-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.record-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.record-card p {
  margin-bottom: 16px;
  color: var(--muted);
}

.notification-centre {
  display: grid;
  gap: 14px;
}

.notification-centre-intro {
  display: grid;
  gap: 4px;
  border: 1px solid #d7e5f7;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px 16px;
}

.notification-centre-intro strong {
  color: var(--ink);
  font-size: 18px;
}

.notification-centre-intro span,
.notification-card header small {
  color: var(--muted);
}

.notification-card {
  display: grid;
  gap: 12px;
}

.notification-card p {
  margin: 0;
}

.contract-repository-panel {
  padding: 0;
  overflow: hidden;
}

.contract-repository-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 16px;
  list-style: none;
}

.contract-repository-panel > summary::-webkit-details-marker,
.contract-archive-group > summary::-webkit-details-marker {
  display: none;
}

.contract-repository-panel > summary strong {
  color: var(--ink);
  font-size: 17px;
}

.contract-repository-panel > .manager-list {
  padding: 0 16px 16px;
}

.contract-repository-groups,
.contract-repository-group {
  display: grid;
  gap: 10px;
}

.contract-record {
  display: grid;
  gap: 6px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.contract-record.expired {
  border-color: #f4c7a1;
  background: #fff7ed;
}

.contract-record.archived {
  background: #f3f7fc;
  opacity: 0.82;
}

.contract-repository-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.contract-repository-actions .pill {
  margin-left: auto;
}

.contract-archive-group {
  border-top: 1px solid #dce8f8;
  padding-top: 10px;
}

.contract-archive-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 8px 0;
  color: var(--ink);
  list-style: none;
}

body.manager-desktop-dark .contract-repository-panel > summary strong,
body.dark-mode .contract-repository-panel > summary strong,
body.manager-desktop-dark .contract-archive-group > summary,
body.dark-mode .contract-archive-group > summary {
  color: #ecfeff;
}

body.manager-desktop-dark .contract-record,
body.dark-mode .contract-record {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(2, 12, 27, 0.72);
}

body.manager-desktop-dark .contract-record.expired,
body.dark-mode .contract-record.expired {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(67, 35, 10, 0.72);
}

body.manager-desktop-dark .contract-record.archived,
body.dark-mode .contract-record.archived {
  background: rgba(7, 24, 43, 0.72);
  opacity: 0.76;
}

.notification-email-audit {
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #f8fbff;
}

.notification-email-audit summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 11px 13px;
}

.notification-email-audit summary strong {
  color: var(--ink);
}

.notification-email-audit summary span {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  text-align: right;
}

.notification-email-actions {
  border-top: 1px solid #dce8f8;
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px 12px;
}

.manager-dark .notification-email-audit,
body.dark-mode .notification-email-audit {
  background: rgba(2, 12, 27, 0.72);
  border-color: rgba(34, 211, 238, 0.34);
}

.manager-dark .notification-email-audit summary strong,
body.dark-mode .notification-email-audit summary strong {
  color: #ecfeff;
}

.manager-dark .notification-email-audit summary span,
body.dark-mode .notification-email-audit summary span {
  color: #9cc9d5;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.notification-note-panel {
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0;
}

.notification-note-panel summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 900;
}

.notification-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.notification-note-grid label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.notification-note-grid .wide,
.notification-note-grid button {
  grid-column: 1 / -1;
}

.notification-note-grid input,
.notification-note-grid select,
.notification-note-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px 12px;
}

.notification-notes {
  display: grid;
  gap: 8px;
  border-top: 1px solid #dce8f8;
  padding: 12px 14px 14px;
}

.notification-notes article {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: white;
  padding: 10px;
  box-shadow: inset 0 0 0 1px #e4edf9;
}

.notification-notes strong {
  color: var(--blue);
  font-size: 12px;
}

.notification-notes span,
.notification-note-empty {
  color: var(--muted);
  line-height: 1.4;
}

.notification-delivery-panel {
  margin-bottom: 2px;
}

.notification-delivery-panel summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.notification-delivery-panel summary span {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: right;
}

.notification-delivery-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.notification-delivery-row {
  align-items: end;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 1fr) auto auto minmax(110px, 0.8fr) auto;
  padding: 12px;
}

.notification-delivery-row > div,
.notification-delivery-row label {
  display: grid;
  gap: 5px;
}

.notification-delivery-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.notification-delivery-row select {
  min-height: 42px;
}

.compact-check {
  align-items: center;
  display: flex !important;
  gap: 7px !important;
  white-space: nowrap;
}

.compact-check input {
  accent-color: var(--blue);
  block-size: 18px;
  inline-size: 18px;
}

.manager-dark .notification-delivery-row,
body.dark-mode .notification-delivery-row {
  background: rgba(2, 12, 27, 0.72);
  border-color: rgba(34, 211, 238, 0.34);
}

.manager-dark .notification-delivery-row strong,
body.dark-mode .notification-delivery-row strong,
.manager-dark .notification-delivery-row label,
body.dark-mode .notification-delivery-row label {
  color: #ecfeff;
}

.manager-dark .notification-delivery-row span,
body.dark-mode .notification-delivery-row span,
.manager-dark .notification-delivery-panel summary span,
body.dark-mode .notification-delivery-panel summary span {
  color: #9cc9d5;
}

.manager-dark .notification-delivery-row select,
body.dark-mode .notification-delivery-row select {
  background: #061525;
  border-color: rgba(34, 211, 238, 0.42);
  color: #ecfeff;
}

@media (max-width: 700px) {
  .notification-delivery-panel summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-delivery-panel summary span {
    text-align: left;
  }

  .notification-delivery-row {
    grid-template-columns: 1fr 1fr;
  }

  .notification-delivery-row > div,
  .notification-delivery-row .save-notification-delivery {
    grid-column: 1 / -1;
  }

  .notification-email-audit summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-email-audit summary span {
    justify-content: flex-start;
    text-align: left;
  }
}

.people-access-grid {
  grid-template-columns: minmax(340px, 0.95fr) minmax(380px, 1.2fr);
  align-items: start;
}

.people-access-list-card:last-child {
  grid-column: 1 / -1;
}

.resident-access-card {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
}

.resident-access-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #1765f2, #13c8e6, #18a943);
}

.people-access-form-card,
.people-access-list-card,
.resident-access-card {
  box-shadow: 0 14px 40px rgba(13, 37, 76, 0.08);
}

.people-access-form-card header,
.people-access-list-card header,
.resident-access-card header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.people-access-form-card header strong,
.people-access-list-card header strong,
.resident-access-card header strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.access-help {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.45;
}

.desktop-staff-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.desktop-staff-form .form-actions,
.desktop-staff-form button {
  grid-column: 1 / -1;
}

.desktop-staff-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.desktop-staff-form .form-actions button {
  grid-column: auto;
}

.people-access-list-card .manager-list {
  display: grid;
  gap: 10px;
}

.staff-lifecycle-section {
  display: grid;
  gap: 10px;
}

button[aria-busy="true"],
.primary-button[aria-busy="true"],
.secondary-button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.74;
}

.staff-email-status {
  align-items: center;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(21, 89, 221, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 9px 10px;
}

.staff-email-status strong {
  color: var(--ink);
  font-size: 13px;
}

.staff-email-status span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.staff-email-status .secondary-button {
  justify-self: start;
  margin-top: 2px;
}

.staff-archive-section {
  border: 1px solid rgba(21, 89, 221, 0.16);
  border-radius: 8px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.72);
}

.staff-archive-section summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.staff-lifecycle-button {
  border: 1px solid rgba(21, 89, 221, 0.2);
  border-radius: 999px;
  background: #eef5ff;
  color: #0b2a55;
  font-weight: 800;
  padding: 8px 12px;
}

.staff-resident-visible-button {
  border: 1px solid rgba(25, 163, 55, 0.24);
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  font-weight: 800;
  padding: 8px 12px;
}

.checkbox-label {
  align-items: center;
  flex-direction: row !important;
  gap: 10px;
  justify-content: flex-start;
}

.checkbox-label input[type="checkbox"] {
  flex: 0 0 auto;
  min-height: 20px;
  width: 20px;
}

.staff-lifecycle-button.danger {
  background: #fff1f2;
  border-color: rgba(225, 29, 72, 0.25);
  color: #be123c;
}

body.manager-desktop-dark .staff-archive-section,
.manager-frame:not(.manager-light-theme) .staff-archive-section {
  background: rgba(2, 16, 31, 0.74);
  border-color: rgba(34, 211, 238, 0.28);
}

body.manager-desktop-dark .staff-lifecycle-button,
.manager-frame:not(.manager-light-theme) .staff-lifecycle-button {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.36);
  color: #dffbff;
}

body.manager-desktop-dark .staff-resident-visible-button,
.manager-frame:not(.manager-light-theme) .staff-resident-visible-button {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.36);
  color: #dcfce7;
}

body.manager-desktop-dark .staff-lifecycle-button.danger,
.manager-frame:not(.manager-light-theme) .staff-lifecycle-button.danger {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(251, 113, 133, 0.36);
  color: #fecdd3;
}

.people-access-list-card .accordion-card {
  border-color: #d7e2f2;
  background: #f9fbff;
}

.white-label-card > details > summary {
  align-items: center;
}

.branding-detail-grid {
  grid-template-columns: minmax(0, 1fr);
}

.branding-studio-card {
  position: relative;
  overflow: hidden;
}

.branding-studio-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--tenant-primary, var(--blue)), #21dff6, var(--tenant-accent, var(--green)));
}

.white-label-summary-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.branding-paintbrush {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background:
    radial-gradient(circle at 75% 25%, rgba(33, 223, 246, 0.32), transparent 34%),
    linear-gradient(135deg, var(--tenant-primary, var(--blue)), #07182f);
  color: #fff;
  box-shadow: 0 14px 28px rgba(21, 89, 221, 0.18);
}

.white-label-onboarding,
.white-label-settings-panel,
.white-label-create-panel,
.white-label-launch-output {
  display: grid;
  gap: 12px;
}

.white-label-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 101, 242, 0.09), rgba(19, 200, 230, 0.06)),
    #fbfdff;
  padding: 14px;
}

.white-label-hero strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.white-label-hero span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.white-label-explicit-note {
  margin: 0;
  border: 1px solid #bfe7f3;
  border-radius: 8px;
  background: #effbff;
  color: #16415d;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.white-label-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.white-label-steps span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: white;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.white-label-steps strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tenant-primary, var(--blue)), var(--tenant-accent, var(--green)));
  color: white;
  font-size: 12px;
}

.white-label-settings-panel,
.white-label-create-panel {
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #f9fbff;
  padding: 12px;
}

.white-label-settings-panel summary,
.white-label-create-panel summary {
  align-items: center;
}

.white-label-settings-panel summary span,
.white-label-create-panel summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manager-frame:not(.manager-light-theme) .white-label-hero,
.manager-frame:not(.manager-light-theme) .white-label-explicit-note,
.manager-frame:not(.manager-light-theme) .white-label-steps span,
.manager-frame:not(.manager-light-theme) .white-label-settings-panel,
.manager-frame:not(.manager-light-theme) .white-label-create-panel {
  color: var(--ink);
  text-shadow: none;
}

.manager-frame:not(.manager-light-theme) .white-label-hero strong,
.manager-frame:not(.manager-light-theme) .white-label-settings-panel summary strong,
.manager-frame:not(.manager-light-theme) .white-label-create-panel summary strong,
.manager-frame:not(.manager-light-theme) .white-label-brand-form label,
.manager-frame:not(.manager-light-theme) .white-label-create-form label,
.manager-frame:not(.manager-light-theme) .white-label-create-form legend {
  color: var(--ink);
  text-shadow: none;
}

.manager-frame:not(.manager-light-theme) .white-label-hero span,
.manager-frame:not(.manager-light-theme) .white-label-settings-panel summary span,
.manager-frame:not(.manager-light-theme) .white-label-create-panel summary span {
  color: #44546a;
  text-shadow: none;
}

.manager-frame:not(.manager-light-theme) .white-label-brand-form input:not([type="color"]),
.manager-frame:not(.manager-light-theme) .white-label-brand-form select,
.manager-frame:not(.manager-light-theme) .white-label-create-form input:not([type="color"]),
.manager-frame:not(.manager-light-theme) .white-label-create-form select {
  background: #ffffff;
  border-color: #cfdced;
  color: var(--ink);
  box-shadow: none;
}

.white-label-brand-form,
.white-label-create-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.white-label-create-form {
  display: grid;
  gap: 12px;
}

.white-label-create-form fieldset {
  margin: 0;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  padding: 12px;
}

.white-label-create-form legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.white-label-brand-form button,
.white-label-create-form .form-actions,
.white-label-brand-form .form-actions,
.white-label-brand-preview,
.white-label-launch-output {
  grid-column: 1 / -1;
}

.white-label-brand-preview {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.tenant-preview-logo,
.tenant-preview-background {
  border: 1px dashed #bfd1ea;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(21, 89, 221, 0.1), rgba(20, 163, 51, 0.1)),
    #fff;
  background-position: center;
  background-repeat: no-repeat;
}

.tenant-preview-logo {
  min-height: 78px;
  background-size: contain;
}

.tenant-preview-background {
  display: grid;
  min-height: 78px;
  place-items: end start;
  background-size: cover;
  padding: 10px;
}

.tenant-preview-background span {
  border-radius: 999px;
  background: rgba(6, 18, 36, 0.74);
  color: #fff;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
}

.white-label-create-form .form-actions,
.white-label-tenant-toolbar,
.white-label-tenant-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.white-label-tenant-toolbar {
  justify-content: space-between;
  margin-top: 14px;
}

.white-label-tenant-toolbar strong {
  color: var(--ink);
}

.white-label-tenant-list .white-label-tenant-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #d7e5f7;
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.tenant-swatch {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 28%, var(--swatch-accent), transparent 32%),
    linear-gradient(135deg, var(--swatch-primary), #06162d);
  box-shadow: 0 12px 24px rgba(13, 37, 76, 0.14);
}

.white-label-tenant-card strong,
.white-label-launch-output strong {
  color: var(--ink);
}

.white-label-tenant-card span,
.white-label-tenant-card small {
  display: block;
}

.white-label-launch-output {
  border: 1px solid #bfe7ca;
  border-radius: 8px;
  background: #f3fff6;
  padding: 12px;
}

.white-label-launch-output label {
  margin: 0;
}

.billing-grid {
  grid-template-columns: minmax(0, 1fr);
}

.billing-return-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(21, 89, 221, 0.22);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(239, 248, 255, 0.98), rgba(246, 255, 251, 0.96));
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  padding: 16px;
}

.billing-return-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #22c55e, #22d3ee, var(--tenant-primary, var(--blue)));
}

.billing-return-card.processing::before {
  background: linear-gradient(90deg, #f59e0b, #22d3ee, var(--tenant-primary, var(--blue)));
}

.billing-return-card.cancelled::before {
  background: linear-gradient(90deg, #f97316, #f59e0b);
}

.billing-return-card small {
  display: block;
  color: var(--tenant-primary, var(--blue));
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.billing-return-card strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.billing-return-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.billing-return-orbit {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(21, 89, 221, 0.08));
}

.billing-return-orbit span {
  position: absolute;
  inset: 9px;
  border: 2px solid transparent;
  border-top-color: #22d3ee;
  border-radius: 999px;
  animation: billing-return-spin 1.8s linear infinite;
}

.billing-return-orbit span:nth-child(2) {
  inset: 15px;
  border-top-color: #22c55e;
  animation-duration: 1.2s;
  animation-direction: reverse;
}

.billing-return-orbit span:nth-child(3) {
  inset: 20px;
  border-top-color: var(--tenant-primary, var(--blue));
  animation-duration: 2.4s;
}

.billing-return-card.success .billing-return-orbit::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #16a34a;
  font-weight: 900;
}

.billing-return-card.success .billing-return-orbit span {
  animation: none;
  opacity: 0.25;
}

.billing-return-dismiss {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
}

body.manager-desktop-dark .billing-return-card,
body.dark-mode .billing-return-card {
  border-color: rgba(34, 211, 238, 0.42);
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(2, 13, 28, 0.96), rgba(7, 23, 42, 0.94));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

body.manager-desktop-dark .billing-return-card strong,
body.dark-mode .billing-return-card strong {
  color: #f8fbff;
}

body.manager-desktop-dark .billing-return-card p,
body.dark-mode .billing-return-card p {
  color: #b9c8d8;
}

body.manager-desktop-dark .billing-return-dismiss,
body.dark-mode .billing-return-dismiss {
  color: #e9f7ff;
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(2, 13, 28, 0.72);
}

@keyframes billing-return-spin {
  to { transform: rotate(360deg); }
}

.billing-status-card,
.billing-pathway-card,
.billing-plans-card,
.billing-tenant-card {
  position: relative;
  overflow: hidden;
}

.billing-status-card::before,
.billing-plans-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #0f766e, var(--tenant-primary, var(--blue)), #f59e0b);
}

.billing-status-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.billing-status-metrics article {
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #f9fbff;
  padding: 12px;
}

.billing-status-metrics small,
.billing-plan-card small,
.billing-tenant-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.billing-status-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
}

.billing-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.billing-usage-card {
  align-content: start;
}

.billing-usage-list {
  display: grid;
  gap: 10px;
}

.billing-usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.55fr);
  align-items: center;
  gap: 12px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.billing-usage-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.billing-usage-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.billing-usage-row.at-limit {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fff7f7;
}

.billing-usage-meter {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e6eef9;
}

.billing-usage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tenant-primary, var(--blue)), var(--tenant-accent, var(--green)));
}

.billing-features-card {
  align-content: start;
}

.billing-feature-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.billing-feature-columns h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
}

.billing-feature-list {
  display: grid;
  gap: 8px;
}

.billing-feature-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.billing-feature-row > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #eaf7ef;
  color: var(--tenant-accent, var(--green));
  font-weight: 950;
}

.billing-feature-row.locked > span {
  background: #eef4ff;
  color: var(--tenant-primary, var(--blue));
}

.billing-feature-row strong,
.billing-feature-row small {
  display: block;
}

.billing-feature-row strong {
  color: var(--ink);
  font-size: 13px;
}

.billing-feature-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.billing-feature-row em {
  color: var(--tenant-primary, var(--blue));
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.billing-flow-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.billing-flow-list li {
  display: grid;
  gap: 4px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.billing-flow-list strong {
  color: var(--ink);
}

.billing-flow-list span {
  color: var(--muted);
  font-weight: 800;
}

.billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.billing-plan-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dce8f8;
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.billing-plan-card.recommended {
  border-color: rgba(21, 89, 221, 0.42);
  box-shadow: 0 18px 42px rgba(21, 89, 221, 0.12);
}

.billing-plan-card-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.billing-plan-card-header strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.billing-plan-card-header span {
  color: var(--tenant-primary, var(--blue));
  font-size: 13px;
  font-weight: 950;
  text-align: right;
}

.billing-plan-card p {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.35;
}

.billing-plan-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.billing-plan-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.billing-plan-card li {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.billing-plan-card li::before {
  content: "✓";
  margin-right: 6px;
  color: var(--tenant-accent, var(--green));
}

.billing-tenant-list {
  display: grid;
  gap: 8px;
}

.billing-tenant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(150px, auto);
  align-items: center;
  gap: 12px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.billing-tenant-row strong,
.billing-tenant-row span {
  display: block;
}

.billing-tenant-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.billing-tenant-usage,
.billing-discount-control {
  grid-column: 1 / -1;
}

.billing-tenant-usage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-tenant-usage span {
  display: inline-flex;
  border: 1px solid #dce8f8;
  border-radius: 999px;
  background: #f7fbff;
  padding: 6px 10px;
  color: var(--ink);
}

.billing-discount-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.billing-discount-control input {
  min-width: 0;
}

body.dark-mode .billing-status-metrics article,
body.dark-mode .billing-flow-list li,
body.dark-mode .billing-plan-card,
body.dark-mode .billing-tenant-row,
body.dark-mode .billing-feature-row,
body.dark-mode .billing-usage-row {
  border-color: rgba(35, 214, 255, 0.28);
  background: rgba(3, 18, 35, 0.88);
}

body.dark-mode .billing-feature-columns h4,
body.dark-mode .billing-feature-row strong {
  color: #f8fdff;
}

body.dark-mode .billing-feature-row small {
  color: #9ec7d8;
}

body.dark-mode .billing-usage-row.at-limit {
  border-color: rgba(248, 113, 113, 0.46);
  background: rgba(65, 14, 22, 0.6);
}

body.dark-mode .billing-tenant-usage span {
  border-color: rgba(35, 214, 255, 0.28);
  background: rgba(35, 214, 255, 0.08);
  color: #e8fbff;
}

body.dark-mode .billing-usage-meter {
  background: rgba(148, 190, 215, 0.24);
}

.storage-readiness-card {
  position: relative;
  overflow: hidden;
}

.storage-readiness-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #0f766e, #21dff6, #f59e0b);
}

.storage-readiness-status {
  display: grid;
  gap: 12px;
}

.storage-readiness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.storage-readiness-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #f9fbff;
  padding: 12px;
}

.storage-readiness-grid strong {
  color: var(--ink);
  font-size: 12px;
}

.resident-access-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
  min-width: 0;
}

.resident-access-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
  padding: 14px;
  min-width: 0;
}

.resident-access-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.resident-access-heading strong {
  color: var(--ink);
  font-size: 15px;
}

.resident-access-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.desktop-resident-portal-list article,
.desktop-resident-invite-list article {
  border-color: #d7e5f7;
  background: white;
  box-shadow: 0 10px 26px rgba(23, 101, 242, 0.06);
}

.desktop-resident-portal-list .portal-building-row {
  min-width: 0;
}

.resident-portal-list article,
.desktop-resident-portal-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.resident-portal-list .portal-building-row,
.desktop-resident-portal-list .portal-building-row {
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  width: 100%;
}

.resident-portal-list .building-logo.small,
.desktop-resident-portal-list .building-logo.small {
  width: 54px;
  height: 54px;
  justify-self: start;
}

.resident-portal-list .portal-building-row > div:last-child,
.desktop-resident-portal-list .portal-building-row > div:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.resident-portal-list .portal-building-row strong,
.desktop-resident-portal-list .portal-building-row strong,
.resident-portal-list .portal-building-row span,
.desktop-resident-portal-list .portal-building-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.resident-portal-list article > div:last-child,
.desktop-resident-portal-list article > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resident-portal-list .preview-resident-portal,
.desktop-resident-portal-list .preview-resident-portal {
  border-color: #a5f3fc;
  background: #ecfeff;
  color: #075985;
}

.desktop-resident-invite-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.desktop-resident-invite-form button {
  grid-column: 1 / -1;
}

.resident-invite-desktop-panel .resident-invite-output {
  border-color: #cfe0f7;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(23, 101, 242, 0.03);
  min-width: 0;
}

.resident-bulk-invite {
  border: 1px solid #d7e5f7;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px 12px;
}

.resident-invite-entry {
  background: #f8fbff;
  border: 1px solid #d7e5f7;
  border-radius: 10px;
  overflow: hidden;
}

.resident-invite-entry summary {
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 10px 12px;
}

.resident-invite-entry summary::-webkit-details-marker {
  display: none;
}

.resident-invite-entry summary::after {
  color: var(--blue);
  content: "+";
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.resident-invite-entry[open] summary::after {
  content: "×";
}

.resident-invite-entry summary strong,
.resident-invite-entry summary span {
  display: block;
}

.resident-invite-entry summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.manager-dark .resident-invite-entry,
body.dark-mode .resident-invite-entry {
  background: #f8fbff;
  border-color: #d7e5f7;
  color: #071a39;
}

.manager-dark .resident-invite-entry summary,
body.dark-mode .resident-invite-entry summary,
.manager-dark .resident-invite-entry summary strong,
body.dark-mode .resident-invite-entry summary strong {
  color: #071a39;
}

.manager-dark .resident-invite-entry summary span,
body.dark-mode .resident-invite-entry summary span {
  color: #334766;
}

.manager-dark .resident-invite-entry summary::after,
body.dark-mode .resident-invite-entry summary::after {
  color: #1559dd;
}

.resident-invite-entry form {
  border-top: 1px solid #d7e5f7;
  padding: 12px;
}

.form-help {
  color: #52637d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

body.manager-desktop-dark .form-help {
  color: #c6d7ea;
}

.resident-bulk-invite summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--ink);
}

.resident-bulk-invite summary span,
.resident-invite-ledger-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.resident-bulk-invite textarea {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}

.resident-bulk-invite .secondary-button {
  margin-top: 10px;
}

.resident-bulk-invite-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.resident-bulk-invite-results .bulk-invite-skipped {
  border-color: #fed7aa;
  background: #fff7ed;
}

.resident-bulk-invite-results .bulk-invite-skipped small,
.resident-invite-missing {
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.resident-invite-summary {
  display: grid;
  gap: 10px;
}

.resident-invite-summary-details {
  border: 1px solid #d7e5f7;
  border-radius: 10px;
  background: #f8fbff;
  overflow: hidden;
}

.resident-invite-summary-details summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.resident-invite-summary-details summary::-webkit-details-marker {
  display: none;
}

.resident-invite-summary-details summary::after {
  content: "＋";
  color: var(--blue);
  font-weight: 900;
}

.resident-invite-summary-details[open] summary::after {
  content: "×";
}

.resident-invite-summary-details summary strong,
.resident-invite-summary-details summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resident-invite-summary-details summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.resident-invite-summary-body {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.resident-invite-summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
}

.resident-invite-summary-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.resident-invite-coverage {
  margin: 0;
  color: #0b1b3b;
  font-size: 12px;
  font-weight: 850;
}

.resident-invite-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.resident-invite-summary-grid article {
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.resident-invite-summary-grid strong {
  display: block;
  color: var(--blue);
  font-size: 20px;
}

.resident-invite-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.resident-invite-summary-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 680px) {
  .resident-ticket-filter-bar {
    grid-template-columns: 1fr;
  }

  .resident-ticket-filter-bar label.wide {
    grid-column: auto;
  }

  .resident-invite-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.resident-invite-ledger-item {
  align-items: start;
}

.resident-invite-timeline {
  grid-column: 1 / -1;
  border-top: 1px solid #e1ebf8;
  padding-top: 8px;
}

.resident-invite-timeline summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.resident-invite-timeline summary small {
  color: var(--muted);
  font-weight: 750;
  text-align: right;
}

.resident-invite-timeline ol {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 18px;
}

.resident-invite-timeline li {
  color: var(--muted);
  font-size: 12px;
}

.resident-invite-timeline li strong,
.resident-invite-timeline li span,
.resident-invite-timeline li small {
  display: block;
}

.resident-invite-timeline li strong {
  color: var(--ink);
}

.resident-invite-ledger-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.resident-invite-actions,
.resident-bulk-invite-results article div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.resident-invite-actions button,
.resident-invite-actions a,
.resident-bulk-invite-results a {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.resident-invite-actions button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.resident-invite-actions .revoke-resident-invite {
  color: var(--red);
}

.resident-invite-actions .renew-resident-invite {
  color: var(--green);
}

.portfolio-desktop-grid {
  display: grid;
  grid-template-columns: minmax(500px, 1fr) minmax(360px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.portfolio-editor-card,
.portfolio-list-card,
.portfolio-profile-card {
  box-shadow: 0 14px 40px rgba(13, 37, 76, 0.08);
}

.desktop-new-building-button {
  width: 100%;
  margin-bottom: 12px;
}

.desktop-building-form,
.desktop-staff-form,
.desktop-resident-invite-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.desktop-building-form label,
.desktop-staff-form label,
.desktop-resident-invite-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.desktop-building-form input,
.desktop-building-form select,
.desktop-building-form textarea,
.desktop-staff-form input,
.desktop-staff-form select,
.desktop-staff-form textarea,
.desktop-resident-invite-form input,
.desktop-resident-invite-form select,
.desktop-resident-invite-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.desktop-building-form .wide,
.desktop-building-form .form-actions,
.desktop-resident-invite-form .form-help {
  grid-column: 1 / -1;
}

.desktop-building-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.desktop-building-profile-accordion {
  border-color: #d7e5f7;
  border: 1px solid #d7e5f7;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(23, 101, 242, 0.06);
  overflow: hidden;
}

.desktop-building-profile-accordion.selected {
  border-color: #8fb8ff;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.desktop-building-profile-accordion summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 14px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.desktop-building-profile-accordion summary::-webkit-details-marker {
  display: none;
}

.desktop-building-profile-accordion summary > div:first-child {
  min-width: 0;
}

.desktop-building-profile-accordion summary > div:first-child strong,
.desktop-building-profile-accordion summary > div:first-child span {
  display: block;
}

.desktop-building-profile-accordion summary > div:first-child span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.desktop-building-profile-accordion summary > div:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.desktop-building-profile-accordion .desktop-edit-building {
  min-width: 72px;
}

.desktop-building-profile-accordion .danger-action-button,
.building-list .danger-action-button {
  border-color: rgba(219, 39, 76, 0.24);
  background: #fff1f3;
  color: #b71540;
}

.desktop-building-profile-accordion.draft-building-record,
.building-list .draft-building-record {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.08);
}

.desktop-building-profile-content,
.portfolio-profile-card #desktop-building-profile-preview {
  display: grid;
  gap: 14px;
}

.desktop-building-profile-content {
  padding: 0 14px 14px;
}

.building-profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbff 0%, #eef6ff 100%);
  padding: 14px;
}

.building-profile-hero strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
}

.building-profile-hero span {
  color: var(--muted);
}

.building-logo.large {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  font-size: 20px;
}

.building-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.building-profile-stats span {
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  padding: 12px;
  font-size: 12px;
  font-weight: 800;
}

.building-profile-stats strong {
  display: block;
  color: var(--blue);
  font-size: 22px;
}

.building-profile-last-activity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  background: #f5f9ff;
  padding: 10px 12px;
}

.building-profile-last-activity strong {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.building-profile-last-activity span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

body.manager-desktop-dark .building-profile-last-activity {
  background: rgba(7, 20, 42, 0.94);
  border-color: rgba(34, 211, 238, 0.28);
}

body.manager-desktop-dark .building-profile-last-activity strong {
  color: #eaf7ff;
}

body.manager-desktop-dark .building-profile-last-activity span {
  color: #b8c8da;
}

.building-safety-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.building-safety-list div {
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.building-safety-list dt {
  color: var(--ink);
  font-weight: 900;
}

.building-safety-list dd {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.building-profile-timeline {
  display: grid;
  gap: 8px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.building-profile-timeline strong {
  color: var(--ink);
  font-size: 13px;
}

.building-profile-timeline span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.building-profile-empty {
  display: grid;
  gap: 6px;
  border: 1px dashed #b9cbe6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 18px;
  color: var(--muted);
}

.building-profile-empty strong {
  color: var(--ink);
  font-size: 20px;
}

.property-location-panel {
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  margin: 14px 0;
}

.property-location-panel summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  list-style: none;
}

.property-location-panel summary::-webkit-details-marker {
  display: none;
}

.property-location-panel summary strong {
  color: var(--ink);
}

.property-location-panel summary span {
  color: var(--muted);
  font-weight: 800;
}

.property-location-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.property-location-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 12px;
  background: rgba(248, 250, 252, 0.86);
}

.property-location-card strong,
.property-location-card span {
  display: block;
}

.property-location-card strong {
  color: var(--ink);
}

.property-location-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.property-location-card.inactive {
  opacity: 0.72;
}

.property-location-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.property-location-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.property-location-form textarea,
.property-location-form .form-actions {
  grid-column: 1 / -1;
}

.location-context-panel {
  display: block;
  width: 100%;
}

.location-context-strip,
.location-context-empty {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 250, 0.82));
  color: #0f172a;
  padding: 12px;
  margin: 4px 0 10px;
}

.location-context-strip strong,
.location-context-empty strong {
  display: block;
  color: #0f172a;
  font-size: 0.95rem;
}

.location-context-strip span,
.location-context-empty span {
  color: #475569;
  font-weight: 750;
}

.location-context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.location-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 850;
  padding: 7px 10px;
}

.location-context-chip em {
  color: #2563eb;
  font-style: normal;
  font-weight: 850;
}

.location-context-chip.muted {
  color: #64748b;
}

.location-report-card {
  align-self: stretch;
}

.manager-frame:not(.manager-light-theme) .property-location-panel,
body.manager-desktop-dark .property-location-panel {
  background: rgba(2, 12, 27, 0.82);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 18px 40px rgba(8, 47, 73, 0.26);
}

.manager-frame:not(.manager-light-theme) .property-location-card,
body.manager-desktop-dark .property-location-card {
  background: rgba(3, 18, 35, 0.88);
  border-color: rgba(34, 211, 238, 0.28);
}

.manager-frame:not(.manager-light-theme) .property-location-panel summary strong,
.manager-frame:not(.manager-light-theme) .property-location-card strong,
body.manager-desktop-dark .property-location-panel summary strong,
body.manager-desktop-dark .property-location-card strong {
  color: #f8fbff;
}

.manager-frame:not(.manager-light-theme) .property-location-panel summary span,
.manager-frame:not(.manager-light-theme) .property-location-card span,
body.manager-desktop-dark .property-location-panel summary span,
body.manager-desktop-dark .property-location-card span {
  color: #a9c7dc;
}

.manager-frame:not(.manager-light-theme) .location-context-strip,
.manager-frame:not(.manager-light-theme) .location-context-empty,
body.manager-desktop-dark .location-context-strip,
body.manager-desktop-dark .location-context-empty {
  background: linear-gradient(135deg, rgba(3, 18, 35, 0.94), rgba(6, 78, 94, 0.42));
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.08), 0 18px 36px rgba(3, 7, 18, 0.24);
}

.manager-frame:not(.manager-light-theme) .location-context-strip strong,
.manager-frame:not(.manager-light-theme) .location-context-empty strong,
body.manager-desktop-dark .location-context-strip strong,
body.manager-desktop-dark .location-context-empty strong {
  color: #f8fbff;
}

.manager-frame:not(.manager-light-theme) .location-context-strip span,
.manager-frame:not(.manager-light-theme) .location-context-empty span,
body.manager-desktop-dark .location-context-strip span,
body.manager-desktop-dark .location-context-empty span {
  color: #b7d4e6;
}

.manager-frame:not(.manager-light-theme) .location-context-chip,
body.manager-desktop-dark .location-context-chip {
  background: rgba(8, 47, 73, 0.74);
  border-color: rgba(34, 211, 238, 0.34);
  color: #f8fbff;
}

.manager-frame:not(.manager-light-theme) .location-context-chip em,
body.manager-desktop-dark .location-context-chip em {
  color: #67e8f9;
}

.floor-plan-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.floor-plan-editor-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.floor-plan-editor-heading strong {
  display: block;
  color: var(--ink);
}

.floor-plan-viewer {
  display: grid;
  gap: 12px;
  border: 1px solid #dce8f8;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.floor-plan-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.floor-plan-toolbar strong {
  display: block;
  color: var(--ink);
}

.floor-plan-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.floor-plan-toolbar select {
  min-height: 38px;
  border: 1px solid #d8e4f5;
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
  color: var(--ink);
  font-weight: 900;
}

.floor-plan-canvas {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid #cfdcf0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23, 101, 242, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 101, 242, 0.08) 1px, transparent 1px),
    #f7fbff;
  background-size: 32px 32px;
}

.floor-plan-canvas.has-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.floor-plan-canvas.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.34);
}

.floor-plan-grid {
  position: absolute;
  inset: 12%;
  border: 2px solid rgba(7, 26, 57, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(7, 26, 57, 0.12) 49%, rgba(7, 26, 57, 0.12) 51%, transparent 52%),
    linear-gradient(180deg, transparent 48%, rgba(7, 26, 57, 0.12) 49%, rgba(7, 26, 57, 0.12) 51%, transparent 52%);
}

.floor-marker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 190px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(7, 26, 57, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  padding: 5px 8px 5px 5px;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(13, 37, 76, 0.16);
  font-size: 11px;
  font-weight: 900;
}

.floor-marker b,
.floor-key-icon {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  letter-spacing: 0;
}

.floor-marker em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.floor-marker-lifts b,
.floor-key-icon.floor-marker-lifts {
  background: #1765f2;
}

.floor-marker-fireEscapes b,
.floor-key-icon.floor-marker-fireEscapes {
  background: #14a44d;
}

.floor-marker-extinguishers b,
.floor-key-icon.floor-marker-extinguishers {
  background: #ff6b00;
}

.floor-marker-highRisers b,
.floor-key-icon.floor-marker-highRisers {
  background: #7c3aed;
}

.floor-plan-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.floor-plan-key span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dce8f8;
  border-radius: 999px;
  background: #f8fbff;
  padding: 5px 9px 5px 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.floor-plan-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: white;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(13, 37, 76, 0.12);
}

@media (max-width: 1120px) {
  .people-access-grid,
  .resident-access-layout {
    grid-template-columns: 1fr;
  }

  .white-label-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .desktop-staff-form,
  .desktop-resident-invite-form,
  .portfolio-desktop-grid,
  .desktop-building-form,
  .white-label-brand-form,
  .white-label-create-form fieldset {
    grid-template-columns: 1fr;
  }

  .billing-status-metrics,
  .billing-plan-grid,
  .billing-feature-columns,
  .billing-tenant-row,
  .billing-usage-row,
  .billing-discount-control {
    grid-template-columns: 1fr;
  }

  .portfolio-editor-card {
    grid-row: auto;
  }

  .building-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floor-plan-editor {
    grid-template-columns: 1fr;
  }

  .property-location-card,
  .property-location-form {
    grid-template-columns: 1fr;
  }

  .property-location-actions {
    justify-content: flex-start;
  }

  .floor-plan-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .floor-plan-canvas {
    min-height: 220px;
  }

  .white-label-hero {
    display: grid;
    align-items: stretch;
  }

  .white-label-tenant-list .white-label-tenant-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .white-label-tenant-actions {
    justify-content: stretch;
  }

  .white-label-tenant-actions .secondary-button,
  .white-label-hero .secondary-button {
    width: 100%;
  }

  .storage-readiness-grid {
    grid-template-columns: 1fr;
  }

  .task-time-tools {
    grid-template-columns: 1fr;
  }
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.incident-record-card {
  display: grid;
  gap: 12px;
}

.incident-record-card header {
  margin-bottom: 0;
}

.incident-record-card header small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.incident-remedy-field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.incident-remedy-field textarea {
  width: 100%;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}

.incident-evidence-panel,
.incident-step-editor,
.incident-action-log,
.incident-control-panel {
  display: grid;
  gap: 7px;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}

.incident-evidence-panel:not([open]) > :not(summary),
.incident-step-editor:not([open]) > :not(summary),
.incident-action-log:not([open]) > :not(summary),
.incident-control-panel:not([open]) > :not(summary),
.compact-incident-card:not([open]) > :not(summary) {
  display: none;
}

.incident-evidence-panel summary,
.incident-step-editor summary,
.incident-action-log summary,
.incident-control-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.incident-evidence-panel summary::-webkit-details-marker,
.incident-step-editor summary::-webkit-details-marker,
.incident-action-log summary::-webkit-details-marker,
.incident-control-panel summary::-webkit-details-marker {
  display: none;
}

.incident-evidence-panel summary span,
.incident-step-editor summary span,
.incident-action-log summary span,
.incident-control-panel summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.incident-control-panel-body,
.incident-contact-grid {
  display: grid;
  gap: 10px;
}

.incident-status-section {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.incident-status-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dfe8f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.incident-status-section > header div {
  display: grid;
  gap: 2px;
}

.incident-status-section > header strong {
  color: var(--ink);
  font-size: 14px;
}

.incident-status-section > header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.incident-status-section > header em {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  min-height: 30px;
  border-radius: 999px;
  background: #e9f2ff;
  color: #0b5bd3;
  font-style: normal;
  font-weight: 900;
}

.incident-status-section-list {
  display: grid;
  gap: 10px;
}

.incident-status-section-list .record-grid {
  margin: 0;
}

.incident-evidence-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.incident-evidence-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #cbd9ed;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  padding: 0;
}

.incident-evidence-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.incident-evidence-pending,
.incident-append-photos {
  display: grid;
  gap: 6px;
  border: 1px dashed #cbd9ed;
  border-radius: 8px;
  padding: 10px;
}

.incident-append-photos label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.incident-append-photos input {
  width: 100%;
}

.incident-action-log > strong {
  font-size: 13px;
}

.incident-action-log article {
  display: grid;
  gap: 3px;
  border-top: 1px solid #e6edf7;
  padding-top: 7px;
}

.incident-action-log span,
.incident-action-log p {
  color: var(--muted);
  font-size: 13px;
}

.incident-action-log small {
  color: #31517f;
  font-size: 11px;
  font-weight: 850;
}

.manager-phone-incident-list {
  gap: 10px;
}

.compact-incident-card {
  padding: 0;
  overflow: hidden;
}

.compact-incident-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.compact-incident-card summary::-webkit-details-marker {
  display: none;
}

.compact-incident-card summary span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.compact-incident-card summary strong,
.compact-incident-card summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.incident-accordion-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(16, 185, 219, 0.22);
  padding: 14px 16px 16px;
}

.incident-status-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.incident-status-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--blue);
  font-weight: 850;
}

.incident-status-actions button:disabled {
  color: #60718e;
  background: #eef3f8;
  cursor: default;
}

.incident-status-actions .close-incident {
  border-color: #bfe8c7;
  color: #14702b;
  background: #e6f6e9;
}

.incident-status-actions .incident-add-step {
  border-color: #c7d8f4;
  color: var(--blue);
  background: #edf4ff;
}

.renovations-desktop {
  display: grid;
  gap: 18px;
}

.reno-desktop-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid #c9d9ef;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f8f5 100%);
  padding: 22px;
}

.reno-desktop-hero h2 {
  margin-bottom: 5px;
  font-size: 28px;
}

.reno-desktop-hero span,
.reno-desktop-metrics span,
.desktop-reno-card span,
.desktop-reno-card small,
.desktop-reno-card p {
  color: var(--muted);
}

.reno-desktop-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.reno-desktop-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
}

.reno-desktop-metrics strong {
  display: block;
  margin-bottom: 5px;
  font-size: 30px;
}

.reno-desktop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.desktop-reno-list {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.desktop-reno-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.desktop-reno-card header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.desktop-reno-card header strong {
  display: block;
  margin-bottom: 4px;
}

.desktop-room-tree {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.desktop-room-node {
  border: 1px solid #e0e8f4;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.desktop-room-node summary {
  color: var(--ink);
  font-weight: 850;
}

.desktop-room-node div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 9px;
}

.desktop-room-node span {
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 850;
}

.project-timeline {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.project-timeline h3,
.project-attachments h3 {
  margin-bottom: 10px;
}

.project-attachments {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.attachment-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.attachment-counts span {
  border-radius: 999px;
  background: #eef6f2;
  color: #12713a;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
}

.attachment-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.attachment-list article {
  display: grid;
  gap: 4px;
  border: 1px solid #e0e8f4;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.attachment-list p {
  margin: 4px 0 0;
  font-size: 12px;
}

.project-timeline ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-timeline li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e0e8f4;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
}

.timeline-dot.green {
  background: var(--green);
}

.timeline-dot.blue-soft {
  background: var(--blue);
}

.project-timeline small {
  display: block;
  margin-top: 3px;
}

.desktop-reno-side {
  position: sticky;
  top: 24px;
}

.desktop-estimate-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.desktop-estimate-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.desktop-estimate-form input,
.desktop-estimate-form select,
.desktop-estimate-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px 12px;
}

.desktop-estimate-form textarea {
  resize: vertical;
}

.attachment-form {
  border-top: 1px solid var(--line);
}

.attachment-form input[type="file"] {
  padding: 8px 10px;
}

.desktop-reno-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 18px 18px;
}

.desktop-reno-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: white;
  font-weight: 800;
}

.phone-stage {
  display: none;
}

dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(7, 20, 47, 0.42);
}

.modal-card {
  width: min(460px, calc(100vw - 32px));
  background: white;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 22px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px;
}

.action-grid button {
  display: grid;
  gap: 10px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  font-weight: 800;
}

.action-grid span {
  color: var(--blue);
  font-size: 28px;
}

.record-modal-card {
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
}

.record-modal-card > label,
.record-modal-grid label {
  display: grid;
  gap: 7px;
  padding: 0 20px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.record-modal-card input,
.record-modal-card select,
.record-modal-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.record-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.record-modal-card .primary-button {
  margin: 0 20px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 90;
  max-width: min(420px, calc(100vw - 32px));
  transform: translate(-50%, 16px);
  opacity: 0;
  border: 1px solid rgba(32, 203, 236, 0.28);
  border-radius: 18px;
  color: #eaf7ff;
  background:
    linear-gradient(135deg, rgba(5, 18, 38, 0.96), rgba(10, 48, 88, 0.96)),
    rgba(5, 18, 38, 0.96);
  padding: 11px 16px;
  box-shadow:
    0 18px 42px rgba(3, 11, 24, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 26px rgba(32, 203, 236, 0.14);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast-success {
  border-color: rgba(39, 194, 119, 0.42);
  color: #ecfff5;
  background: linear-gradient(135deg, rgba(5, 48, 37, 0.96), rgba(13, 102, 69, 0.96));
  box-shadow:
    0 18px 42px rgba(3, 11, 24, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 24px rgba(39, 194, 119, 0.18);
}

.toast-error,
.toast-locked {
  border-color: rgba(255, 183, 77, 0.52);
  color: #fff7e7;
  background: linear-gradient(135deg, rgba(38, 19, 5, 0.97), rgba(97, 53, 12, 0.97));
  box-shadow:
    0 18px 42px rgba(3, 11, 24, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 26px rgba(255, 183, 77, 0.18);
}

.toast-locked {
  border-color: rgba(32, 203, 236, 0.52);
  color: #f0fcff;
  background: linear-gradient(135deg, rgba(5, 18, 38, 0.98), rgba(14, 58, 104, 0.98));
  box-shadow:
    0 18px 42px rgba(3, 11, 24, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 28px rgba(32, 203, 236, 0.22);
}

@media (max-width: 760px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    transform: translateY(16px);
  }

  .toast.show {
    transform: translateY(0);
  }
}

.feature-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-tag {
  border: 1px solid #c7d8f4;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--blue);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.feature-tag.disabled {
  border-color: #ffd2d7;
  background: #fff3f5;
  color: #b80018;
}

.feature-tag.enabled {
  border-color: #bce3ce;
  background: #edf9f1;
  color: #157533;
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }

  .right-column {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .metric-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .reno-desktop-layout {
    grid-template-columns: 1fr;
  }

  .desktop-reno-side {
    position: static;
  }

  .reno-desktop-metrics {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (min-width: 861px) and (max-width: 1120px) {
  .workspace {
    width: calc(100vw - 260px);
    max-width: calc(100vw - 260px);
    box-sizing: border-box;
  }

  .people-access-grid,
  .resident-access-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .resident-access-panel,
  .resident-invite-desktop-panel,
  .desktop-resident-invite-form,
  .resident-invite-ledger-item {
    min-width: 0;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 10;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .workspace {
    width: 100%;
    padding: 16px;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
  }

  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    margin-left: auto;
  }

  .date-control {
    display: none;
  }

  .content-grid,
  .right-column,
  .metric-row,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .metric-row {
    display: grid;
  }

  .metric-card {
    min-height: auto;
  }

  .shift-row,
  .incident-row {
    grid-template-columns: auto 1fr;
  }

  .shift-row time,
  .shift-row em,
  .incident-row .pill,
  .incident-row .incident-status {
    grid-column: 2;
  }

  .donut-area {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

@media (max-width: 680px), (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .desktop-auth {
    display: none !important;
  }

  body.desktop-locked .desktop-auth {
    display: grid !important;
    align-items: start;
    justify-items: center;
    min-height: 100svh;
    min-height: 100dvh;
    width: 100%;
    overflow-y: auto;
    padding: max(24px, env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom));
  }

  body.desktop-locked .desktop-auth-card {
    width: min(100%, 390px);
    max-height: none;
    overflow: visible;
    border-radius: 18px;
    padding: 20px;
  }

  body.desktop-locked .brand-logo-wordmark {
    width: min(250px, 100%);
  }

  body.desktop-locked .desktop-auth-brand {
    padding-bottom: 6px;
  }

  body.desktop-locked .auth-wordmark {
    width: min(250px, 100%);
  }

  .sidebar {
    display: none !important;
  }

  body.desktop-locked .app-shell {
    display: none !important;
    pointer-events: none;
    user-select: none;
  }

  html,
  body,
  .app-shell,
  .workspace {
    min-height: 100%;
    min-height: 100dvh;
  }

  body {
    background: white;
    overflow: hidden;
  }

  body:not(.desktop-locked):not(.resident-route-active) {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  body:not(.desktop-locked):not(.resident-route-active) .app-shell,
  body:not(.desktop-locked):not(.resident-route-active) .workspace {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  .workspace {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0;
  }

  .topbar {
    display: none;
  }

  .top-actions .primary-button {
    width: 44px;
    padding: 0;
    font-size: 0;
  }

  .top-actions .primary-button span {
    margin: 0;
    font-size: 20px;
  }

  .mobile-tabs {
    display: none;
  }

  .mobile-tabs button {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    padding: 9px 13px;
    font-weight: 750;
  }

  .mobile-tabs button.active {
    color: white;
    border-color: var(--blue);
    background: var(--blue);
  }

  .content-grid,
  .view-section,
  .renovations-desktop {
    display: none !important;
  }

  .phone-stage {
    display: grid;
    width: 100%;
    max-width: 100vw;
    min-height: 100svh;
    height: 100dvh;
    overflow: hidden;
    padding: 0;
  }

  .phone-frame {
    display: none;
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    min-height: 100svh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .phone-frame.active {
    display: grid;
    grid-template-rows: auto 1fr auto;
  }

  .phone-frame,
  .phone-frame *,
  .manager-frame,
  .manager-frame * {
    min-width: 0;
    box-sizing: border-box;
  }

  .auth-screen.active {
    grid-template-rows: 1fr;
  }

  .phone-status,
  .phone-frame header {
    color: white;
    background: var(--nav);
  }

  .phone-status {
    display: none;
  }

  .phone-frame header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: 70px 1fr 70px;
    align-items: center;
    min-height: calc(52px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0;
  }

  .phone-frame header strong {
    text-align: center;
  }

  .phone-frame header button {
    border: 0;
    color: white;
    background: transparent;
    text-align: left;
  }

  .phone-frame header .staff-logout,
  .phone-frame header .resident-logout {
    display: inline-grid;
    place-items: center;
    justify-self: start;
    min-width: 42px;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .phone-frame header button:last-child {
    text-align: right;
  }

  .auth-body {
    display: grid;
    align-content: center;
    gap: 18px;
    min-height: 100svh;
    padding: 28px 18px;
    background:
      radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1), transparent 28%),
      linear-gradient(135deg, rgba(6, 22, 47, 0.46), rgba(10, 48, 99, 0.22)),
      var(--tenant-login-background, url("assets/royal-mile-high-street.jpg")) center / cover;
  }

  body[data-tenant-style-preset="midnight"] .auth-body,
  body[data-tenant-style-preset="midnight"].resident-route-active .auth-body {
    background:
      radial-gradient(circle at 20% 12%, rgba(31, 215, 255, 0.2), transparent 30%),
      linear-gradient(135deg, rgba(3, 10, 24, 0.92), rgba(10, 31, 68, 0.9)),
      var(--tenant-login-background, none) center / cover;
  }

  body[data-tenant-style-preset="emerald"] .auth-body,
  body[data-tenant-style-preset="emerald"].resident-route-active .auth-body {
    background:
      radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.34), transparent 30%),
      linear-gradient(135deg, rgba(9, 88, 64, 0.86), rgba(16, 148, 90, 0.76)),
      var(--tenant-login-background, none) center / cover;
  }

  body[data-tenant-style-preset="copper"] .auth-body,
  body[data-tenant-style-preset="copper"].resident-route-active .auth-body {
    background:
      radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.3), transparent 30%),
      linear-gradient(135deg, rgba(111, 54, 23, 0.88), rgba(194, 105, 42, 0.72)),
      var(--tenant-login-background, none) center / cover;
  }

  body[data-tenant-style-preset="plain"] .auth-body,
  body[data-tenant-style-preset="plain"].resident-route-active .auth-body {
    background: linear-gradient(135deg, var(--tenant-primary, var(--blue)), var(--tenant-accent, var(--green)));
  }

  .resident-auth-screen .auth-body {
    background:
      radial-gradient(circle at 25% 14%, rgba(255, 255, 255, 0.32), transparent 34%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(241, 246, 252, 0.7)),
      var(--tenant-login-background, url("assets/royal-mile-high-street.jpg")) center / cover;
  }

  body[data-tenant-style-preset="midnight"] .resident-auth-screen .auth-body {
    background:
      radial-gradient(circle at 20% 12%, rgba(31, 215, 255, 0.2), transparent 30%),
      linear-gradient(135deg, rgba(3, 10, 24, 0.92), rgba(10, 31, 68, 0.9)),
      var(--tenant-login-background, none) center / cover;
  }

  body[data-tenant-style-preset="emerald"] .resident-auth-screen .auth-body {
    background:
      radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.34), transparent 30%),
      linear-gradient(135deg, rgba(9, 88, 64, 0.86), rgba(16, 148, 90, 0.76)),
      var(--tenant-login-background, none) center / cover;
  }

  body[data-tenant-style-preset="copper"] .resident-auth-screen .auth-body {
    background:
      radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.3), transparent 30%),
      linear-gradient(135deg, rgba(111, 54, 23, 0.88), rgba(194, 105, 42, 0.72)),
      var(--tenant-login-background, none) center / cover;
  }

  body[data-tenant-style-preset="plain"] .resident-auth-screen .auth-body {
    background: linear-gradient(135deg, var(--tenant-primary, var(--blue)), var(--tenant-accent, var(--green)));
  }

  .auth-brand {
    display: grid;
    justify-items: center;
    gap: 8px;
    color: var(--ink);
    text-align: center;
  }

  .auth-brand,
  .resident-auth-brand {
    border: 1px solid rgba(221, 229, 240, 0.75);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    padding: 14px;
    backdrop-filter: blur(8px);
  }

  .auth-brand .auth-logo-badge {
    width: 76px;
    height: 76px;
    margin-bottom: 4px;
    border-radius: 20px;
  }

  .auth-brand strong {
    font-size: 27px;
  }

  .auth-brand small {
    color: var(--muted);
    letter-spacing: 0;
    text-transform: none;
  }

  .tenant-welcome-panel-mobile {
    padding: 13px;
  }

  .auth-form,
  .staff-request-form {
    display: grid;
    gap: 12px;
  }

  .portal-link {
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    background: white;
    color: var(--blue);
    padding: 12px 14px;
    font-weight: 850;
  }

  .resident-auth-brand {
    display: grid;
    justify-items: center;
    gap: 8px;
    color: var(--ink);
    text-align: center;
  }

  .resident-auth-brand .building-logo {
    width: 68px;
    height: 68px;
  }

  .resident-auth-brand strong {
    font-size: 24px;
  }

  .resident-auth-brand small {
    color: var(--muted);
    font-weight: 750;
  }

  .auth-form label,
  .staff-request-form label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
  }

  .auth-form input,
  .staff-request-form input,
  .staff-request-form select,
  .staff-request-form textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--ink);
    background: white;
  }

  .staff-request-form textarea {
    min-height: 82px;
    padding-top: 10px;
    resize: vertical;
  }

  .staff-request-confirmation,
  .staff-request-records {
    display: grid;
    gap: 8px;
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    background: #f6fbff;
    padding: 12px;
    margin-bottom: 12px;
  }

  .staff-request-confirmation strong,
  .staff-request-records strong {
    color: var(--ink);
  }

  .staff-request-confirmation span,
  .staff-request-records span,
  .staff-request-records small {
    color: var(--muted);
    font-size: 13px;
  }

  .staff-request-records article {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 10px;
  }

  .auth-submit,
  .request-submit {
    width: 100%;
    margin-top: 4px;
  }

  .resident-form-status {
    display: block;
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.08);
    color: #0f2a4d;
    font-weight: 800;
    padding: 10px 12px;
  }

  .resident-form-status.success {
    border-color: rgba(22, 163, 74, 0.28);
    background: rgba(22, 163, 74, 0.1);
    color: #14532d;
  }

  .resident-form-status.error {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.1);
    color: #7f1d1d;
  }

  body.dark-mode .resident-form-status {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(6, 22, 38, 0.92);
    color: #e8fbff;
  }

  .phone-body {
    min-height: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px 16px 20px;
  }

  .phone-body small {
    color: var(--muted);
  }

  .property-summary {
    display: grid;
    gap: 3px;
    margin-bottom: 14px;
  }

  .property-summary strong {
    font-size: 20px;
  }

  .mobile-progress {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 14px;
  }

  .announcement-banner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    background: #f6fbff;
    padding: 12px;
    margin-bottom: 14px;
  }

  .announcement-composer > small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .announcement-composer.announcement-collapsed {
    gap: 0;
    padding: 10px 12px;
  }

  .announcement-composer.announcement-collapsed > :not(.manager-panel-title) {
    display: none !important;
  }

  .announcement-composer.announcement-collapsed > small,
  .announcement-composer.announcement-collapsed .manager-banner-preview,
  .announcement-composer.announcement-collapsed .announcement-history,
  .announcement-composer.announcement-collapsed .resident-feedback-confirmation,
  .announcement-composer.announcement-collapsed .confirmation-preview {
    display: none;
  }

  .manager-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .announcement-composer .manager-panel-title {
    cursor: pointer;
  }

  .manager-panel-title h3 {
    margin-bottom: 0;
  }

  .announcement-control-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid #c7d8f4;
    border-radius: 50%;
    color: var(--blue);
    background: white;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
  }

  .announcement-control-toggle[aria-expanded="true"] {
    color: var(--red);
    border-color: #ffc8cf;
    background: #fff7f8;
  }

  .collapsed-announcement-control {
    display: none;
  }

  .manager-banner-preview {
    display: grid;
    gap: 8px;
  }

  .manager-banner-preview article {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 10px;
  }

.manager-banner-preview small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.confirmation-preview {
  display: grid;
  gap: 10px;
  border: 1px solid #bfd2ee;
  border-radius: 8px;
  background: #f7fbff;
  padding: 12px;
}

.confirmation-preview h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.confirmation-preview article {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.confirmation-preview img,
.confirmation-image-empty {
  width: 112px;
  height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: white;
}

.confirmation-image-button,
.image-preview-trigger {
  display: block;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.image-preview-trigger img {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 8px;
  object-fit: cover;
}

.confirmation-image-button img {
  object-fit: contain;
}

.image-preview-modal-card {
  max-width: min(92vw, 720px);
}

.image-preview-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.image-preview-modal-card img,
.image-preview-carousel img {
  display: block;
  width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  object-fit: contain;
  background: #0b1220;
}

.image-preview-nav {
  width: 40px;
  height: 40px;
  border-color: #cbd9ed;
  background: #f8fbff;
  color: #0b5bd3;
  font-size: 30px;
  line-height: 1;
}

.image-preview-nav[hidden] {
  display: none;
}

#image-preview-position {
  justify-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.image-preview-modal-card p {
  color: var(--muted);
}

body.manager-desktop-dark .incident-evidence-panel,
body.manager-desktop-dark .incident-step-editor,
body.manager-desktop-dark .incident-action-log,
body.manager-desktop-dark .incident-control-panel,
body.manager-desktop-dark .incident-status-section > header {
  border-color: rgba(33, 223, 246, 0.28);
  background: rgba(4, 14, 28, 0.92);
}

body.manager-desktop-dark .incident-evidence-panel summary strong,
body.manager-desktop-dark .incident-step-editor summary strong,
body.manager-desktop-dark .incident-action-log summary strong,
body.manager-desktop-dark .incident-control-panel summary strong,
body.manager-desktop-dark .incident-status-section > header strong,
body.manager-desktop-dark .incident-remedy-field,
body.manager-desktop-dark .incident-append-photos label {
  color: var(--dark-text);
}

body.manager-desktop-dark .incident-evidence-panel summary span,
body.manager-desktop-dark .incident-step-editor summary span,
body.manager-desktop-dark .incident-action-log summary span,
body.manager-desktop-dark .incident-control-panel summary span,
body.manager-desktop-dark .incident-status-section > header span,
body.manager-desktop-dark .incident-action-log span,
body.manager-desktop-dark .incident-action-log p,
body.manager-desktop-dark .incident-action-log small,
body.manager-desktop-dark .incident-evidence-pending span,
body.manager-desktop-dark .image-preview-modal-card p,
body.manager-desktop-dark #image-preview-position {
  color: var(--dark-muted);
}

body.manager-desktop-dark .incident-remedy-field textarea,
body.manager-desktop-dark .incident-contact-person,
body.manager-desktop-dark .incident-whatsapp,
body.manager-desktop-dark .incident-photo-append-input {
  border-color: rgba(33, 223, 246, 0.34);
  background: rgba(1, 8, 18, 0.96);
  color: var(--dark-text);
}

body.manager-desktop-dark .incident-remedy-field textarea::placeholder,
body.manager-desktop-dark .incident-contact-person::placeholder,
body.manager-desktop-dark .incident-whatsapp::placeholder {
  color: rgba(154, 178, 208, 0.82);
}

body.manager-desktop-dark .incident-evidence-pending,
body.manager-desktop-dark .incident-append-photos {
  border-color: rgba(33, 223, 246, 0.28);
  background: rgba(1, 8, 18, 0.62);
}

body.manager-desktop-dark .incident-status-section > header em {
  background: rgba(33, 223, 246, 0.14);
  color: var(--dark-cyan);
}

.calendar-event-modal-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.calendar-event-modal-meta,
.calendar-event-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.calendar-event-modal-card p,
.calendar-event-modal-card small {
  line-height: 1.45;
}

.calendar-event-modal-card p {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
}

.calendar-event-modal-card small {
  display: block;
  color: var(--muted);
}

.confirmation-image-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  padding: 8px;
}

.confirmation-preview strong,
.confirmation-preview p,
.confirmation-preview small {
  display: block;
}

.confirmation-preview p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.confirmation-preview small {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

  .announcement-history {
    margin-top: 10px;
  }

  .announcement-history article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .announcement-history article > div {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .banner-action-card button {
    justify-self: start;
    margin-top: 6px;
  }

  .leave-status-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 10px 0;
  }

  .leave-status-strip article {
    display: grid;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 10px;
    text-align: center;
  }

  .leave-status-strip strong {
    color: var(--ink);
    font-size: 22px;
  }

  .leave-status-strip span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .task-control-group {
    display: grid;
    gap: 8px;
  }

  .task-date-filter {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 8px;
    margin: 10px 0;
  }

  .task-date-filter label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
  }

  .task-date-filter select,
  .task-date-filter input {
    min-width: 0;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    color: var(--ink);
    padding: 0 8px;
    font: inherit;
    font-size: 12px;
  }

  .task-control-group h3 {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 0;
    color: var(--ink);
    font-size: 13px;
  }

  .task-control-group h3 span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .edit-task:disabled {
    cursor: not-allowed;
    opacity: 0.62;
  }

  .announcement-banner > .image-preview-trigger:not(.announcement-image-banner) img {
    width: 62px;
    height: 62px;
    border-radius: 8px;
    object-fit: cover;
  }

  .announcement-banner .announcement-image-banner {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 1600 / 420;
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    background: #eef5ff;
  }

  .announcement-banner .announcement-image-banner img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
  }

  .announcement-image-caption {
    grid-column: 1 / -1;
  }

  .announcement-banner div {
    display: grid;
    gap: 4px;
  }

  .announcement-banner strong {
    font-size: 14px;
  }

  .announcement-banner span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
  }

  .announcement-banner:not(:has(img)) {
    grid-template-columns: 1fr;
  }

  .announcement-banner:has(.staff-banner-accordion) {
    grid-template-columns: 1fr;
  }

  .staff-banner-accordion {
    width: 100%;
  }

  .staff-banner-accordion summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
  }

  .staff-banner-accordion summary::-webkit-details-marker {
    display: none;
  }

  .staff-banner-accordion summary span {
    color: var(--blue);
    font-size: 12px;
    font-weight: 850;
  }

  .staff-banner-accordion > div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    padding-top: 10px;
  }

  .mobile-progress > div:last-child {
    display: grid;
    gap: 4px;
  }

  .mobile-progress span,
  .mobile-progress small {
    color: var(--muted);
  }

  .progress-ring {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: conic-gradient(var(--green) 0 67%, #dbe4ef 67% 100%);
    position: relative;
  }

  .progress-ring::before {
    position: absolute;
    inset: 12px;
    border-radius: inherit;
    background: white;
    content: "";
  }

  .progress-ring strong,
  .progress-ring span {
    position: relative;
    z-index: 1;
  }

  .progress-ring strong {
    align-self: end;
    font-size: 19px;
  }

  .progress-ring span {
    align-self: start;
    font-size: 11px;
  }

  .phone-search {
    display: block;
    margin: 12px 0 4px;
  }

  .phone-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
  }

  .today-briefing {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(145deg, #ffffff, #f6fbff);
    padding: 12px;
    margin-top: 12px;
    box-shadow: 0 10px 24px rgba(17, 32, 56, 0.07);
  }

  .today-briefing-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
  }

  .today-briefing-title strong {
    color: var(--ink);
  }

  .today-briefing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .today-briefing-grid button,
  .command-card {
    display: grid;
    gap: 4px;
    min-height: 86px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: white;
    padding: 10px;
    text-align: left;
  }

  .today-briefing-grid small,
  .today-briefing-grid span,
  .command-card small,
  .command-card span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
  }

  .today-briefing-grid strong,
  .command-card strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.2;
    text-overflow: ellipsis;
  }

  .today-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .today-quick-actions button {
    min-height: 38px;
  }

  .empty-state {
    border: 1px dashed #b9c6d8;
    border-radius: 8px;
    color: var(--muted);
    padding: 14px;
  }

  .mini-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 8px;
    margin: 16px 0 20px;
  }

  .mini-metrics button {
    display: grid;
    justify-items: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: white;
    padding: 10px 4px;
  }

  .mini-metrics button:active {
    transform: translateY(1px);
  }

  .mini-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(145deg, #1d7cff, #15d1ff);
    box-shadow:
      inset 0 1px 2px rgba(255, 255, 255, 0.55),
      0 8px 16px rgba(24, 92, 214, 0.22);
  }

  .mini-icon::before,
  .mini-icon::after,
  .mini-icon i,
  .mini-icon i::before,
  .mini-icon i::after {
    content: "";
    position: absolute;
    display: block;
  }

  .mini-icon::before {
    inset: 3px;
    border-radius: 10px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
  }

  .mini-icon.staff {
    background: linear-gradient(145deg, #1c74ff, #11d0c9);
  }

  .mini-icon.staff i {
    width: 9px;
    height: 9px;
    top: 8px;
    left: 13px;
    border-radius: 50%;
    background: white;
    box-shadow:
      -8px 4px 0 -1px rgba(255, 255, 255, 0.86),
      8px 4px 0 -1px rgba(255, 255, 255, 0.86);
  }

  .mini-icon.staff::after {
    width: 22px;
    height: 11px;
    left: 6px;
    bottom: 7px;
    border-radius: 14px 14px 6px 6px;
    background: white;
    box-shadow:
      -8px 2px 0 -3px rgba(255, 255, 255, 0.72),
      8px 2px 0 -3px rgba(255, 255, 255, 0.72);
  }

  .mini-icon.calendar {
    background: linear-gradient(145deg, #7c3dff, #ff5db8);
  }

  .mini-icon.calendar i {
    width: 20px;
    height: 18px;
    left: 7px;
    top: 9px;
    border-radius: 5px;
    background: white;
  }

  .mini-icon.calendar i::before {
    width: 20px;
    height: 5px;
    left: 0;
    top: 0;
    border-radius: 5px 5px 0 0;
    background: #ffbd3f;
  }

  .mini-icon.calendar i::after {
    width: 3px;
    height: 3px;
    left: 5px;
    top: 9px;
    border-radius: 50%;
    background: #7c3dff;
    box-shadow: 6px 0 0 #7c3dff, 12px 0 0 #7c3dff, 0 5px 0 #7c3dff, 6px 5px 0 #7c3dff;
  }

  .calendar-panel {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
    margin-bottom: 12px;
  }

  .calendar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .calendar-title-row h3 {
    margin: 0;
    font-size: 16px;
  }

  .calendar-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }

  .calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
  }

  .calendar-weekday {
    color: var(--muted);
    text-align: center;
    font-size: 11px;
    font-weight: 850;
  }

  .calendar-day {
    display: grid;
    align-content: space-between;
    gap: 4px;
    min-height: 42px;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    color: var(--ink);
    background: white;
    padding: 6px;
    text-align: left;
  }

  .calendar-day.empty {
    border-color: transparent;
    background: transparent;
  }

  .calendar-day.today {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(24, 92, 214, 0.12);
  }

  .calendar-day strong {
    font-size: 12px;
  }

  .calendar-day span {
    display: flex;
    gap: 3px;
    min-height: 6px;
  }

  .calendar-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
  }

  .calendar-dot.visit { background: var(--purple); }
  .calendar-dot.delivery { background: var(--blue); }
  .calendar-dot.leave { background: var(--orange); }
  .calendar-dot.service { background: var(--green); }
  .calendar-dot.holiday { background: var(--red); }

  .calendar-event-list {
    display: grid;
    gap: 9px;
  }

  .calendar-event {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 11px;
  }

  .calendar-event strong,
  .calendar-event span,
  .calendar-event small {
    display: block;
  }

  .calendar-event span,
  .calendar-event small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
  }

.calendar-event-form {
  margin: 0;
}

.desktop-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.desktop-calendar-board,
.desktop-calendar-events {
  margin-bottom: 0;
}

.desktop-calendar-board {
  min-height: 520px;
}

.desktop-calendar-grid .calendar-day {
  min-height: 72px;
  padding: 10px;
}

.desktop-calendar-grid .calendar-day strong {
  font-size: 14px;
}

.desktop-calendar-legend {
  grid-template-columns: repeat(4, auto);
  justify-content: start;
}

.desktop-calendar-side {
  position: sticky;
  top: 18px;
  margin-bottom: 0;
}

.desktop-calendar-events {
  grid-column: 1 / -1;
}

.desktop-calendar-form {
  margin: 0;
}

  .mini-icon.tasks {
    background: linear-gradient(145deg, #ff8a00, #ffd34f);
  }

  .mini-icon.tasks i {
    width: 20px;
    height: 22px;
    left: 8px;
    top: 6px;
    border-radius: 6px;
    background: white;
  }

  .mini-icon.tasks i::before {
    width: 9px;
    height: 5px;
    left: 5px;
    top: 4px;
    border-left: 2px solid #19a64a;
    border-bottom: 2px solid #19a64a;
    transform: rotate(-45deg);
  }

  .mini-icon.tasks i::after {
    width: 10px;
    height: 2px;
    right: 4px;
    top: 12px;
    border-radius: 99px;
    background: #ff8a00;
    box-shadow: 0 5px 0 #ff8a00;
  }

  .mini-icon.incidents {
    background: linear-gradient(145deg, #ff3d5a, #ff8a3d);
  }

  .mini-icon.incidents i {
    width: 0;
    height: 0;
    left: 8px;
    top: 7px;
    border-right: 9px solid transparent;
    border-left: 9px solid transparent;
    border-bottom: 21px solid white;
  }

  .mini-icon.incidents i::before {
    width: 3px;
    height: 8px;
    left: -1px;
    top: 8px;
    border-radius: 99px;
    background: #ff3d5a;
  }

  .mini-icon.incidents i::after {
    width: 3px;
    height: 3px;
    left: -1px;
    top: 18px;
    border-radius: 50%;
    background: #ff3d5a;
  }

  .mini-icon.jobs {
    background: linear-gradient(145deg, #16b85f, #35e0a1);
  }

  .mini-icon.jobs i {
    width: 20px;
    height: 7px;
    left: 8px;
    top: 14px;
    border-radius: 5px;
    background: white;
    transform: rotate(-38deg);
  }

  .mini-icon.jobs i::before {
    width: 9px;
    height: 9px;
    left: -4px;
    top: -1px;
    border: 3px solid white;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
  }

  .mini-icon.jobs i::after {
    width: 7px;
    height: 7px;
    right: -3px;
    top: 0;
    border-radius: 2px;
    background: white;
  }

  .phone-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
    margin: 8px 0 10px;
  }

  .phone-section-heading h3 {
    margin: 0;
  }

  .phone-icon-action {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: linear-gradient(145deg, #ff7447, var(--red));
    box-shadow: 0 10px 18px rgba(231, 62, 62, 0.28);
    font-size: 22px;
    font-weight: 950;
    line-height: 1;
  }

  .phone-icon-action:active {
    transform: translateY(1px);
    box-shadow: 0 6px 12px rgba(231, 62, 62, 0.24);
  }

  .manager-metric-sections {
    display: grid;
    gap: 10px;
    margin: 14px 0;
  }

  .manager-command-centre {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0;
  }

  .command-card {
    position: relative;
    overflow: hidden;
    min-height: 92px;
  }

  .command-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--blue);
  }

  .command-card.people::before { background: var(--purple); }
  .command-card.operations::before { background: var(--orange); }
  .command-card.residents::before { background: var(--green); }
  .command-card.calendar::before { background: var(--blue); }

  .manager-metric-section .accordion-content {
    padding-top: 10px;
  }

  .manager-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .manager-metrics button {
    display: grid;
    gap: 4px;
    min-height: 78px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: white;
    padding: 12px;
    text-align: left;
  }

  .manager-metrics strong {
    font-size: 26px;
  }

  .manager-metrics span {
    color: var(--muted);
  }

  .report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0;
  }

  .report-kpi-card,
  .report-card {
    background: #fbfdff;
    box-shadow: 0 10px 24px rgba(17, 32, 56, 0.06);
  }

  .report-kpi-card {
    position: relative;
    min-height: 112px;
    justify-items: start;
    align-content: start;
    padding: 14px;
    text-align: left;
    border-top: 4px solid var(--blue);
  }

  .report-kpi-card::before {
    content: none;
  }

  .report-kpi-card strong {
    margin: 4px 0 2px;
    color: var(--ink);
    font-size: 28px;
    z-index: auto;
  }

  .report-kpi-card:nth-child(2) {
    border-top-color: var(--green);
  }

  .report-kpi-card:nth-child(3) {
    border-top-color: #7b4dff;
  }

  .report-kpi-card:nth-child(4) {
    border-top-color: var(--orange);
  }

  .report-card {
    margin-top: 10px;
    padding: 12px;
  }

  .report-meter {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 12px;
  }

  .report-meter > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px;
    align-items: center;
  }

  .report-meter strong {
    min-width: 0;
    color: var(--ink);
    font-size: 14px;
  }

  .report-meter > div span {
    color: var(--ink);
    font-size: 20px;
    font-weight: 950;
    line-height: 1;
  }

  .report-meter i {
    display: block;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf6;
  }

  .report-meter b {
    display: block;
    width: calc(var(--value, 0) * 1%);
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
  }

  .report-meter small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .report-meter.green b {
    background: var(--green);
  }

  .report-meter.orange b {
    background: var(--orange);
  }

  .report-meter.red b {
    background: var(--red);
  }

  .report-meter.purple b {
    background: #7b4dff;
  }

  .building-selector {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
  }

  .building-selector select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 0 12px;
  }

  .manager-panel,
  .incident-control-card,
  .package-form,
  .edit-form,
  .profile-section {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
  }

  .manager-progress-link {
    width: 100%;
    color: inherit;
    text-align: left;
    cursor: pointer;
  }

  .manager-progress-link:active {
    transform: translateY(1px);
  }

  .manager-frame:not(.manager-light-theme) {
    --tron-bg: #06111f;
    --tron-panel: rgba(8, 22, 38, 0.92);
    --tron-panel-strong: rgba(10, 30, 52, 0.96);
    --tron-cyan: #1ee7ff;
    --tron-blue: #1f77ff;
    --tron-line: rgba(30, 231, 255, 0.34);
    --tron-text: #e8fbff;
    --tron-muted: #8cb8cc;
    color: var(--tron-text);
    background:
      linear-gradient(rgba(6, 17, 31, 0.72), rgba(6, 17, 31, 0.92)),
      url("assets/signacula-neon-panel.png") top center / 92% auto no-repeat,
      linear-gradient(rgba(30, 231, 255, 0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(30, 231, 255, 0.06) 1px, transparent 1px),
      radial-gradient(circle at 50% 0%, rgba(31, 119, 255, 0.28), transparent 40%),
      var(--tron-bg);
    background-size: auto, 92% auto, 22px 22px, 22px 22px, auto, auto;
  }

  .manager-frame:not(.manager-light-theme) header,
  .manager-frame:not(.manager-light-theme) footer {
    border-color: rgba(30, 231, 255, 0.32);
    background: linear-gradient(180deg, rgba(4, 14, 28, 0.98), rgba(5, 18, 35, 0.94));
    box-shadow: 0 0 18px rgba(30, 231, 255, 0.18);
  }

  .manager-frame:not(.manager-light-theme) header strong {
    color: var(--tron-text);
    text-shadow: 0 0 10px rgba(30, 231, 255, 0.62);
  }

  .manager-frame:not(.manager-light-theme) header button,
  .manager-frame:not(.manager-light-theme) footer button {
    color: var(--tron-cyan);
  }

  .manager-frame:not(.manager-light-theme) .manager-theme-toggle {
    border: 1px solid rgba(30, 231, 255, 0.54);
    border-radius: 999px;
    background: rgba(30, 231, 255, 0.08);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(30, 231, 255, 0.18);
  }

  .manager-frame:not(.manager-light-theme) .phone-body {
    background: transparent;
  }

  .manager-frame:not(.manager-light-theme) .property-summary,
  .manager-frame:not(.manager-light-theme) .command-card,
  .manager-frame:not(.manager-light-theme) .manager-panel,
  .manager-frame:not(.manager-light-theme) .incident-control-card,
  .manager-frame:not(.manager-light-theme) .package-form,
  .manager-frame:not(.manager-light-theme) .edit-form,
  .manager-frame:not(.manager-light-theme) .profile-section,
  .manager-frame:not(.manager-light-theme) .calendar-panel,
  .manager-frame:not(.manager-light-theme) .report-card,
  .manager-frame:not(.manager-light-theme) .report-kpi-card,
  .manager-frame:not(.manager-light-theme) .accordion-card {
    border-color: var(--tron-line);
    background: linear-gradient(145deg, rgba(7, 22, 40, 0.96), rgba(5, 13, 27, 0.92));
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.03),
      0 0 20px rgba(30, 231, 255, 0.12);
  }

  .manager-frame:not(.manager-light-theme) .property-summary strong,
  .manager-frame:not(.manager-light-theme) .manager-panel h3,
  .manager-frame:not(.manager-light-theme) .manager-panel-title h3,
  .manager-frame:not(.manager-light-theme) .calendar-title-row h3,
  .manager-frame:not(.manager-light-theme) .report-kpi-card strong,
  .manager-frame:not(.manager-light-theme) .report-bar strong,
  .manager-frame:not(.manager-light-theme) .accordion-card summary strong {
    color: var(--tron-text);
    text-shadow: 0 0 10px rgba(30, 231, 255, 0.42);
  }

  .manager-frame:not(.manager-light-theme) .property-summary small,
  .manager-frame:not(.manager-light-theme) .manager-panel span,
  .manager-frame:not(.manager-light-theme) .manager-list span,
  .manager-frame:not(.manager-light-theme) .manager-metrics span,
  .manager-frame:not(.manager-light-theme) .command-card span,
  .manager-frame:not(.manager-light-theme) .command-card small,
  .manager-frame:not(.manager-light-theme) .report-kpi-card span,
  .manager-frame:not(.manager-light-theme) .report-kpi-card small,
  .manager-frame:not(.manager-light-theme) .report-bar span,
  .manager-frame:not(.manager-light-theme) .report-insight-list span,
  .manager-frame:not(.manager-light-theme) .report-insight-link span,
  .manager-frame:not(.manager-light-theme) .calendar-legend,
  .manager-frame:not(.manager-light-theme) .calendar-event span,
  .manager-frame:not(.manager-light-theme) .calendar-event small,
  .manager-frame:not(.manager-light-theme) .calendar-weekday,
  .manager-frame:not(.manager-light-theme) .accordion-content small,
  .manager-frame:not(.manager-light-theme) label {
    color: var(--tron-muted);
  }

  .manager-frame:not(.manager-light-theme) .command-card strong {
    color: var(--tron-text);
    text-shadow: 0 0 10px rgba(30, 231, 255, 0.38);
  }

  .manager-frame:not(.manager-light-theme) .building-selector select,
  .manager-frame:not(.manager-light-theme) input,
  .manager-frame:not(.manager-light-theme) select,
  .manager-frame:not(.manager-light-theme) textarea {
    border-color: rgba(30, 231, 255, 0.28);
    background: rgba(3, 12, 24, 0.88);
    color: var(--tron-text);
    box-shadow: inset 0 0 12px rgba(30, 231, 255, 0.08);
  }

  .manager-frame:not(.manager-light-theme) .incident-control-card label,
  .manager-frame:not(.manager-light-theme) .package-form label,
  .manager-frame:not(.manager-light-theme) .edit-form label,
  .manager-frame:not(.manager-light-theme) .desktop-building-form label,
  .manager-frame:not(.manager-light-theme) .desktop-staff-form label,
  .manager-frame:not(.manager-light-theme) .desktop-resident-invite-form label,
  .manager-frame:not(.manager-light-theme) .desktop-calendar-form label,
  .manager-frame:not(.manager-light-theme) .desktop-estimate-form label,
  .manager-frame:not(.manager-light-theme) .record-modal-grid label,
  .manager-frame:not(.manager-light-theme) .notification-note-grid label,
  .manager-frame:not(.manager-light-theme) .signature-modal-card label,
  .manager-frame:not(.manager-light-theme) .resident-invite-output label,
  .manager-frame:not(.manager-light-theme) .floor-plan-toolbar label,
  .manager-frame:not(.manager-light-theme) .task-date-filter label,
  .manager-frame:not(.manager-light-theme) .time-window-pickers label,
  .manager-frame:not(.manager-light-theme) .form-phone label {
    color: #effcff;
    text-shadow: none;
  }

  .manager-frame:not(.manager-light-theme) .incident-control-card label span,
  .manager-frame:not(.manager-light-theme) .package-form label span,
  .manager-frame:not(.manager-light-theme) .edit-form label span,
  .manager-frame:not(.manager-light-theme) .desktop-building-form label span,
  .manager-frame:not(.manager-light-theme) .desktop-staff-form label span,
  .manager-frame:not(.manager-light-theme) .desktop-resident-invite-form label span,
  .manager-frame:not(.manager-light-theme) .desktop-calendar-form label span,
  .manager-frame:not(.manager-light-theme) .desktop-estimate-form label span,
  .manager-frame:not(.manager-light-theme) .record-modal-grid label span,
  .manager-frame:not(.manager-light-theme) .notification-note-grid label span,
  .manager-frame:not(.manager-light-theme) .signature-modal-card label span,
  .manager-frame:not(.manager-light-theme) .resident-invite-output label span,
  .manager-frame:not(.manager-light-theme) .floor-plan-toolbar label span,
  .manager-frame:not(.manager-light-theme) .task-date-filter label span,
  .manager-frame:not(.manager-light-theme) .time-window-pickers label span,
  .manager-frame:not(.manager-light-theme) .form-phone label span,
  .manager-frame:not(.manager-light-theme) .form-help {
    color: #c8f2ff;
    text-shadow: none;
  }

  .manager-frame:not(.manager-light-theme) .white-label-brand-form label,
  .manager-frame:not(.manager-light-theme) .white-label-create-form label,
  .manager-frame:not(.manager-light-theme) .white-label-brand-form label span,
  .manager-frame:not(.manager-light-theme) .white-label-create-form label span {
    color: #07142f;
    text-shadow: none;
  }

  .manager-frame:not(.manager-light-theme) .manager-progress {
    border-color: var(--tron-line);
    background: linear-gradient(135deg, rgba(5, 21, 39, 0.98), rgba(7, 34, 55, 0.9));
    box-shadow: 0 0 24px rgba(30, 231, 255, 0.14);
  }

  .manager-frame:not(.manager-light-theme) .progress-ring {
    color: var(--tron-text);
    filter: drop-shadow(0 0 8px rgba(30, 231, 255, 0.45));
  }

  .manager-frame:not(.manager-light-theme) .progress-ring::before {
    background: radial-gradient(circle, rgba(7, 22, 40, 0.98), rgba(2, 9, 20, 0.98));
    box-shadow:
      inset 0 0 14px rgba(30, 231, 255, 0.18),
      0 0 12px rgba(30, 231, 255, 0.12);
  }

  .manager-frame:not(.manager-light-theme) .progress-ring strong {
    color: #ffffff;
    text-shadow:
      0 0 8px rgba(30, 231, 255, 0.86),
      0 0 14px rgba(30, 231, 255, 0.46);
  }

  .manager-frame:not(.manager-light-theme) .progress-ring span {
    color: #bff7ff;
  }

  .manager-frame:not(.manager-light-theme) .report-meter {
    border-color: rgba(30, 231, 255, 0.3);
    background: rgba(4, 14, 28, 0.92);
  }

  .manager-frame:not(.manager-light-theme) .report-meter strong,
  .manager-frame:not(.manager-light-theme) .report-meter > div span {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(30, 231, 255, 0.42);
  }

  .manager-frame:not(.manager-light-theme) .report-meter small {
    color: #bff7ff;
  }

  .manager-frame:not(.manager-light-theme) .manager-metric-section {
    border-color: rgba(30, 231, 255, 0.42);
    background: linear-gradient(135deg, rgba(5, 20, 38, 0.94), rgba(2, 10, 22, 0.96));
  }

  .manager-frame:not(.manager-light-theme) .manager-metric-section summary {
    grid-template-columns: 42px minmax(0, 1fr) minmax(64px, max-content);
    min-height: 62px;
    border-bottom: 1px solid rgba(30, 231, 255, 0);
  }

  .manager-frame:not(.manager-light-theme) .manager-metric-section[open] summary {
    border-bottom-color: rgba(30, 231, 255, 0.22);
  }

  .manager-frame:not(.manager-light-theme) .manager-metric-section summary::after {
    grid-column: 3;
    justify-self: end;
    min-width: 64px;
    border: 1px solid rgba(30, 231, 255, 0.54);
    background: rgba(30, 231, 255, 0.08);
    color: var(--tron-cyan);
    box-shadow: 0 0 14px rgba(30, 231, 255, 0.24);
  }

  .manager-frame:not(.manager-light-theme) .manager-metric-section summary > em {
    grid-column: 4;
    border-color: rgba(30, 231, 255, 0.32);
    background: rgba(30, 231, 255, 0.1);
    color: var(--tron-cyan);
  }

  .tron-section-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(30, 231, 255, 0.6);
    border-radius: 8px;
    color: var(--tron-cyan);
    background: radial-gradient(circle, rgba(30, 231, 255, 0.2), rgba(31, 119, 255, 0.08));
    box-shadow:
      inset 0 0 12px rgba(30, 231, 255, 0.16),
      0 0 16px rgba(30, 231, 255, 0.24);
    font-size: 18px;
    font-weight: 950;
  }

  .manager-frame:not(.manager-light-theme) .manager-metrics button {
    position: relative;
    overflow: hidden;
    border-color: rgba(30, 231, 255, 0.3);
    background:
      linear-gradient(135deg, rgba(30, 231, 255, 0.1), rgba(31, 119, 255, 0.06)),
      rgba(4, 14, 28, 0.94);
    color: var(--tron-text);
    box-shadow: inset 0 0 18px rgba(30, 231, 255, 0.08);
  }

  .manager-frame:not(.manager-light-theme) .manager-metrics button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-left: 3px solid var(--tron-cyan);
    opacity: 0.75;
    pointer-events: none;
  }

  .manager-frame:not(.manager-light-theme) .manager-metrics button strong {
    color: var(--tron-cyan);
    text-shadow: 0 0 12px rgba(30, 231, 255, 0.62);
  }

  .manager-frame:not(.manager-light-theme) .manager-metrics button:active {
    transform: translateY(1px);
    box-shadow: inset 0 0 20px rgba(30, 231, 255, 0.18);
  }

  .manager-frame:not(.manager-light-theme) .manager-list article,
  .manager-frame:not(.manager-light-theme) .manager-panel article,
  .manager-frame:not(.manager-light-theme) .attention-link,
  .manager-frame:not(.manager-light-theme) .report-insight-list article,
  .manager-frame:not(.manager-light-theme) .report-insight-link,
  .manager-frame:not(.manager-light-theme) .calendar-event,
  .manager-frame:not(.manager-light-theme) .manager-banner-preview article,
  .manager-frame:not(.manager-light-theme) .accordion-content article {
    border-color: rgba(30, 231, 255, 0.24);
    background: rgba(4, 15, 29, 0.84);
    color: var(--tron-text);
  }

  .manager-frame:not(.manager-light-theme) .report-insight-link small {
    color: var(--tron-cyan);
  }

  .manager-frame:not(.manager-light-theme) .calendar-day {
    border-color: rgba(30, 231, 255, 0.22);
    background: rgba(4, 15, 29, 0.84);
    color: var(--tron-text);
  }

  .manager-frame:not(.manager-light-theme) .calendar-day.today {
    border-color: var(--tron-cyan);
    box-shadow: 0 0 14px rgba(30, 231, 255, 0.26);
  }

  .manager-frame:not(.manager-light-theme) .report-bar i {
    background: rgba(30, 231, 255, 0.12);
    box-shadow: inset 0 0 10px rgba(30, 231, 255, 0.1);
  }

  .manager-frame:not(.manager-light-theme) .report-bar b {
    background: var(--tron-cyan);
    box-shadow: 0 0 14px rgba(30, 231, 255, 0.34);
  }

  .manager-frame:not(.manager-light-theme) .report-kpi-card::before {
    background:
      radial-gradient(circle at center, rgba(7, 22, 40, 0.98) 0 54%, transparent 55%),
      conic-gradient(var(--tron-cyan) 0 calc((var(--value, 0) * 1%)), rgba(30, 231, 255, 0.12) 0 100%);
  }

  .manager-frame:not(.manager-light-theme) .leave-status-strip article {
    border-color: rgba(30, 231, 255, 0.24);
    background: rgba(4, 15, 29, 0.84);
  }

  .manager-frame:not(.manager-light-theme) .leave-status-strip strong,
  .manager-frame:not(.manager-light-theme) .task-control-group h3 {
    color: var(--tron-text);
  }

  .manager-frame:not(.manager-light-theme) .announcement-composer > small,
  .manager-frame:not(.manager-light-theme) .manager-banner-preview small {
    color: #bff7ff;
  }

  .manager-frame:not(.manager-light-theme) .confirmation-preview {
    border-color: rgba(30, 231, 255, 0.34);
    background: rgba(4, 15, 29, 0.84);
  }

  .manager-frame:not(.manager-light-theme) .confirmation-preview h4,
  .manager-frame:not(.manager-light-theme) .confirmation-preview strong {
    color: var(--tron-text);
  }

  .manager-frame:not(.manager-light-theme) .confirmation-preview small {
    color: var(--tron-cyan);
  }

  .manager-frame:not(.manager-light-theme) .announcement-control-toggle {
    border-color: rgba(30, 231, 255, 0.54);
    background: rgba(30, 231, 255, 0.08);
    color: var(--tron-cyan);
    box-shadow: 0 0 14px rgba(30, 231, 255, 0.18);
  }

  .manager-frame:not(.manager-light-theme) .announcement-control-toggle[aria-expanded="true"] {
    border-color: rgba(30, 231, 255, 0.68);
    background: var(--tron-cyan);
    color: #03111c;
  }

  .manager-frame:not(.manager-light-theme) .pill {
    border: 1px solid rgba(30, 231, 255, 0.3);
    box-shadow: 0 0 10px rgba(30, 231, 255, 0.12);
  }

  .manager-frame:not(.manager-light-theme) footer .active {
    color: #03111c;
    background: var(--tron-cyan);
    box-shadow: 0 0 16px rgba(30, 231, 255, 0.48);
  }

  .manager-frame.manager-light-theme {
    color: var(--ink);
    background: #f5f8fc;
  }

  .manager-frame.manager-light-theme header,
  .manager-frame.manager-light-theme footer {
    border-color: var(--line);
    background: white;
    box-shadow: 0 10px 24px rgba(17, 32, 56, 0.08);
  }

  .manager-frame.manager-light-theme header strong,
  .manager-frame.manager-light-theme header button,
  .manager-frame.manager-light-theme footer button {
    color: var(--ink);
    text-shadow: none;
  }

  .manager-frame.manager-light-theme header button {
    border-color: transparent;
  }

  .manager-frame.manager-light-theme .manager-theme-toggle {
    color: var(--blue);
    border: 1px solid #c7d8f4;
    border-radius: 999px;
    background: #eef5ff;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 900;
  }

  .manager-frame.manager-light-theme .manager-metric-section summary {
    grid-template-columns: 42px minmax(0, 1fr) minmax(64px, max-content);
    min-height: 62px;
  }

  .manager-frame.manager-light-theme .manager-metric-section summary strong {
    grid-column: 2;
    min-width: 0;
    max-width: 100%;
    justify-self: center;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .manager-frame.manager-light-theme .manager-metric-section summary::after {
    grid-column: 3;
    justify-self: end;
    min-width: 64px;
  }

  .manager-frame.manager-light-theme .tron-section-icon {
    border-color: #c7d8f4;
    color: var(--blue);
    background: #eef5ff;
    box-shadow: none;
  }

  .manager-frame.manager-light-theme .manager-progress,
  .manager-frame.manager-light-theme .manager-metric-section,
  .manager-frame.manager-light-theme .manager-panel,
  .manager-frame.manager-light-theme .attention-link,
  .manager-frame.manager-light-theme .report-card,
  .manager-frame.manager-light-theme .report-kpi-card,
  .manager-frame.manager-light-theme .calendar-panel,
  .manager-frame.manager-light-theme .property-summary {
    border-color: var(--line);
    background: #fbfdff;
    box-shadow: none;
  }

  .manager-frame.manager-light-theme .manager-metrics button {
    border-color: var(--line);
    background: white;
    color: var(--ink);
    box-shadow: none;
  }

  .manager-frame.manager-light-theme .manager-metrics button strong {
    color: var(--blue);
    text-shadow: none;
  }

  .manager-frame.manager-light-theme .manager-metrics button::before {
    content: none;
  }

  .staff-buzzer-panel {
    display: grid;
    gap: 10px;
    border: 1px solid #ffc8cf;
    border-radius: 8px;
    background: #fff7f8;
    padding: 12px;
    margin-bottom: 16px;
  }

  .staff-resident-requests-panel {
    display: grid;
    gap: 10px;
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    background: #f6fbff;
    padding: 12px;
    margin-bottom: 16px;
  }

  .buzzer-alert-list {
    display: grid;
    gap: 8px;
  }

  .buzzer-alert {
    display: grid;
    gap: 6px;
    border: 1px solid #ffc8cf;
    border-radius: 8px;
    background: white;
    padding: 10px;
  }

  .buzzer-alert-waiting {
    border-color: #c7d8f4;
    background: #f6fbff;
  }

  .buzzer-alert strong {
    color: var(--red);
  }

  .buzzer-alert-waiting strong {
    color: var(--blue);
  }

  .buzzer-alert span,
  .buzzer-alert small {
    color: var(--muted);
    font-size: 13px;
  }

  .buzzer-alert textarea,
  .resident-action-note {
    width: 100%;
    min-height: 58px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 9px 10px;
    color: var(--ink);
    resize: vertical;
  }

  .buzzer-alert > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .buzzer-alert button {
    border: 1px solid #ffc8cf;
    border-radius: 8px;
    background: #fff7f8;
    color: var(--red);
    font-weight: 850;
  }

  .resident-contact-actions,
  .buzzer-alert .resident-contact-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .resident-contact-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    background: white;
    color: var(--blue);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
  }

  .buzzer-alert .resident-contact-actions a {
    border-color: #ffc8cf;
    color: var(--red);
  }

  .buzzer-alert-waiting .resident-contact-actions a {
    border-color: #c7d8f4;
    color: var(--blue);
  }

  .resident-request-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .resident-request-metrics span {
    border: 1px solid rgba(21, 89, 221, 0.18);
    border-radius: 999px;
    background: rgba(21, 89, 221, 0.08);
    color: #15335f;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 850;
  }

  .manager-desktop-dark .resident-request-metrics span {
    border-color: rgba(34, 211, 238, 0.32);
    background: rgba(34, 211, 238, 0.1);
    color: #dffbff;
  }

  .buzzer-alert-waiting button,
  .buzzer-alert button:disabled {
    border-color: #c7d8f4;
    background: #edf4ff;
    color: #31517f;
  }

  .action-feed-list {
    display: grid;
    gap: 8px;
  }

  .action-feed-item {
    position: relative;
    overflow: hidden;
  }

  .action-feed-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--blue);
  }

  .action-feed-item.red::before { background: var(--red); }
  .action-feed-item.orange::before { background: var(--orange); }
  .action-feed-item.green::before { background: var(--green); }
  .action-feed-item.purple::before { background: var(--purple); }

  .resident-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .resident-confirm-actions button {
    min-height: 38px;
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    background: white;
    color: var(--blue);
    font-weight: 850;
  }

  .resident-confirm-actions .resident-escalate-request {
    border-color: #ffc8cf;
    color: var(--red);
  }

  .resident-invite-output {
    display: grid;
    gap: 10px;
  }

  .resident-invite-output label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
  }

  .resident-invite-output input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 0 12px;
  }

  .resident-invite-output > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .resident-invite-output button,
  .resident-invite-output a {
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    background: white;
    color: var(--blue);
    font-weight: 850;
    min-height: 42px;
    display: grid;
    place-items: center;
    text-decoration: none;
  }

  .manager-panel article,
  .manager-list article,
  .attention-link {
    display: grid;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 12px;
  }

  .attention-link {
    width: 100%;
    position: relative;
    overflow: hidden;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
  }

  .attention-link.action-feed-item {
    border-color: rgba(29, 124, 255, 0.22);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.86),
      0 12px 28px rgba(19, 47, 93, 0.08);
  }

  .attention-link.action-feed-item::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 0;
    width: 4px;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 0 18px color-mix(in srgb, var(--blue) 52%, transparent);
  }

  .attention-link.action-feed-item strong,
  .attention-link.action-feed-item span {
    position: relative;
    z-index: 1;
  }

  .attention-link.action-feed-item.task-summary {
    border-style: solid;
    border-color: rgba(34, 211, 238, 0.52);
    background:
      linear-gradient(135deg, rgba(236, 254, 255, 0.98), rgba(239, 246, 255, 0.96));
  }

  .attention-link.action-feed-item.task-summary::after {
    content: "OPEN QUEUE";
    position: absolute;
    top: 10px;
    right: 12px;
    color: var(--blue);
    font-size: 0.62rem;
    font-weight: 950;
    letter-spacing: 0.08em;
  }

  .attention-link.action-feed-item.red::before { background: var(--red); box-shadow: 0 0 18px rgba(255, 77, 97, 0.42); }
  .attention-link.action-feed-item.orange::before { background: var(--orange); box-shadow: 0 0 18px rgba(255, 122, 26, 0.42); }
  .attention-link.action-feed-item.green::before { background: var(--green); box-shadow: 0 0 18px rgba(24, 169, 67, 0.42); }
  .attention-link.action-feed-item.purple::before { background: var(--purple); box-shadow: 0 0 18px rgba(126, 71, 255, 0.42); }
  .attention-link.action-feed-item.cyan::before { background: #22d3ee; box-shadow: 0 0 18px rgba(34, 211, 238, 0.48); }

  .manager-frame:not(.manager-light-theme) .attention-link.action-feed-item {
    border-color: rgba(30, 231, 255, 0.28);
    background:
      linear-gradient(135deg, rgba(3, 12, 26, 0.92), rgba(5, 22, 42, 0.86));
    box-shadow:
      inset 0 0 22px rgba(30, 231, 255, 0.08),
      0 18px 38px rgba(0, 0, 0, 0.26);
  }

  .manager-frame:not(.manager-light-theme) .attention-link.action-feed-item strong {
    color: var(--tron-text);
    text-shadow: 0 0 12px rgba(30, 231, 255, 0.24);
  }

  .manager-frame:not(.manager-light-theme) .attention-link.action-feed-item span {
    color: var(--tron-muted);
  }

  .manager-frame:not(.manager-light-theme) .attention-link.action-feed-item.task-summary {
    border-color: rgba(34, 211, 238, 0.5);
    background:
      linear-gradient(135deg, rgba(4, 27, 49, 0.96), rgba(7, 39, 61, 0.9));
  }

  .manager-frame:not(.manager-light-theme) .attention-link.action-feed-item.task-summary::after {
    color: var(--tron-cyan);
    text-shadow: 0 0 14px rgba(30, 231, 255, 0.42);
  }

  .attention-link:active {
    transform: translateY(1px);
  }

  .attention-link:focus-visible {
    outline: 3px solid rgba(23, 101, 242, 0.24);
    outline-offset: 2px;
  }

  .accordion-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    overflow: hidden;
  }

  .accordion-card summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px;
    cursor: pointer;
    list-style: none;
  }

  .accordion-card summary::-webkit-details-marker {
    display: none;
  }

  .accordion-card summary::after {
    content: "Open +";
    display: grid;
    place-items: center;
    min-width: 68px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef5ff;
    color: var(--blue);
    font-size: 0.74rem;
    font-weight: 950;
    line-height: 1;
    grid-column: 2;
    grid-row: 1;
  }

  .accordion-card[open] summary::after {
    content: "Close ×";
    background: var(--blue);
    color: white;
  }

  .accordion-summary-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .accordion-summary-copy strong,
  .accordion-summary-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .accordion-summary-copy small {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
  }

  .accordion-summary-copy.needs-action small {
    color: #b45309;
  }

  .accordion-summary-copy.needs-action strong::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 999px;
    background: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
    vertical-align: 0.08em;
  }

  .accordion-card summary > .pill,
  .accordion-card summary > em {
    grid-column: 3;
    grid-row: 1;
    margin-right: 0;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .accordion-card .accordion-content {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding: 0 12px 12px;
  }

  .resident-list .accordion-card,
  .manager-list .accordion-card {
    width: 100%;
  }

  .manager-panel span,
  .manager-list span,
  .incident-control-card span {
    color: var(--muted);
    font-size: 13px;
  }

  .manager-list {
    display: grid;
    gap: 10px;
  }

  .manager-list article > div,
  .manager-list .accordion-content > div,
  .incident-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .inventory-list article,
  .sop-list article,
  .reno-project-list article {
    align-content: start;
  }

  .inventory-list article small,
  .sop-list article small,
  .reno-project-list article small,
  .reno-project-list article p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
  }

  .sop-list ol {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 12px;
  }

  .room-builder {
    display: grid;
    gap: 10px;
    border: 1px solid #c8d8ee;
    border-radius: 8px;
    background: white;
    padding: 12px;
  }

  .toggle-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 9px;
    line-height: 1.25;
    width: 100%;
  }

  .toggle-row input {
    flex: 0 0 auto;
    width: 17px;
    min-height: auto;
    accent-color: var(--blue);
  }

  .toggle-row span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .secondary-button,
  .reno-room-list button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--blue);
    font-weight: 850;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .form-actions-three {
    grid-template-columns: 0.8fr 0.8fr 1fr;
  }

  .staff-directory-card .accordion-content {
    gap: 7px;
  }

  .compact-list article {
    gap: 5px;
  }

  .reno-room-list {
    display: grid;
    gap: 8px;
  }

  .reno-room-list article {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 10px;
  }

  .reno-room-tree,
  .reno-room-list details {
    display: grid;
    gap: 7px;
  }

  .reno-room-node,
  .reno-room-list details {
    border: 1px solid #e0e8f4;
    border-radius: 8px;
    background: #fbfdff;
    padding: 8px;
  }

  .reno-room-node summary,
  .reno-room-list summary {
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
    overflow-wrap: anywhere;
  }

  .reno-room-node div,
  .reno-room-list details div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
  }

  .reno-room-node span,
  .reno-room-list details span {
    border-radius: 999px;
    background: #eaf2ff;
    color: var(--blue);
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 850;
  }

  @media (max-width: 360px) {
    .reno-room-list article {
      grid-template-columns: 1fr;
    }

    .reno-room-list button {
      width: 100%;
    }
  }

  .contact-list article > div {
    grid-template-columns: repeat(3, 1fr);
  }

  .qr-preview,
  .qr-sticker-list article {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 12px;
  }

  .asset-qr-list {
    margin-top: 10px;
  }

  .asset-qr-card strong {
    color: var(--ink);
  }

  .qr-preview strong,
  .qr-sticker-list article > strong {
    color: var(--ink);
  }

  .manager-frame:not(.manager-light-theme) .qr-preview strong,
  .manager-frame:not(.manager-light-theme) .qr-sticker-list article > strong {
    color: #07142f;
    text-shadow: none;
  }

  body.manager-desktop-dark .qr-preview,
  body.manager-desktop-dark .qr-sticker-list article,
  .manager-frame:not(.manager-light-theme) .qr-preview,
  .manager-frame:not(.manager-light-theme) .qr-sticker-list article {
    border-color: rgba(117, 167, 230, 0.36);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.94)),
      #ffffff;
    color: #07142f;
    box-shadow: 0 14px 32px rgba(2, 12, 28, 0.2);
  }

  body.manager-desktop-dark .qr-preview strong,
  body.manager-desktop-dark .qr-sticker-list article > strong,
  .manager-frame:not(.manager-light-theme) .qr-preview strong,
  .manager-frame:not(.manager-light-theme) .qr-sticker-list article > strong {
    color: #07142f;
  }

  .asset-scan-card {
    border-color: rgba(12, 189, 219, 0.28);
  }

  .asset-scan-details article {
    display: grid;
    gap: 4px;
  }

  .qr-preview {
    grid-template-columns: 120px 1fr;
    align-items: center;
  }

  .qr-logo-frame,
  .qr-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    object-fit: contain;
    padding: 8px;
  }

  .qr-logo-frame {
    position: relative;
    display: block;
    overflow: hidden;
  }

  .qr-logo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .qr-logo-frame i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 4px solid white;
    border-radius: 10px;
    background:
      url("/assets/signacula-app-icon.png") center / 82% 82% no-repeat,
      white;
    box-shadow: 0 0 0 1px rgba(7, 20, 47, 0.12), 0 8px 18px rgba(7, 20, 47, 0.14);
    pointer-events: none;
  }

  .qr-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 900;
  }

  .qr-open-scanner {
    min-height: 52px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #111827 0%, #1452ff 56%, #16d9f3 100%);
    box-shadow: 0 18px 34px rgba(15, 92, 255, 0.22);
  }

  .qr-scanner-hero {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid rgba(16, 217, 243, 0.28);
    border-radius: 8px;
    background:
      linear-gradient(90deg, rgba(16, 217, 243, 0.1) 1px, transparent 1px),
      linear-gradient(0deg, rgba(16, 217, 243, 0.08) 1px, transparent 1px),
      linear-gradient(135deg, rgba(2, 10, 24, 0.96), rgba(7, 20, 47, 0.9));
    background-size: 32px 32px, 32px 32px, auto;
    color: white;
  }

  .qr-scanner-hero strong {
    font-size: 20px;
    line-height: 1.15;
  }

  .qr-scanner-hero small {
    color: #b8d2ef;
    line-height: 1.45;
  }

  .qr-scanner-mark {
    position: relative;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(34, 211, 238, 0.44);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(23, 37, 84, 0.95), rgba(8, 145, 178, 0.46));
    box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.16), 0 0 22px rgba(34, 211, 238, 0.2);
  }

  .qr-scanner-mark span,
  .qr-scanner-mark i {
    position: absolute;
    inset: 14px;
    border: 2px solid #67e8f9;
    border-radius: 5px;
  }

  .qr-scanner-mark i {
    inset: 24px 10px 10px 24px;
    border-color: #60a5fa;
  }

  .qr-scanner-camera {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 280px;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 8px;
    background:
      radial-gradient(circle at 50% 20%, rgba(16, 217, 243, 0.18), transparent 34%),
      linear-gradient(180deg, #07142f, #020817);
  }

  .qr-scanner-camera::before {
    content: "Camera feed";
    position: absolute;
    color: rgba(226, 240, 255, 0.52);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .qr-scanner-camera video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
  }

  .qr-scanner-frame {
    position: absolute;
    z-index: 2;
    width: min(72%, 260px);
    aspect-ratio: 1;
    border: 1px solid rgba(103, 232, 249, 0.26);
  }

  .qr-scanner-frame span {
    position: absolute;
    width: 42px;
    height: 42px;
    border-color: #22d3ee;
    border-style: solid;
  }

  .qr-scanner-frame span:nth-child(1) {
    top: -2px;
    left: -2px;
    border-width: 4px 0 0 4px;
  }

  .qr-scanner-frame span:nth-child(2) {
    top: -2px;
    right: -2px;
    border-width: 4px 4px 0 0;
  }

  .qr-scanner-frame span:nth-child(3) {
    bottom: -2px;
    left: -2px;
    border-width: 0 0 4px 4px;
  }

  .qr-scanner-frame span:nth-child(4) {
    right: -2px;
    bottom: -2px;
    border-width: 0 4px 4px 0;
  }

  .qr-scanner-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .qr-upload-button input {
    display: none;
  }

  .qr-manual-form {
    margin-top: 0;
  }

  .mini-icon.qr {
    background: linear-gradient(135deg, #0f172a, #0891b2);
  }

  .mini-icon.qr i::before,
  .mini-icon.qr i::after {
    content: "";
    position: absolute;
    border: 2px solid white;
    border-radius: 3px;
  }

  .mini-icon.qr i::before {
    width: 13px;
    height: 13px;
    left: 8px;
    top: 8px;
  }

  .mini-icon.qr i::after {
    width: 10px;
    height: 10px;
    right: 8px;
    bottom: 8px;
    border-color: #67e8f9;
  }

  @media (max-width: 420px) {
    .qr-scanner-actions {
      grid-template-columns: 1fr;
    }
  }

  .qr-preview span,
  .qr-preview small,
  .qr-sticker-list small {
    color: var(--muted);
    font-size: 12px;
    word-break: break-word;
  }

  .manager-frame:not(.manager-light-theme) .qr-preview span,
  .manager-frame:not(.manager-light-theme) .qr-preview small,
  .manager-frame:not(.manager-light-theme) .qr-sticker-list small {
    color: #3d516c;
  }

  body.manager-desktop-dark .qr-preview span,
  body.manager-desktop-dark .qr-preview small,
  body.manager-desktop-dark .qr-sticker-list small {
    color: #3d516c;
  }

  .manager-frame:not(.manager-light-theme) .empty-state {
    border-color: rgba(190, 214, 244, 0.72);
    color: #b8c7db;
  }

  .qr-sticker-list article {
    grid-template-columns: 92px 1fr;
    align-items: start;
  }

  .qr-sticker-list article > strong,
  .qr-sticker-list article > span,
  .qr-sticker-list article > small,
  .qr-sticker-list article > div {
    grid-column: 2;
  }

  .qr-sticker-list .qr-logo-frame,
  .qr-placeholder {
    grid-column: 1;
    grid-row: 1 / span 4;
  }

  .qr-sticker-list article > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .approve-request,
  .reject-request,
  .contact-list a,
  .qr-sticker-list a,
  .qr-sticker-list button,
  .inventory-action,
  .open-sop,
  .select-reno-project,
  .incident-actions a,
  .incident-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
  }

  .contact-list a {
    color: var(--blue);
  }

  .qr-sticker-list a,
  .qr-sticker-list button,
  .inventory-action,
  .inventory-adjust,
  .inventory-save,
  .open-sop,
  .select-reno-project {
    color: var(--blue);
  }

  .inventory-controls {
    display: grid;
    grid-template-columns: 1fr 38px 58px 38px 64px;
    align-items: center;
    gap: 7px;
  }

  .inventory-controls input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 8px;
    text-align: center;
  }

  .inventory-adjust,
  .inventory-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    font-weight: 850;
  }

  @media (max-width: 360px) {
    .inventory-controls {
      grid-template-columns: 1fr 1fr 1fr;
    }

    .inventory-controls .pill {
      grid-column: 1 / -1;
      justify-self: start;
    }

    .inventory-save {
      grid-column: 1 / -1;
    }
  }

  .approve-request,
  .incident-actions button {
    color: white;
    border-color: var(--green);
    background: var(--green);
  }

  .reject-request {
    color: white;
    border-color: var(--red);
    background: var(--red);
  }

  .incident-actions a {
    color: white;
    border-color: #1fa855;
    background: #1fa855;
  }

  .incident-control-card label,
  .package-form label,
  .edit-form label,
  .manager-list label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
  }

  .incident-control-card input,
  .incident-control-card textarea,
  .package-form input,
  .package-form textarea,
  .edit-form input,
  .edit-form select,
  .edit-form textarea,
  .manager-list textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: white;
  }

  .edit-form .toggle-row input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    padding: 0;
  }

  .edit-form textarea {
    resize: vertical;
  }

  .generated-email-link {
    text-decoration: none;
  }

  .scan-card {
    margin-bottom: 14px;
  }

  .edit-staff,
  .edit-task,
  .building-list button {
    justify-self: start;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue);
    background: white;
    padding: 0 14px;
    font-weight: 800;
  }

  .building-list .danger-action-button {
    border-color: rgba(219, 39, 76, 0.28);
    background: #fff1f3;
    color: #b71540;
  }

.task-control-toggle,
.staff-control-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid #c7d8f4;
    border-radius: 50%;
    color: var(--blue);
    background: white;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
  }

.task-control-toggle[aria-expanded="true"],
.staff-control-toggle[aria-expanded="true"] {
  color: var(--red);
  border-color: #ffc8cf;
  background: #fff7f8;
}

.task-inline-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  padding: 0 14px;
  color: #fff;
  background: linear-gradient(180deg, #2b7bff 0%, #1559dd 100%);
  box-shadow: 0 10px 24px rgba(21, 89, 221, 0.18);
  font-size: 13px;
  font-weight: 900;
}

.task-summary-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-inline-add-wide {
  display: flex;
  width: 100%;
  margin: 10px 0;
}

.manager-frame.manager-light-theme .task-inline-add {
  border: 1px solid var(--tenant-primary, var(--blue));
  color: #fff;
  background: linear-gradient(180deg, var(--tenant-primary, var(--blue)) 0%, #0f4bc4 100%);
  box-shadow: 0 10px 24px rgba(21, 89, 221, 0.22);
}

.manager-frame.manager-light-theme .task-add-toggle {
  width: auto;
  min-width: 44px;
  height: 36px;
  justify-self: end;
  border: 1px solid var(--tenant-primary, var(--blue));
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, var(--tenant-primary, var(--blue)) 0%, #0f4bc4 100%);
  box-shadow: 0 10px 22px rgba(21, 89, 221, 0.2);
  padding: 0 12px;
}

.manager-frame.manager-light-theme .task-add-toggle[aria-expanded="true"] {
  border-color: #ffc8cf;
  color: var(--red);
  background: #fff7f8;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.1);
}

.panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

  .contact-form-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid #c7d8f4;
    border-radius: 50%;
    color: var(--blue);
    background: white;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
  }

  .contact-form-toggle[aria-expanded="true"] {
    color: var(--red);
    border-color: #ffc8cf;
    background: #fff7f8;
  }

  .building-control-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid #c7d8f4;
    border-radius: 50%;
    color: var(--blue);
    background: white;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
  }

  .building-control-toggle[aria-expanded="true"] {
    color: var(--red);
    border-color: #ffc8cf;
    background: #fff7f8;
  }

.collapsed-task-control,
.collapsed-staff-control,
.collapsed-desktop-staff-control,
.collapsed-contact-form,
.collapsed-building-control {
  display: none;
}

.task-time-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-time-tools label:last-child {
  grid-column: 1 / -1;
}

.time-window-pickers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-time-tools label,
.time-window-pickers label {
  min-width: 0;
}

.task-time-tools input,
.task-time-tools select,
.time-window-pickers input,
.time-window-pickers select {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

@media (max-width: 640px) {
  .task-time-tools,
  .time-window-pickers {
    grid-template-columns: 1fr;
  }

  .task-time-tools label:last-child {
    grid-column: auto;
  }
}

.building-hours-tools label:last-child {
  grid-column: auto;
}

.rota-entry-form {
  margin-top: 10px;
}

  .building-control-panel {
    display: grid;
    gap: 10px;
  }

  .building-portfolio-accordion {
    margin-bottom: 12px;
  }

  .building-portfolio-accordion .accordion-content > small {
    color: var(--muted);
    font-size: 13px;
  }

  .contact-search {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
  }

  .contact-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: white;
  }

  .profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
  }

  .profile-stats article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 12px;
  }

  .profile-stats strong {
    display: block;
    font-size: 25px;
  }

  .profile-stats span,
  .profile-section p,
  .profile-section li {
    color: var(--muted);
    font-size: 13px;
  }

  .inventory-stats {
    margin-bottom: 14px;
  }

  .reno-hero {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
    border: 1px solid #bdd2f4;
    border-radius: 8px;
    background: linear-gradient(135deg, #f7fbff 0%, #eef6f2 100%);
    padding: 14px;
  }

  .reno-hero strong {
    font-size: 22px;
  }

  .reno-hero span {
    color: var(--muted);
    font-size: 13px;
  }

  .manager-reno-hero {
    background: linear-gradient(135deg, #f9fbff 0%, #f1f8ee 100%);
  }

  .check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
  }

  .check-grid legend {
    padding: 0 4px;
    font-size: 13px;
    font-weight: 850;
  }

  .check-grid label {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    font-size: 12px;
    font-weight: 750;
  }

  .check-grid input {
    width: 16px;
    min-height: auto;
    accent-color: var(--blue);
  }

  .profile-section ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 18px;
  }

  .incident-control-card textarea,
  .package-form textarea {
    min-height: 84px;
    padding-top: 10px;
    resize: vertical;
  }

  .package-signature-label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
  }

  .package-signature-input,
  .package-signature-display {
    min-height: 54px;
    border: 1px solid rgba(14, 76, 139, 0.22);
    border-radius: 10px;
    background:
      linear-gradient(135deg, rgba(247, 251, 255, 0.98), rgba(231, 242, 255, 0.82)),
      #fbfdff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
    padding: 14px 12px;
    font-family: "Brush Script MT", "Segoe Script", cursive;
    font-size: 20px;
  }

  .package-signature-display {
    display: flex;
    align-items: center;
    color: #16324f;
  }

  .signature-capture-control {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 12px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.88));
    box-shadow: 0 10px 24px rgba(7, 20, 47, 0.06);
  }

  .signature-capture-control[open] {
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: 0 16px 36px rgba(9, 33, 67, 0.12);
  }

  .signature-capture-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    cursor: pointer;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
    list-style: none;
  }

  .signature-capture-summary::-webkit-details-marker {
    display: none;
  }

  .signature-capture-summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f0f8ff, #dff7ff);
    color: #0d57d9;
    font-size: 18px;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
  }

  .signature-capture-control[open] .signature-capture-summary::after {
    content: "-";
  }

  .signature-state {
    margin-left: auto;
    border-radius: 999px;
    background: #fff3e5;
    color: #9a3412;
    padding: 5px 9px;
    font-size: 11px;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .signature-state:where(:not(:empty)) {
    white-space: nowrap;
  }

  .signature-capture-summary .signature-state:first-letter {
    text-transform: uppercase;
  }

  .signature-capture-control .signature-state {
    border: 1px solid rgba(194, 65, 12, 0.18);
  }

  .signature-capture-control .signature-state.captured {
    background: #ecfdf5;
    color: #047857;
    border-color: rgba(4, 120, 87, 0.2);
  }

  .signature-capture-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .signature-preview {
    min-height: 72px;
    border: 1px dashed rgba(72, 105, 143, 0.42);
    border-radius: 10px;
    background:
      linear-gradient(transparent 70%, rgba(21, 67, 115, 0.1) 71%, transparent 72%),
      linear-gradient(135deg, #ffffff, #f3f8ff);
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 10px;
    color: #5d718b;
  }

  .signature-preview img,
  .package-signature-display img {
    max-width: 100%;
    max-height: 96px;
    object-fit: contain;
  }

  .package-signature-display {
    gap: 10px;
    flex-wrap: wrap;
  }

  .package-signature-display small {
    display: block;
    width: 100%;
    color: var(--muted);
    font-family: var(--font);
    font-size: 12px;
  }

  .manager-dark .signature-capture-control,
  body.dark-mode .signature-capture-control,
  .manager-frame:not(.manager-light-theme) .signature-capture-control {
    border-color: rgba(34, 211, 238, 0.44);
    background:
      linear-gradient(145deg, rgba(8, 25, 46, 0.96), rgba(2, 10, 22, 0.94));
    box-shadow:
      inset 0 1px 0 rgba(150, 236, 255, 0.12),
      0 0 24px rgba(34, 211, 238, 0.08);
  }

  .manager-dark .signature-capture-summary,
  body.dark-mode .signature-capture-summary,
  .manager-frame:not(.manager-light-theme) .signature-capture-summary,
  .manager-dark .package-signature-label,
  body.dark-mode .package-signature-label,
  .manager-frame:not(.manager-light-theme) .package-signature-label {
    color: #e9fbff;
  }

  .manager-dark .package-signature-input,
  body.dark-mode .package-signature-input,
  .manager-frame:not(.manager-light-theme) .package-signature-input,
  .manager-dark .package-signature-display,
  body.dark-mode .package-signature-display,
  .manager-frame:not(.manager-light-theme) .package-signature-display,
  .manager-dark .signature-preview,
  body.dark-mode .signature-preview,
  .manager-frame:not(.manager-light-theme) .signature-preview {
    border-color: rgba(106, 229, 255, 0.46);
    background:
      linear-gradient(transparent 70%, rgba(21, 67, 115, 0.12) 71%, transparent 72%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(234, 245, 255, 0.94));
    color: #07142f;
  }

  body.manager-desktop-dark .package-signature-input,
  body.manager-desktop-dark .package-signature-display,
  body.manager-desktop-dark .signature-preview,
  body.manager-desktop-dark .signature-preview strong,
  body.manager-desktop-dark .signature-preview span,
  body.manager-desktop-dark .signature-preview small {
    color: #07142f;
  }

  body.manager-desktop-dark .package-signature-display small {
    color: #40516a;
  }

  .manager-frame:not(.manager-light-theme) .signature-capture-summary::after {
    background: linear-gradient(135deg, rgba(33, 223, 246, 0.96), rgba(61, 139, 255, 0.9));
    color: #03101f;
    box-shadow: 0 0 18px rgba(33, 223, 246, 0.28);
  }

  .manager-frame:not(.manager-light-theme) .signature-state {
    background: rgba(251, 146, 60, 0.14);
    border-color: rgba(251, 146, 60, 0.34);
    color: #fed7aa;
  }

  .manager-frame:not(.manager-light-theme) .signature-state.captured {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.36);
    color: #a7f3d0;
  }

  .signature-modal-card {
    width: min(720px, calc(100vw - 24px));
    padding: 18px;
    display: grid;
    gap: 14px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.95));
    box-shadow: 0 30px 80px rgba(2, 8, 23, 0.28);
  }

  .signature-modal-card label {
    display: grid;
    gap: 7px;
    font-weight: 800;
    color: var(--ink);
  }

  .signature-modal-card input {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    font: inherit;
  }

  #signature-canvas {
    width: 100%;
    height: min(260px, 42vh);
    border: 1px solid rgba(14, 76, 139, 0.28);
    border-radius: 14px;
    background:
      radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.1), transparent 30%),
      linear-gradient(transparent 78%, rgba(15, 47, 85, 0.16) 79%, transparent 80%),
      #fff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.94),
      inset 0 -18px 30px rgba(37, 99, 235, 0.04);
    touch-action: none;
  }

  #signature-modal-meta {
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 10px;
    background: rgba(239, 246, 255, 0.74);
    color: #52667f;
    padding: 10px 12px;
  }

  .custody-overdue-note {
    display: inline-flex;
    width: fit-content;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 999px;
    background: #fff1f2;
    color: #b91c1c;
    padding: 5px 10px;
    font-weight: 900;
  }

  .custody-reminder-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border: 1px solid #ffd2d6;
    border-radius: 8px;
    background: #fff7f8;
    padding: 9px;
  }

  .custody-reminder-actions small {
    flex: 1 1 160px;
    color: #9f1239;
    font-weight: 900;
  }

  .custody-reminder-actions button {
    min-height: 34px;
    border: 1px solid #ffc0c8;
    border-radius: 999px;
    background: white;
    color: #b91c1c;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
  }

  .package-collect-button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: white;
    font-weight: 900;
  }

  .package-action-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
  }

  .contract-repository-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .contract-repository-actions small {
    color: var(--muted);
  }

  .expected-delivery-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .expected-delivery-summary span {
    display: grid;
    gap: 2px;
    border: 1px solid #dce8f8;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--muted);
    padding: 9px;
    font-size: 12px;
    line-height: 1.35;
  }

  .expected-delivery-summary strong {
    color: var(--ink);
    font-size: 11px;
    text-transform: uppercase;
  }

  .expected-delivery-summary .wide {
    grid-column: 1 / -1;
  }

  .delivery-quick-action {
    min-height: 42px;
    border: 1px solid #b9d1ff;
    border-radius: 8px;
    background: #eef5ff;
    color: var(--blue);
    font-weight: 900;
  }

  .package-related-request {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    background: #eef5ff;
    color: var(--blue);
    padding: 4px 8px;
    font-weight: 800;
  }

  .package-reminder-button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: white;
    font-weight: 900;
  }

  .job-list {
    display: grid;
    gap: 10px;
  }

  .job-list article {
    display: grid;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
  }

  .job-list span {
    color: var(--muted);
    font-size: 13px;
  }

  .job-list em {
    justify-self: start;
  }

  .phone-list .incident-row {
    grid-template-columns: 54px 1fr;
    padding: 10px 0;
  }

  .phone-list .thumb {
    width: 54px;
    height: 46px;
  }

  .phone-list .pill,
  .phone-list .incident-status {
    display: none;
  }

  .segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f2f5fa;
    padding: 2px;
  }

  .segmented button {
    border: 0;
    border-radius: 5px;
    background: transparent;
    padding: 8px;
    font-size: 12px;
  }

  .segmented .active {
    color: white;
    background: var(--blue);
  }

  .role-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .resident-brand-card,
  .resident-alert,
  .resident-section {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
    margin-bottom: 12px;
  }

  .resident-frame#resident-dashboard-phone {
    background: #eef4f8;
  }

  .resident-frame#resident-dashboard-phone .phone-body {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0), #f4f8fb 260px),
      #f4f8fb;
  }

  .resident-brand-card {
    grid-template-columns: auto 1fr;
    align-items: center;
    position: relative;
    min-height: 128px;
    overflow: hidden;
    border: 0;
    color: white;
    background:
      linear-gradient(90deg, rgba(7, 27, 52, 0.86), rgba(7, 27, 52, 0.38)),
      url("assets/royal-mile-high-street.jpg") center / cover;
    box-shadow: 0 16px 30px rgba(20, 39, 66, 0.18);
  }

  .resident-brand-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.34);
  }

  .resident-brand-card > * {
    position: relative;
    z-index: 1;
  }

  .resident-brand-card strong {
    color: white;
    font-size: 20px;
  }

  .resident-brand-card span {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
  }

  .resident-brand-card .building-logo {
    border-color: rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.18);
    color: white;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
  }

  .resident-home-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
  }

  .resident-home-actions button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    border: 1px solid #d5e2f1;
    border-radius: 8px;
    background: white;
    color: #17304f;
    padding: 10px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(20, 39, 66, 0.08);
  }

  .resident-home-actions button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 280px);
  }

  .resident-home-actions button span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef5ff;
    color: var(--blue);
    font-size: 18px;
    font-weight: 950;
  }

  .resident-home-actions button:nth-child(2) span {
    background: #f4fbf1;
    color: var(--green);
  }

  .resident-home-actions button strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    justify-self: center;
    text-align: center;
    font-size: 14px;
  }

  .resident-progress-panel {
    display: grid;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid rgba(44, 112, 201, 0.2);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 246, 255, 0.94)),
      radial-gradient(circle at 18% 10%, rgba(37, 99, 235, 0.18), transparent 32%);
    box-shadow: 0 14px 28px rgba(20, 39, 66, 0.1);
  }

  .resident-progress-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .resident-progress-head div {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .resident-progress-head span,
  .resident-progress-meter span,
  .resident-achievement-grid small {
    color: #60718c;
    font-size: 12px;
    font-weight: 800;
  }

  .resident-progress-head strong {
    color: #102343;
    font-size: 20px;
    line-height: 1;
  }

  .resident-progress-action {
    max-width: 152px;
    border: 0;
    border-radius: 8px;
    background: #123a6b;
    color: white;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    box-shadow: 0 10px 20px rgba(18, 58, 107, 0.22);
  }

  .resident-progress-action.attention {
    background: #b45309;
  }

  .resident-progress-action.complete {
    background: var(--green);
  }

  .resident-progress-meter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .resident-progress-meter article {
    display: grid;
    gap: 7px;
    min-width: 0;
    border: 1px solid rgba(173, 196, 226, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    padding: 10px;
  }

  .resident-newsletter-teaser {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.96)),
      radial-gradient(circle at 8% 0%, rgba(31, 215, 255, 0.16), transparent 34%);
    box-shadow: 0 12px 26px rgba(15, 42, 82, 0.1);
  }

  .resident-newsletter-teaser.no-image {
    grid-template-columns: minmax(0, 1fr);
  }

  .resident-newsletter-teaser .resident-newsletter-image {
    width: 82px;
    height: 70px;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #0b1d39;
    color: #1fd7ff;
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 950;
    box-shadow: inset 0 0 0 1px rgba(31, 215, 255, 0.24);
  }

  .resident-newsletter-teaser .resident-newsletter-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .resident-newsletter-teaser > div {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .resident-newsletter-teaser small {
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
  }

  .resident-newsletter-teaser h3 {
    color: #071834;
    font-size: 16px;
    line-height: 1.15;
    margin: 0;
  }

  .resident-newsletter-teaser p {
    color: #53647d;
    font-size: 13px;
    line-height: 1.25;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .resident-newsletter-teaser .link-button {
    justify-self: start;
    padding: 0;
    min-height: 0;
  }

  .resident-today-panel {
    display: grid;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.96)),
      radial-gradient(circle at 100% 0%, rgba(31, 215, 255, 0.14), transparent 34%);
    box-shadow: 0 14px 28px rgba(15, 42, 82, 0.1);
  }

  .resident-today-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .resident-today-header div {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .resident-today-header span {
    color: #1765f2;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .resident-today-header strong {
    color: #071834;
    font-size: 17px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .resident-today-header time {
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    background: #eef5ff;
    color: #123a6b;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 950;
  }

  .resident-today-panel .resident-today-header time {
    display: none;
  }

  .resident-page[data-resident-page="overview"] .resident-announcement {
    order: -10;
  }

  .resident-today-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .resident-today-grid article {
    display: grid;
    gap: 5px;
    min-width: 0;
    min-height: 82px;
    border: 1px solid rgba(173, 196, 226, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    padding: 10px;
  }

  .resident-weather-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 11px;
  }

  .resident-weather-card .resident-metric-heading {
    display: contents;
  }

  .resident-weather-card .resident-weather-icon {
    grid-row: 1 / span 3;
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-color: rgba(37, 99, 235, 0.26);
    background:
      radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.95), transparent 30%),
      linear-gradient(135deg, rgba(219, 234, 254, 0.98), rgba(255, 255, 255, 0.9));
  }

  .resident-weather-card #resident-weather-summary {
    font-size: 25px;
    line-height: 1;
  }

  .resident-weather-card #resident-weather-meta {
    font-size: 11px;
  }

  .resident-metric-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
  }

  .resident-today-icon {
    position: relative;
    display: inline-grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.86));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
  }

  .resident-weather-icon,
  .resident-moon-icon {
    background-position: center;
    background-repeat: no-repeat;
    background-size: 80% 80%;
  }

  .resident-weather-icon[data-icon="sun"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cg stroke-linecap='round'%3E%3Cg stroke='%23ffb21c' stroke-width='5'%3E%3Cpath d='M48 8v12M48 76v12M8 48h12M76 48h12'/%3E%3C/g%3E%3Cg stroke='%23ffd36a' stroke-width='4'%3E%3Cpath d='M20.5 20.5l8.6 8.6M66.9 66.9l8.6 8.6M75.5 20.5l-8.6 8.6M29.1 66.9l-8.6 8.6'/%3E%3C/g%3E%3Cg stroke='%23ff9f1c' stroke-width='3' opacity='.9'%3E%3Cpath d='M34 12l3.5 9M62 12l-3.5 9M34 84l3.5-9M62 84l-3.5-9M12 34l9 3.5M84 34l-9 3.5M12 62l9-3.5M84 62l-9-3.5'/%3E%3C/g%3E%3C/g%3E%3Ccircle cx='48' cy='48' r='20' fill='%23ffb21c'/%3E%3Ccircle cx='41' cy='40' r='5' fill='%23fff7c8' opacity='.85'/%3E%3C/svg%3E");
  }

  .resident-weather-icon[data-icon="cloud"],
  .resident-weather-icon[data-icon="pending"],
  .resident-weather-icon[data-icon="forecast"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cpath d='M27 68h42c10.5 0 19-8.1 19-18.2 0-9.9-8.1-18-18-18-2.1 0-4.1.3-6 1C59.9 24.2 51.2 18 41 18c-13.8 0-25 11.2-25 25v.6C8.6 46.2 4 52.7 4 60.2 4 68.8 11.4 76 20.5 76H69' fill='none' stroke='%230b1b34' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M26 67h44c9 0 16-7 16-16s-7-16-16-16c-3 0-6 .8-8.4 2.3C58.3 27.1 50.1 21 40 21c-12.7 0-23 10.3-23 23 0 1.5.1 3 .4 4.4C9.9 49.8 5 56 5 63c0 7.7 6.3 14 14 14h51' fill='none' stroke='%2323d6ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .resident-weather-icon[data-icon="rain"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cpath d='M27 58h42c10.5 0 19-8.1 19-18.2 0-9.9-8.1-18-18-18-2.1 0-4.1.3-6 1C59.9 14.2 51.2 8 41 8c-13.8 0-25 11.2-25 25v.6C8.6 36.2 4 42.7 4 50.2 4 58.8 11.4 66 20.5 66H69' fill='none' stroke='%230b1b34' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M26 57h44c9 0 16-7 16-16s-7-16-16-16c-3 0-6 .8-8.4 2.3C58.3 17.1 50.1 11 40 11c-12.7 0-23 10.3-23 23 0 1.5.1 3 .4 4.4C9.9 39.8 5 46 5 53c0 7.7 6.3 14 14 14h51' fill='none' stroke='%2323d6ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cg stroke='%231765f2' stroke-width='7' stroke-linecap='round'%3E%3Cpath d='M31 70l-6 12M49 70l-6 12M67 70l-6 12'/%3E%3C/g%3E%3C/svg%3E");
  }

  .resident-weather-icon[data-icon="storm"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cpath d='M27 58h42c10.5 0 19-8.1 19-18.2 0-9.9-8.1-18-18-18-2.1 0-4.1.3-6 1C59.9 14.2 51.2 8 41 8c-13.8 0-25 11.2-25 25v.6C8.6 36.2 4 42.7 4 50.2 4 58.8 11.4 66 20.5 66H69' fill='none' stroke='%230b1b34' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M26 57h44c9 0 16-7 16-16s-7-16-16-16c-3 0-6 .8-8.4 2.3C58.3 17.1 50.1 11 40 11c-12.7 0-23 10.3-23 23 0 1.5.1 3 .4 4.4C9.9 39.8 5 46 5 53c0 7.7 6.3 14 14 14h51' fill='none' stroke='%2323d6ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M47 62h15L51 82h16L43 92l8-19H38z' fill='%23ffb21c' stroke='%23fff7c8' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .resident-weather-icon[data-icon="snow"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cpath d='M27 58h42c10.5 0 19-8.1 19-18.2 0-9.9-8.1-18-18-18-2.1 0-4.1.3-6 1C59.9 14.2 51.2 8 41 8c-13.8 0-25 11.2-25 25v.6C8.6 36.2 4 42.7 4 50.2 4 58.8 11.4 66 20.5 66H69' fill='none' stroke='%230b1b34' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M26 57h44c9 0 16-7 16-16s-7-16-16-16c-3 0-6 .8-8.4 2.3C58.3 17.1 50.1 11 40 11c-12.7 0-23 10.3-23 23 0 1.5.1 3 .4 4.4C9.9 39.8 5 46 5 53c0 7.7 6.3 14 14 14h51' fill='none' stroke='%2323d6ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cg fill='%2360a5fa'%3E%3Ccircle cx='29' cy='77' r='4'/%3E%3Ccircle cx='48' cy='82' r='4'/%3E%3Ccircle cx='67' cy='76' r='4'/%3E%3C/g%3E%3C/svg%3E");
  }

  .resident-weather-icon[data-icon="mist"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M20 36h56M10 51h62M24 66h58' stroke='%230b1b34' stroke-width='8'/%3E%3Cpath d='M20 36h56M10 51h62M24 66h58' stroke='%2323d6ff' stroke-width='3'/%3E%3Cpath d='M30 24h34M34 78h28' stroke='%238fb2da' stroke-width='5' opacity='.8'/%3E%3C/g%3E%3C/svg%3E");
  }

  .resident-moon-icon[data-icon="full-moon"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Ccircle cx='48' cy='48' r='29' fill='%23f8fbff' stroke='%230b1b34' stroke-width='6'/%3E%3Ccircle cx='36' cy='40' r='4' fill='%2394a3b8' opacity='.7'/%3E%3Ccircle cx='55' cy='57' r='6' fill='%2394a3b8' opacity='.55'/%3E%3Cpath d='M58 28c7 3 11 9 13 17' fill='none' stroke='%2323d6ff' stroke-width='3' stroke-linecap='round' opacity='.65'/%3E%3C/svg%3E");
  }

  .resident-moon-icon[data-icon="first-quarter"],
  .resident-moon-icon[data-icon="last-quarter"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Ccircle cx='48' cy='48' r='29' fill='%230b1b34' stroke='%230b1b34' stroke-width='6'/%3E%3Cpath d='M48 19a29 29 0 0 1 0 58z' fill='%23f8fbff'/%3E%3Cpath d='M58 28c7 3 11 9 13 17' fill='none' stroke='%2323d6ff' stroke-width='3' stroke-linecap='round' opacity='.65'/%3E%3C/svg%3E");
  }

  .resident-moon-icon[data-icon="new-moon"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Ccircle cx='48' cy='48' r='29' fill='%230b1b34' stroke='%23f8fbff' stroke-width='5'/%3E%3Cpath d='M31 29c8-7 21-10 34-2' fill='none' stroke='%2323d6ff' stroke-width='3' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E");
  }

  .resident-moon-icon[data-icon="waxing-crescent"],
  .resident-moon-icon[data-icon="waning-crescent"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Ccircle cx='48' cy='48' r='29' fill='%23f8fbff' stroke='%230b1b34' stroke-width='6'/%3E%3Ccircle cx='60' cy='48' r='29' fill='%230b1b34'/%3E%3Cpath d='M36 24c-11 9-15 28-4 42' fill='none' stroke='%2323d6ff' stroke-width='3' stroke-linecap='round' opacity='.75'/%3E%3C/svg%3E");
  }

  .resident-moon-icon[data-icon="waxing-gibbous"],
  .resident-moon-icon[data-icon="waning-gibbous"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'%3E%3Ccircle cx='48' cy='48' r='29' fill='%23f8fbff' stroke='%230b1b34' stroke-width='6'/%3E%3Ccircle cx='33' cy='48' r='18' fill='%230b1b34' opacity='.95'/%3E%3Cpath d='M58 28c7 3 11 9 13 17' fill='none' stroke='%2323d6ff' stroke-width='3' stroke-linecap='round' opacity='.65'/%3E%3C/svg%3E");
  }

  .resident-today-grid span {
    color: #60718c;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .resident-today-grid strong {
    color: #102343;
    font-size: 15px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .resident-today-grid small {
    color: #53647d;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .resident-home-feed,
  .resident-notification-list,
  .resident-useful-info,
  .resident-preference-grid {
    display: grid;
    gap: 8px;
  }

  .resident-notification-digest {
    background:
      linear-gradient(135deg, #f8fbff, #ffffff),
      radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.12), transparent 34%);
  }

  .resident-notification-panel {
    display: grid;
    gap: 10px;
  }

  .resident-notification-panel summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    cursor: pointer;
    list-style: none;
  }

  .resident-notification-panel summary::-webkit-details-marker {
    display: none;
  }

  .resident-notification-panel summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #edf5ff;
    color: #102343;
    font-size: 15px;
    font-weight: 900;
  }

  .resident-notification-panel[open] summary::after {
    content: "−";
  }

  .resident-notification-panel summary strong {
    color: #102343;
    font-size: 15px;
    min-width: 0;
  }

  .resident-notification-list button {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid #d8e5f5;
    border-radius: 8px;
    background: #ffffff;
    color: #102343;
    padding: 9px 10px;
    text-align: left;
  }

  .resident-notification-list button.read,
  .resident-notification-list button:disabled {
    opacity: 0.78;
    cursor: default;
  }

  .resident-notification-list button.read > span[aria-hidden="true"],
  .resident-notification-list button:disabled > span[aria-hidden="true"] {
    background: #eef7ed;
    color: #14813d;
  }

  .resident-notification-list button > span[aria-hidden="true"] {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #eaf2ff;
    color: var(--blue);
    font-size: 18px;
    line-height: 1;
  }

  .resident-notification-list button strong {
    overflow-wrap: anywhere;
    color: #102343;
    font-size: 13px;
    line-height: 1.25;
    white-space: normal;
  }

  .resident-notification-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .resident-notification-copy small {
    color: #5b6b82;
    font-size: 12px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .resident-feed-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    border: 1px solid #d8e5f5;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f7fbff);
    color: #102343;
    padding: 10px;
    text-align: left;
    box-shadow: 0 10px 20px rgba(20, 39, 66, 0.07);
  }

  .resident-feed-item > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eef5ff;
    color: var(--blue);
    font-weight: 950;
  }

  .resident-feed-item.attention > span {
    background: #fff7ed;
    color: #b45309;
  }

  .resident-feed-item.complete > span {
    background: #ecfdf5;
    color: #15803d;
  }

  .resident-feed-item.newsletter > span {
    background: #eef2ff;
    color: #4f46e5;
  }

  .resident-feed-item div {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .resident-feed-item strong,
  .resident-feed-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .resident-feed-item strong {
    font-size: 14px;
  }

  .resident-feed-item small,
  .resident-useful-info span,
  .resident-preference-grid span {
    color: #60718c;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
  }

  .resident-feed-item em {
    color: var(--blue);
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
    text-transform: uppercase;
  }

  .resident-care-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .resident-care-strip span {
    min-width: 0;
    border: 1px solid rgba(173, 196, 226, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: #3f526c;
    padding: 8px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
  }

  .resident-progress-more {
    display: grid;
    gap: 10px;
  }

  .resident-progress-more summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    border: 1px solid rgba(173, 196, 226, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    color: #14284a;
    padding: 9px 11px;
    cursor: pointer;
    list-style: none;
  }

  .resident-progress-more summary::-webkit-details-marker {
    display: none;
  }

  .resident-progress-more summary span {
    color: #14284a;
    font-size: 13px;
    font-weight: 950;
  }

  .resident-progress-more summary strong {
    border-radius: 999px;
    background: #eef5ff;
    color: #1d4ed8;
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1;
  }

  .resident-progress-more summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #eef5ff;
    color: var(--blue);
    font-weight: 950;
  }

  .resident-progress-more[open] summary::after {
    content: "×";
    background: #eaf7ef;
    color: var(--green);
  }

  .resident-progress-more[open] .resident-care-strip {
    margin-top: 10px;
  }

  .resident-feedback-pulse {
    gap: 10px;
    background:
      linear-gradient(135deg, #ffffff, #f4fbff),
      radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.12), transparent 34%);
  }

  .resident-feedback-pulse p {
    margin: 0;
    color: #60718c;
    font-size: 13px;
    font-weight: 800;
  }

  .resident-pulse-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .resident-pulse-actions button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    font-weight: 950;
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.2);
  }

  .resident-pulse-actions button:nth-child(2) {
    background: linear-gradient(135deg, #2563eb, #1fd7ff);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
  }

  .resident-feedback-pulse textarea {
    width: 100%;
    min-height: 64px;
    resize: vertical;
  }

  .resident-feedback-pulse small {
    color: #166534;
    font-size: 12px;
    font-weight: 900;
  }

  .resident-useful-info article,
  .resident-preference-grid article {
    display: grid;
    gap: 4px;
    min-width: 0;
    border: 1px solid #d9e6f6;
    border-radius: 8px;
    background: #fbfdff;
    padding: 10px;
  }

  .resident-useful-info strong,
  .resident-preference-grid strong {
    color: #102343;
    font-size: 13px;
  }

  .resident-preference-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .resident-preference-grid article {
    text-align: center;
  }

  .resident-newsletter-modal-card {
    max-width: 620px;
    color: #071a33;
  }

  .resident-newsletter-modal-card .panel-header,
  .resident-newsletter-modal-card .panel-header h2,
  #resident-newsletter-modal-title {
    color: #071a33;
  }

  .resident-newsletter-modal-card small,
  #resident-newsletter-modal-meta {
    color: #334155;
  }

  .resident-newsletter-modal-card img,
  .resident-newsletter-modal-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
  }

  .resident-newsletter-modal-card p {
    white-space: pre-line;
    color: var(--text);
    line-height: 1.55;
  }

  .inline-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .checkbox-row input {
    width: auto;
  }

  .manager-dark .resident-newsletter-teaser,
  body.dark-mode .resident-newsletter-teaser {
    border-color: rgba(31, 215, 255, 0.34);
    background:
      linear-gradient(135deg, rgba(3, 14, 30, 0.94), rgba(7, 30, 54, 0.9)),
      radial-gradient(circle at 12% 8%, rgba(31, 215, 255, 0.18), transparent 36%);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), inset 0 0 28px rgba(31, 215, 255, 0.05);
  }

  .manager-dark .resident-newsletter-teaser small,
  body.dark-mode .resident-newsletter-teaser small,
  .manager-dark .resident-newsletter-teaser p,
  body.dark-mode .resident-newsletter-teaser p {
    color: rgba(218, 236, 255, 0.78);
  }

  .manager-dark .resident-newsletter-teaser h3,
  body.dark-mode .resident-newsletter-teaser h3 {
    color: #f4fbff;
  }

  .manager-dark .resident-today-panel,
  body.dark-mode .resident-today-panel {
    border-color: rgba(31, 215, 255, 0.34);
    background:
      linear-gradient(135deg, rgba(3, 14, 30, 0.94), rgba(7, 30, 54, 0.9)),
      radial-gradient(circle at 92% 0%, rgba(31, 215, 255, 0.2), transparent 34%);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), inset 0 0 28px rgba(31, 215, 255, 0.05);
  }

  .manager-dark .resident-today-header span,
  body.dark-mode .resident-today-header span {
    color: #6ee7ff;
  }

  .manager-dark .resident-today-header strong,
  body.dark-mode .resident-today-header strong,
  .manager-dark .resident-today-grid strong,
  body.dark-mode .resident-today-grid strong {
    color: #f4fbff;
  }

  .manager-dark .resident-today-header time,
  body.dark-mode .resident-today-header time {
    border-color: rgba(31, 215, 255, 0.28);
    background: rgba(31, 215, 255, 0.14);
    color: #dff9ff;
  }

  .manager-dark .resident-today-grid article,
  body.dark-mode .resident-today-grid article {
    border-color: rgba(31, 215, 255, 0.24);
    background: rgba(4, 20, 38, 0.76);
  }

  .manager-dark .resident-today-grid span,
  body.dark-mode .resident-today-grid span,
  .manager-dark .resident-today-grid small,
  body.dark-mode .resident-today-grid small {
    color: rgba(218, 236, 255, 0.78);
  }

  .manager-dark .resident-feed-item,
  body.dark-mode .resident-feed-item,
  .manager-dark .resident-notification-digest,
  body.dark-mode .resident-notification-digest,
  .manager-dark .resident-notification-list button,
  body.dark-mode .resident-notification-list button,
  .manager-dark .resident-feedback-pulse,
  body.dark-mode .resident-feedback-pulse,
  .manager-dark .resident-useful-info article,
  body.dark-mode .resident-useful-info article,
  .manager-dark .resident-preference-grid article,
  body.dark-mode .resident-preference-grid article {
    border-color: rgba(31, 215, 255, 0.28);
    background: linear-gradient(135deg, rgba(5, 22, 42, 0.96), rgba(6, 31, 54, 0.9));
    color: #f4fbff;
    box-shadow: inset 0 0 22px rgba(31, 215, 255, 0.04);
  }

  .manager-dark .resident-feed-item strong,
  body.dark-mode .resident-feed-item strong,
  .manager-dark .resident-notification-panel summary strong,
  body.dark-mode .resident-notification-panel summary strong,
  .manager-dark .resident-notification-list button strong,
  body.dark-mode .resident-notification-list button strong,
  .manager-dark .resident-useful-info strong,
  body.dark-mode .resident-useful-info strong,
  .manager-dark .resident-preference-grid strong,
  body.dark-mode .resident-preference-grid strong {
    color: #f4fbff;
  }

  .manager-dark .resident-notification-panel summary::after,
  body.dark-mode .resident-notification-panel summary::after {
    background: rgba(31, 215, 255, 0.16);
    color: #1fd7ff;
  }

  .manager-dark .resident-feed-item small,
  body.dark-mode .resident-feed-item small,
  .manager-dark .resident-feedback-pulse p,
  body.dark-mode .resident-feedback-pulse p,
  .manager-dark .resident-useful-info span,
  body.dark-mode .resident-useful-info span,
  .manager-dark .resident-preference-grid span,
  body.dark-mode .resident-preference-grid span {
    color: rgba(218, 236, 255, 0.78);
  }

  .manager-dark .resident-care-strip span,
  body.dark-mode .resident-care-strip span {
    border-color: rgba(31, 215, 255, 0.22);
    background: rgba(4, 20, 38, 0.82);
    color: rgba(218, 236, 255, 0.86);
  }

  .manager-dark .resident-progress-more summary,
  body.dark-mode .resident-progress-more summary {
    border-color: rgba(31, 215, 255, 0.24);
    background: rgba(4, 20, 38, 0.82);
    color: #f4fbff;
  }

  .manager-dark .resident-progress-more summary span,
  body.dark-mode .resident-progress-more summary span {
    color: #f4fbff;
  }

  .manager-dark .resident-notification-list button > span[aria-hidden="true"],
  body.dark-mode .resident-notification-list button > span[aria-hidden="true"] {
    background: rgba(31, 215, 255, 0.14);
    color: #1fd7ff;
  }

  .resident-progress-meter strong {
    color: #0d2a55;
    font-size: 24px;
    line-height: 1;
  }

  .resident-progress-meter i {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #dce8f7;
  }

  .resident-progress-meter article:first-child i::before,
  .resident-progress-meter article:nth-child(2) i::before {
    content: "";
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #22c55e);
  }

  .resident-progress-meter article:first-child i::before {
    width: var(--resident-care-progress, 0%);
  }

  .resident-progress-meter article:nth-child(2) i::before {
    width: var(--resident-task-progress, 0%);
  }

  .resident-achievement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .resident-achievement-grid span {
    display: grid;
    gap: 2px;
    min-width: 0;
    border: 1px solid #d7e3f2;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    padding: 8px;
  }

  .resident-achievement-grid span.active {
    border-color: rgba(34, 197, 94, 0.5);
    background: #f0fbf5;
  }

  .resident-achievement-grid strong {
    overflow: hidden;
    color: #14284a;
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .resident-section-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .resident-panel-toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #bdd2f4;
    border-radius: 999px;
    background: #eef5ff;
    color: var(--blue);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
  }

  .resident-panel-toggle[aria-expanded="true"] {
    background: var(--blue);
    color: white;
  }

  @media (max-width: 430px) {
    .resident-preference-grid {
      grid-template-columns: 1fr;
    }

    .resident-care-strip {
      grid-template-columns: 1fr;
    }

    .resident-feed-item {
      grid-template-columns: 34px minmax(0, 1fr);
    }

    .resident-feed-item em {
      grid-column: 2;
      justify-self: start;
    }
  }

  .building-logo {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border: 1px solid #bdd2f4;
    border-radius: 8px;
    background:
      linear-gradient(135deg, #f8fbff, #eaf2ff);
    color: var(--blue);
    font-weight: 950;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 35, 67, 0.08);
  }

  .building-logo.small {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    font-size: 12px;
  }

  .building-logo img {
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    object-fit: contain;
    border-radius: 6px;
  }

  .portal-building-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .resident-brand-card span,
  .resident-alert span,
  .resident-list span,
  .resident-list small {
    color: var(--muted);
    font-size: 13px;
  }

  #resident-dashboard-phone .resident-brand-card strong {
    color: white;
  }

  #resident-dashboard-phone .resident-brand-card span {
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
  }

  #resident-dashboard-phone .resident-brand-card .building-logo {
    border-color: rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.18);
    color: white;
  }

  .resident-alert {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-color: #ffc8cf;
    background:
      linear-gradient(135deg, #fff8f9, #ffffff 64%);
    box-shadow: 0 12px 24px rgba(184, 0, 24, 0.08);
  }

  .resident-alert strong,
  .resident-alert span {
    grid-column: 1;
  }

  .resident-alert #resident-buzzer {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .resident-section,
  .resident-action-accordion {
    box-shadow: 0 10px 24px rgba(20, 39, 66, 0.07);
  }

  .resident-section h3 {
    margin: 0;
    color: #172b45;
    font-size: 15px;
  }

  .resident-collapsible-section {
    display: block;
    padding: 0;
    overflow: hidden;
  }

  .resident-collapsible-section summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 13px 14px;
    cursor: pointer;
    list-style: none;
  }

  .resident-collapsible-section summary::-webkit-details-marker {
    display: none;
  }

  .resident-collapsible-section summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    grid-column: 2;
    grid-row: 1;
    border: 1px solid #c8d9f2;
    border-radius: 999px;
    color: var(--blue);
    background: #eef5ff;
    font-weight: 950;
    line-height: 1;
  }

  .resident-collapsible-section[open] summary::after {
    content: "−";
    border-color: rgba(23, 101, 242, 0.28);
    color: white;
    background: var(--blue);
  }

  .resident-collapsible-section summary span {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .resident-collapsible-section summary strong {
    color: #172b45;
    font-size: 15px;
  }

  .resident-collapsible-section summary small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
  }

  .resident-collapsible-section summary .pill {
    grid-column: 2;
    grid-row: 1;
    margin-right: 34px;
  }

  .resident-collapsible-section > .resident-news-feed,
  .resident-collapsible-section > .resident-list {
    padding: 0 14px 14px;
  }

  body.dark-mode .resident-collapsible-section summary strong {
    color: #f4fbff;
  }

  body.dark-mode .resident-collapsible-section summary small {
    color: #b9d7e8;
  }

  body.dark-mode .resident-collapsible-section summary::after {
    border-color: rgba(35, 214, 255, 0.3);
    color: #9edff4;
    background: rgba(8, 31, 54, 0.82);
  }

  body.dark-mode .resident-collapsible-section[open] summary::after {
    border-color: rgba(35, 214, 255, 0.42);
    color: #061529;
    background: linear-gradient(135deg, #23d6ff, #1765f2);
  }

  #resident-buzzer {
    position: relative;
    display: grid;
    place-items: center;
    justify-self: center;
    width: 104px;
    height: 104px;
    overflow: visible;
    border: 4px solid #b80018;
    border-radius: 999px;
    background:
      radial-gradient(ellipse at 30% 18%, rgba(255, 235, 238, 0.95) 0 7%, rgba(255, 151, 162, 0.72) 8% 18%, rgba(255, 151, 162, 0) 19%),
      radial-gradient(circle at 50% 46%, #ff4f62 0 38%, #e70e2b 39% 64%, #a90017 100%);
    box-shadow:
      inset 0 10px 16px rgba(255, 255, 255, 0.34),
      inset 0 -12px 18px rgba(80, 0, 10, 0.38),
      0 9px 0 #7f0012,
      0 18px 28px rgba(184, 0, 24, 0.28);
    color: white;
    padding: 0;
    text-shadow: 0 1px 2px rgba(60, 0, 8, 0.45);
  }

  #resident-buzzer::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow:
      inset 0 5px 12px rgba(255, 255, 255, 0.2),
      inset 0 -10px 18px rgba(74, 0, 10, 0.28);
  }

  #resident-buzzer::after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 18px;
    top: 15px;
    width: 42px;
    height: 24px;
    border-radius: 999px 999px 70% 70%;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.18) 58%, rgba(255, 255, 255, 0));
    filter: blur(0.2px);
    transform: rotate(-18deg);
  }

  .buzzer-cap {
    position: absolute;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(120, 126, 136, 0.92);
    border-radius: 999px;
    background:
      radial-gradient(ellipse at 32% 20%, rgba(255, 255, 255, 0.98) 0 13%, rgba(233, 238, 244, 0.82) 14% 28%, rgba(233, 238, 244, 0) 29%),
      radial-gradient(circle at 50% 52%, #f3f6f9 0 24%, #b9c1cb 48%, #68717d 100%);
    box-shadow:
      inset 0 5px 8px rgba(255, 255, 255, 0.72),
      inset 0 -7px 10px rgba(50, 55, 64, 0.42),
      0 4px 0 #5f6670,
      0 9px 14px rgba(60, 0, 10, 0.26);
  }

  .buzzer-cap::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 6px;
    width: 14px;
    height: 7px;
    border-radius: 999px 999px 80% 80%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.2));
    transform: rotate(-22deg);
    filter: blur(0.15px);
  }

  .buzzer-curved-label {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }

  .buzzer-curved-label path {
    fill: none;
  }

  .buzzer-curved-label text {
    fill: white;
    font-size: 17px;
    font-weight: 950;
    letter-spacing: 2px;
    text-shadow:
      0 1px 2px rgba(70, 0, 10, 0.7),
      0 -1px 0 rgba(255, 210, 216, 0.3);
  }

  #resident-buzzer:active,
  #resident-buzzer.buzzer-sent {
    transform: translateY(5px);
    box-shadow:
      inset 0 8px 16px rgba(255, 255, 255, 0.24),
      inset 0 -10px 16px rgba(80, 0, 10, 0.42),
      0 4px 0 #7f0012,
      0 10px 20px rgba(184, 0, 24, 0.24);
  }

  #resident-buzzer:active .buzzer-cap,
  #resident-buzzer.buzzer-sent .buzzer-cap {
    transform: translateY(2px);
    box-shadow:
      inset 0 4px 9px rgba(255, 255, 255, 0.26),
      inset 0 -6px 10px rgba(50, 55, 64, 0.46),
      0 2px 0 #5f6670,
      0 6px 11px rgba(80, 0, 10, 0.22);
  }

  #resident-buzzer-header,
  #resident-requests-buzzer,
  #resident-footer-buzzer,
  #resident-requests-footer-buzzer {
    border: 2px solid #ff9aa5;
    border-radius: 999px;
    background: radial-gradient(circle at 32% 25%, #ff9aa5 0 14%, #ff3348 15% 58%, #b80018 100%);
    box-shadow:
      inset 0 4px 8px rgba(255, 255, 255, 0.28),
      0 4px 0 #7f0012,
      0 8px 14px rgba(184, 0, 24, 0.22);
    color: white;
    font-weight: 900;
  }

  #resident-footer-buzzer,
  #resident-requests-footer-buzzer {
    width: 42px;
    height: 42px;
    justify-self: center;
  }

  .resident-alert .buzzer-sent,
  #resident-buzzer-header.buzzer-sent,
  #resident-requests-buzzer.buzzer-sent,
  #resident-footer-buzzer.buzzer-sent,
  #resident-requests-footer-buzzer.buzzer-sent {
    border-color: #ffc5cb;
    background: radial-gradient(circle at 32% 25%, #ffc5cb 0 14%, #e71932 15% 58%, #9f0017 100%);
    color: white;
  }

  .ticket-sent {
    border-color: #19a43a;
    background: #eaf9ee;
    color: #13802d;
  }

  .resident-renovation-card {
    border-color: #c7d8f4;
    background: #f6fbff;
  }

  .resident-feedback-card {
    border-color: #c9e7dc;
    background: #f7fffb;
  }

  body:not(.dark-mode) .resident-action-accordion summary strong,
  body:not(.dark-mode) .resident-action-accordion summary em,
  body:not(.dark-mode) .resident-section-heading h3,
  body:not(.dark-mode) .resident-section h3 {
    color: #0b1933;
    text-shadow: none;
  }

  body:not(.dark-mode) .resident-action-accordion summary strong {
    font-weight: 950;
  }

  body:not(.dark-mode) .resident-action-accordion summary .pill,
  body:not(.dark-mode) .resident-action-accordion summary em.pill {
    border-color: #c9d8ee;
    background: #eef5ff;
    color: #16437f;
  }

  body:not(.dark-mode) .resident-feedback-card summary .pill,
  body:not(.dark-mode) .resident-feedback-card summary em.pill {
    border-color: #bde5ce;
    background: #eaf9ee;
    color: #126b31;
  }

  .resident-page-tabs {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid #d8e5f5;
    border-radius: 14px;
    background: rgba(248, 251, 255, 0.92);
    padding: 5px;
    margin: 0 0 12px;
    box-shadow: 0 10px 22px rgba(20, 39, 66, 0.08);
    backdrop-filter: blur(12px);
  }

  .resident-page-tabs button {
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #4f627d;
    font-size: 12px;
    font-weight: 900;
  }

  .resident-page-tabs button.active {
    background: linear-gradient(135deg, #1765f2, #23d6ff);
    color: white;
    box-shadow: 0 8px 18px rgba(23, 101, 242, 0.22);
  }

  .resident-page {
    display: none;
    gap: 12px;
  }

  .resident-page.active {
    display: grid;
  }

  body.dark-mode .resident-page-tabs {
    border-color: rgba(35, 214, 255, 0.34);
    background: rgba(2, 17, 34, 0.9);
    box-shadow: 0 0 22px rgba(35, 214, 255, 0.12);
  }

  body.dark-mode .resident-page-tabs button {
    color: #a9d9ee;
  }

  body.dark-mode .resident-page-tabs button.active {
    background: linear-gradient(135deg, #23d6ff, #1765f2);
    color: #061529;
    box-shadow: 0 0 18px rgba(35, 214, 255, 0.34);
  }

  .resident-action-accordion {
    margin-bottom: 12px;
  }

  .resident-action-accordion .accordion-content {
    padding-top: 10px;
  }

  .resident-feedback-confirmation {
    border: 1px solid #bce3ce;
    border-radius: 8px;
    background: #edf9f1;
    color: #157533;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 800;
  }

  .resident-list {
    display: grid;
    gap: 8px;
  }

  .resident-request-search {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    gap: 10px;
    border: 1px solid #dbe6f4;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 10px 24px rgba(17, 32, 56, 0.08);
    backdrop-filter: blur(12px);
  }

  .resident-request-search label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
  }

  .resident-request-search input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    background: #f8fbff;
    padding: 0 13px;
    color: var(--ink);
    font-size: 15px;
  }

  .resident-filter-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .resident-filter-chips button {
    min-height: 42px;
    border: 1px solid #d3deec;
    border-radius: 999px;
    background: #ffffff;
    color: #31517f;
    font-weight: 900;
  }

  .resident-filter-chips button.active {
    border-color: var(--blue);
    color: white;
    background: var(--blue);
    box-shadow: 0 8px 16px rgba(20, 92, 230, 0.18);
  }

  .resident-request-scroll {
    max-height: 54px;
    min-height: 54px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 6px;
    scrollbar-width: thin;
  }

  #resident-requests-phone .resident-request-scroll {
    max-height: 240px;
    min-height: 96px;
  }

  .resident-request-row summary {
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    min-height: 52px;
    padding: 9px 10px;
  }

  .resident-request-row summary::after {
    content: none;
  }

  .resident-request-row summary strong,
  .resident-request-row summary span,
  .resident-request-row summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .resident-request-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef5ff;
    color: var(--blue);
    font-size: 15px;
    font-weight: 950;
  }

  .resident-request-copy {
    display: grid;
    gap: 3px;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .resident-request-copy small {
    color: var(--muted);
    font-size: 12px;
  }

  .resident-request-row summary > em {
    grid-column: 4;
    max-width: 92px;
    margin-right: 0;
  }

  .resident-request-row .accordion-content {
    padding: 8px;
  }

  .resident-delivery-status {
    display: grid;
    gap: 4px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(59, 130, 246, 0.1));
    color: var(--ink);
    padding: 10px;
  }

  .resident-delivery-status strong {
    font-size: 13px;
  }

  .resident-delivery-status span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
  }

  .resident-delivery-status.complete {
    border-color: rgba(37, 99, 235, 0.25);
    background: #eef5ff;
  }

  .resident-list article {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 10px;
  }

  .resident-task-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .resident-task-carousel article {
    min-width: 0;
    scroll-snap-align: start;
  }

  .resident-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding-top: 2px;
  }

  .resident-carousel-dots button {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: #b8c7de;
    padding: 0;
  }

  .resident-carousel-dots button.active {
    width: 20px;
    background: var(--blue);
  }

  .resident-list em {
    justify-self: start;
  }

  .resident-form {
    display: grid;
    gap: 10px;
  }

  .resident-form label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
  }

  .resident-form input,
  .resident-form textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 10px 12px;
  }

  .resident-form input[type="file"] {
    padding: 9px;
    color: var(--muted);
    font-size: 12px;
  }

  .resident-photo-preview {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: center;
    gap: 10px;
    border: 1px solid #c7d8f4;
    border-radius: 8px;
    background: #f6fbff;
    padding: 8px;
  }

  .resident-photo-preview img {
    width: 64px;
    height: 54px;
    border-radius: 6px;
    object-fit: cover;
  }

  .resident-photo-preview .image-preview-trigger {
    width: 64px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    overflow: hidden;
    cursor: zoom-in;
  }

  .resident-photo-preview .image-preview-trigger img {
    width: 64px;
    height: 54px;
  }

  .resident-photo-preview.is-loading {
    opacity: 0.9;
  }

  .resident-photo-placeholder {
    width: 64px;
    height: 54px;
    border-radius: 6px;
    border: 1px dashed #b7c8e7;
    background: linear-gradient(135deg, #eef5ff, #ffffff);
  }

  .resident-photo-preview span {
    color: var(--muted);
    font-size: 12px;
  }

  .action-state-note {
    border-left: 3px solid var(--green);
    background: #f1fbf5;
    color: #0f7a34;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
  }

  .resident-lifecycle {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 4px 0;
  }

  .resident-lifecycle-step {
    display: grid;
    gap: 5px;
    align-content: start;
    min-width: 0;
    border: 1px solid rgba(96, 115, 142, 0.24);
    border-radius: 8px;
    background: rgba(247, 250, 255, 0.92);
    color: #53627a;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
  }

  .resident-lifecycle-step i {
    display: block;
    width: 12px;
    height: 12px;
    margin: 0 auto;
    border: 2px solid currentColor;
    border-radius: 999px;
    background: transparent;
  }

  .resident-lifecycle-step.complete {
    border-color: rgba(23, 168, 68, 0.28);
    background: #f1fbf5;
    color: #0f7a34;
  }

  .resident-lifecycle-step.complete i {
    background: currentColor;
  }

  .resident-lifecycle-step.active {
    border-color: rgba(37, 99, 235, 0.32);
    background: #eef5ff;
    color: #1d55c7;
  }

  .resident-lifecycle-step.attention {
    border-color: rgba(245, 111, 28, 0.35);
    background: #fff4eb;
    color: #b7530f;
  }

  .manager-dark .resident-lifecycle-step,
  body.dark-mode .resident-lifecycle-step {
    border-color: rgba(106, 229, 255, 0.22);
    background: rgba(5, 19, 35, 0.78);
    color: #b8c8dc;
  }

  .manager-dark .resident-lifecycle-step.complete,
  body.dark-mode .resident-lifecycle-step.complete {
    border-color: rgba(40, 220, 120, 0.35);
    background: rgba(14, 72, 45, 0.5);
    color: #8ff5b4;
  }

  .manager-dark .resident-lifecycle-step.active,
  body.dark-mode .resident-lifecycle-step.active {
    border-color: rgba(29, 224, 255, 0.45);
    background: rgba(11, 70, 96, 0.5);
    color: #8ff3ff;
  }

  .manager-dark .resident-lifecycle-step.attention,
  body.dark-mode .resident-lifecycle-step.attention {
    border-color: rgba(255, 168, 74, 0.45);
    background: rgba(94, 54, 10, 0.52);
    color: #ffd08c;
  }

  .phone-date {
    color: var(--muted);
    font-size: 13px;
  }

  .current-shift,
  .upcoming,
  .task-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 12px;
    margin-bottom: 10px;
  }

  .current-shift {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .current-shift button {
    grid-column: 1 / -1;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    color: white;
    background: var(--blue);
    font-weight: 800;
  }

  .upcoming {
    display: flex;
    justify-content: space-between;
  }

  .request-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 14px 0 12px;
  }

  .request-actions button {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: white;
    font-weight: 800;
  }

  .request-actions button.active {
    color: white;
    border-color: var(--blue);
    background: var(--blue);
  }

  .staff-request-form {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
    margin-bottom: 12px;
  }

  .task-card {
    border-top: 1px solid var(--line);
    margin-top: 12px;
  }

  .task-card summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 28px auto;
    gap: 8px;
    align-items: center;
    font-size: 13px;
  }

  .task-state-mark {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 2px solid #c7d8f4;
    border-radius: 50%;
    background: white;
    color: white;
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
  }

  .task-card.complete .task-state-mark {
    border-color: var(--green);
    background: var(--green);
  }

  .task-card summary::after {
    grid-column: 3;
    grid-row: 1;
  }

  .task-mini-timeline {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 10px;
  }

  .task-mini-timeline span {
    display: grid;
    grid-template-columns: 18px minmax(0, 84px) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    color: var(--muted);
    font-size: 12px;
  }

  .task-mini-timeline i {
    width: 10px;
    height: 10px;
    margin-top: 3px;
    border: 2px solid #b9c6d8;
    border-radius: 50%;
    background: white;
  }

  .task-mini-timeline .done i {
    border-color: var(--green);
    background: var(--green);
  }

  .task-mini-timeline strong {
    color: var(--ink);
    font-size: 12px;
  }

  .task-mini-timeline small {
    color: var(--muted);
    line-height: 1.25;
  }

  .task-card summary > em {
    grid-column: 4;
    grid-row: 1;
    margin-right: 0;
  }

  .task-card summary span {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .task-card small,
  .task-card p {
    color: var(--muted);
    font-size: 12px;
  }

  .task-card p {
    margin: 0;
  }

  .task-blocked-reason {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .task-blocked-reason input {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 0 10px;
    color: var(--ink);
  }

  .task-card.blocked {
    border-left: 3px solid #e46800;
    padding-left: 9px;
  }

  .task-card.in-progress {
    border-left: 3px solid var(--blue);
    padding-left: 9px;
  }

  .task-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .task-actions button {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 850;
    box-shadow: 0 8px 16px rgba(15, 37, 68, 0.12);
  }

  .task-actions .task-start {
    background: var(--blue);
  }

  .task-actions .task-block {
    background: var(--orange);
  }

  .task-actions .task-complete {
    background: var(--green);
  }

  .task-actions .task-incomplete {
    background: #44546a;
  }

  .task-actions .task-complete.requires-confirm {
    background: #0b1f3a;
    outline: 2px solid rgba(20, 166, 60, 0.28);
  }

  .task-actions button:disabled {
    color: #7185a3;
    background: #edf4ff;
    box-shadow: none;
  }

  .task-group time {
    color: var(--muted);
  }

  .task-group.collapsed {
    display: grid;
    gap: 4px;
  }

  .form-phone label {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 800;
  }

  .form-phone select,
  .form-phone input[type="file"],
  .form-phone textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    font-weight: 500;
  }

  .incident-photo-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .form-phone textarea {
    min-height: 86px;
    resize: vertical;
  }

  .phone-wide-action {
    margin: 0 0 14px;
    width: 100%;
  }

  .mobile-form-accordion {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
  }

  .mobile-form-accordion summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    list-style: none;
    padding: 14px;
  }

  .mobile-form-accordion summary::-webkit-details-marker {
    display: none;
  }

  .mobile-form-accordion summary::after {
    color: var(--blue);
    content: "+";
    flex: 0 0 auto;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
  }

  .mobile-form-accordion[open] summary::after {
    content: "×";
  }

  .mobile-form-accordion summary strong,
  .mobile-form-accordion summary span {
    display: block;
  }

  .mobile-form-accordion summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
  }

  .mobile-form-panel {
    border-top: 1px solid var(--line);
    padding: 14px;
  }

  .severity-slider {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdff;
    padding: 12px;
  }

  .severity-slider input[type="range"] {
    width: 100%;
    accent-color: var(--orange);
  }

  .severity-scale {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
  }

  #incident-severity-label {
    justify-self: center;
    border-radius: 999px;
    background: #fff4e8;
    color: #c75b00;
    padding: 5px 10px;
    font-size: 12px;
  }

  .photo-upload {
    display: flex;
    gap: 10px;
  }

  .photo {
    width: 82px;
    height: 74px;
    border-radius: 7px;
    background-size: cover;
  }

  .photo-upload button {
    width: 82px;
    border: 1px dashed #b9c6d8;
    border-radius: 7px;
    color: #31517f;
    background: #fbfdff;
  }

  .phone-frame footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    align-items: center;
    border-top: 1px solid var(--line);
    background: white;
    padding: 8px 4px calc(10px + env(safe-area-inset-bottom));
  }

  .manager-footer {
    grid-template-columns: repeat(5, 1fr) !important;
  }

  .phone-frame footer button {
    height: 36px;
    border: 0;
    color: #5a6a86;
    background: transparent;
  }

  .phone-frame footer .active {
    color: var(--blue);
  }

  .resident-frame footer #resident-footer-buzzer,
  .resident-frame footer #resident-requests-footer-buzzer {
    width: 42px;
    height: 42px;
    justify-self: center;
    border: 2px solid #ff9aa5;
    border-radius: 999px;
    color: white;
    background: radial-gradient(circle at 32% 25%, #ff9aa5 0 14%, #ff3348 15% 58%, #b80018 100%);
    box-shadow:
      inset 0 4px 8px rgba(255, 255, 255, 0.28),
      0 4px 0 #7f0012,
      0 8px 14px rgba(184, 0, 24, 0.22);
    font-weight: 900;
  }

  .resident-frame footer #resident-footer-buzzer.buzzer-sent,
  .resident-frame footer #resident-requests-footer-buzzer.buzzer-sent {
    border-color: #ffc5cb;
    color: white;
    background: radial-gradient(circle at 32% 25%, #ffc5cb 0 14%, #e71932 15% 58%, #9f0017 100%);
  }

}

.tenant-signup-page {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tenant-signup-body {
  height: auto;
  min-height: 100%;
  margin: 0;
  color: #071426;
  background:
    radial-gradient(circle at 20% 16%, rgba(34, 211, 238, 0.24), transparent 28%),
    radial-gradient(circle at 78% 24%, rgba(37, 99, 235, 0.22), transparent 30%),
    linear-gradient(115deg, rgba(3, 9, 19, 0.68), rgba(8, 36, 61, 0.42)),
    url("/assets/royal-mile-high-street.jpg") center / cover fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: visible;
}

.tenant-signup-body .hidden {
  display: none;
}

.welcome-page,
.welcome-body {
  min-height: 100%;
}

.welcome-body {
  margin: 0;
  color: #071426;
  background: #f4f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.welcome-shell {
  min-height: 100dvh;
  padding: clamp(16px, 3vw, 34px);
  background:
    linear-gradient(90deg, rgba(246, 249, 253, 0.96) 0%, rgba(246, 249, 253, 0.82) 42%, rgba(246, 249, 253, 0.46) 100%),
    url("/assets/signacula-lobby-welcome.jpg") center / cover no-repeat;
}

.welcome-hero {
  display: grid;
  align-content: start;
  gap: clamp(18px, 3vw, 30px);
  width: min(1120px, 100%);
  min-height: calc(100dvh - clamp(32px, 6vw, 68px));
  margin: 0 auto;
}

.welcome-nav {
  justify-self: end;
  display: inline-flex;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(16px);
}

.welcome-nav a {
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
}

.welcome-nav a:hover {
  color: #071426;
  background: #eff6ff;
}

.welcome-copy {
  display: grid;
  gap: 12px;
  max-width: 640px;
  padding-top: clamp(12px, 5vw, 72px);
}

.welcome-copy img {
  width: min(310px, 72vw);
  height: auto;
}

.welcome-copy span,
.welcome-choice-card small {
  color: #1559dd;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.welcome-copy h1 {
  margin: 0;
  color: #071426;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  letter-spacing: 0;
  line-height: 0.94;
}

.welcome-copy p {
  max-width: 580px;
  margin: 0;
  color: #475569;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 750;
  line-height: 1.68;
}

.welcome-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px));
  gap: 12px;
  max-width: 520px;
}

.welcome-selectors label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 900;
}

.welcome-selectors select {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  color: #071426;
  background: rgba(255, 255, 255, 0.9);
  padding: 0 14px;
  font: inherit;
  font-weight: 850;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.welcome-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 860px;
  margin-top: auto;
}

.welcome-choice-card {
  display: grid;
  gap: 12px;
  padding: clamp(18px, 2.5vw, 24px);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
}

.welcome-choice-card.residential {
  border-color: rgba(21, 89, 221, 0.22);
}

.welcome-choice-card strong {
  color: #071426;
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
  line-height: 1.05;
}

.welcome-choice-card p {
  margin: 0;
  color: #475569;
  font-weight: 750;
  line-height: 1.56;
}

.welcome-choice-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.welcome-primary,
.welcome-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 950;
  text-decoration: none;
}

.welcome-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #1559dd, #18bdf2);
  box-shadow: 0 14px 28px rgba(21, 89, 221, 0.2);
}

.welcome-secondary {
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: #1559dd;
  background: #ffffff;
}

.welcome-region-note {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 850;
}

.tenant-signup-topbar {
  position: static;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 8px;
  color: white;
}

.tenant-signup-home,
.tenant-signup-topbar nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tenant-signup-home {
  min-height: 46px;
  padding: 5px 12px 5px 6px;
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 999px;
  color: white;
  font-weight: 900;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(2, 8, 23, 0.64), rgba(14, 51, 82, 0.48));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.tenant-signup-home img {
  width: 36px;
  height: 36px;
  padding: 2px;
  border-radius: 10px;
  object-fit: contain;
  background: #061426;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.3);
}

.tenant-signup-topbar nav {
  position: relative;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.66), rgba(8, 47, 73, 0.46)),
    rgba(2, 8, 23, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 50px rgba(0, 0, 0, 0.22),
    0 0 34px rgba(34, 211, 238, 0.08);
  backdrop-filter: blur(18px);
}

.tenant-signup-topbar nav::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.14), rgba(37, 99, 235, 0.14), transparent);
  pointer-events: none;
}

.tenant-signup-topbar nav a {
  position: relative;
  z-index: 1;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.tenant-signup-topbar nav a:hover,
.tenant-signup-topbar nav a.is-current {
  color: #071426;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  box-shadow:
    0 10px 24px rgba(34, 211, 238, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}

.tenant-signup-topbar nav a.is-primary {
  color: #061426;
  background: linear-gradient(135deg, #67e8f9, #2563eb);
  box-shadow:
    0 12px 28px rgba(37, 99, 235, 0.28),
    0 0 24px rgba(34, 211, 238, 0.16);
}

.tenant-language-picker {
  position: relative;
  z-index: 10;
  flex: 0 0 auto;
}

.desktop-auth-card .auth-language-picker,
.auth-body .auth-language-picker {
  justify-self: center;
  margin: -2px 0 8px;
}

.desktop-auth-card .auth-language-picker {
  position: absolute;
  top: 18px;
  right: 18px;
}

.auth-body .auth-language-picker {
  align-self: center;
}

.auth-language-picker .tenant-language-trigger {
  min-height: 38px;
  padding: 6px 10px;
  border-color: rgba(37, 99, 235, 0.24);
  color: #061426;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.9)),
    rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 12px 28px rgba(15, 23, 42, 0.12);
}

.tenant-language-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid rgba(103, 232, 249, 0.34);
  border-radius: 999px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(8, 47, 73, 0.52)),
    rgba(2, 8, 23, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.2),
    0 0 26px rgba(34, 211, 238, 0.1);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  backdrop-filter: blur(18px);
}

.tenant-language-trigger span:first-child {
  font-size: 1.18rem;
  line-height: 1;
}

.tenant-language-trigger span:last-child {
  min-width: 24px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.tenant-language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: min(260px, calc(100vw - 28px));
  max-height: min(420px, calc(100dvh - 100px));
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(2, 8, 23, 0.96), rgba(8, 47, 73, 0.92)),
    rgba(2, 8, 23, 0.96);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(34, 211, 238, 0.12);
  backdrop-filter: blur(22px);
}

.tenant-language-picker.open .tenant-language-menu {
  display: grid;
  gap: 4px;
}

.tenant-language-menu button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  font: inherit;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

.tenant-language-menu button:hover,
.tenant-language-menu button.active {
  color: #061426;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
}

.tenant-language-menu button small {
  color: inherit;
  opacity: 0.72;
  font-size: 0.7rem;
  font-weight: 900;
}

html[dir="rtl"] .tenant-signup-topbar,
html[dir="rtl"] .tenant-signup-panel,
html[dir="rtl"] .tenant-content-card,
html[dir="rtl"] .tenant-landing-panel {
  text-align: right;
}

html[dir="rtl"] .tenant-language-menu {
  right: auto;
  left: 0;
}

html[dir="rtl"] .tenant-language-menu button {
  text-align: right;
}

.tenant-signup-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.85fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100dvh - 76px);
  margin: 0 auto;
  padding: 36px 0 56px;
}

.tenant-signup-hero {
  color: white;
  text-shadow: 0 2px 18px rgba(2, 8, 23, 0.52);
}

.tenant-signup-wordmark {
  display: block;
  width: min(330px, 82vw);
  max-height: 120px;
  object-fit: contain;
  padding: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.24));
}

.tenant-signup-hero h1 {
  max-width: 650px;
  margin: 0;
  color: white;
  font-size: clamp(2.35rem, 5.4vw, 4.8rem);
  line-height: 0.98;
}

.tenant-signup-hero p {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.7;
}

.tenant-signup-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 660px;
  margin-top: 30px;
}

.tenant-signup-proof article {
  padding: 16px;
  border: 1px solid rgba(103, 232, 249, 0.34);
  border-radius: 12px;
  background: rgba(2, 13, 26, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tenant-signup-proof strong,
.tenant-signup-proof span {
  display: block;
}

.tenant-signup-proof strong {
  font-size: 1.2rem;
}

.tenant-signup-proof span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.86rem;
}

.tenant-signup-steps {
  display: grid;
  gap: 12px;
  max-width: 650px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.tenant-signup-steps li {
  display: grid;
  grid-template-columns: 38px minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(2, 8, 23, 0.48);
}

.tenant-signup-steps span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #05111f;
  background: linear-gradient(135deg, #67e8f9, #3b82f6);
  font-weight: 900;
}

.tenant-signup-steps strong,
.tenant-signup-steps small {
  display: block;
}

.tenant-signup-steps strong {
  color: white;
  font-size: 0.96rem;
}

.tenant-signup-steps small {
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.88rem;
  line-height: 1.45;
}

.tenant-signup-panel {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 22px;
  background: rgba(248, 251, 255, 0.96);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.tenant-signup-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.tenant-signup-panel-heading small {
  color: #2563eb;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tenant-signup-panel-heading h2 {
  margin: 4px 0 0;
  color: #071426;
  font-size: 1.8rem;
  letter-spacing: 0;
}

.tenant-signup-secure {
  padding: 8px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #0f3f99;
  background: #eff6ff;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.tenant-signup-form {
  display: grid;
  gap: 18px;
}

.tenant-setup-fields {
  display: grid;
  gap: 18px;
}

.tenant-signup-form fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid #dbe5f2;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.tenant-signup-form legend {
  margin-bottom: 8px;
  color: #071426;
  font-weight: 900;
}

.tenant-signup-form label {
  display: grid;
  gap: 8px;
  color: #24324a;
  font-weight: 800;
}

.tenant-signup-form input,
.tenant-signup-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  color: #071426;
  background: white;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
}

.tenant-signup-form input.tenant-field-error,
.tenant-signup-form select.tenant-field-error,
.tenant-slug-input:has(.tenant-field-error) {
  border-color: #ef4444;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.tenant-signup-form.is-complete {
  display: none;
}

.tenant-signup-complete .tenant-step-progress {
  display: none;
}

.tenant-signup-form input:focus,
.tenant-signup-form select:focus {
  outline: 3px solid rgba(21, 89, 221, 0.22);
  border-color: #1559dd;
}

.tenant-plan-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tenant-plan-picker label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid #d8e2f0;
  border-radius: 14px;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tenant-plan-picker label:has(input:checked),
.tenant-plan-picker label.selected {
  border-color: #1559dd;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
  box-shadow: 0 14px 28px rgba(21, 89, 221, 0.13);
}

.tenant-plan-picker label:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
}

.tenant-plan-picker input {
  width: 18px;
  min-height: 18px;
  accent-color: #1559dd;
}

.tenant-plan-picker strong,
.tenant-plan-picker small {
  display: block;
}

.tenant-plan-picker small {
  margin-top: 2px;
  color: #65758f;
}

.tenant-plan-picker em {
  display: block;
  margin-top: 6px;
  color: #1559dd;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.tenant-slug-input {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.tenant-slug-input span {
  padding: 0 0 0 14px;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 800;
}

.tenant-slug-input input {
  border: 0;
  border-radius: 0;
}

.tenant-brand-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tenant-brand-swatches input[type="color"] {
  padding: 4px;
}

.tenant-brand-preview {
  padding: 0;
  border: 0;
}

.tenant-brand-preview-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  color: #071426;
  background:
    linear-gradient(135deg, rgba(21, 89, 221, 0.14), rgba(25, 163, 55, 0.12)),
    #ffffff;
}

.tenant-brand-preview-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--tenant-preview-primary, #1559dd), var(--tenant-preview-accent, #19a337));
  font-size: 1.45rem;
  font-weight: 950;
  box-shadow: 0 16px 30px rgba(21, 89, 221, 0.24);
}

.tenant-brand-preview-card small,
.tenant-brand-preview-card strong,
.tenant-brand-preview-card p {
  display: block;
}

.tenant-brand-preview-card small {
  color: #64748b;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tenant-brand-preview-card strong {
  margin-top: 3px;
  font-size: 1rem;
}

.tenant-brand-preview-card p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.4;
}

.tenant-signup-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
}

.tenant-signup-note {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
}

.tenant-signup-status {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #cfd9e8;
  border-radius: 14px;
  color: #0f172a;
  background: #f8fbff;
}

.tenant-signup-status.hidden {
  display: none;
}

.tenant-step-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}

.tenant-step-progress span {
  display: inline-flex;
  justify-content: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #d8e2f0;
  border-radius: 999px;
  color: #64748b;
  background: #f8fbff;
  font-size: 0.78rem;
  font-weight: 900;
}

.tenant-step-progress span.active {
  border-color: #1559dd;
  color: #ffffff;
  background: linear-gradient(135deg, #1559dd, #18bdf2);
  box-shadow: 0 12px 24px rgba(21, 89, 221, 0.18);
}

.tenant-onboarding-step {
  display: none;
}

.tenant-onboarding-step.active {
  display: grid;
  gap: 18px;
}

.tenant-onboarding-step h3 {
  margin: 0;
  color: #071426;
  font-size: 1.45rem;
  line-height: 1.15;
}

.tenant-onboarding-step p {
  margin: 0;
  color: #53647d;
  font-weight: 750;
  line-height: 1.6;
}

.tenant-step-next {
  width: 100%;
  min-height: 52px;
}

.tenant-signup-status.success {
  border-color: #86efac;
  background: #f0fdf4;
}

.tenant-signup-status.warning {
  border-color: #fdba74;
  background: #fff7ed;
}

.tenant-signup-status.error {
  border-color: #fca5a5;
  background: #fef2f2;
}

.tenant-signup-status span,
.tenant-signup-status strong {
  display: block;
}

.tenant-signup-link {
  justify-self: start;
  color: #1559dd;
  font-weight: 900;
}

.tenant-signup-button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(135deg, #1559dd, #18bdf2);
  box-shadow: 0 14px 28px rgba(21, 89, 221, 0.22);
}

.tenant-landing-shell {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.66fr);
  min-height: auto;
}

.tenant-landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.tenant-landing-cta,
.tenant-content-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  text-decoration: none;
}

.tenant-landing-panel {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 22px;
  color: white;
  background: rgba(2, 13, 26, 0.58);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.tenant-landing-panel small,
.tenant-content-card small {
  color: #67e8f9;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tenant-landing-panel h2 {
  margin: 12px 0;
  color: white;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.12;
}

.tenant-landing-panel p,
.tenant-content-card p {
  color: rgba(226, 232, 240, 0.8);
  line-height: 1.68;
}

.tenant-landing-panel .tenant-signup-link {
  color: #67e8f9;
}

.tenant-pricing-panel {
  grid-column: 1 / -1;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 22px;
  color: white;
  background: rgba(2, 13, 26, 0.64);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.tenant-pricing-heading {
  max-width: 760px;
}

.tenant-pricing-heading small,
.tenant-pricing-grid small {
  color: #67e8f9;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tenant-pricing-heading h2 {
  margin: 10px 0;
  color: white;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.12;
}

.tenant-pricing-heading p,
.tenant-pricing-grid p {
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.58;
}

.tenant-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.tenant-pricing-grid article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 245px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.tenant-pricing-grid article.featured {
  border-color: rgba(103, 232, 249, 0.58);
  background: linear-gradient(180deg, rgba(21, 89, 221, 0.28), rgba(15, 23, 42, 0.74));
  box-shadow: 0 18px 34px rgba(21, 89, 221, 0.18);
}

.tenant-pricing-grid strong {
  color: white;
  font-size: 1.24rem;
}

.tenant-pricing-grid p {
  margin: 0;
  font-size: 0.94rem;
}

.tenant-pricing-grid a {
  align-self: end;
  justify-self: start;
  margin-top: 6px;
  color: #67e8f9;
  font-weight: 900;
  text-decoration: none;
}

.tenant-signup-footer {
  width: min(1180px, calc(100% - 40px));
  margin: -22px auto 0;
  padding: 0 0 34px;
  text-align: center;
}

.tenant-signup-footer a {
  color: rgba(226, 232, 240, 0.78);
  font-weight: 900;
}

.tenant-content-page {
  display: grid;
  align-items: center;
  width: min(920px, calc(100% - 40px));
  min-height: calc(100dvh - 78px);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) 0 calc(64px + env(safe-area-inset-bottom));
}

.tenant-content-card {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 24px;
  color: white;
  background: rgba(2, 13, 26, 0.62);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.tenant-content-card .tenant-signup-wordmark {
  width: min(280px, 82vw);
  margin-bottom: 20px;
}

.tenant-content-card h1 {
  margin: 10px 0 16px;
  color: white;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.02;
}

.tenant-content-card h2 {
  margin: 22px 0 8px;
  color: white;
  font-size: 1.12rem;
}

.tenant-content-action {
  width: fit-content;
  margin-top: 18px;
}

.tenant-onboarding-shell {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
  align-items: start;
  min-height: auto;
  padding-top: clamp(18px, 4vw, 46px);
}

.tenant-onboarding-shell .tenant-signup-panel {
  width: 100%;
}

.tenant-onboarding-shell::after {
  content: "";
  display: block;
  width: min(100%, 720px);
  min-height: clamp(190px, 28vw, 320px);
  margin-top: clamp(12px, 3vw, 28px);
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(2, 8, 23, 0.05), rgba(2, 8, 23, 0.28)),
    url("/assets/signacula-neon-panel.png") center / cover no-repeat;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.24);
  opacity: 0.9;
  pointer-events: none;
}

@media (max-width: 820px) {
  .welcome-shell {
    min-height: 100dvh;
    padding: 14px;
    background:
      linear-gradient(180deg, rgba(246, 249, 253, 0.96) 0%, rgba(246, 249, 253, 0.88) 54%, rgba(246, 249, 253, 0.74) 100%),
      url("/assets/signacula-lobby-welcome.jpg") center top / cover no-repeat;
  }

  .welcome-hero {
    gap: 16px;
    min-height: calc(100dvh - 28px);
  }

  .welcome-nav {
    justify-self: stretch;
    justify-content: center;
    overflow-x: auto;
    border-radius: 18px;
  }

  .welcome-nav a {
    padding: 8px 10px;
    white-space: nowrap;
  }

  .welcome-copy {
    padding-top: 10px;
  }

  .welcome-copy h1 {
    font-size: clamp(2.4rem, 13vw, 3.25rem);
    line-height: 0.98;
  }

  .welcome-selectors,
  .welcome-choice-grid {
    grid-template-columns: 1fr;
  }

  .welcome-choice-card {
    border-radius: 18px;
  }

  .welcome-choice-card div {
    display: grid;
  }

  .tenant-signup-body {
    min-height: 100%;
    overflow: visible;
    overscroll-behavior-y: auto;
    background:
      radial-gradient(circle at 20% 16%, rgba(34, 211, 238, 0.22), transparent 30%),
      linear-gradient(145deg, rgba(3, 9, 19, 0.66), rgba(8, 36, 61, 0.46)),
      url("/assets/royal-mile-high-street.jpg") center top / cover scroll;
  }

  .tenant-signup-topbar {
    position: static;
    width: min(100% - 28px, 560px);
    padding: 16px 0 0;
    gap: 8px;
  }

  .tenant-signup-topbar nav {
    gap: 5px;
    padding: 5px;
  }

  .tenant-signup-topbar nav a {
    min-height: 32px;
    padding: 7px 9px;
    font-size: 0.74rem;
    white-space: nowrap;
  }

  .tenant-signup-home span {
    display: none;
  }

  .tenant-language-trigger {
    min-height: 40px;
    padding: 6px 9px;
  }

  .tenant-language-trigger span:last-child {
    display: none;
  }

  .tenant-signup-shell {
    grid-template-columns: 1fr;
    width: min(100% - 28px, 560px);
    gap: 18px;
    min-height: auto;
    padding: 18px 0 calc(92px + env(safe-area-inset-bottom));
  }

  .tenant-landing-shell {
    min-height: auto;
    padding-bottom: 18px;
  }

  .tenant-onboarding-shell {
    padding-top: 14px;
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  .tenant-onboarding-shell::after {
    min-height: clamp(170px, 42vw, 230px);
    margin-top: 6px;
    border-radius: 18px;
  }

  .tenant-signup-wordmark {
    width: min(250px, 76vw);
    max-height: 92px;
    padding: 0;
  }

  .tenant-signup-hero h1 {
    font-size: clamp(2rem, 10vw, 2.45rem);
    line-height: 1.03;
  }

  .tenant-signup-hero p {
    margin: 12px 0 0;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .tenant-signup-proof {
    gap: 8px;
    margin-top: 18px;
  }

  .tenant-signup-proof article {
    padding: 12px 14px;
  }

  .tenant-signup-proof,
  .tenant-plan-picker {
    grid-template-columns: 1fr;
  }

  .tenant-signup-steps {
    gap: 8px;
    margin-top: 18px;
  }

  .tenant-signup-steps li {
    grid-template-columns: 34px 1fr;
    padding: 12px;
  }

  .tenant-signup-steps small {
    grid-column: 2;
  }

  .tenant-signup-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .tenant-signup-panel-heading {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
  }

  .tenant-signup-panel-heading h2 {
    font-size: 1.55rem;
  }

  .tenant-step-progress {
    gap: 6px;
  }

  .tenant-step-progress span {
    min-height: 32px;
    padding: 7px 8px;
    font-size: 0.72rem;
  }

  .tenant-onboarding-step h3 {
    font-size: 1.25rem;
  }

  .tenant-signup-secure {
    justify-self: start;
  }

  .tenant-plan-picker label {
    min-height: 78px;
  }

  .tenant-slug-input {
    grid-template-columns: 1fr;
  }

  .tenant-slug-input span {
    padding: 12px 14px 0;
  }

  .tenant-brand-swatches {
    grid-template-columns: 1fr;
  }

  .tenant-landing-actions {
    display: grid;
    margin-top: 20px;
  }

  .tenant-landing-cta {
    width: 100%;
  }

  .tenant-landing-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .tenant-pricing-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .tenant-pricing-grid {
    grid-template-columns: 1fr;
  }

  .tenant-pricing-grid article {
    min-height: 0;
  }

  .tenant-signup-footer {
    width: min(100% - 28px, 560px);
    margin: 0 auto;
    padding-bottom: calc(34px + env(safe-area-inset-bottom));
  }

  .tenant-content-page {
    width: min(100% - 28px, 560px);
    min-height: auto;
    padding: 20px 0 calc(48px + env(safe-area-inset-bottom));
  }

  .tenant-content-card {
    padding: 20px;
    border-radius: 18px;
  }
}

@media (max-width: 680px), (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  body.resident-route-active {
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.resident-route-active .app-shell,
  body.resident-route-active .workspace,
  body.resident-route-active .phone-stage {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  body.resident-route-active .resident-auth-screen,
  body.resident-route-active .resident-auth-screen.active {
    display: block;
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  body.resident-route-active .resident-auth-screen:not(.active) {
    display: none !important;
  }

  body.resident-route-active .resident-auth-screen .auth-body {
    align-content: start;
    height: auto;
    min-height: 100svh;
    overflow: visible;
    padding-bottom: calc(156px + env(safe-area-inset-bottom));
  }

  body.resident-route-active #resident-signup-form {
    padding-bottom: 72px;
  }

  body.resident-route-active .resident-auth-screen:has(#resident-signup-form:not(.hidden)) [data-open-reset-request="resident"] {
    display: none;
  }
}

html.resident-signup-active,
body.resident-route-active.resident-signup-active {
  height: auto;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.resident-route-active.resident-signup-active .app-shell,
body.resident-route-active.resident-signup-active .workspace,
body.resident-route-active.resident-signup-active .phone-stage {
  height: auto;
  min-height: 100svh;
  overflow: visible;
}

body.resident-route-active.resident-signup-active .resident-auth-screen,
body.resident-route-active.resident-signup-active .resident-auth-screen.active {
  display: block;
  height: auto;
  min-height: 100svh;
  overflow: visible;
}

body.resident-route-active.resident-signup-active .resident-auth-screen .auth-body {
  align-content: start;
  height: auto;
  min-height: 100svh;
  overflow: visible;
  padding-bottom: calc(176px + env(safe-area-inset-bottom));
}

body.resident-route-active.resident-signup-active #resident-signup-form {
  padding-bottom: 96px;
}

body.resident-route-active.resident-signup-active [data-open-reset-request="resident"] {
  display: none;
}

.resident-page-tabs {
  display: grid;
}

.resident-footer-pages {
  position: static;
  z-index: auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 26px rgba(14, 34, 62, 0.08);
}

body.resident-route-active .resident-footer-pages {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.resident-route-active .resident-footer-pages button {
  height: auto;
  min-height: 44px;
}

.resident-footer-pages button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 46px;
  height: auto;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #607089;
  padding: 5px 2px;
  font-weight: 900;
}

.resident-footer-pages button span {
  font-size: 16px;
  line-height: 1;
}

.resident-footer-pages button small {
  color: inherit;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.1;
}

.resident-footer-pages button.active {
  background: linear-gradient(135deg, #1765f2, #23d6ff);
  color: white;
  box-shadow: 0 10px 22px rgba(23, 101, 242, 0.22);
}

body.dark-mode .resident-footer-pages button {
  color: #9edff4;
}

body.dark-mode .resident-footer-pages {
  border-top: 1px solid rgba(35, 214, 255, 0.28);
  background: rgba(2, 17, 34, 0.96);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.28);
}

body.dark-mode .resident-footer-pages button.active {
  background: linear-gradient(135deg, #23d6ff, #1765f2);
  color: #061529;
  box-shadow: 0 0 20px rgba(35, 214, 255, 0.34);
}

.resident-page {
  display: none;
}

.resident-page.active {
  display: grid;
}

@media (max-width: 720px) {
  .dashboard-assistant-card,
  .assistant-command-card {
    grid-template-columns: 1fr;
  }

  .dashboard-assistant-card {
    gap: 12px;
    padding: 13px;
  }

  .dashboard-assistant-card.mobile {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-assistant-card.mobile .assistant-command-button,
  .dashboard-assistant-card.mobile .secondary-button {
    grid-column: 1 / -1;
  }

  .dashboard-assistant-copy h3 {
    font-size: 16px;
  }

  .dashboard-assistant-copy p {
    font-size: 13px;
  }

  .dashboard-assistant-meta small {
    font-size: 11px;
  }

  .dashboard-assistant-card .assistant-command-button,
  .dashboard-assistant-card .secondary-button,
  .assistant-command-button {
    width: 100%;
  }

  .assistant-command-queue {
    grid-column: auto;
  }

  .platform-action-prompt {
    grid-template-columns: 1fr;
  }

  .platform-prompt-button {
    width: 100%;
  }
}

#resident-dashboard-phone[data-resident-dashboard-page="overview"] [data-resident-page]:not([data-resident-page="overview"]),
#resident-dashboard-phone[data-resident-dashboard-page="metrics"] [data-resident-page]:not([data-resident-page="metrics"]),
#resident-dashboard-phone[data-resident-dashboard-page="updates"] [data-resident-page]:not([data-resident-page="updates"]),
#resident-dashboard-phone[data-resident-dashboard-page="info"] [data-resident-page]:not([data-resident-page="info"]),
#resident-dashboard-phone[data-resident-dashboard-page="feedback"] [data-resident-page]:not([data-resident-page="feedback"]) {
  display: none !important;
}

#resident-dashboard-phone[data-resident-dashboard-page="overview"] [data-resident-page="overview"],
#resident-dashboard-phone[data-resident-dashboard-page="metrics"] [data-resident-page="metrics"],
#resident-dashboard-phone[data-resident-dashboard-page="updates"] [data-resident-page="updates"],
#resident-dashboard-phone[data-resident-dashboard-page="info"] [data-resident-page="info"],
#resident-dashboard-phone[data-resident-dashboard-page="feedback"] [data-resident-page="feedback"] {
  display: grid !important;
}

#resident-dashboard-phone .phone-body {
  transition: background 180ms ease;
}

#resident-dashboard-phone[data-resident-dashboard-page="overview"] .resident-home-actions {
  display: grid;
}

#resident-dashboard-phone:not([data-resident-dashboard-page="overview"]) .resident-home-actions {
  display: none !important;
}

#resident-dashboard-phone[data-resident-dashboard-page="updates"] .phone-body {
  background:
    radial-gradient(circle at top right, rgba(23, 101, 242, 0.16), transparent 220px),
    linear-gradient(180deg, #edf6ff 0%, #f7fbff 42%, #eef7ff 100%);
}

#resident-dashboard-phone[data-resident-dashboard-page="metrics"] .phone-body {
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.14), transparent 220px),
    radial-gradient(circle at bottom left, rgba(23, 101, 242, 0.1), transparent 240px),
    linear-gradient(180deg, #f3f9ff 0%, #f8fcff 44%, #edf7ff 100%);
}

#resident-dashboard-phone[data-resident-dashboard-page="info"] .phone-body {
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 210px),
    linear-gradient(180deg, #eefbf8 0%, #f7fffc 48%, #eefaf7 100%);
}

#resident-dashboard-phone[data-resident-dashboard-page="feedback"] .phone-body {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 210px),
    linear-gradient(180deg, #fff7ed 0%, #fffaf4 48%, #fff4e6 100%);
}

#resident-dashboard-phone[data-resident-dashboard-page="updates"] .resident-page.active,
#resident-dashboard-phone[data-resident-dashboard-page="metrics"] .resident-page.active,
#resident-dashboard-phone[data-resident-dashboard-page="info"] .resident-page.active,
#resident-dashboard-phone[data-resident-dashboard-page="feedback"] .resident-page.active {
  min-height: calc(100svh - 220px);
  align-content: start;
}

body.dark-mode #resident-dashboard-phone[data-resident-dashboard-page="updates"] .phone-body {
  background:
    radial-gradient(circle at top right, rgba(35, 214, 255, 0.18), transparent 230px),
    linear-gradient(180deg, #031a31 0%, #061225 48%, #04172b 100%);
}

body.dark-mode #resident-dashboard-phone[data-resident-dashboard-page="metrics"] .phone-body {
  background:
    radial-gradient(circle at top right, rgba(35, 214, 255, 0.16), transparent 230px),
    radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.13), transparent 240px),
    linear-gradient(180deg, #031a31 0%, #061225 48%, #051b2a 100%);
}

body.dark-mode #resident-dashboard-phone[data-resident-dashboard-page="info"] .phone-body {
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.17), transparent 230px),
    linear-gradient(180deg, #041f27 0%, #061626 52%, #06211f 100%);
}

body.dark-mode #resident-dashboard-phone[data-resident-dashboard-page="feedback"] .phone-body {
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.15), transparent 230px),
    linear-gradient(180deg, #21170a 0%, #081424 52%, #1d1609 100%);
}

body:not(.dark-mode) #resident-dashboard-phone .resident-section-heading h3,
body:not(.dark-mode) #resident-dashboard-phone .resident-section h3,
body:not(.dark-mode) #resident-dashboard-phone .resident-action-accordion summary strong,
body:not(.dark-mode) #resident-dashboard-phone .resident-action-accordion summary em {
  color: #0b1933;
  text-shadow: none;
}

body:not(.dark-mode) #resident-dashboard-phone .resident-action-accordion summary .pill,
body:not(.dark-mode) #resident-dashboard-phone .resident-action-accordion summary em.pill,
body:not(.dark-mode) #resident-dashboard-phone .resident-section-heading .pill {
  border-color: #c9d8ee;
  background: #eef5ff;
  color: #16437f;
}

body:not(.dark-mode) #resident-dashboard-phone .resident-task-carousel article strong {
  color: #0b1933;
  text-shadow: none;
}

body:not(.dark-mode) #resident-dashboard-phone .resident-task-carousel article span {
  color: #42516a;
  text-shadow: none;
}

@media (max-width: 760px) {
  .platform-insight-grid,
  .platform-insight-columns {
    grid-template-columns: 1fr;
  }

  .assistant-summary-card {
    grid-template-columns: 1fr;
  }

  .assistant-score-ring {
    width: 76px;
    height: 76px;
  }

  .platform-action-prompt {
    grid-template-columns: 1fr;
  }

  .platform-insight-kpi strong {
    font-size: 22px;
  }

  .platform-insight-footnote {
    text-align: left;
  }
}

/* Final dark-mode contrast sweep. Keep this late so older form/card rules cannot wash it out. */
body.manager-desktop-dark .sidebar .nav-item,
body.manager-desktop-dark .sidebar .nav-item span,
body.manager-desktop-dark .sidebar .nav-item .nav-label {
  color: #f2fbff;
  opacity: 1;
  text-shadow: 0 0 12px rgba(33, 223, 246, 0.24);
}

body.manager-desktop-dark .sidebar .nav-item .nav-icon,
body.manager-desktop-dark .sidebar .nav-item .icon {
  color: #dffbff;
  border-color: rgba(123, 232, 255, 0.34);
  background: rgba(9, 32, 56, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 16px rgba(33, 223, 246, 0.16);
}

body.manager-desktop-dark .sidebar .nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(28, 92, 255, 0.9), rgba(17, 129, 194, 0.82));
  box-shadow:
    inset 4px 0 0 #82f8ff,
    inset 0 0 0 1px rgba(121, 238, 255, 0.34),
    inset 0 0 24px rgba(33, 223, 246, 0.12);
}

body.manager-desktop-dark .sidebar .nav-item.active span,
body.manager-desktop-dark .sidebar .nav-item.active .nav-label {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.34);
}

body.manager-desktop-dark .sidebar .nav-item[aria-disabled="true"],
body.manager-desktop-dark .sidebar .nav-item.is-disabled {
  color: rgba(204, 226, 244, 0.66);
  opacity: 0.72;
}

body.manager-desktop-dark .incident-control-card label,
body.manager-desktop-dark .package-form label,
body.manager-desktop-dark .edit-form label,
body.manager-desktop-dark .manager-list label,
body.manager-desktop-dark .calendar-panel label,
body.manager-desktop-dark .report-card label,
.manager-frame:not(.manager-light-theme) .incident-control-card label,
.manager-frame:not(.manager-light-theme) .package-form label,
.manager-frame:not(.manager-light-theme) .edit-form label,
.manager-frame:not(.manager-light-theme) .manager-list label,
.manager-frame:not(.manager-light-theme) .calendar-panel label,
.manager-frame:not(.manager-light-theme) .report-card label {
  color: #f3fbff;
  opacity: 1;
  text-shadow: 0 0 10px rgba(30, 231, 255, 0.16);
}

body.manager-desktop-dark .incident-control-card label span,
body.manager-desktop-dark .package-form label span,
body.manager-desktop-dark .edit-form label span,
body.manager-desktop-dark .manager-list label span,
body.manager-desktop-dark .form-help,
.manager-frame:not(.manager-light-theme) .incident-control-card label span,
.manager-frame:not(.manager-light-theme) .package-form label span,
.manager-frame:not(.manager-light-theme) .edit-form label span,
.manager-frame:not(.manager-light-theme) .manager-list label span,
.manager-frame:not(.manager-light-theme) .form-help {
  color: #c9e9f5;
  opacity: 1;
}

body.manager-desktop-dark .incident-control-card input,
body.manager-desktop-dark .incident-control-card select,
body.manager-desktop-dark .incident-control-card textarea,
body.manager-desktop-dark .package-form input,
body.manager-desktop-dark .package-form select,
body.manager-desktop-dark .package-form textarea,
body.manager-desktop-dark .edit-form input,
body.manager-desktop-dark .edit-form select,
body.manager-desktop-dark .edit-form textarea,
body.manager-desktop-dark .manager-list input,
body.manager-desktop-dark .manager-list select,
body.manager-desktop-dark .manager-list textarea,
body.manager-desktop-dark .calendar-panel input,
body.manager-desktop-dark .calendar-panel select,
body.manager-desktop-dark .calendar-panel textarea,
.manager-frame:not(.manager-light-theme) .incident-control-card input,
.manager-frame:not(.manager-light-theme) .incident-control-card select,
.manager-frame:not(.manager-light-theme) .incident-control-card textarea,
.manager-frame:not(.manager-light-theme) .package-form input,
.manager-frame:not(.manager-light-theme) .package-form select,
.manager-frame:not(.manager-light-theme) .package-form textarea,
.manager-frame:not(.manager-light-theme) .edit-form input,
.manager-frame:not(.manager-light-theme) .edit-form select,
.manager-frame:not(.manager-light-theme) .edit-form textarea,
.manager-frame:not(.manager-light-theme) .manager-list input,
.manager-frame:not(.manager-light-theme) .manager-list select,
.manager-frame:not(.manager-light-theme) .manager-list textarea,
.manager-frame:not(.manager-light-theme) .calendar-panel input,
.manager-frame:not(.manager-light-theme) .calendar-panel select,
.manager-frame:not(.manager-light-theme) .calendar-panel textarea {
  border-color: rgba(87, 224, 246, 0.44);
  background: rgba(4, 14, 28, 0.94);
  color: #f8fdff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 0 16px rgba(30, 231, 255, 0.08);
}

body.manager-desktop-dark input::placeholder,
body.manager-desktop-dark textarea::placeholder,
.manager-frame:not(.manager-light-theme) input::placeholder,
.manager-frame:not(.manager-light-theme) textarea::placeholder {
  color: #a9bfd4;
  opacity: 1;
}

body.manager-desktop-dark .qr-preview,
body.manager-desktop-dark .qr-sticker-list article,
body.manager-desktop-dark .signature-preview,
body.manager-desktop-dark .package-signature-input,
body.manager-desktop-dark .white-label-brand-form,
body.manager-desktop-dark .white-label-create-form,
body.manager-desktop-dark .resident-invite-entry,
body.manager-desktop-dark .resident-invite-desktop-panel .resident-invite-output,
body.manager-desktop-dark .resident-invite-summary-grid article,
.manager-frame:not(.manager-light-theme) .qr-preview,
.manager-frame:not(.manager-light-theme) .qr-sticker-list article,
.manager-frame:not(.manager-light-theme) .signature-preview,
.manager-frame:not(.manager-light-theme) .package-signature-input,
.manager-frame:not(.manager-light-theme) .white-label-brand-form,
.manager-frame:not(.manager-light-theme) .white-label-create-form,
.manager-frame:not(.manager-light-theme) .resident-invite-entry,
.manager-frame:not(.manager-light-theme) .resident-invite-output,
.manager-frame:not(.manager-light-theme) .resident-invite-summary-grid article {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: #07142f;
  text-shadow: none;
}

body.manager-desktop-dark .qr-preview :is(strong, h3, label),
body.manager-desktop-dark .qr-sticker-list article :is(strong, h3, label),
body.manager-desktop-dark .signature-preview :is(strong, h3, label),
body.manager-desktop-dark .package-signature-input :is(strong, h3, label),
body.manager-desktop-dark .white-label-brand-form :is(strong, h3, label),
body.manager-desktop-dark .white-label-create-form :is(strong, h3, label),
body.manager-desktop-dark .resident-invite-entry :is(strong, h3, label),
body.manager-desktop-dark .resident-invite-desktop-panel .resident-invite-output :is(strong, h3, label),
body.manager-desktop-dark .resident-invite-summary-grid article :is(strong, h3, label),
.manager-frame:not(.manager-light-theme) .qr-preview :is(strong, h3, label),
.manager-frame:not(.manager-light-theme) .qr-sticker-list article :is(strong, h3, label),
.manager-frame:not(.manager-light-theme) .signature-preview :is(strong, h3, label),
.manager-frame:not(.manager-light-theme) .package-signature-input :is(strong, h3, label),
.manager-frame:not(.manager-light-theme) .white-label-brand-form :is(strong, h3, label),
.manager-frame:not(.manager-light-theme) .white-label-create-form :is(strong, h3, label),
.manager-frame:not(.manager-light-theme) .resident-invite-entry :is(strong, h3, label),
.manager-frame:not(.manager-light-theme) .resident-invite-output :is(strong, h3, label),
.manager-frame:not(.manager-light-theme) .resident-invite-summary-grid article :is(strong, h3, label) {
  color: #07142f;
  opacity: 1;
  text-shadow: none;
}

body.manager-desktop-dark .qr-preview :is(span, small, p),
body.manager-desktop-dark .qr-sticker-list article :is(span, small, p),
body.manager-desktop-dark .signature-preview :is(span, small, p),
body.manager-desktop-dark .package-signature-input :is(span, small, p),
body.manager-desktop-dark .white-label-brand-form :is(span, small, p),
body.manager-desktop-dark .white-label-create-form :is(span, small, p),
body.manager-desktop-dark .resident-invite-entry :is(span, small, p),
body.manager-desktop-dark .resident-invite-desktop-panel .resident-invite-output :is(span, small, p),
body.manager-desktop-dark .resident-invite-summary-grid article :is(span, small, p),
.manager-frame:not(.manager-light-theme) .qr-preview :is(span, small, p),
.manager-frame:not(.manager-light-theme) .qr-sticker-list article :is(span, small, p),
.manager-frame:not(.manager-light-theme) .signature-preview :is(span, small, p),
.manager-frame:not(.manager-light-theme) .package-signature-input :is(span, small, p),
.manager-frame:not(.manager-light-theme) .white-label-brand-form :is(span, small, p),
.manager-frame:not(.manager-light-theme) .white-label-create-form :is(span, small, p),
.manager-frame:not(.manager-light-theme) .resident-invite-entry :is(span, small, p),
.manager-frame:not(.manager-light-theme) .resident-invite-output :is(span, small, p),
.manager-frame:not(.manager-light-theme) .resident-invite-summary-grid article :is(span, small, p) {
  color: #405571;
  opacity: 1;
  text-shadow: none;
}

.manager-frame.manager-light-theme .platform-insight-kpi,
.manager-frame.manager-light-theme .platform-insight-list article,
.manager-frame.manager-light-theme .platform-action-prompt,
.manager-frame.manager-light-theme .assistant-summary-card,
.manager-frame.manager-light-theme .assistant-action-card {
  background: #ffffff;
  color: #07142f;
  text-shadow: none;
}

.manager-frame.manager-light-theme .platform-insight-kpi :is(strong, h3),
.manager-frame.manager-light-theme .platform-insight-list article :is(strong, h3),
.manager-frame.manager-light-theme .platform-action-prompt :is(strong, h3),
.manager-frame.manager-light-theme .assistant-summary-card :is(strong, h3),
.manager-frame.manager-light-theme .assistant-action-card :is(strong, h3) {
  color: #07142f;
}

.manager-frame.manager-light-theme .platform-insight-kpi :is(span, small, p),
.manager-frame.manager-light-theme .platform-insight-list article :is(span, small, p),
.manager-frame.manager-light-theme .platform-action-prompt :is(span, small, p),
.manager-frame.manager-light-theme .assistant-summary-card :is(span, small, p),
.manager-frame.manager-light-theme .assistant-action-card :is(span, small, p) {
  color: #43536c;
}

.install-app-card {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
  left: max(16px, env(safe-area-inset-left));
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  max-width: 620px;
  margin: 0 auto;
  border: 1px solid rgba(191, 219, 254, 0.75);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.94)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(8, 23, 51, 0.22);
  padding: 13px 14px;
  backdrop-filter: blur(16px);
}

.install-app-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.install-app-card strong {
  color: #081733;
  font-size: 14px;
}

.install-app-card span {
  color: #53617b;
  font-size: 12px;
  line-height: 1.35;
}

.install-app-card button {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
}

.install-app-primary {
  min-height: 40px;
  background: linear-gradient(135deg, var(--blue), #13b8d4);
  color: #ffffff;
  padding: 0 16px;
  box-shadow: 0 12px 26px rgba(21, 89, 221, 0.24);
}

.install-app-dismiss {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: rgba(226, 235, 247, 0.86);
  color: #31415d;
  font-size: 20px;
  line-height: 1;
}

html.standalone-app .install-app-card {
  display: none;
}

@media (display-mode: standalone) {
  .install-app-card {
    display: none;
  }
}

@media (max-width: 520px) {
  .install-app-card {
    grid-template-columns: minmax(0, 1fr) auto;
    border-radius: 16px;
  }

  .install-app-dismiss {
    grid-column: 2;
    grid-row: 1;
  }

  .install-app-primary {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Mobile viewport guard: iOS zooms focused fields below 16px and can preserve
   a sideways visual viewport after auth. Keep sign-in fields readable and
   clamp manager dashboard modules to the phone width. */
@media (max-width: 760px) {
  html,
  body,
  .app-shell,
  .phone-stage,
  .phone-frame,
  .phone-body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .auth-form input,
  .auth-form select,
  .auth-form textarea,
  .password-field input,
  .auth-submit {
    font-size: 16px;
  }

  .manager-frame .phone-body > *,
  .manager-frame .property-summary,
  .manager-frame .manager-progress,
  .manager-frame .manager-metric-section,
  .manager-frame .manager-panel,
  .manager-frame .manager-metrics,
  .manager-frame .manager-metrics button,
  .manager-frame .dashboard-assistant-card,
  .manager-frame .dashboard-assistant-card.mobile,
  .manager-frame .command-card {
    max-width: 100%;
    min-width: 0;
  }

  .manager-frame .manager-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-frame .dashboard-assistant-card.mobile {
    overflow: hidden;
  }

  #manager-reports-phone .phone-body {
    display: grid;
    align-content: start;
    gap: 12px;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  #manager-reports-phone .compact-summary,
  #manager-reports-phone .report-export-row,
  #manager-reports-phone .report-kpi-grid,
  #manager-reports-phone .report-card {
    margin: 0;
  }

  #manager-reports-phone .report-export-row {
    grid-template-columns: 1fr;
  }

  #manager-reports-phone .report-kpi-grid {
    gap: 8px;
  }

  #manager-reports-phone .report-kpi-card {
    min-height: 104px;
    padding: 12px;
  }

  #manager-reports-phone .report-kpi-card strong {
    font-size: 24px;
  }

  #manager-reports-phone .report-card {
    border-radius: 12px;
    padding: 12px;
  }

  #manager-reports-phone .report-collapse-card:not([open]) {
    padding-bottom: 12px;
  }

  #manager-reports-phone .report-collapse-card:not([open]) > .report-collapse-body,
  #manager-reports-phone .report-collapse-card:not([open]) .audit-launch-grid,
  #manager-reports-phone .report-collapse-card:not([open]) .report-bars,
  #manager-reports-phone .report-collapse-card:not([open]) .report-insight-list {
    display: none;
  }

  #manager-reports-phone .report-collapse-summary h3,
  #manager-reports-phone .report-card-header h3 {
    font-size: 16px;
  }

  #manager-reports-phone .report-collapse-summary .pill {
    margin-right: 30px;
  }

  #manager-reports-phone .report-bars,
  #manager-reports-phone .report-insight-list,
  #manager-reports-phone .platform-action-prompt-list,
  #manager-reports-phone .platform-insight-list,
  #manager-reports-phone .usage-analytics-list {
    gap: 8px;
  }

  #manager-reports-phone .audit-launch-grid {
    grid-template-columns: 1fr;
  }

  #announcement-show-until {
    justify-self: start;
    width: min(100%, 260px);
    text-align: center;
  }
}
