/* V41: explicit page and window geometry; original charcoal/blue/purple palette. */
:root{--v40-bg:#0c0c0f;--v40-panel:#202023;--v40-control:#2b2b30;--v40-line:#35353c;--v40-text:#f5f5f7;--v40-muted:#a1a1aa;--v40-blue:#0a84ff}
body.v41-page{display:block!important;position:static!important;min-width:0!important;width:100%!important;min-height:100dvh!important;height:auto!important;margin:0!important;padding:0!important;overflow-x:clip!important;overflow-y:auto!important;background:#0c0c0f!important}
.v41-page .v40-shell{display:grid;grid-template-columns:248px minmax(0,1fr);width:100%;max-width:1600px;min-height:100dvh;margin:0 auto}
.v41-page .v40-main{width:100%;min-width:0;padding:36px;max-width:none;overflow-wrap:break-word}
body.v41-page>.v40-doc{display:block!important;width:min(100%,1060px)!important;max-width:1060px!important;min-width:0!important;margin:0 auto!important;padding:32px!important}
.v40-doc h1{font-size:clamp(24px,4vw,34px)!important;line-height:1.4}.v40-doc h2{margin:24px 0 12px}.v40-doc ol,.v40-doc ul{padding-left:22px;list-style:revert}.v40-doc .v40-card{margin-top:18px}.v40-doc code{white-space:normal;overflow-wrap:anywhere}.v40-doc table{table-layout:fixed}.v40-doc td,.v40-doc th{overflow-wrap:anywhere}
.v40-nav{background:#202023!important;padding:24px 16px!important;border-color:#35353c!important;display:block!important}.v40-nav .v40-brand{font-size:18px;line-height:1.5;margin:4px 10px 28px!important;overflow-wrap:anywhere}.v40-nav a:not(.v40-brand){display:flex!important;align-items:center;gap:12px;min-height:44px;margin:4px 0!important;padding:10px 12px!important;border:1px solid transparent;font-size:14px!important;color:#c2c2ca!important}.v40-nav a i{width:18px;text-align:center;color:#9494a3}.v40-nav a[aria-current=page]{background:#0a84ff22!important;border-color:#0a84ff44;color:#8fcaff!important}.v40-nav a[aria-current=page] i{color:#69b7ff}.v40-nav small{padding:22px 12px 6px;font-size:11px;letter-spacing:.03em}
.v41-icon-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;min-height:40px;border:1px solid #3b3b43;background:#2c2c31;color:#c6c6cf;border-radius:11px;padding:0;cursor:pointer}.v41-icon-btn:hover{background:#38383f;color:white}.v41-mobilebar,.v41-nav-close,.v41-nav-backdrop{display:none}
.v40-heading{align-items:center;margin-bottom:20px;gap:16px}.v40-heading h1{font-size:28px;margin:0 0 8px}.v40-sub{line-height:1.7}.v40-grid{align-items:start;gap:20px}.v40-card{border-radius:18px;padding:24px;box-shadow:0 4px 20px #0002}.v40-card h2{font-size:17px;margin:0 0 12px}.v40-stack{gap:18px}.v40-field{font-size:13px;gap:8px;line-height:1.5;color:#b9b9c4}.v40-field input,.v40-field select,.v40-field textarea{font-size:15px;min-height:46px;padding:11px 13px;border-radius:11px;background:#151517}.v40-field small{font-size:11px;color:#888892;font-weight:400}.v40-field input[type=file]{padding:8px;font-size:12px;overflow:hidden}.v40-field input[type=file]::file-selector-button{border:0;border-radius:7px;background:#34343c;color:#f2f2f7;padding:9px 12px;margin-right:10px;font:inherit;cursor:pointer}.v40-btn{border-radius:11px;min-height:44px;box-shadow:none!important;background:linear-gradient(125deg,#087eff,#0964d7);font-size:14px;padding:11px 16px;gap:8px}.v40-btn.secondary{background:#2c2c31;border-color:#3b3b42}.v40-btn.danger{background:#ff453a15}.v40-btn:hover{filter:brightness(1.1)}.v40-status:empty{display:none}.v40-status{font-size:13px;margin:8px 0 18px}.v40-image-preview{height:128px;max-width:100%;border-style:solid;background:#161619}.v40-avatar{flex:0 0 76px;width:76px;height:76px;border-radius:20px}.v40-item{padding:18px;gap:12px;background:#19191d}.v40-item>.v40-row{width:100%}.v40-item .v40-btn{font-size:13px}.v40-code{line-height:1.65;font-size:12px;word-break:break-word}.v40-metric{font-size:36px}.v40-row input[type=checkbox]{width:18px;height:18px;accent-color:#0a84ff}
/* Sidebar: one scroll region, fixed header/footer, no extra section on top. */
body #sidebar{background:#202023!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}body #sidebar>.sidebar-brand-row,body #sidebar>.border-t{flex:0 0 auto!important}body #sidebar .v41-sidebar-scroll{flex:1 1 0!important;min-height:0!important;overflow:auto!important;padding:16px!important;overscroll-behavior:contain}body #sidebar .v40-inline-links{display:grid!important;gap:6px!important;padding:0 0 16px!important;border-bottom:1px solid #36363d;margin-bottom:16px}body #sidebar .v40-inline-links a{display:flex!important;align-items:center;gap:12px;min-height:44px;padding:11px 12px!important;margin:0!important;background:#2c2c31;color:#d2d2dc;border:1px solid #3a3a42;border-radius:11px;font-size:13px}body #sidebar .v40-inline-links i{width:18px;text-align:center;color:#8aaeff}body #sidebar button{min-height:40px}body #sidebar .sidebar-brand-row{min-height:76px!important;height:auto!important;padding:16px!important}body #sidebar>.border-t{padding:12px 16px!important}
/* Shared window and control polish. */
body [data-modal]{background:#000a!important;backdrop-filter:none!important;isolation:isolate}body [data-modal]>[data-modal-content]{background:#202023!important;box-shadow:0 24px 90px #0008!important}body [data-modal] button{box-shadow:none!important}body [data-modal] input:not([type=checkbox]):not([type=radio]),body [data-modal] select,body [data-modal] textarea{min-height:44px}body [data-modal] .macos-titlebar{background:#28282d!important;border-bottom:1px solid #3a3a42!important}body [data-modal] .macos-close{width:38px!important;height:38px!important;min-height:38px!important;border-radius:10px!important}body [data-modal] .macos-titlebar h3{font-size:17px!important}body .v41-desktop-create{white-space:nowrap}body #mobileCreateFab{width:52px!important;height:52px!important;border-radius:16px!important;box-shadow:0 8px 24px #0005!important;background:linear-gradient(140deg,#9870ff,#713beb)!important}
/* Create-key modal owns its structure; legacy decorators must not wrap it. */
body #mobileCreateModal{padding:16px!important;align-items:center!important}body #mobileCreateModal [data-modal-content]{display:flex!important;flex-direction:column!important;padding:0!important;width:520px!important;max-width:100%!important;max-height:calc(100dvh - 32px)!important;overflow:hidden!important;border-radius:20px!important;opacity:1!important;scrollbar-gutter:auto!important}body #mobileCreateModal [data-modal-content]::before,body #mobileCreateModal [data-modal-content]::after{display:none!important}.v41-window-head{display:flex;align-items:center;gap:12px;padding:16px 20px;flex:0 0 auto;background:#28282d;border-bottom:1px solid #393940}.v41-window-head h3{flex:1;margin:0;font-size:17px!important;font-weight:700}.v41-lights{display:flex;gap:6px}.v41-lights b{width:9px;height:9px;border-radius:50%;background:#ff5f57}.v41-lights b:nth-child(2){background:#febc2e}.v41-lights b:nth-child(3){background:#28c840}body #mobileCreateForm{display:flex!important;flex-direction:column!important;overflow:hidden!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;flex:1 1 auto!important}.v41-key-body{display:grid;gap:18px;padding:20px;min-height:0;overflow:auto;overscroll-behavior:contain}.v41-key-footer{flex:0 0 auto;padding:14px 20px 18px;border-top:1px solid #393940;background:#25252a}.v41-key-footer .v40-status{margin:0 0 12px;font-size:12px;line-height:1.6}.v41-create-submit{width:100%;min-height:46px}.v41-input-action{display:flex;position:relative}.v41-input-action input{padding-right:52px!important}.v41-input-action button{position:absolute;right:4px;top:4px;width:38px;height:38px;min-height:38px;background:transparent;border:0}.v41-duration{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:10px}.v41-two-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.v41-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.v41-presets button{min-height:38px;padding:8px 4px;border:1px solid #383840;border-radius:9px;background:#2c2c32;color:#b9b9c7;font-size:12px}.v41-presets button[aria-pressed=true]{background:#0a84ff24;border-color:#0a84ff88;color:#8ec9ff}
@media(max-width:767px){.v41-page .v40-shell{display:block;min-height:calc(100dvh - 60px)}.v41-page .v40-main{padding:24px 16px}.v41-mobilebar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;min-height:60px;background:#232326;border-bottom:1px solid #37373e}.v41-mobilebar a{font-size:16px;font-weight:700;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v41-page .v40-nav{position:fixed!important;top:0;bottom:0;left:0;width:min(296px,86vw);height:100dvh;z-index:1201;overflow:auto;transform:translateX(-105%);transition:transform .2s ease;visibility:hidden;box-shadow:16px 0 60px #0006}.v41-page.v41-nav-open .v40-nav{transform:translateX(0);visibility:visible}.v41-nav-close{display:flex;float:right;margin:0 0 12px 10px}.v41-nav-backdrop:not([hidden]){display:block;position:fixed;inset:0;background:#0009;border:0;z-index:1200}.v40-nav .v40-brand{clear:both;padding-top:8px}.v41-page .v40-nav small{display:block!important}.v40-heading{align-items:flex-start;gap:12px}.v40-heading h1{font-size:24px}.v40-heading>.v40-btn{min-height:36px;padding:8px 11px;font-size:12px}.v40-card{padding:20px;border-radius:16px}.v40-grid{gap:16px}.v40-grid .v40-grid{gap:12px}.v40-sub{font-size:13px}.v40-field input,.v40-field select,.v40-field textarea{font-size:16px}.v40-field input[type=file]{font-size:12px}.v40-doc .v40-grid{grid-template-columns:1fr}body.v41-page>.v40-doc{padding:24px 16px!important}.v40-doc table{display:table;font-size:11px}.v40-doc td,.v40-doc th{padding:8px 5px}.v40-auth{margin:24px auto!important}.v40-image-form .v40-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.v40-image-form .v40-btn{font-size:13px;padding:10px}.v41-key-body{padding:16px;gap:16px}.v41-key-footer{padding:12px 16px 16px}.v41-window-head{padding:12px 16px;gap:10px}body #mobileCreateModal{padding:10px!important}body #mobileCreateModal [data-modal-content]{max-height:calc(100dvh - 20px)!important}body #sidebar{top:0!important;bottom:0!important;left:0!important;height:100dvh!important;max-height:100dvh!important;border-radius:0 18px 18px 0!important;width:min(310px,86vw)!important}body #sidebar .macos-tool-grid{grid-template-columns:1fr!important}body #sidebar .v41-sidebar-scroll button{font-size:13px!important;min-height:42px!important}body [data-modal]:not(#mobileCreateModal)>[data-modal-content]{padding:16px!important}body [data-modal] .macos-titlebar{margin-bottom:16px!important}.v41-two-fields{gap:10px}}
@media(prefers-reduced-motion:reduce){.v41-page .v40-nav{transition:none}}

@media(max-width:767px){.v40-doc table,.v40-doc tbody{display:block;width:100%}.v40-doc thead{display:none}.v40-doc tbody tr{display:grid;gap:6px;padding:14px 0;border-bottom:1px solid #37373f}.v40-doc td{display:block;padding:0;border:0;font-size:13px;line-height:1.6}.v40-doc td:first-child{color:#8fcaff}.v40-doc td:nth-child(3){color:#a1a1aa}.v40-doc td code{font-size:12px}}
body.v41-page.v41-nav-open{overflow:hidden!important}.v41-page .v40-nav{overscroll-behavior:contain}
