.km-database-switch {
    color: var(--theme-text, #17202a); background: var(--theme-surface, #fff);
    border-block: 1px solid var(--theme-border, #cbd5e1); padding: 18px 0; min-width: 0;
    font-family: inherit; font-size: 14px; line-height: 1.5; letter-spacing: 0;
}
.km-database-switch *, .km-database-switch *::before, .km-database-switch *::after { box-sizing: border-box; letter-spacing: 0; }
.km-database-switch [hidden] { display: none !important; }
.km-database-switch .km-db-header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.km-database-switch h3 { font-size: 16px; line-height: 1.4; margin: 0; font-weight: 700; }
.km-database-switch [data-db-current] { font-size: 13px; color: var(--theme-muted, #566474); }
.km-database-switch fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.km-database-switch legend { font-size: 13px; font-weight: 600; margin-bottom: 10px; padding: 0; }
.km-database-switch label { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 13px; font-weight: 600; }
.km-database-switch :is(input:not([type="checkbox"]), select) { width: 100%; min-width: 0; height: 42px; padding: 8px 10px; border: 1px solid var(--theme-border, #a8b4c0); border-radius: 6px; background: var(--theme-surface-soft, #f8fafc); color: inherit; font: inherit; font-weight: 400; }
.km-database-switch .km-db-backend { max-width: 280px; margin-bottom: 16px; }
.km-database-switch .km-db-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(100px, 1fr); gap: 14px 16px; max-width: 720px; }
.km-database-switch .km-db-password { grid-column: 1 / -1; }
.km-database-switch .km-db-muted { color: var(--theme-muted, #566474); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.km-database-switch .km-db-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 18px; }
.km-database-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; max-width: 100%; padding: 9px 13px; border: 1px solid var(--theme-border, #a8b4c0); border-radius: 6px; background: var(--theme-surface-soft, #f8fafc); color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.km-database-switch button span { min-width: 0; overflow-wrap: anywhere; text-align: center; }
.km-database-switch :is(svg, i[data-lucide]) { flex: 0 0 18px; width: 18px; height: 18px; }
.km-database-switch button:not(:disabled):hover { border-color: var(--theme-accent, #235fa6); }
.km-database-switch :is(button, input, select):focus-visible { outline: 2px solid var(--theme-accent, #235fa6); outline-offset: 3px; }
.km-database-switch :is(button, input, select):disabled { opacity: .55; cursor: not-allowed; }
.km-database-switch[aria-busy="true"] { cursor: progress; }
.km-database-switch .km-db-status { min-height: 22px; margin: 12px 0; overflow-wrap: anywhere; }
.km-database-switch[data-status="error"] .km-db-status { color: #a32632; }
.km-database-switch[data-status="success"] .km-db-status { color: #176844; }
.km-database-switch .km-db-confirm { border-left: 3px solid #b37616; padding: 12px 16px; background: var(--theme-surface-soft, #f8fafc); max-width: 720px; margin-block: 12px; }
.km-database-switch h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.km-database-switch .km-db-confirm p { margin-block: 10px; overflow-wrap: anywhere; }
.km-database-switch .km-db-ack { flex-direction: row; align-items: flex-start; gap: 10px; margin-top: 16px; }
.km-database-switch input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; margin: 2px 0 0; accent-color: var(--theme-accent, #235fa6); }
.km-database-switch [data-db-commit] { border-color: #a32632; color: #a32632; }
.km-database-switch .km-db-reload { border: 0; padding-inline: 0; background: transparent; color: var(--theme-muted, #566474); }
body[data-theme="glass"] .km-database-switch { background: transparent; }
@media (max-width: 480px) {
    .km-database-switch .km-db-fields { grid-template-columns: minmax(0, 1fr); }
    .km-database-switch .km-db-backend { max-width: none; }
    .km-database-switch .km-db-actions { flex-direction: column; }
    .km-database-switch .km-db-actions button { width: 100%; }
    .km-database-switch .km-db-confirm { padding-inline: 10px; }
}
@media print { .km-database-switch { display: none; } }
