/* Scoped to device management and the commerce dialog. */
.device-page header,.device-page main,.device-page footer{max-width:1320px}
.device-page main{min-height:calc(100vh - 166px);padding-top:30px;padding-bottom:36px}
.device-page h1{font-size:clamp(30px,3.2vw,42px);letter-spacing:-1.3px;margin:0 0 10px}
.device-page .page-intro{color:#aeb8c5;line-height:1.6;margin:0 0 24px;max-width:780px}
.device-page header{padding-top:22px;padding-bottom:22px}
.device-page header>a:last-child,.device-page footer a{color:#b9f571;text-underline-offset:4px}
.commerce{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px;align-items:start;max-width:none;margin:0}
.commerce .card{min-width:0;padding:24px;border:1px solid #293441;border-radius:18px;background:#121923}
.commerce .connection-card{grid-column:1;grid-row:2}
.commerce .owner-card{grid-column:2;grid-row:2}
.commerce .wide-card{grid-column:1/-1}
.commerce h2{font-size:21px;line-height:1.3;margin:0 0 10px}
.commerce h3{font-size:16px;margin:0 0 8px;overflow-wrap:anywhere}
.commerce p{line-height:1.6;font-size:14px;margin:0 0 16px;color:#aeb8c5}
.commerce label{margin:0;min-width:0;font-size:13px}
.commerce input,.commerce select,.commerce textarea{width:100%;box-sizing:border-box;font:inherit;font-size:15px;margin:7px 0 0;padding:11px 12px;border-radius:10px;border:1px solid #34404e;background:#0e131b;color:#fff}
.commerce input[data-device-code-mask]{font-family:ui-monospace,Consolas,monospace;letter-spacing:1px}
.commerce input[type=checkbox]{display:inline-block;width:auto;margin:0 8px 0 0;vertical-align:middle}
.commerce label:has(input[type=checkbox]){display:flex;gap:8px;align-items:center}
.commerce select:focus{outline:2px solid #b9f571}
.commerce form{display:grid;gap:16px;max-width:none}
.commerce .pair-form{grid-template-columns:minmax(0,1.35fr) minmax(130px,1fr);margin-top:20px}
.commerce .pair-form>button{grid-column:1/-1;justify-self:start}
.commerce button{width:auto;padding:11px 18px;font-size:14px;line-height:1.35}
.commerce form>button{justify-self:start}
.commerce .secondary{background:#1b2530;color:#dce3e9;border:1px solid #394453}
.commerce .actions{display:flex;gap:8px;flex-wrap:wrap;margin:0}
.commerce .status{grid-column:1/-1;grid-row:1;border:1px solid #48643b;background:#1a2a20;color:#e8eadf;border-radius:12px;padding:12px 16px;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.commerce .status:empty{display:none}
.commerce .connected{margin:16px 0 0;color:#b9f571;overflow-wrap:anywhere}
.commerce .connected:empty{display:none}
.commerce .session-actions{margin-top:14px}
.commerce .login-options{display:flex;gap:4px;padding:4px;border:1px solid #2d3845;border-radius:12px;background:#0d131c;margin:18px 0}
.commerce .login-options button{flex:1;background:transparent;color:#b0bccb;border-radius:8px;padding:9px 12px}
.commerce .login-options button[aria-pressed=true]{background:#293746;color:#fff}
.commerce .owner-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.commerce .list-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;margin-top:20px;align-items:start}
.commerce .list-items{display:grid;gap:10px}
.commerce .list-items article{padding:14px;border:1px solid #2b3745;border-radius:12px;background:#0d141d;display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0}
.commerce .list-items h3{margin:0;min-width:0}
.commerce .list-items .actions{flex-shrink:0}
.commerce .list-items button{padding:8px 12px}
.commerce .editor{padding:20px;background:#0d141d;border:1px solid #2b3745;border-radius:12px}
.commerce .editor>h3{margin:0}
.commerce .editor textarea{min-height:120px}
.commerce .purchase-form{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:18px}
.commerce .purchase-form>.full-width{grid-column:1/-1}
.commerce details>summary{cursor:pointer;font-size:19px;font-weight:650;line-height:1.4}
.commerce details>summary:focus-visible{outline:3px solid #63cfdf;outline-offset:5px}
.commerce details[open]>summary{margin-bottom:16px}
.commerce .owned{display:grid;gap:12px;margin-top:18px}
.commerce .license-target{padding:12px 14px;border:1px solid #3b4a59;border-radius:10px;background:#0d141d;color:#dce3e9;font-size:14px}
.commerce .license-group{display:grid;gap:10px;padding:16px;border:1px solid #2d3845;border-radius:14px;background:#0d141d}
.commerce .license-group-vacant{border-color:#78a946;background:linear-gradient(135deg,rgba(185,245,113,.1),#0d141d 55%)}
.commerce .license-group-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.commerce .license-group-heading h3{margin:0;font-size:18px}
.commerce .license-group-heading span{display:inline-grid;place-items:center;min-width:28px;height:28px;border-radius:999px;background:#b9f571;color:#14200d;font-weight:800}
.commerce .license-group>p{margin:0 0 4px}
.commerce .owned article{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #2d3845;border-radius:12px;padding:16px;min-width:0;background:#121923}
.commerce .license-copy{min-width:0}
.commerce .license-copy h3{margin-bottom:5px}
.commerce .license-copy p{margin:2px 0}
.commerce .license-time{display:block;color:#fff;margin:7px 0 3px}
.commerce .license-current{flex:0 0 auto;padding:8px 12px;border-radius:999px;background:#273323;color:#b9f571;font-size:13px;font-weight:700}
.commerce .order-history{display:grid;gap:4px;margin-top:8px;padding-top:16px;border-top:1px solid #2d3845}
.commerce .order-history p{margin:0;padding:8px 0;border-bottom:1px solid #202a35}
.commerce .test{padding:12px;border:1px solid #d7aa5c;border-radius:8px;color:#eecb91;margin-top:16px}
.commerce .order-box:not(:empty){margin-top:20px;padding-top:18px;border-top:1px solid #2d3845}
.commerce-dialog{width:min(1120px,calc(100vw - 32px));max-width:none;max-height:90vh;overflow-y:auto;padding:24px}
.commerce-dialog>.dialog-close{display:block;margin:0 0 18px auto}
@media(max-width:820px){.commerce{grid-template-columns:1fr;gap:16px}.commerce .connection-card,.commerce .owner-card{grid-column:1;grid-row:auto}.commerce .list-workspace{grid-template-columns:1fr}.commerce .card{padding:20px}.commerce-dialog{padding:18px}.commerce .list-items article,.commerce .license-group article{flex-wrap:wrap}.commerce .license-group article button{width:100%}}
@media(max-width:480px){.device-page header,.device-page main,.device-page footer{padding-left:16px;padding-right:16px}.device-page header .brand{font-size:23px}.device-page main{padding-top:24px}.commerce .pair-form,.commerce .purchase-form{grid-template-columns:1fr}.commerce .card{padding:18px}.commerce .login-options button{padding:9px 7px;font-size:13px}.device-page footer{flex-wrap:wrap}}

.commerce .owned:empty{display:none}
@media(min-width:1050px){.commerce.has-device{grid-template-columns:minmax(290px,.75fr) minmax(0,1.6fr)}.commerce.has-device .connection-card{grid-column:1;grid-row:2}.commerce.has-device .owner-card{grid-column:1;grid-row:3}.commerce.has-device .lists-card{grid-column:2;grid-row:2/span 2}.commerce.has-device details.wide-card{grid-column:2;grid-row:4}.commerce.has-device .list-workspace{grid-template-columns:1fr}.commerce.has-device .editor{grid-template-columns:repeat(2,minmax(0,1fr))}.commerce.has-device .editor>h3,.commerce.has-device .editor>.actions,.commerce.has-device .editor>label:has(textarea),.commerce.has-device .editor>label:has(input[type=checkbox]){grid-column:1/-1}}

.commerce.has-device .editor>label:has(input[type=url]){grid-column:1/-1}
.device-page footer span{display:inline}
