/* Personal display. Dark keeps the established application appearance. */
.rn-dashboard-adjust{border:1px solid #78a46e;border-radius:8px;background:#244f39;color:#fff;padding:10px 14px;font-weight:700;cursor:pointer;min-height:44px;white-space:nowrap}
.dashboard-toolbar{gap:12px;flex-wrap:wrap}.dashboard-settings-popup{max-height:90dvh;overflow:auto}.rn-display-setting{padding:14px;border:1px solid #d2ddd6;background:#f3f7f4;border-radius:10px;margin:16px 0}.rn-display-setting label{display:grid;gap:7px;color:#203d2e;font-weight:700}.rn-display-setting small{font-size:12px;color:#50675a;font-weight:400}.rn-display-setting select,.profile-grid select{padding:10px;border:1px solid #b9cbbf;border-radius:7px;background:#fff;color:#183629;min-height:44px}.rn-tile-order{padding:0;list-style:none;margin:12px 0}.rn-tile-order li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px;border:1px solid #d6e2da;border-radius:8px;margin:6px 0;background:#f6f9f7;color:#203d2e}.rn-order-actions{display:flex;gap:6px;flex-shrink:0}.rn-order-actions button{width:44px;min-height:44px;border:1px solid #a9bfb1;background:#fff;color:#16472d;border-radius:7px;font-weight:800;cursor:pointer}.rn-order-actions button:disabled{opacity:.35;cursor:default}[data-rn-theme-select]:disabled{opacity:.6}[data-rn-theme-status]{display:block;font-size:12px;line-height:1.45}.dashboard-settings-popup h3{color:#24463a}.rn-tile-order button:focus-visible,.rn-dashboard-adjust:focus-visible{outline:3px solid #4a922a;outline-offset:2px}
html[data-rn-theme="light"]{--green:#2c6f28;--green-dark:#225822;--green-soft:#286d23;--panel:#fff;--panel-strong:#f5f8f6;--line:#c8d9ce;--text:#193629;--muted:#4e6759;color-scheme:light}
html[data-rn-theme="light"] body{background:#f1f5f2;color:#193629}
html[data-rn-theme="light"] body::before{background:linear-gradient(135deg,#f8faf8,#e9f1ec)}
html[data-rn-theme="light"] :is(.app-sidebar,header,.mobile-bottom-nav){background:#fff;border-color:#ceddd3;box-shadow:0 3px 16px #20452b0b}
html[data-rn-theme="light"] :is(header h1,.brand strong,.dashboard-toolbar h2,.card h3,.dashboard-widget-head h3,.dash-weather-temp,.dash-stat strong,.dashboard-generic-preview strong){color:#183c2a}
html[data-rn-theme="light"] :is(header p,.brand span,.menu-title,.user-meta span,.dashboard-toolbar span,.card p,.dashboard-widget-head span,.dash-weather-desc,.dash-stat span,.dashboard-generic-preview p,.dash-empty,.dashboard-slot-empty){color:#526c5c}
html[data-rn-theme="light"] :is(.side-nav button,.mobile-bottom-nav button){color:#244b34}
html[data-rn-theme="light"] :is(.side-nav button.active,.mobile-bottom-nav button.active){background:#2e7544;color:#fff}
html[data-rn-theme="light"] .sidebar-logout{color:#31513e!important}
html[data-rn-theme="light"] :is(.card,.dashboard-widget){background:#fff;border-color:#cbded1;box-shadow:0 5px 18px #193e2510}
html[data-rn-theme="light"] :is(.dashboard-widget-head,.dash-table th,.dash-table td,.dash-calendar-item){border-color:#d8e4dd;color:#244b34}
html[data-rn-theme="light"] .dash-table th{background:#f0f6f2}
html[data-rn-theme="light"] :is(.dash-stat,.dash-calendar-item){background:#f3f8f4;border-color:#d5e3da}
html[data-rn-theme="light"] :is(.dash-btn,.mobile-menu-button){background:#edf6ee;border-color:#aecab7;color:#235333}
html[data-rn-theme="light"] :is(.card-footer,.dash-weather-place){color:#286b33}
html[data-rn-theme="light"] footer{background:#e6eee8;border-color:#c9d9cd;color:#48634f}
html[data-rn-theme="light"] :is(#fallenOverlay,#revierkarteOverlay){background:#f1f5f2!important;color:#193629}
html[data-rn-theme="light"] #fallenOverlay::before{background:#f1f5f2!important}
html[data-rn-theme="light"] #fallenOverlay :is(.fallen-stat,.fallen-home-tile,.fallen-dashboard-widget,.fallen-dashboard-group-dialog,.fallen-service-item){background:#fff!important;border-color:#c9ddd0!important;color:#193629!important;box-shadow:0 4px 16px #183d2510}
html[data-rn-theme="light"] #fallenOverlay :is(h1,h2,h3,h4,.fallen-stat strong,.fallen-home-tile h3,.fallen-widget-title){color:#183c2a!important}
html[data-rn-theme="light"] #fallenOverlay :is(.fallen-home-tile p,.fallen-home-tile .open,.weather-note){color:#4f6c59!important}
html[data-rn-theme="light"] #revierkarteOverlay :is(.rk-full-head,.rk-side,.rk-side-section,.rk-side-btn,.rk-area-manager,.rk-boundary-popup,.rk-side-title,.map-filter-box,#rkBoundaryPopup){background:#fff!important;border-color:#c8dace!important;color:#193d29!important}
html[data-rn-theme="light"] #revierkarteOverlay :is(h2,h3,.rk-side-title,.rk-side-section-head,.rk-object-row,.rk-object-list,.rehkitz-muted,.map-filter-title,.map-filter-list,.rk-area-manager label){color:#284e36!important}
html[data-rn-theme="light"] #revierkarteOverlay .rk-side-btn.primary{background:#2e7544!important;color:#fff!important}
html[data-rn-theme="light"] #revierkarteOverlay :is(input,select){background:#f8fbf9!important;color:#193d29!important;border-color:#bbd0c2!important}
/* Dedicated account/NFC pages use the same personal palette. */
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] body{background:#071710;color:#e9f2ec}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(main,.user,.tile,.box,.panel,.card){background:#10281c;color:#e9f2ec;border-color:#35513f}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(h1,h2,h3,h4,label,th){color:#e9f2ec}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(input,select,textarea){background:#173323;color:#f0f6f2;border-color:#52715c}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(.hint,.weather-note,small){color:#bfd0c3}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(a,.nfcTagSelected){color:#bbdfc2}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] .nfcTagSelected{background:#244d34}
@media(max-width:600px){.rn-dashboard-adjust{font-size:13px}.rn-tile-order li{font-size:13px}.dashboard-settings-popup{padding:20px!important}.rn-display-setting{padding:10px}}
@media print{html[data-rn-theme] body{background:#fff!important;color:#000!important}html[data-rn-theme] body::before{display:none!important}}

html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"]{--text:#e9f2ec;--muted:#bfd0c3;--bg:#071710;--card:#10281c;--line:#35513f}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(.folder,.category,.menu,.menu button,.category-menu,.category-menu button,.upload-box,.storage-card,.photo,th){background:#173323;color:#e9f2ec;border-color:#35513f}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(.folder.active,.category.active){background:#29563b;border-color:#77a384}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] .category.child{background:#183222}
html[data-rn-theme="light"] .top{background:#fff;color:#193629;border-color:#c8d9ce}html[data-rn-theme="light"] .top p{color:#526c5c}

html[data-rn-theme="light"] #fallenOverlay :is(.fallen-module-head,.fallen-module-nav,.fallen-kpi,.fallen-dash-card,.fallen-service-panel,.fallen-quick:not(.primary):not(.telegram):not(.super)){background:#fff!important;color:#193629!important;border-color:#cadbd0!important}
html[data-rn-theme="light"] #fallenOverlay :is(.fallen-module-nav button,.fallen-module-title p,.fallen-revier-chip,.fallen-kpi span,.fallen-service-item p,.fallen-service-layout-reset,.fallen-dash-card .card-link,.fallen-status-row small,.fallen-dash-line small){color:#42624d!important}
html[data-rn-theme="light"] #fallenOverlay .fallen-module-nav button.active{background:#2e7544!important;color:#fff!important}
html[data-rn-theme="light"] #fallenOverlay .fallen-module-nav button.super-only:not(.active){background:#fff2d4!important;color:#704606!important}
html[data-rn-theme="light"] #fallenOverlay .fallen-user-dashboard .fallen-dash-card .fallen-dash-line,
html[data-rn-theme="light"] #fallenOverlay .fallen-user-dashboard .fallen-dash-card .fallen-dash-line .left,
html[data-rn-theme="light"] #fallenOverlay .fallen-user-dashboard .fallen-dash-card .fallen-dash-line .left>span:not(.fallen-dot),
html[data-rn-theme="light"] #fallenOverlay .fallen-user-dashboard .fallen-dash-card .fallen-dash-line strong,
html[data-rn-theme="light"] #fallenOverlay .fallen-user-dashboard .fallen-dash-card .fallen-dash-line .left strong{color:#193d29!important}
html[data-rn-theme="light"] #fallenOverlay .fallen-user-dashboard .fallen-dash-card .fallen-dash-line small{color:#526c5c!important}
html[data-rn-theme="light"] #fallenOverlay .fallen-kpi.online strong{color:#087537!important}html[data-rn-theme="light"] #fallenOverlay .fallen-kpi.alarm strong{color:#b72727!important}html[data-rn-theme="light"] #fallenOverlay .fallen-kpi.offline strong{color:#895c00!important}html[data-rn-theme="light"] #fallenOverlay .fallen-kpi.wait strong{color:#005e91!important}
html[data-rn-theme="light"] #fallenOverlay .fallen-status-pill{color:#17633c;background:#e2f3e8}
html[data-rn-theme="light"] #revierkarteOverlay :is(.rk-full-sub,.rk-head-chip){color:#42624d;border-color:#b9cdbf}

html[data-rn-theme="light"] #revierkarteOverlay :is(.rk-map-stage,#revierkarteMap){background:#e9f1ec!important}
html[data-rn-theme="light"] #fallenOverlay .fallen-dashboard-toolbar .hint{color:#526c5c}

/* Dark surfaces and explicit foregrounds must change together, including nested dialogs. */
@media screen {
html[data-rn-theme="dark"]{--rn-dialog:#10281c;--rn-raised:#193627;--rn-dialog-line:#45634e;--rn-dialog-text:#edf5ef;--rn-dialog-muted:#c1d1c6;--rn-field:#0c2117;--rn-link:#a6dfb5}
html[data-rn-theme="dark"] :is(.login-popup,.profile-popup,.fallen-confirm-box,.rn-display-setting,.rn-tile-order li){background:var(--rn-dialog)!important;color:var(--rn-dialog-text)!important;border-color:var(--rn-dialog-line)}
html[data-rn-theme="dark"] :is(.login-popup,.profile-popup,.fallen-confirm-box) :is(h1,h2,h3,h4,label,legend){color:var(--rn-dialog-text)!important}
html[data-rn-theme="dark"] :is(.login-popup,.profile-popup,.fallen-confirm-box) :is(.login-subtitle,.weather-note,.recovery-note,.dashboard-settings-note,small,[data-rn-theme-status]){color:var(--rn-dialog-muted)!important}
html[data-rn-theme="dark"] :is(.login-popup,.profile-popup,.fallen-confirm-box) :is(input,select,textarea){background:var(--rn-field)!important;color:var(--rn-dialog-text)!important;border-color:#668d74!important;color-scheme:dark}
html[data-rn-theme="dark"] :is(.login-popup,.profile-popup,.fallen-confirm-box) :is(input,textarea)::placeholder{color:#aec2b5;opacity:1}
html[data-rn-theme="dark"] :is(.login-popup,.profile-popup,.fallen-confirm-box) a{color:var(--rn-link)}
html[data-rn-theme="dark"] .login-popup .login-help-link{color:var(--rn-link)}
html[data-rn-theme="dark"] .login-popup .register-link{background:#2d533d;color:#fff;border-color:#668d74}
html[data-rn-theme="dark"] .login-popup button[aria-label="Passwort anzeigen"]{color:var(--rn-dialog-text)}
html[data-rn-theme="dark"] :is(.rn-display-setting label,.rn-display-setting small,.rn-tile-order li,.dashboard-setting-row label,.dashboard-settings-popup h3){color:var(--rn-dialog-text)}
html[data-rn-theme="dark"] :is(.rn-display-setting select,.rn-order-actions button){background:var(--rn-raised);color:var(--rn-dialog-text);border-color:var(--rn-dialog-line)}
html[data-rn-theme="dark"] #fallenStammOverlay :is(.fallen-stamm-grid>div,#fallenZuordnungBox,#fallenHistorieBox){background:var(--rn-raised)!important;color:var(--rn-dialog-text)!important;border-color:var(--rn-dialog-line)!important}
html[data-rn-theme="dark"] .fallen-confirm-box .fallen-table{color:var(--rn-dialog-text)}
html[data-rn-theme="dark"] .fallen-confirm-box .fallen-table :is(th,td){color:var(--rn-dialog-text);border-color:var(--rn-dialog-line)}
html[data-rn-theme="dark"] .fallen-confirm-box .fallen-table th{background:#244431}
html[data-rn-theme="dark"] .fallen-confirm-box .fallen-row:hover{background:#254b35}
.fallen-confirm-box .fallen-table button:not(.fallen-danger):not(.fallen-delete){background:#2d533d;color:#fff}
html[data-rn-theme="dark"] .fallen-confirm-box :is(.fallen-secondary,.fallen-primary){background:#2d6943;color:#fff;border-color:#6da27d}
html[data-rn-theme="dark"] .fallen-confirm-box a{color:#a6dfb5}
html[data-rn-theme="dark"] .fallen-confirm-box .fallen-table :is(strong[style],div[style*="color:#365647"]){color:var(--rn-dialog-text)!important}
html[data-rn-theme="dark"] .fallen-confirm-box p{color:var(--rn-dialog-muted)}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(.invite-panel,.rkperm-card,.rkperm-group-head){background:var(--rn-raised);color:var(--rn-dialog-text);border-color:var(--rn-dialog-line)}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(.role,.invite-code,.jagd-none){color:#c1d1c6}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] .jagd-ok{color:#91e5ac}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] .jagd-warn{color:#f4d58c}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] .photo img{background:#244431;color:#edf5ef}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] .breadcrumb button{color:#a6dfb5}
html[data-rn-display-page="standalone"]:not([data-rn-legacy-dark]):not([data-rn-white-surface])[data-rn-theme="dark"] :is(.save,.primary){background:#28683e;color:#fff}
}

/* Management forms intentionally remain white in either personal theme. */
@media screen {
html[data-rn-white-surface="true"]{color-scheme:light!important}
html[data-rn-white-surface="true"] body{background:#f4f6f4;color:#24312b}
html[data-rn-white-surface="true"] main{background:#fff;color:#24312b}
html[data-rn-theme] #fallenStammOverlay{--rn-dialog:#fff;--rn-raised:#f5f7f6;--rn-dialog-text:#24312b;--rn-dialog-muted:#526059;--rn-field:#fff;--rn-link:#245d40;color-scheme:light}
html[data-rn-theme] #fallenStammOverlay .fallen-stamm-grid>div:last-child{background:#fff!important}
html[data-rn-theme] #fallenStammOverlay :is(input,select,textarea){background:#fff!important;color:#24312b!important;color-scheme:light!important;border-color:#b7c8bd!important}
html[data-rn-theme] #fallenStammOverlay :is(input,textarea)::placeholder{color:#65756d;opacity:1}
html[data-rn-theme] #fallenStammOverlay .fallen-table th{background:#edf3ef;color:#26362e}
html[data-rn-theme] #fallenStammOverlay .fallen-table :is(th,td){border-color:#d7e2db}
html[data-rn-theme] #fallenStammOverlay .fallen-row:hover{background:#f5f8f6}
html[data-rn-theme] #fallenStammOverlay a{color:#245d40}
html[data-rn-theme] #fallenStammOverlay .fallen-danger{border:0;border-radius:7px;background:#b92d2d;color:#fff;padding:.65rem .9rem;font-weight:700;cursor:pointer}
}

/* The cashbook is a white dialog even when the surrounding dashboard is dark. */
@media screen {
#kassenOverlay{color-scheme:light}
#kassenOverlay :is(input,select,textarea,option,optgroup){color-scheme:light!important}
#kassenOverlay :is(select option,select optgroup){background:#fff;color:#24312b}
#kassenOverlay .rn-autocomplete-list{color-scheme:light;color:#24312b;background:#fff}
#kassenOverlay .rn-autocomplete-list button{color:#24312b!important;background:#fff!important}
#kassenOverlay .rn-autocomplete-list button:is(:hover,:focus-visible){color:#193b29!important;background:#e4eee7!important}
}

/* Catch entry stays light, including the native open selection in dark mode. */
@media screen {
#jsForm select{color-scheme:light!important;background:#fff!important;color:#24312b!important}
#jsForm select :is(option,optgroup){color-scheme:light!important;background:#fff!important;color:#24312b!important}
#jsForm select option:checked{background:#dcebe1!important;color:#193b29!important}
}
