body{margin:0;background:#101c25;color:#e2edf3;font:16px system-ui}main{max-width:1000px;margin:auto;padding:28px}header,nav{display:flex;gap:24px;align-items:center;flex-wrap:wrap}a{color:#8dd9f3}label{display:block;margin:18px 0}input,select,button{font:inherit;padding:10px;border:1px solid #697e8b;border-radius:5px}input{display:block;margin-top:6px;max-width:100%;box-sizing:border-box}button{cursor:pointer;background:#236f66;color:white}section{margin:24px 0}#products button{display:block;margin:8px 0;text-align:left;width:100%}#status{white-space:pre-wrap}button:disabled{opacity:.5;cursor:wait}[hidden]{display:none!important}

.password-field{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.password-field input{margin:0;min-width:0}.password-field button{background:#253e4e}
#login{max-width:520px}#email{width:100%}.password-field input{flex:1;min-width:220px}#login-form>button{margin-top:18px}#login-form{padding-bottom:8px}

.library-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.file-result{white-space:pre-wrap;overflow-wrap:anywhere}.file-result:empty{display:none}#library details{margin:14px 0}#library summary{cursor:pointer;color:#8dd9f3}

.parts-dialog{max-width:850px;width:85vw;max-height:85vh;overflow:auto;background:#142633;color:#e2edf3;border:1px solid #697e8b;border-radius:10px;padding:24px}.parts-dialog::backdrop{background:#0009}.part-choice{display:flex;gap:12px;align-items:start}.part-choice input{display:inline;margin:4px 0}.parts-dialog select{max-width:100%}.parts-dialog button{margin-right:12px}

/* Clear product boundaries — keep each item and its actions together. */
#inventory,#library,#products,#linked-projects{display:grid;gap:18px}
#inventory>section,#library>section,#products>div,#linked-projects>p{box-sizing:border-box;min-width:0;margin:0;padding:20px;border:3px solid #829faf;border-radius:12px;background:#182b37;overflow-wrap:anywhere}
#inventory>section:focus-within,#library>section:focus-within,#products>div:focus-within,#linked-projects>p:focus-within{border-color:#f3ca76}
#inventory>section>h2,#library>section>h2{margin:0 0 12px;line-height:1.35}
#inventory>section>p:last-child{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:0}
#inventory>section a,.library-actions>a,#linked-projects>p>a{display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box;padding:8px 12px;border:1px solid #7894a5;border-radius:6px;background:#203a49}
#products>div>button{margin:0;white-space:normal;overflow-wrap:anywhere}#products>div>button+button{margin-top:12px}
#linked-projects>h3{margin-bottom:0}.parts-dialog .part-choice{padding:12px;margin:12px 0;border:3px solid #829faf;border-radius:9px;background:#182b37;overflow-wrap:anywhere}.parts-dialog .part-choice:has(input:checked){border-color:#f3ca76;background:#283a40}
@media(max-width:600px){#inventory>section,#library>section,#products>div,#linked-projects>p{padding:14px}main{padding:18px}#inventory>section>p:last-child a{max-width:100%}}
