        @keyframes progress {
            0% {
                width: 0%;
            }

            50% {
                width: 70%;
            }

            100% {
                width: 100%;
            }
        }

        .animate-progress {
            animation: progress 2s infinite ease-in-out;
        }

        html[data-theme='light'] body.pwa-residentes #app nav {
            background-color: #ffffff !important;
            border-color: #cbd5e1 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app nav button {
            color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app nav button[class~='bg-white/80'] {
            background-color: #f1f5f9 !important;
            color: #047857 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app nav {
            background-color: #0f172a !important;
            border-color: #334155 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app nav button {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app nav button[class~='bg-slate-700/90'] {
            background-color: #334155 !important;
            color: #a7f3d0 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app nav button[class~='bg-white/80'] {
            background-color: #334155 !important;
            color: #a7f3d0 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app main > section[class~='grid-cols-2'][class~='sm:grid-cols-4'] > button,
        html[data-theme='dark'] body.pwa-residentes #app main > div[class~='grid-cols-2'][class~='gap-4'] > div {
            background-color: #111827 !important;
            border-color: #334155 !important;
            box-shadow: 0 16px 34px rgba(2, 6, 23, .45) !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app main > section[class~='grid-cols-2'][class~='sm:grid-cols-4'] > button > p {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app main > section[class~='grid-cols-2'][class~='sm:grid-cols-4'] > button > h3 {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app main > div[class~='grid-cols-2'][class~='gap-4'] > div > p:first-of-type {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app main > div[class~='grid-cols-2'][class~='gap-4'] > div > p:last-of-type {
            color: #cbd5e1 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app main > section[class~='grid-cols-2'][class~='sm:grid-cols-4'] > button,
        html[data-theme='light'] body.pwa-residentes #app main > div[class~='grid-cols-2'][class~='gap-4'] > div {
            background-color: #ffffff !important;
            border-color: #cbd5e1 !important;
            box-shadow: 0 12px 28px rgba(15, 23, 42, .08) !important;
        }

        html[data-theme='light'] body.pwa-residentes #app main > section[class~='grid-cols-2'][class~='sm:grid-cols-4'] > button > p,
        html[data-theme='light'] body.pwa-residentes #app main > div[class~='grid-cols-2'][class~='gap-4'] > div > p:last-of-type {
            color: #475569 !important;
            -webkit-text-fill-color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app main > section[class~='grid-cols-2'][class~='sm:grid-cols-4'] > button > h3,
        html[data-theme='light'] body.pwa-residentes #app main > div[class~='grid-cols-2'][class~='gap-4'] > div > p:first-of-type,
        html[data-theme='light'] body.pwa-residentes #app > div[class~='flex-col'] > header h1 {
            color: #0f172a !important;
            -webkit-text-fill-color: #0f172a !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-title {
            color: #f8fafc !important;
            -webkit-text-fill-color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-notifications {
            background-color: #111827 !important;
            border-color: #334155 !important;
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-notifications .text-gray-600,
        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-notifications .text-gray-500 {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-notifications .text-gray-900 {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-feature-cta {
            background-color: #ffffff !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-feature-cta--visit {
            color: #047857 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-feature-cta--qr {
            color: #155e75 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-quick-actions > button,
        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-kpis > div {
            background-color: #111827 !important;
            border-color: #334155 !important;
            box-shadow: 0 16px 34px rgba(2, 6, 23, .45) !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-quick-actions > button > p {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-quick-actions > button > h3,
        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-kpis > div > p:first-of-type {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard-kpis > div > p:last-of-type {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #panic-btn {
            background-color: rgba(15, 23, 42, .94) !important;
            border-color: rgba(251, 113, 133, .5) !important;
            box-shadow: 0 18px 38px rgba(2, 6, 23, .42) !important;
        }

        html[data-theme='dark'] body.pwa-residentes #panic-btn h3 {
            color: #fda4af !important;
        }

        html[data-theme='dark'] body.pwa-residentes #panic-status {
            color: #fecdd3 !important;
        }

        html[data-theme='light'] body.pwa-residentes #panic-btn {
            background-color: rgba(255, 255, 255, .94) !important;
            border-color: #fecaca !important;
            box-shadow: 0 12px 28px rgba(127, 29, 29, .08) !important;
        }

        html[data-theme='light'] body.pwa-residentes #app #panic-btn h3 {
            color: #9f1239 !important;
            -webkit-text-fill-color: #9f1239 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app #panic-status {
            color: #be123c !important;
            -webkit-text-fill-color: #be123c !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-dashboard-title {
            color: #0f172a !important;
            -webkit-text-fill-color: #0f172a !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-dashboard-quick-actions > button,
        html[data-theme='light'] body.pwa-residentes #app .resident-dashboard-kpis > div {
            background-color: #ffffff !important;
            border-color: #cbd5e1 !important;
            box-shadow: 0 12px 28px rgba(15, 23, 42, .08) !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-dashboard-quick-actions > button > p {
            color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-dashboard-quick-actions > button > h3,
        html[data-theme='light'] body.pwa-residentes #app .resident-dashboard-kpis > div > p:first-of-type {
            color: #0f172a !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-dashboard-kpis > div > p:last-of-type {
            color: #475569 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-reservas-page {
            background-color: #0b1220 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-reservas-page > header,
        html[data-theme='dark'] body.pwa-residentes .resident-reservas-area,
        html[data-theme='dark'] body.pwa-residentes .resident-reservas-item,
        html[data-theme='dark'] body.pwa-residentes .resident-reservas-empty {
            background-color: #111827 !important;
            border-color: #334155 !important;
            color: #cbd5e1 !important;
            box-shadow: 0 12px 28px rgba(2, 6, 23, .3) !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-reservas-page [class~='text-gray-900'] {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-reservas-page [class~='text-gray-500'],
        html[data-theme='dark'] body.pwa-residentes .resident-reservas-page [class~='text-gray-400'] {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-reservas-detail {
            background-color: #1e293b !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-reservas-no-areas {
            background-color: #422006 !important;
            border-color: #92400e !important;
            color: #fde68a !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-reservas-page [class~='bg-indigo-50'] {
            background-color: #312e81 !important;
            border-color: #4f46e5 !important;
            color: #e0e7ff !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-reservas-filter {
            color-scheme: dark;
            background-color: #0f172a !important;
            border-color: #475569 !important;
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page {
            background-color: #0b1220 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page > div:first-child {
            background-color: rgba(17, 24, 39, .97) !important;
            border-color: #334155 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page > div:first-child header button {
            background-color: #1e293b !important;
            border-color: #475569 !important;
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-chat-page #chat-destino {
            color-scheme: dark;
            background-color: #0f172a !important;
            border-color: #475569 !important;
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page > div:first-child section {
            background-color: #0f172a !important;
            border-color: #334155 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page [class~='text-slate-400'],
        html[data-theme='dark'] body.pwa-residentes .resident-chat-page [class~='text-slate-500'] {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page [class~='text-slate-600'],
        html[data-theme='dark'] body.pwa-residentes .resident-chat-page [class~='text-slate-800'] {
            color: #f1f5f9 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page [class~='bg-slate-100'] {
            background-color: #1e293b !important;
            border-color: #475569 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page main {
            background-color: #0b1220 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page main [class~='bg-white'] {
            background-color: #1e293b !important;
            border-color: #475569 !important;
            color: #f1f5f9 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page > div:last-child {
            background-color: #111827 !important;
            border-color: #334155 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page > div:last-child > div {
            background-color: #0f172a !important;
            border-color: #475569 !important;
        }

        body.pwa-residentes .resident-chat-page #chat-form button[type='submit'] {
            background-color: #047857 !important;
            color: #fff !important;
            -webkit-text-fill-color: #fff !important;
        }

        body.pwa-residentes .resident-chat-page #chat-messages > div > div[class~='bg-emerald-600'],
        body.pwa-residentes .resident-chat-page #chat-messages > div > div[class~='bg-emerald-500'] {
            background-color: #047857 !important;
            color: #fff !important;
            -webkit-text-fill-color: #fff !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page {
            background-color: #0b1220 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page > header,
        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-item,
        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-empty {
            background-color: #111827 !important;
            border-color: #334155 !important;
            color: #cbd5e1 !important;
            box-shadow: 0 12px 28px rgba(2, 6, 23, .3) !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page [class~='text-gray-900'] {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page [class~='text-gray-700'],
        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page [class~='text-gray-500'],
        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page [class~='text-gray-400'] {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page [class~='bg-amber-50'] {
            background-color: #422006 !important;
            color: #fde68a !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page [class~='bg-sky-50'] {
            background-color: #082f49 !important;
            color: #bae6fd !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page [class~='bg-violet-50'] {
            background-color: #2e1065 !important;
            color: #ddd6fe !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-pqrs-page [class~='bg-emerald-50'] {
            background-color: #064e3b !important;
            color: #a7f3d0 !important;
        }

        /* Older cached PQRS modules do not include the semantic resident-pqrs-* classes. */
        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) {
            background-color: #0b1220 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) > header,
        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) > main > div {
            background-color: #111827 !important;
            border-color: #334155 !important;
            color: #cbd5e1 !important;
            box-shadow: 0 12px 28px rgba(2, 6, 23, .3) !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='text-gray-900'] {
            color: #f8fafc !important;
            -webkit-text-fill-color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='text-gray-700'],
        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='text-gray-500'],
        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='text-gray-400'] {
            color: #cbd5e1 !important;
            -webkit-text-fill-color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-amber-50'] {
            background-color: #422006 !important;
            color: #fde68a !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-sky-50'] {
            background-color: #082f49 !important;
            color: #bae6fd !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-violet-50'] {
            background-color: #2e1065 !important;
            color: #ddd6fe !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-emerald-50'] {
            background-color: #064e3b !important;
            color: #a7f3d0 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-slate-100'] {
            background-color: #334155 !important;
            color: #e2e8f0 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) > nav {
            background: #0f172a !important;
            border-color: #334155 !important;
            backdrop-filter: none !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) > nav button {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) > nav button[class~='bg-white/80'] {
            background-color: #334155 !important;
            color: #a7f3d0 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='text-gray-400'] {
            color: #475569 !important;
            -webkit-text-fill-color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-amber-50'] {
            background-color: #fef3c7 !important;
            color: #92400e !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-sky-50'] {
            background-color: #e0f2fe !important;
            color: #075985 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-violet-50'] {
            background-color: #ede9fe !important;
            color: #5b21b6 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-emerald-50'] {
            background-color: #dcfce7 !important;
            color: #166534 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) [class~='bg-slate-100'] {
            background-color: #e2e8f0 !important;
            color: #334155 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) > nav {
            background: #ffffff !important;
            border-color: #cbd5e1 !important;
            backdrop-filter: none !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) > nav button {
            color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div:has(> header #add-pqrs-btn) > nav button[class~='bg-white/80'] {
            background-color: #f1f5f9 !important;
            color: #047857 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-packages-page,
        html[data-theme='dark'] body.pwa-residentes .resident-notices-page {
            background-color: #0b1220 !important;
        }

        body.pwa-residentes .resident-packages-page > main,
        body.pwa-residentes .resident-notices-page > main {
            padding-bottom: calc(9rem + env(safe-area-inset-bottom));
        }

        body.pwa-residentes .resident-notices-page > main {
            width: min(100%, 72rem);
            margin-inline: auto;
        }

        html[data-theme='light'] body.pwa-residentes .resident-packages-item [class~='bg-amber-50'] {
            color: #92400e !important;
            -webkit-text-fill-color: #92400e !important;
        }

        html[data-theme='light'] body.pwa-residentes .resident-packages-item > div:first-child > span:last-child,
        html[data-theme='light'] body.pwa-residentes .resident-packages-code > p:first-child {
            color: #4b5563 !important;
            -webkit-text-fill-color: #4b5563 !important;
        }

        html[data-theme='light'] body.pwa-residentes .resident-packages-code > p:last-child {
            color: #047857 !important;
            -webkit-text-fill-color: #047857 !important;
        }

        html[data-theme='light'] body.pwa-residentes .resident-notices-page [class~='bg-red-50'] {
            color: #b91c1c !important;
            -webkit-text-fill-color: #b91c1c !important;
        }

        html[data-theme='light'] body.pwa-residentes .resident-notices-page [class~='bg-purple-50'] {
            color: #7e22ce !important;
            -webkit-text-fill-color: #7e22ce !important;
        }

        html[data-theme='light'] body.pwa-residentes .resident-notices-page [class~='text-gray-400'] {
            color: #4b5563 !important;
            -webkit-text-fill-color: #4b5563 !important;
        }

        html[data-theme='light'] body.pwa-residentes .resident-notice-item [class~='text-emerald-600'] {
            color: #047857 !important;
            -webkit-text-fill-color: #047857 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-packages-page > header,
        html[data-theme='dark'] body.pwa-residentes .resident-packages-item,
        html[data-theme='dark'] body.pwa-residentes .resident-notice-item,
        html[data-theme='dark'] body.pwa-residentes .resident-notices-empty {
            background-color: #111827 !important;
            border-color: #334155 !important;
            color: #cbd5e1 !important;
            box-shadow: 0 12px 28px rgba(2, 6, 23, .3) !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-packages-page [class~='text-gray-900'],
        html[data-theme='dark'] body.pwa-residentes .resident-packages-page [class~='text-gray-800'],
        html[data-theme='dark'] body.pwa-residentes .resident-notices-page [class~='text-gray-900'],
        html[data-theme='dark'] body.pwa-residentes .resident-notices-page [class~='text-gray-800'] {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-packages-page [class~='text-gray-600'],
        html[data-theme='dark'] body.pwa-residentes .resident-packages-page [class~='text-gray-500'],
        html[data-theme='dark'] body.pwa-residentes .resident-packages-page [class~='text-gray-400'],
        html[data-theme='dark'] body.pwa-residentes .resident-notices-page [class~='text-gray-700'],
        html[data-theme='dark'] body.pwa-residentes .resident-notices-page [class~='text-gray-600'],
        html[data-theme='dark'] body.pwa-residentes .resident-notices-page [class~='text-gray-500'],
        html[data-theme='dark'] body.pwa-residentes .resident-notices-page [class~='text-gray-400'] {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-packages-empty {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-packages-item [class~='bg-amber-50'] {
            background-color: #422006 !important;
            color: #fde68a !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-packages-code {
            background-color: #1e293b !important;
            border-color: #64748b !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-packages-code > p:last-child {
            color: #6ee7b7 !important;
            -webkit-text-fill-color: #6ee7b7 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-notices-page [class~='bg-red-50'] {
            background-color: #450a0a !important;
            color: #fecaca !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-notices-page [class~='bg-purple-50'] {
            background-color: #3b0764 !important;
            color: #e9d5ff !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-notice-item [class~='text-emerald-600'] {
            color: #6ee7b7 !important;
            -webkit-text-fill-color: #6ee7b7 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-notice-item[class~='border-emerald-200'] {
            border-color: #047857 !important;
        }

        /* Keep older deployed notices markup themed even when its semantic classes are missing. */
        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) {
            background-color: #0b1220 !important;
        }

        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) > header,
        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) > main > section > div:not(:first-child) {
            background-color: #111827 !important;
            border-color: #334155 !important;
            color: #cbd5e1 !important;
            box-shadow: 0 12px 28px rgba(2, 6, 23, .3) !important;
        }

        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) [class~='text-gray-900'],
        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) [class~='text-gray-800'] {
            color: #f8fafc !important;
            -webkit-text-fill-color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) [class~='text-gray-700'],
        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) [class~='text-gray-600'],
        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) [class~='text-gray-500'],
        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) [class~='text-gray-400'] {
            color: #cbd5e1 !important;
            -webkit-text-fill-color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) [class~='text-emerald-600'] {
            color: #6ee7b7 !important;
            -webkit-text-fill-color: #6ee7b7 !important;
        }

        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) [class~='bg-red-50'] {
            background-color: #450a0a !important;
            color: #fecaca !important;
        }

        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) [class~='bg-purple-50'] {
            background-color: #3b0764 !important;
            color: #e9d5ff !important;
        }

        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) > nav {
            background: #0f172a !important;
            border-color: #334155 !important;
            backdrop-filter: none !important;
        }

        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) > nav button {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes.theme-dark #app > div:has(> main > section > div > h2) > nav button[class~='bg-white/80'] {
            background-color: #334155 !important;
            color: #a7f3d0 !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) {
            background-color: #f1f5f9 !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) > header,
        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) > main > section > div:not(:first-child) {
            background-color: #fff !important;
            border-color: #cbd5e1 !important;
            color: #334155 !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) [class~='text-gray-900'],
        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) [class~='text-gray-800'] {
            color: #0f172a !important;
            -webkit-text-fill-color: #0f172a !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) [class~='text-gray-700'],
        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) [class~='text-gray-600'],
        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) [class~='text-gray-500'],
        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) [class~='text-gray-400'] {
            color: #475569 !important;
            -webkit-text-fill-color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) [class~='text-emerald-600'] {
            color: #047857 !important;
            -webkit-text-fill-color: #047857 !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) [class~='bg-red-50'] {
            color: #b91c1c !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) [class~='bg-purple-50'] {
            color: #7e22ce !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) > nav {
            background: #fff !important;
            border-color: #cbd5e1 !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) > nav button {
            color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes.theme-light #app > div:has(> main > section > div > h2) > nav button[class~='bg-white/80'] {
            background-color: #f1f5f9 !important;
            color: #047857 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-call-card {
            background-color: #111827 !important;
            border-color: #475569 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-call-body {
            background-color: #111827 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-call-body [class~='text-slate-900'] {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-call-body [class~='text-slate-400'] {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .resident-call-card [id$='-track'] {
            background-color: #1e293b !important;
            border-color: #64748b !important;
        }

        html[data-theme='dark'] body.pwa-residentes #chat-form input {
            color: #f8fafc !important;
            caret-color: #f8fafc;
        }

        html[data-theme='dark'] body.pwa-residentes #chat-form input::placeholder {
            color: #94a3b8 !important;
            opacity: 1;
        }

        /* Keep the fixed theme toggle clear of the real resident chat composer. */
        body.pwa-residentes #chat-form {
            box-sizing: border-box;
            min-width: 0;
            margin-left: calc(4.5rem + env(safe-area-inset-left, 0px)) !important;
        }

        @media (max-width: 360px) {
            body.pwa-residentes #chat-form {
                margin-left: calc(3rem + env(safe-area-inset-left, 0px)) !important;
            }
        }

        html[data-theme='light'] body.pwa-residentes #app > div.fixed.inset-0 > div:first-child > section {
            background-color: #ffffff !important;
            border-color: #cbd5e1 !important;
            color: #334155 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div.fixed.inset-0 > div:first-child > section [class~='text-slate-400'],
        html[data-theme='light'] body.pwa-residentes #app > div.fixed.inset-0 > div:first-child > section [class~='text-slate-500'] {
            color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app > div.fixed.inset-0 > div:first-child > section [class~='text-emerald-600'] {
            color: #047857 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div.fixed.inset-0 > div:first-child > section {
            background-color: #111827 !important;
            border-color: #334155 !important;
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div.fixed.inset-0 > div:first-child > section [class~='text-slate-400'],
        html[data-theme='dark'] body.pwa-residentes #app > div.fixed.inset-0 > div:first-child > section [class~='text-slate-500'] {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app > div.fixed.inset-0 > div:first-child > section [class~='text-emerald-600'] {
            color: #6ee7b7 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page {
            background-color: #0b1220 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page > header,
        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-active-panel,
        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-item {
            background-color: #111827 !important;
            border-color: #334155 !important;
            box-shadow: 0 12px 28px rgba(2, 6, 23, .3) !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page [class~='text-gray-900'],
        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page [class~='text-gray-800'] {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page [class~='text-gray-500'],
        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page [class~='text-gray-400'] {
            color: #cbd5e1 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-visitas-page [class~='text-gray-500'],
        html[data-theme='light'] body.pwa-residentes #app .resident-visitas-page [class~='text-gray-400'] {
            color: #475569 !important;
            -webkit-text-fill-color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-visitas-page #visitas-list span[class~='bg-emerald-50'] {
            background-color: #dcfce7 !important;
            color: #166534 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-visitas-page #visitas-list span[class~='bg-amber-50'] {
            background-color: #fef3c7 !important;
            color: #92400e !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-visitas-page #visitas-list span[class~='bg-slate-100'] {
            background-color: #e2e8f0 !important;
            color: #334155 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-active-card {
            background-color: #1e293b !important;
            border-color: #475569 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-active-card[class~='bg-rose-50'] {
            background-color: #3b1722 !important;
            border-color: #9f1239 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-active-card [class~='text-rose-700'] {
            color: #fda4af !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app #visitas-list button[class~='bg-emerald-50'] {
            background-color: #064e3b !important;
            color: #a7f3d0 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-visitas-page > nav {
            background: #ffffff !important;
            border-color: #cbd5e1 !important;
            color: #475569 !important;
            backdrop-filter: none !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-visitas-page > nav button {
            color: #475569 !important;
        }

        html[data-theme='light'] body.pwa-residentes #app .resident-visitas-page > nav button[class~='bg-white/80'] {
            background-color: #f1f5f9 !important;
            color: #047857 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page > nav {
            background: #0f172a !important;
            border-color: #334155 !important;
            color: #cbd5e1 !important;
            backdrop-filter: none !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page > nav button {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page > nav button[class~='bg-slate-700/90'],
        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page > nav button[class~='bg-white/80'] {
            background-color: #334155 !important;
            color: #a7f3d0 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page #visitas-list span[class~='bg-emerald-50'] {
            background-color: #064e3b !important;
            color: #a7f3d0 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page #visitas-list span[class~='bg-amber-50'] {
            background-color: #713f12 !important;
            color: #fde68a !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-visitas-page #visitas-list span[class~='bg-slate-100'] {
            background-color: #334155 !important;
            color: #e2e8f0 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .pwa-modal-content {
            color: #f8fafc;
        }

        html[data-theme='dark'] body.pwa-residentes .pwa-modal-header h3 {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes .pwa-modal-header button {
            background-color: #1e293b !important;
            border: 1px solid #475569 !important;
            color: #cbd5e1 !important;
        }

        body.pwa-residentes #pwa-modal #reserva-form button[type='submit'] {
            background-color: #4f46e5 !important;
            color: #fff !important;
            -webkit-text-fill-color: #fff !important;
        }

        html[data-theme='dark'] body.pwa-residentes .pwa-modal-content label {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes .pwa-modal-content input:not([type='checkbox']):not([type='radio']):not([type='submit']),
        html[data-theme='dark'] body.pwa-residentes .pwa-modal-content select,
        html[data-theme='dark'] body.pwa-residentes .pwa-modal-content textarea {
            color-scheme: dark !important;
            background-color: #0f172a !important;
            border-color: #475569 !important;
            color: #f8fafc !important;
            -webkit-text-fill-color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes .pwa-modal-content select option {
            color: #f8fafc !important;
            background-color: #0f172a !important;
        }

        html[data-theme='dark'] body.pwa-residentes .pwa-modal-content input::placeholder,
        html[data-theme='dark'] body.pwa-residentes .pwa-modal-content textarea::placeholder {
            color: #94a3b8 !important;
            opacity: 1;
        }

        html[data-theme='light'] body.pwa-residentes .pwa-modal-content {
            color: #0f172a;
        }

        html[data-theme='light'] body.pwa-residentes .pwa-modal-header h3 {
            color: #0f172a !important;
        }

        html[data-theme='light'] body.pwa-residentes .pwa-modal-header button {
            background-color: #f1f5f9 !important;
            border: 1px solid #cbd5e1 !important;
            color: #334155 !important;
        }

        html[data-theme='light'] body.pwa-residentes .pwa-modal-content label,
        html[data-theme='light'] body.pwa-residentes .pwa-modal-content [class~='text-gray-400'],
        html[data-theme='light'] body.pwa-residentes .pwa-modal-content [class~='text-gray-500'] {
            color: #334155 !important;
        }

        html[data-theme='light'] body.pwa-residentes .pwa-modal-content input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='submit']):not([type='button']),
        html[data-theme='light'] body.pwa-residentes .pwa-modal-content select,
        html[data-theme='light'] body.pwa-residentes .pwa-modal-content textarea {
            color-scheme: light !important;
            background-color: #f8fafc !important;
            border-color: #94a3b8 !important;
            color: #0f172a !important;
            caret-color: #0f172a !important;
            -webkit-text-fill-color: #0f172a !important;
        }

        html[data-theme='light'] body.pwa-residentes .pwa-modal-content input::placeholder,
        html[data-theme='light'] body.pwa-residentes .pwa-modal-content textarea::placeholder {
            color: #475569 !important;
            -webkit-text-fill-color: #475569 !important;
            opacity: 1 !important;
        }

        html[data-theme='light'] body.pwa-residentes .pwa-modal-content select option {
            color: #0f172a !important;
            background-color: #fff !important;
        }

        html[data-theme='light'] body.pwa-residentes .pwa-modal-content input:disabled,
        html[data-theme='light'] body.pwa-residentes .pwa-modal-content select:disabled,
        html[data-theme='light'] body.pwa-residentes .pwa-modal-content textarea:disabled,
        html[data-theme='light'] body.pwa-residentes .pwa-modal-content input[readonly],
        html[data-theme='light'] body.pwa-residentes .pwa-modal-content textarea[readonly] {
            background-color: #e2e8f0 !important;
            color: #334155 !important;
            -webkit-text-fill-color: #334155 !important;
            opacity: 1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #pwa-static-login > .absolute.inset-0 {
            background: linear-gradient(to bottom, rgba(15, 23, 42, .18), transparent) !important;
        }

        html[data-theme='dark'] body.pwa-residentes #pwa-static-login h2 {
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes #pwa-static-login h2 + p {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #pwa-static-login .resident-login-card {
            background-color: rgba(30, 41, 59, .96) !important;
            border-color: #475569 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #pwa-static-login label {
            color: #cbd5e1 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #pwa-static-login input,
        html[data-theme='dark'] body.pwa-residentes #pwa-static-login select {
            color-scheme: dark;
            background-color: #0f172a !important;
            border-color: #64748b !important;
            color: #f8fafc !important;
        }

        html[data-theme='dark'] body.pwa-residentes #pwa-static-login input::placeholder {
            color: #cbd5e1 !important;
            opacity: 1;
        }

        html[data-theme='dark'] body.pwa-residentes #pwa-static-login span[class~='bg-emerald-100/80'] {
            background-color: #134e4a !important;
            border-color: #0f766e !important;
            color: #99f6e4 !important;
        }

        html[data-theme='dark'] body.pwa-residentes #app .resident-dashboard header .pill-badge {
            background-color: #134e4a !important;
            border-color: #0f766e !important;
            color: #99f6e4 !important;
            -webkit-text-fill-color: #99f6e4 !important;
        }

        @media (max-width: 520px) {
            html body.pwa-residentes #app .resident-dashboard > nav {
                box-sizing: border-box;
                gap: .125rem !important;
                padding-left: 4rem !important;
                padding-right: .5rem !important;
                overflow-x: hidden !important;
            }

            html body.pwa-residentes #app .resident-dashboard > nav > button {
                flex: 1 1 0 !important;
                min-width: 0 !important;
                padding-left: .125rem !important;
                padding-right: .125rem !important;
                white-space: nowrap;
            }
        }

        html[data-theme='dark'] body.pwa-residentes .resident-chat-page #chat-messages [class~='bg-white/90'] {
            background-color: #1e293b !important;
            border-color: #475569 !important;
            color: #e2e8f0 !important;
            -webkit-text-fill-color: #e2e8f0 !important;
        }
    
