/* Keep utility panels light and readable even when opened from a custom memo palette. */
.cloud-panel,.backup-hub-panel,.backup-hub-dialog,.backup-folder-dialog{--popup-bg:#fff!important;--popup-card:#fff!important;--popup-soft:#f7f8fa!important;--popup-input:#fff!important;--popup-text:#252b33!important;--popup-muted:#68717e!important;--popup-border:#e7e9ed!important;--popup-accent:#29333d!important;--popup-accentText:#fff!important;color:var(--popup-text);background:var(--popup-bg);border-color:var(--popup-border);color-scheme:light}
.cloud-panel :is(p,summary,h4),.backup-hub-panel :is(p,summary,h4,h5,label),.backup-hub-dialog :is(p,strong,h3),.backup-folder-dialog :is(p,h3){color:var(--popup-text)!important;opacity:1}
.cloud-panel small,.backup-hub-panel small,.backup-hub-dialog small,.backup-folder-dialog small{color:var(--popup-muted)!important;opacity:1}
.cloud-panel .btn-solid{background:var(--popup-accent);color:var(--popup-accentText)!important;border-color:var(--popup-accent)}
.cloud-panel h4,.backup-hub-panel h4{color:var(--popup-text)!important}
.backup-hub-panel{margin:0 0 22px;padding:18px;border:1px solid var(--popup-border,#e7e9ed);border-radius:14px;scroll-margin-top:12px}
.backup-hub-panel h4{font-size:17px;margin:0 0 8px}.backup-hub-panel h5{font-size:14px;margin:14px 0 8px}
.backup-hub-panel p{margin:8px 0;line-height:1.6;overflow-wrap:anywhere;font-size:13px}
.backup-hub-panel hr{border:0;border-top:1px solid var(--popup-border,#e7e9ed);margin-top:20px}
.backup-hub-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.backup-hub-grid label{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:600;min-width:0}
.backup-hub-grid select{width:100%;min-width:0;box-sizing:border-box;font:inherit;padding:10px;border:1px solid;border-radius:9px}
.backup-hub-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.backup-hub-actions .btn{white-space:normal;line-height:1.5;min-height:42px}
.backup-hub-panel details{margin-top:14px}.backup-hub-panel summary{cursor:pointer;font-size:13px}
.backup-hub-dialog{width:min(640px,94vw);box-sizing:border-box;max-height:86dvh;overflow:auto;padding:20px;border:1px solid;border-radius:16px}
.backup-hub-dialog::backdrop{background:#0009}.backup-hub-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px}.backup-hub-dialog header h3{margin:0;font-size:18px}.backup-hub-dialog p{overflow-wrap:anywhere;line-height:1.6}
.backup-hub-file{display:flex;width:100%;flex-direction:column;align-items:flex-start;text-align:left;gap:6px;margin:10px 0;padding:12px;white-space:normal;overflow-wrap:anywhere}.backup-hub-file small{font-size:12px;line-height:1.6}
#backupHubSelection:empty{display:none}.backup-hub-panel [hidden],.backup-hub-dialog [hidden]{display:none!important}
@media(max-width:420px){.backup-hub-grid{grid-template-columns:1fr}.backup-hub-panel,.cloud-panel{padding:14px}.backup-hub-dialog{padding:16px}.backup-hub-actions>.btn{flex:1 1 135px}}

.backup-hub-name-field{margin-top:12px}
.backup-hub-name-field label{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:600}
.backup-hub-name-field input{width:100%;min-width:0;box-sizing:border-box;font:inherit;padding:10px;border:1px solid var(--popup-border,#e7e9ed);border-radius:9px;background:var(--popup-input,#fff);color:inherit}
.backup-hub-item-row{display:flex;align-items:center;gap:8px;margin:10px 0}
.backup-hub-item-row .backup-hub-file-btn{margin:0;flex:1 1 auto;min-width:0}
.backup-hub-trash-btn{flex:0 0 auto;min-width:44px;min-height:44px;padding:8px 12px;font-size:16px;border-radius:10px;cursor:pointer}
.backup-hub-trash-btn:hover{background:#fff1f0;color:#b42318}
