/* AIM STEM LAB v0.27.199 — explicit-save Project Cloud UI. */
/* AIM STEM LAB v0.27.189 — stable Save + lab-scoped My Projects experience. */
:root{--aim-pc-red:#8a1020;--aim-pc-red2:#b0172f;--aim-pc-ink:#173746;--aim-pc-muted:#657e87;--aim-pc-line:#d7e2e6;--aim-pc-soft:#f5f8f9}
html{scrollbar-gutter:stable}

/* Project restoration may replace a complete lab snapshot. Suppress transition/animation
   interpolation for those two paint frames so components settle once instead of visibly
   travelling through intermediate layout states. */
html.aim-project-restoring *,html.aim-project-restoring *::before,html.aim-project-restoring *::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
.aim-project-controls{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;min-width:0;flex-wrap:nowrap;contain:layout style}
.aim-pc-action{height:38px;min-height:38px;border:1px solid #d2dfe3;border-radius:10px;background:#fff;color:#294b56;padding:0 10px;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;font:800 10.5px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;box-shadow:0 2px 8px rgba(18,45,55,.04);transition:border-color .14s ease,background .14s ease,color .14s ease}
.aim-pc-action:hover{border-color:#b9828b;background:#fff7f8;color:#821020}.aim-pc-action:active{background:#fdf3f5}.aim-pc-action:disabled{opacity:.6;cursor:wait}
.aim-pc-save{width:74px;min-width:74px;border-color:#c7969e;color:#861121}.aim-pc-projects{width:116px;min-width:116px;position:relative}
.aim-pc-save[data-state="saved"]{border-color:#b8d7d0;background:#f3fbf8;color:#315f58}.aim-pc-save[data-state="error"]{border-color:#dba5ae;background:#fff5f6;color:#8a1020}
.aim-pc-icon{font-size:12px;line-height:1;flex:0 0 auto}.aim-pc-save-copy{display:inline-block;width:42px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aim-pc-count{width:18px;min-width:18px;height:18px;padding:0;border-radius:999px;background:#f3e5e7;color:#8a1020;display:inline-grid;place-items:center;font-size:8px;font-weight:950;flex:0 0 18px}.aim-pc-count[hidden]{display:inline-grid!important;visibility:hidden}
.aim-pc-legacy-hidden{display:none!important}

/* Host-specific fitting. Static HTML placement means these controls occupy their
   final size before the lab becomes interactive, preventing first-paint jumps. */
body.arduino-page .studio-actions .aim-project-controls{order:4}
body.arduino-page .studio-actions .aim-pc-action{height:36px;min-height:36px;border-radius:9px;font-size:9px}
body.arduino-page .studio-actions .aim-pc-save{width:68px;min-width:68px}body.arduino-page .studio-actions .aim-pc-projects{width:108px;min-width:108px}
body.arduino-page .studio-actions #free{order:5}body.arduino-page .studio-actions #run{order:6}
.ml-lab-actions .aim-project-controls{margin-right:2px}.ml-lab-actions .aim-pc-action{height:38px;min-height:38px}
.top-actions .aim-project-controls{margin-right:4px}.focus-head-actions .aim-project-controls{margin-left:2px}.focus-head-actions .aim-pc-action{height:36px;min-height:36px}

/* The manager uses a stable viewport. Loading, syncing and row refreshes replace
   content inside the scrollable list without changing the dialog's outer geometry. */
.aim-project-manager{width:min(780px,calc(100vw - 24px));height:min(640px,calc(100dvh - 24px));max-height:min(640px,calc(100dvh - 24px));border:0;border-radius:20px;padding:0;background:#fff;color:var(--aim-pc-ink);box-shadow:0 30px 90px rgba(8,26,34,.30);overflow:hidden;contain:layout paint style}
.aim-project-manager::backdrop{background:rgba(7,21,29,.58);backdrop-filter:blur(3px)}
.aim-pm-shell{display:flex;flex-direction:column;height:100%;max-height:100%;background:#fff;overflow:hidden}
.aim-pm-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px 16px;border-bottom:1px solid #e5edef;flex:0 0 auto}.aim-pm-head>div{min-width:0}.aim-pm-kicker{display:block;color:#8a1020;font-size:8px;font-weight:950;letter-spacing:.12em}.aim-pm-head h2{margin:4px 0 2px;font-size:23px;line-height:1.1;letter-spacing:-.025em;color:#173746}.aim-pm-head p{margin:0;color:#6b8189;font-size:10px}.aim-pm-close{width:36px;height:36px;border:1px solid #dbe5e8;border-radius:11px;background:#fff;color:#5b747d;font-size:20px;cursor:pointer;flex:0 0 auto}
.aim-pm-current{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 20px 0;padding:13px 14px;border:1px solid #ead8dc;border-radius:14px;background:linear-gradient(135deg,#fff8f9,#fff);flex:0 0 auto}.aim-pm-current>div{min-width:0;display:grid;gap:3px}.aim-pm-current span{font-size:8px;font-weight:900;color:#8a1020;text-transform:uppercase;letter-spacing:.08em}.aim-pm-current strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aim-pm-save-current,.aim-pm-new{min-height:36px;border:0;border-radius:10px;background:#8a1020;color:#fff;padding:0 13px;font-size:10px;font-weight:900;cursor:pointer;white-space:nowrap}.aim-pm-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px 10px;flex:0 0 auto}.aim-pm-toolbar>span{font-size:9px;color:#70858d;font-weight:800}.aim-pm-new{background:#fff;border:1px solid #c8d8dd;color:#244c57}.aim-pm-new:hover{border-color:#b67a83;color:#8a1020;background:#fff7f8}
.aim-pm-new-form{margin:0 20px 10px;padding:12px;border:1px solid #dbe6e9;border-radius:13px;background:#f8fbfb;flex:0 0 auto}.aim-pm-new-form[hidden]{display:none}.aim-pm-new-form label{display:block;margin-bottom:6px;font-size:8px;font-weight:900;color:#5f7881;text-transform:uppercase;letter-spacing:.05em}.aim-pm-new-form>div{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px}.aim-pm-new-form input,.aim-pm-rename-form input{height:38px;border:1px solid #cfdde1;border-radius:9px;background:#fff;color:#173746;padding:0 10px;font-size:12px;outline:0}.aim-pm-new-form input:focus,.aim-pm-rename-form input:focus{border-color:#9a3442;box-shadow:0 0 0 3px rgba(138,16,32,.08)}.aim-pm-new-form button,.aim-pm-rename-form button{height:38px;border:1px solid #d2dfe3;border-radius:9px;background:#fff;color:#355661;padding:0 10px;font-size:9px;font-weight:850;cursor:pointer}.aim-pm-new-form button[type="submit"],.aim-pm-rename-form button[type="submit"]{border-color:#8a1020;background:#8a1020;color:#fff}
.aim-pm-list{overflow:auto;padding:0 20px 10px;display:grid;align-content:start;gap:8px;min-height:0;flex:1 1 auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.aim-pm-project{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 13px;border:1px solid #dce6e9;border-radius:13px;background:#fff;min-height:58px}.aim-pm-project.is-current{border-color:#c89aa2;background:#fffafb;box-shadow:inset 3px 0 #8a1020}.aim-pm-project-main{min-width:0}.aim-pm-project-name{display:flex;align-items:center;gap:7px;min-width:0}.aim-pm-project-name strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.aim-pm-project-name span{flex:0 0 auto;padding:2px 5px;border-radius:999px;background:#f4e7e9;color:#8a1020;font-size:7px;font-weight:950;letter-spacing:.05em}.aim-pm-project-meta{margin-top:5px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:#748991;font-size:8.5px}.aim-pm-project-meta i{font-style:normal;color:#b5c2c7}.aim-pm-state.pending{color:#8b6a2b;font-weight:800}.aim-pm-project-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}.aim-pm-project-actions button{height:31px;border:1px solid #d4e0e3;border-radius:8px;background:#fff;color:#385963;padding:0 8px;font-size:8.5px;font-weight:850;cursor:pointer}.aim-pm-project-actions button:hover{border-color:#b9828b;color:#8a1020;background:#fff8f9}.aim-pm-project-actions button.danger{color:#9a2638}.aim-pm-project-actions button.danger[data-confirm="1"]{border-color:#a51b31;background:#a51b31;color:#fff}
.aim-pm-empty,.aim-pm-loading{min-height:190px;border:1px dashed #d9e4e7;border-radius:13px;display:grid;place-content:center;text-align:center;gap:5px;color:#6b828a;font-size:10px}.aim-pm-empty strong{font-size:12px;color:#31505a}.aim-pm-empty span{font-size:9px}.aim-pm-rename-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:9px}.aim-pm-rename-form label{display:grid;gap:5px;font-size:8px;font-weight:900;color:#607a83;text-transform:uppercase;letter-spacing:.05em}.aim-pm-rename-form>div{display:flex;gap:5px}
.aim-pm-foot{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 20px 16px;border-top:1px solid #e7edef;background:#fafcfc;color:#6d828a;font-size:8.5px;line-height:1.45;flex:0 0 auto}.aim-pm-foot>span{max-width:470px}.aim-pm-backup-actions{display:flex;gap:5px;flex:0 0 auto}.aim-pm-backup-actions:empty{display:none}.aim-pm-backup-actions button{height:30px;border:1px solid #d5e0e4;border-radius:8px;background:#fff;color:#536f79;padding:0 8px;font-size:8px;font-weight:800;cursor:pointer}

@media(max-width:1120px){.aim-project-controls{gap:4px}.aim-pc-action{padding:0 8px}.aim-pc-save{width:66px;min-width:66px}.aim-pc-projects{width:104px;min-width:104px}}
@media(max-width:980px){.aim-pc-projects>span:not(.aim-pc-icon){display:none}.aim-pc-projects{width:38px;min-width:38px;padding:0}.aim-pc-count{position:absolute;right:-4px;top:-5px}.aim-pc-save-copy{width:34px}.aim-pc-save{width:62px;min-width:62px}}
@media(max-width:820px){.ml-lab-actions .aim-project-controls{width:100%;display:flex}.ml-lab-actions .aim-project-controls .aim-pc-action{flex:0 0 auto}.ml-lab-actions .aim-project-controls .aim-pc-save{width:66px}.ml-lab-actions .aim-project-controls .aim-pc-projects{width:40px}}
@media(max-width:720px){.aim-project-manager{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:16px}.aim-pm-head{padding:16px}.aim-pm-current{margin:12px 12px 0}.aim-pm-toolbar{padding:12px}.aim-pm-new-form{margin:0 12px 10px}.aim-pm-list{padding:0 12px 8px}.aim-pm-project{grid-template-columns:1fr}.aim-pm-project-actions{justify-content:flex-start}.aim-pm-foot{padding:10px 12px 13px;align-items:flex-start;flex-direction:column}.aim-pm-new-form>div{grid-template-columns:1fr 1fr}.aim-pm-new-form input{grid-column:1/-1}.aim-pm-rename-form{grid-template-columns:1fr}.aim-pm-rename-form>div{justify-content:flex-start}}
@media(max-width:520px){.aim-pc-save>span:not(.aim-pc-icon){display:none}.aim-pc-save{width:36px!important;min-width:36px!important;padding:0}.aim-pm-current{align-items:flex-start;flex-direction:column}.aim-pm-save-current{width:100%}.aim-pm-project-actions button{flex:1 1 auto}}
@media(max-width:480px){.focus-head-actions .aim-project-controls{grid-column:1/-1;width:auto;display:flex}.top-actions .aim-project-controls{width:auto}}
@media(prefers-reduced-motion:reduce){.aim-pc-action{transition:none}}
.aim-pc-action:focus-visible,.aim-pm-shell button:focus-visible,.aim-pm-shell input:focus-visible{outline:2px solid #8a1020!important;outline-offset:2px!important}
/* v0.27.197 — Phase 5 handoff from lab-scoped project manager to the cross-lab dashboard. */
.aim-pm-foot-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.aim-pm-all-projects{height:30px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #c9d8dc;border-radius:8px;background:#fff;color:#244f59;padding:0 10px;font-size:8.5px;font-weight:900;text-decoration:none;white-space:nowrap}
.aim-pm-all-projects:hover{border-color:#b67a83;color:#8a1020;background:#fff7f8}
@media(max-width:720px){.aim-pm-foot-actions{width:100%;justify-content:space-between}.aim-pm-all-projects{min-width:92px}}

.aim-pc-label{display:inline-block;line-height:1;white-space:nowrap}
