/* End-user portal presentation. Every rule is scoped to body.user-portal (set by app.js outside Administration) or to the
   up-* classes that only user-portal.js creates, so admin pages, Machines and module pages for administrators are untouched.
   Colours come from the shared app.css theme tokens, so Bright, Dark, Follow device and Previous colours all apply. */
body.user-portal{--up-radius:16px;--up-shadow:0 1px 2px light-dark(#10283f0d,#0000004d),0 6px 20px light-dark(#10283f0b,#00000040);--up-shadow-hover:0 2px 4px light-dark(#10283f12,#00000059),0 14px 32px light-dark(#10283f14,#0000004d);--up-tint:color-mix(in srgb,var(--soft) 50%,var(--surface))}
.up-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.up-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}

/* Header and footer, only while the signed-in shell is showing. */
body.user-portal:has(main>.shell)>header{padding:14px 32px;box-shadow:0 1px 0 var(--line),0 4px 18px light-dark(#10283f08,#0000002e);border-bottom:0}
body.user-portal #account>span:first-child{display:inline-flex;align-items:center;gap:8px;padding:5px 14px 5px 5px;border-radius:999px;background:var(--soft);font-size:14px;font-weight:600}
body.user-portal #account>span:first-child{padding-left:10px}
body.user-portal #account>span:first-child::before{content:'';width:20px;height:20px;flex:none;background:var(--accent);--up-person:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");-webkit-mask:var(--up-person) center/contain no-repeat;mask:var(--up-person) center/contain no-repeat}
body.user-portal #account button{border-radius:9px}
body.user-portal main:has(>.shell){max-width:1320px;padding-top:30px}
body.user-portal:has(main>.shell)>footer{max-width:1320px;margin:0 auto;padding:18px 28px 30px}

/* Sidebar navigation: one calm panel with icons; the existing buttons, labels and order are kept. */
body.user-portal .shell{grid-template-columns:236px minmax(0,1fr);gap:36px;align-items:start}
body.user-portal .shell>nav{position:sticky;top:20px;gap:0;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:var(--up-radius);box-shadow:var(--up-shadow)}
body.user-portal .shell>nav .nav-group{margin:0;padding:0;border:0}
body.user-portal .shell>nav .nav-group summary{padding:6px 10px 8px;font-size:11.5px;font-weight:650;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
body.user-portal .shell>nav button{display:flex;align-items:center;gap:12px;width:100%;margin:2px 0;padding:9px 12px;border:0;border-radius:10px;background:transparent;color:var(--text);font-weight:500;line-height:1.3;--up-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='3'/%3E%3Cpath d='M12 8.5v7M8.5 12h7'/%3E%3C/svg%3E")}
body.user-portal .shell>nav button::before{content:'';width:20px;height:20px;flex:none;background:currentColor;opacity:.78;-webkit-mask:var(--up-nav-icon) center/contain no-repeat;mask:var(--up-nav-icon) center/contain no-repeat}
body.user-portal .shell>nav button:hover{background:var(--soft)}
body.user-portal .shell>nav button.active{background:var(--soft);color:var(--accent);font-weight:620;box-shadow:inset 3px 0 0 var(--accent)}
body.user-portal .shell>nav button.active::before{opacity:1}
body.user-portal .shell>nav button[data-page="home"]{--up-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 10.5 12 3.5l8.5 7V20a1 1 0 0 1-1 1H15v-6H9v6H4.5a1 1 0 0 1-1-1z'/%3E%3C/svg%3E")}
body.user-portal .shell>nav button[data-page="files"]{--up-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6.5A1.5 1.5 0 0 1 4.5 5h4.6l2 2.2h8.4A1.5 1.5 0 0 1 21 8.7v9.8a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 18.5z'/%3E%3C/svg%3E")}
body.user-portal .shell>nav button[data-page="printers"]{--up-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9V3.5h10V9M7 17.5H4.5A1.5 1.5 0 0 1 3 16v-5.5A1.5 1.5 0 0 1 4.5 9h15a1.5 1.5 0 0 1 1.5 1.5V16a1.5 1.5 0 0 1-1.5 1.5H17M7 14h10v6.5H7z'/%3E%3C/svg%3E")}
body.user-portal .shell>nav button[data-page="help"]{--up-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.6 9.3a2.5 2.5 0 0 1 4.9.7c0 1.7-2.5 2.2-2.5 3.7M12 17h.01'/%3E%3C/svg%3E")}
body.user-portal .shell>nav button[data-page="account"]{--up-nav-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E")}

/* Page headings and cards on every user page (Home, My files, Printers, Help, Account, user modules). */
body.user-portal .shell>section>h1{font-size:30px;letter-spacing:-.03em;margin:2px 0 22px}
body.user-portal .shell>section .card{border-radius:var(--up-radius);box-shadow:var(--up-shadow);padding:24px 26px}
body.user-portal .shell>section .card>h2{font-size:18px;margin-bottom:6px}
body.user-portal .shell>section .card>h2+p.muted{margin-top:0;margin-bottom:18px}
body.user-portal .shell>section .card button.primary,body.user-portal .shell>section form button[type=submit]{background:var(--accent);border-color:var(--accent);color:var(--surface);font-weight:600;border-radius:10px;padding:10px 18px}
body.user-portal .shell>section .card>.row{gap:10px;margin-bottom:10px}
body.user-portal .shell>section .card>.row input[type=file]{flex:1 1 260px;width:auto;margin:0}
body.user-portal .shell>section .list-row .row>a{display:inline-block;padding:9px 13px;border:1px solid var(--line);border-radius:7px;background:var(--surface);font-weight:600;text-decoration:none}
body.user-portal .shell>section .list-row .row>a:hover{background:var(--soft)}
body.user-portal .shell>section .list-row{padding:13px 4px}
body.user-portal .shell>section .list-row:hover{background:var(--up-tint)}

/* Home: greeting, desktops, shortcuts. */
.up-hero{margin:0 0 32px;padding:30px 34px;border:1px solid var(--line);border-radius:20px;background:radial-gradient(circle at 100% 0,color-mix(in srgb,var(--accent) 10%,transparent),transparent 52%),linear-gradient(120deg,var(--soft),var(--surface) 75%);box-shadow:var(--up-shadow)}
.up-eyebrow{margin:0 0 6px;font-size:13px;font-weight:650;letter-spacing:.02em;color:var(--accent)}
.up-hero h1{margin:0 0 6px;font-size:clamp(26px,3.1vw,36px);line-height:1.15;letter-spacing:-.035em;overflow-wrap:anywhere}
.up-lede{margin:0;font-size:16.5px;color:color-mix(in srgb,var(--text) 65%,var(--muted))}
.up-section{margin:0 0 36px}
.up-section-head{display:flex;align-items:center;gap:12px;margin:0 0 14px}
.up-section-head h2{margin:0;font-size:18px;font-weight:650}
.up-count{padding:2px 10px;border-radius:999px;background:var(--soft);color:var(--accent);font-size:12.5px;font-weight:650}
.up-desktops{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));gap:20px;align-items:start}
.up-desktop{display:flex;flex-direction:column;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--up-radius);box-shadow:var(--up-shadow);overflow:hidden}
.up-desktop-head{display:flex;align-items:center;gap:14px;padding:22px 22px 0}
.up-desktop-icon,.up-shortcut-icon{display:grid;place-items:center;flex:none;width:48px;height:48px;border-radius:13px;background:var(--soft);color:var(--accent)}
.up-desktop-icon .up-icon{width:26px;height:26px}
.up-desktop-info{min-width:0}
.up-desktop h3{margin:0;font-size:17.5px;font-weight:650;line-height:1.3;overflow-wrap:anywhere}
.up-desktop-kind{margin:2px 0 0;font-size:13px;color:var(--muted)}
.up-desktop-os{margin:3px 0 0;font-size:14px;font-weight:550;line-height:1.35;color:var(--text);overflow-wrap:anywhere}
.up-desktop-os.is-unknown{font-weight:400;font-style:italic;color:var(--muted)}
.up-desktop-primary{padding:18px 22px 22px}
a.up-launch{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:46px;padding:11px 18px;border-radius:11px;background:var(--accent);color:var(--surface);font-size:15.5px;font-weight:650;text-decoration:none;box-shadow:0 1px 2px light-dark(#0b3d3640,#00000066)}
a.up-launch:hover{background:color-mix(in srgb,var(--accent) 86%,var(--text))}
.up-launch-icon{width:18px;height:18px;stroke-width:2}
.up-desktop-alt{margin-top:auto;padding:14px 22px 18px;border-top:1px solid var(--line);background:var(--up-tint)}
.up-alt-label{margin:0 0 8px;font-size:11.5px;font-weight:650;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.up-desktop-alt>div{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.up-desktop-alt>div+div{margin-top:12px;padding-top:12px;border-top:1px dashed var(--line)}
.up-desktop-alt button{padding:7px 13px;border-radius:9px;background:var(--surface);font-size:13.5px}
.up-desktop-alt button:first-child{color:var(--accent);font-weight:620;border-color:color-mix(in srgb,var(--accent) 40%,var(--line))}
.up-desktop-alt button:hover{background:var(--soft)}
.up-desktop-alt p{flex-basis:100%;margin:2px 0 0;font-size:12.5px;line-height:1.45}
.up-desktop-alt iframe{flex-basis:100%;border:1px solid var(--line);border-radius:10px}
.up-desktop-alt .result{flex-basis:100%;margin:4px 0 0;padding:10px 12px;font-size:13px}
.up-empty{padding:40px 24px;text-align:center;background:var(--surface);border:1.5px dashed var(--line);border-radius:var(--up-radius)}
.up-empty .up-empty-icon{width:40px;height:40px;color:var(--muted);margin-bottom:8px}
.up-empty h3{font-size:17px;margin:0 0 4px}
.up-empty p{margin:0}
.up-shortcuts{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:18px}
.up-shortcut{display:flex;gap:16px;min-width:0;padding:20px 22px;background:var(--surface);border:1px solid var(--line);border-radius:var(--up-radius);box-shadow:var(--up-shadow)}
.up-shortcut-icon{width:42px;height:42px;border-radius:12px}
.up-shortcut-body{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.up-shortcut h3{margin:0 0 4px;font-size:15.5px;font-weight:650}
.up-shortcut p{margin:0 0 14px;font-size:13.5px;line-height:1.5}
.up-shortcut button{margin-top:auto;border-radius:9px;padding:7px 14px;font-size:13.5px;font-weight:600;color:var(--accent)}

@media(prefers-reduced-motion:no-preference){.up-desktop,.up-shortcut{transition:box-shadow .18s ease-out,border-color .18s ease-out}.up-desktop:hover,.up-shortcut:hover{box-shadow:var(--up-shadow-hover);border-color:color-mix(in srgb,var(--accent) 30%,var(--line))}body.user-portal .shell>nav button,a.up-launch{transition:background-color .15s ease-out}}
@media(max-width:900px){body.user-portal .shell{grid-template-columns:200px minmax(0,1fr);gap:24px}}
@media(max-width:700px){
 body.user-portal:has(main>.shell)>header{padding:12px 16px}
 body.user-portal .shell{grid-template-columns:1fr;gap:18px}
 body.user-portal .shell>nav{position:static;padding:6px;overflow-x:auto}
 body.user-portal .shell>nav .nav-group{white-space:nowrap}
 body.user-portal .shell>nav .nav-group summary{display:none}
 body.user-portal .shell>nav button{display:inline-flex;width:auto;margin:0 2px;padding:8px 12px}
 body.user-portal .shell>nav button.active{box-shadow:inset 0 -3px 0 var(--accent)}
 .up-hero{padding:22px 20px;margin-bottom:24px}
 body.user-portal .shell>section .card{padding:18px}
 .up-desktop-head,.up-desktop-primary,.up-desktop-alt{padding-left:18px;padding-right:18px}
}
@media(forced-colors:active){body.user-portal .shell>nav button::before,body.user-portal #account>span:first-child::before{display:none}a.up-launch{border:2px solid ButtonText}.up-desktop,.up-shortcut,.up-hero,body.user-portal .shell>nav{border:1px solid CanvasText}}

.up-power-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:14px 22px;border-top:1px solid var(--line);background:var(--surface)}
.up-power-status{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--muted)}
.up-power-status::before{content:"";width:8px;height:8px;flex:none;border-radius:50%;background:currentColor}
.up-power-footer[data-state="running"] .up-power-status::before{background:var(--accent)}
.up-power-footer button{width:auto;padding:7px 13px;border-radius:9px;background:var(--surface);font-size:13.5px}
.up-power-footer button:hover:enabled{background:var(--soft)}
@media(max-width:600px){.up-power-footer{padding-inline:18px}}
