.storage-settings{max-width:980px;color:var(--ink)}.storage-panel{padding:28px;margin-bottom:22px;background:var(--paper);border:1px solid var(--line)}.storage-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:22px}.storage-section-head h2{margin:0 0 8px;font-size:18px}.storage-section-head p,.storage-note,.storage-path,.storage-preview p{margin:6px 0;color:var(--muted);font-size:13px;line-height:1.8}.storage-current{flex-shrink:0;display:inline-flex;border:1px solid var(--line);border-radius:20px;padding:7px 11px;font-size:12px;color:var(--ink);background:var(--surface)}.storage-settings fieldset{border:0;padding:0;margin:0;min-width:0}.storage-settings .field{display:flex;flex-direction:column;gap:8px}.storage-settings .field small{font-size:12px;line-height:1.6;color:var(--muted)}.storage-settings .field input,.storage-settings .field select{width:100%;box-sizing:border-box;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:11px 12px;font:inherit;color-scheme:inherit}.storage-settings input:focus-visible,.storage-settings select:focus-visible,.storage-settings button:focus-visible{outline:2px solid var(--accent,var(--ink));outline-offset:3px}.storage-provider{max-width:440px;margin-bottom:24px}.storage-local{max-width:640px}.storage-path{overflow-wrap:anywhere}.storage-path code{font:inherit;color:var(--ink)}.storage-settings input[readonly]{background:var(--surface);color:var(--muted)}.storage-fields{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:20px 0}.storage-settings [hidden]{display:none!important}.storage-settings .dialog-actions{margin-top:24px}.storage-cleanup-row{display:flex;align-items:center;gap:18px;margin:22px 0}.storage-cleanup-row .field{flex:1;max-width:380px}.storage-cleanup-actions{display:flex;flex-direction:column;gap:9px}.storage-cleanup-buttons{display:flex;gap:12px;flex-wrap:wrap}.storage-cleanup-actions small{color:var(--muted);font-size:12px}.storage-settings .storage-cleanup-primary{background:var(--danger,#c53d46);color:#fff;border-color:var(--danger,#c53d46);font-weight:600}.storage-cloud-warning,.storage-preview{padding:16px;border-radius:10px;background:var(--surface);border:1px solid var(--line);font-size:13px;line-height:1.8}.storage-preview h3{font-size:15px;margin:0 0 12px}.storage-preview dl{display:grid;grid-template-columns:2fr 1fr 1fr;gap:18px;margin:0 0 12px}.storage-preview dt{color:var(--muted);font-size:12px}.storage-preview dd{margin:5px 0 0;font-weight:600;font-size:14px}.storage-preview button{margin-top:12px}.storage-error{color:var(--danger,#d66767);font-size:13px;line-height:1.7;overflow-wrap:anywhere}.storage-error:empty,.storage-status:empty{display:none}.storage-status{font-size:13px;line-height:1.7;color:var(--ink)}.storage-settings button:disabled,.storage-settings fieldset:disabled{opacity:.6}.storage-settings button:disabled{cursor:not-allowed}.storage-confirm-warning{font-weight:600;line-height:1.8}#storage-confirm-form>p{line-height:1.8}#storage-confirm-form .field{display:flex;flex-direction:column;gap:8px}#storage-confirm-form .field small{color:var(--muted);font-size:12px}@media(max-width:700px){.storage-panel{padding:20px}.storage-section-head{flex-direction:column;gap:12px}.storage-fields{grid-template-columns:1fr;gap:18px}.storage-cleanup-row{align-items:stretch;flex-direction:column}.storage-cleanup-row .field{max-width:none}.storage-cleanup-buttons{flex-direction:column}.storage-cleanup-buttons .btn{width:100%}.storage-preview dl{grid-template-columns:1fr}.storage-settings .dialog-actions .btn{width:100%}}

.storage-fields .storage-endpoint{grid-column:1/-1}

/* Connection testing stays with the form; no modal or separate upload flow. */
.storage-connection-actions{justify-content:flex-start;gap:10px;flex-wrap:wrap}
.storage-test-hint,.storage-test-pending{margin:12px 0 0;color:var(--muted);font-size:13px;line-height:1.7}
.storage-test-result{display:flex;align-items:flex-start;gap:24px;margin-top:22px;padding:20px;background:var(--surface);border-radius:14px}
.storage-test-result figure{margin:0;flex:0 0 160px}
.storage-test-result img{display:block;width:160px;height:100px;object-fit:contain;border-radius:8px}
.storage-test-result figcaption{margin-top:8px;font-size:12px;color:var(--muted)}
.storage-test-details{flex:1;min-width:0}.storage-test-details h3{margin:0 0 12px;font-size:15px;font-weight:600}
.storage-test-details ul{list-style:none;padding:0;margin:0;display:grid;gap:9px}
.storage-test-details li{display:grid;grid-template-columns:minmax(110px,180px) max-content;justify-content:start;gap:5px 20px;font-size:13px;line-height:1.6}
.storage-test-details strong{font-size:12px;font-weight:500;color:var(--muted)}
.storage-test-details li.is-success strong{color:light-dark(#25734b,#80d4a1)}
.storage-test-details li.is-failed strong,.storage-test-details li.is-failed p{color:var(--danger,#b53745)}
.storage-test-details li p,.storage-test-details>p{grid-column:1/-1;margin:0;font-size:13px;overflow-wrap:anywhere}
@media(max-width:600px){.storage-test-result{gap:16px;flex-direction:column;padding:16px}.storage-test-result figure{flex-basis:auto}.storage-test-details{width:100%}.storage-connection-actions .btn{flex:1 1 auto}.storage-settings input{font-size:16px}}

.storage-provider-title{margin:0 0 6px;font-size:16px;font-weight:600}
.storage-advanced{margin-top:4px}
.storage-advanced summary{display:flex;align-items:center;gap:9px;width:fit-content;cursor:pointer;border-radius:8px;padding:8px 12px;background:var(--surface);font-size:13px;font-weight:500;color:var(--ink);list-style:none}
.storage-advanced summary::-webkit-details-marker{display:none}
.storage-advanced summary::after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:-3px 2px 0 5px}
.storage-advanced[open] summary::after{transform:rotate(225deg);margin-top:3px}
.storage-advanced summary span{font-size:12px;font-weight:400;color:var(--muted)}
.storage-advanced summary:hover{background:color-mix(in srgb,var(--ink) 8%,var(--paper))}
.storage-advanced summary:focus-visible{outline:2px solid var(--accent,var(--ink));outline-offset:3px}
.storage-cloud [data-provider-form="s3"] .field:has(input[name="bucket"]){grid-column:1/-1}
