/* Dashboard shell: Discord-style settings layout. Tokens are scoped so public profiles keep their own look. */
.shell,#savebar,.design-confirm,#layout-studio{--bg:#313338;--panel:#2b2d31;--raised:#4e5058;--border:#3f4147;--text:#f2f3f5;--muted:#b5bac1;--accent:#5865f2;--field:#1e1f22;font-family:"gg sans","Noto Sans","Segoe UI",Helvetica,Arial,sans-serif}
.shell #profile-preview,#layout-studio .public-page{--accent:#a3e635;--panel:#181a18;--border:#30342f;--text:#f0f2ed;--muted:#9da398}
body:has(.shell){background:#313338}
.shell{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);min-height:100vh;color:var(--text)}
.shell .sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;background:#2b2d31;border:0;padding:24px 12px 14px 20px;gap:2px;align-items:stretch}
.sidebar-user{display:flex;align-items:center;gap:10px;padding:8px 10px;margin-bottom:8px;border-radius:6px;background:#232428}
.sidebar-user:hover{background:#1e1f22}
.sidebar-user .avatar{width:36px;height:36px;font-size:1rem;color:#fff;background:#5865f2}
.sidebar-user span{display:flex;flex-direction:column;min-width:0}.sidebar-user strong{font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-user small{color:#949ba4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shell .nav-label{color:#949ba4;font-size:.75rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase;padding:0 10px;margin:16px 0 6px}
.shell .nav-button{border:0;border-radius:4px;background:transparent;color:#b5bac1;padding:6px 10px;min-height:34px;font-size:.95rem;font-weight:500;gap:10px}
.shell .nav-button:hover{background:#35373c;color:#dbdee1}
.shell .nav-button.active{background:#404249;color:#fff}
.shell .nav-button i{width:20px;font-size:.95rem}
.shell .nav-button.danger{color:#f23f42}.shell .nav-button.danger:hover{background:#f23f4219;color:#f23f42}
.nav-separator{height:1px;background:#3f4147;margin:10px;flex-shrink:0}
.shell .sidebar-bottom{margin-top:auto;padding-top:24px}.shell .sidebar-legal{padding:0 10px}
.shell .content{background:#313338;max-width:none;margin:0;padding:48px 40px 110px}
.shell .page-heading,.shell .workspace{max-width:1180px;margin-left:auto;margin-right:auto}
.shell .page-heading{margin-bottom:20px}.shell .page-heading h1{font-size:1.25rem;letter-spacing:0;font-weight:700}
.shell .workspace{grid-template-columns:minmax(0,1fr) 340px;gap:24px}
.shell .panel{background:#2b2d31;border:1px solid #232428;border-radius:8px}
.shell .panel-heading{border-bottom:1px solid #3f4147}
.shell input:not([type=color]):not([type=range]),.shell textarea,.shell select,.shell .input-prefix,#layout-studio input:not([type=color]):not([type=range]),#layout-studio select{background:var(--field);border:1px solid var(--field);border-radius:4px;color:var(--text)}
.shell .input-prefix input{border:0}
.shell input:focus-visible,.shell textarea:focus-visible,.shell select:focus-visible{outline:0;border-color:#5865f2}
.shell button,.shell .button,#savebar button,.design-confirm button,#layout-studio button{border-radius:4px;border:0;background:#4e5058;color:#fff}
.shell button:hover,.shell .button:hover,#savebar button:hover,.design-confirm button:hover,#layout-studio button:hover{background:#6d6f78}
.shell .subtle,#savebar .subtle,.design-confirm .subtle,#layout-studio .subtle{background:transparent;color:#dbdee1}
.shell .subtle:hover,#savebar .subtle:hover,.design-confirm .subtle:hover,#layout-studio .subtle:hover{background:#ffffff14;text-decoration:underline}
.shell .primary,#savebar .primary,.design-confirm .primary,#layout-studio .primary{background:#5865f2;color:#fff}
.shell .primary:hover,#savebar .primary:hover,.design-confirm .primary:hover,#layout-studio .primary:hover{background:#4752c4;text-decoration:none}
.shell .danger:not(.nav-button),.design-confirm .danger{color:#f23f42}
.shell .danger:not(.nav-button):hover{background:#f23f42;color:#fff}
.shell .nav-button:focus-visible,.shell button:focus-visible,.shell a:focus-visible{outline:2px solid #00a8fc;outline-offset:2px}
.shell .upload-box{background:var(--field);border-color:#4e5058;border-radius:8px}.shell .upload-box:hover{border-color:#5865f2}
.shell .link-row{background:#232428;border-color:#1e1f22;border-radius:8px}
.shell .pill{border-radius:4px;background:#1e1f22;border:0;color:#b5bac1}
.shell .notice{border-radius:4px}
.demo-banner{background:#5865f2;border:0;color:#fff;font-size:.85rem}.demo-banner a{color:#fff;font-weight:700}
.preview-column .preview-label{letter-spacing:.02em;text-transform:uppercase;font-weight:700;color:#949ba4}
#profile-preview{border-radius:8px;overflow:hidden;border:1px solid #232428}

/* Customize: tab bar, themes */
.customize{overflow:hidden}
.tabbar{display:flex;gap:2px;overflow-x:auto;padding:10px 12px 0;border-bottom:1px solid #3f4147;background:#232428}
.shell .tabbar button{background:transparent;color:#b5bac1;border-radius:4px 4px 0 0;padding:10px 14px;white-space:nowrap;border-bottom:2px solid transparent;font-weight:500}
.shell .tabbar button:hover{background:#2b2d31;color:#fff}
.shell .tabbar button[aria-selected=true]{background:#2b2d31;color:#fff;border-bottom-color:#5865f2}
.tabbar button i{color:#949ba4}.tabbar button[aria-selected=true] i{color:#5865f2}
.panel-foot{padding:14px 23px;border-top:1px solid #3f4147;background:#232428;display:flex;justify-content:flex-end}
.theme-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin-top:14px}
.shell .theme-choice{flex-direction:column;align-items:stretch;gap:8px;padding:8px;background:#232428;border:2px solid transparent;border-radius:8px;text-align:left}
.shell .theme-choice:hover{background:#2e3035}
.shell .theme-choice[aria-pressed=true]{border-color:#5865f2}
.theme-choice strong{font-size:.8rem}
.theme-swatch{position:relative;height:54px;border-radius:5px;display:block;overflow:hidden}
.theme-swatch i{position:absolute;left:10%;width:80%;height:12px;border-radius:3px}.theme-swatch i:first-child{top:9px;height:20px}.theme-swatch i:nth-child(2){top:34px}
.theme-swatch b{position:absolute;right:10%;top:12px;width:12px;height:12px;border-radius:50%}
.appearance-colors,.appearance-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:4px 24px;margin-top:14px}
.appearance-controls .field,.appearance-colors .field{margin-bottom:14px}
.appearance-controls.inactive{opacity:.45;pointer-events:none}
.customize .range-control{padding:0;border:0;accent-color:#5865f2;background:transparent}
.customize .preset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin:14px 0 20px}
.customize .preset-choice{background:#232428;border:2px solid transparent;border-radius:8px;padding:10px;flex-direction:column;align-items:stretch;text-align:left;gap:7px}
.customize .preset-choice:hover{background:#2e3035}.customize .preset-choice[aria-pressed=true]{border-color:#5865f2}
.customize .preset-choice small{color:#b5bac1}
.customize .preset-mini{background:#1e1f22}.customize .preset-mini i{background:#5865f299}
.upload-detail{color:#b5bac1}

/* Unsaved-changes bar (Discord style) */
#savebar{position:fixed;left:50%;bottom:20px;transform:translate(-50%,140%);width:min(720px,calc(100vw - 32px));display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 10px 10px 18px;background:#111214;color:#f2f3f5;border-radius:8px;box-shadow:0 8px 30px #0008;transition:transform .25s;z-index:60;font-size:.9rem}
#savebar.visible{transform:translate(-50%,0)}#savebar div{display:flex;gap:6px}#savebar i{color:#f0b232;margin-right:6px}
#savebar #savebar-save{background:#248046}#savebar #savebar-save:hover{background:#1a6334}

/* Freeform studio uses the same palette */
#layout-studio{background:#313338}.studio-bar,.studio-tools{background:#2b2d31!important;border-color:#232428!important}
#layout-viewport{background-color:#1e1f22!important}
#layout-studio .studio-tools input[type=range]{accent-color:#5865f2}#layout-feedback{color:#23a559!important}
#layout-studio .preset-choice[aria-pressed=true]{border-color:#5865f2}

@media(max-width:1150px){.shell .workspace{grid-template-columns:minmax(0,1fr) 300px}.shell{grid-template-columns:230px minmax(0,1fr)}.shell .content{padding:36px 22px 110px}}
@media(max-width:900px){.shell{grid-template-columns:1fr}.shell .sidebar{position:static;height:auto;flex-direction:row;align-items:center;overflow-x:auto;padding:10px 12px;gap:4px}.sidebar-user,.shell .nav-label,.nav-separator,.shell .sidebar-bottom{display:none}.shell .nav-button{width:auto;white-space:nowrap}.shell .workspace{grid-template-columns:1fr}.shell .preview-column{position:static;max-width:420px;width:100%;margin:6px auto 20px}}
@media(max-width:680px){.shell .content{padding:22px 14px 110px}#savebar{bottom:10px;padding-left:12px}#savebar span{font-size:.8rem}}
