/* Webmail v3: consistent theme on login and admin pages */
:root{color-scheme:light}html[data-theme="dark"]{color-scheme:dark}
.header-actions{display:flex;align-items:center;gap:10px}.theme-switch{font:inherit;border-radius:8px;padding:10px 14px;border:1px solid #bcc7d7;background:#edf1f6;color:#173c68;cursor:pointer;white-space:nowrap}.login-theme{position:fixed;top:22px;right:22px;width:auto;margin:0;z-index:2}
html[data-theme="dark"] body{background:#101723!important;color:#e7edf7!important}
html[data-theme="dark"] main,html[data-theme="dark"] section{background:#1b2636!important;color:#e7edf7!important;border-color:#35445b!important;box-shadow:0 5px 20px #0002!important}
html[data-theme="dark"] input:not([type="checkbox"]),html[data-theme="dark"] select{background:#111b29!important;color:#f0f4fa!important;border-color:#53637a!important}
html[data-theme="dark"] input::placeholder{color:#a2afc1}
html[data-theme="dark"] .muted,html[data-theme="dark"] .state,html[data-theme="dark"] footer{color:#b4c1d1!important}
html[data-theme="dark"] td,html[data-theme="dark"] th{border-color:#344359!important}
html[data-theme="dark"] button.secondary,html[data-theme="dark"] .theme-switch{background:#2b3b51!important;color:#eef4ff!important;border:1px solid #52647b!important}
html[data-theme="dark"] button:not(.secondary):not(.theme-switch){background:#3e72ad!important;color:#fff!important}
html[data-theme="dark"] .notice{background:#193c32!important;color:#d9f8e8!important}
html[data-theme="dark"] .notice.error{background:#4c242b!important;color:#ffdbdf!important}
html[data-theme="dark"] .error{color:#ffb3b3!important}
@media(max-width:650px){.header-actions{flex-wrap:wrap;justify-content:flex-end}.theme-switch{font-size:13px;padding:9px}.login-theme{top:10px;right:10px}}
/* V4: the entire viewport, including outside the centered body, uses the selected theme. */
html{min-height:100%;background:#f5f7fa}
html[data-theme="dark"]{background:#101723!important;min-height:100%;}
html[data-theme="dark"] body{background:#101723!important;min-height:100vh;}
html[data-theme="dark"] table,html[data-theme="dark"] thead,html[data-theme="dark"] tbody,html[data-theme="dark"] tr{background:transparent!important;color:inherit!important}
