/* Gambio Security Manager v1.5 - theme layer */
:root {
    color-scheme: light;
}
html[data-theme="dark"] {
    color-scheme: dark;
}
.theme-toggle {
    appearance: none;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.08);
    color: inherit;
    border-radius: 8px;
    padding: 7px 10px;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.theme-toggle:hover { background: rgba(255,255,255,.15); }
.theme-icon { font-size: 16px; }
.install-current,
.install-current:hover {
    cursor: default;
    opacity: .72;
    background: #dfe7e5 !important;
    color: #47615c !important;
    border-color: transparent !important;
}

/* Dark theme deliberately overrides the existing app.css rather than replacing it. */
html[data-theme="dark"] body {
    background: #101718 !important;
    color: #e7eeee !important;
}
html[data-theme="dark"] .top {
    background: #0b292b !important;
    color: #f4f8f8 !important;
    border-color: #214144 !important;
}
html[data-theme="dark"] .top a,
html[data-theme="dark"] .brand,
html[data-theme="dark"] .nav a {
    color: #f4f8f8 !important;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] strong,
html[data-theme="dark"] b {
    color: #f3f7f7 !important;
}
html[data-theme="dark"] .card {
    background: #172123 !important;
    border-color: #2b3b3e !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.3) !important;
}
html[data-theme="dark"] table {
    color: #e2e9e9 !important;
}
html[data-theme="dark"] th {
    color: #aebfc0 !important;
}
html[data-theme="dark"] td,
html[data-theme="dark"] th {
    border-color: #2b3b3e !important;
}
html[data-theme="dark"] .muted {
    color: #9dafb0 !important;
}
html[data-theme="dark"] code {
    background: #0e1718 !important;
    color: #d7e3e3 !important;
    border-color: #304245 !important;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #10191a !important;
    color: #eef4f4 !important;
    border-color: #3b4d50 !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #819394 !important;
}
html[data-theme="dark"] .btn.secondary {
    background: #293638 !important;
    color: #edf3f3 !important;
    border-color: #3c4c4f !important;
}
html[data-theme="dark"] .btn.secondary:hover {
    background: #344346 !important;
}
html[data-theme="dark"] .install-current,
html[data-theme="dark"] .install-current:hover {
    background: #243334 !important;
    color: #8fa3a4 !important;
}
html[data-theme="dark"] .flash {
    background: #173d31 !important;
    color: #ccebdd !important;
    border-color: #285746 !important;
}
html[data-theme="dark"] .badge.ok {
    background: #183c30 !important;
    color: #8fe0bb !important;
}
html[data-theme="dark"] .badge.warn {
    background: #443518 !important;
    color: #f2ce78 !important;
}
html[data-theme="dark"] .badge.bad {
    background: #482426 !important;
    color: #f2a4a8 !important;
}
@media (max-width: 760px) {
    .theme-label { display: none; }
    .theme-toggle { padding: 7px 9px; }
}
/* v1.8 safety UI */
.modified-confirm{display:inline-flex;align-items:center;gap:7px;margin:8px 8px 8px 0;padding:7px 10px;border:1px solid #d7a0a0;border-radius:8px;background:#fff1f1;color:#8b2222;font-size:12px;font-weight:700}.modified-confirm input{width:auto;margin:0}.health-note{font-size:12px}
