:root{--shell-topbar-h:60px;--shell-rail-w:68px;--shell-rail-w-pinned:240px;--shell-tabbar-h:calc(62px + env(safe-area-inset-bottom, 0px))}.app-topbar{position:fixed;top:0;left:0;right:0;height:var(--shell-topbar-h);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px 0 12px;background:var(--surface-1);border-bottom:1px solid var(--border-default);z-index:var(--z-topbar)}.topbar-left{display:flex;align-items:center;gap:12px;min-width:0}.topbar-logo{height:32px;width:auto;flex-shrink:0}.topbar-logo--dark{display:none}html[data-bs-theme=dark] .topbar-logo--light{display:none}html[data-bs-theme=dark] .topbar-logo--dark{display:block}.topbar-right{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-left:auto}.topbar-icon-btn{width:44px;height:44px;display:flex;align-items:center;justify-content:center;border:none;border-radius:50%;background:0 0;color:var(--text-secondary);font-size:1rem;cursor:pointer;transition:var(--transition-fast)}.topbar-icon-btn:hover{background:var(--surface-2);color:var(--accent-600)}.topbar-icon-btn .ico{width:19px;height:19px}.sync-pill{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 12px;border-radius:var(--radius-pill);font-size:.76rem;font-weight:600;border:1px solid var(--border-default);background:var(--surface-2);color:var(--text-secondary);user-select:none;white-space:nowrap}.sync-dot{width:8px;height:8px;border-radius:50%;background:var(--gray-400);flex-shrink:0}.sync-pill.is-online{background:var(--success-50);border-color:var(--success-100);color:var(--success-700)}.sync-pill.is-connecting{background:var(--warning-50);border-color:var(--warning-100);color:var(--warning-700)}.sync-pill.is-offline{background:var(--error-50);border-color:var(--error-100);color:var(--error-700)}.sync-pill.is-online .sync-dot,.sync-sheet.is-online .sync-dot{background:var(--success-500);box-shadow:0 0 0 3px var(--success-100)}.sync-pill.is-connecting .sync-dot,.sync-sheet.is-connecting .sync-dot{background:var(--warning-500);animation:sync-pulse 1.2s ease-in-out infinite}.sync-pill.is-offline .sync-dot,.sync-sheet.is-offline .sync-dot{background:var(--error-500)}@keyframes sync-pulse{0%,100%{opacity:1}50%{opacity:.35}}html[data-bs-theme=dark] .sync-pill.is-online{color:var(--success-400)}html[data-bs-theme=dark] .sync-pill.is-connecting{color:var(--warning-400)}html[data-bs-theme=dark] .sync-pill.is-offline{color:var(--error-400)}.sync-sheet{position:fixed;top:var(--shell-topbar-h);left:0;right:0;display:none;align-items:center;gap:11px;min-height:52px;padding:9px 14px;background:var(--surface-1);border-bottom:1px solid var(--border-default);box-shadow:var(--shadow);z-index:calc(var(--z-topbar) + 1)}.sync-sheet.is-online{background:var(--success-50);border-bottom-color:var(--success-100)}.sync-sheet.is-connecting{background:var(--warning-50);border-bottom-color:var(--warning-100)}.sync-sheet.is-offline{background:var(--error-50);border-bottom-color:var(--error-100)}.sync-sheet .sync-dot{width:10px;height:10px}.sync-sheet-text{display:flex;flex-direction:column;gap:1px;min-width:0}.sync-sheet-title{font-size:.82rem;font-weight:700;color:var(--text-primary)}.sync-sheet-note{font-size:.76rem;line-height:1.35;color:var(--text-secondary)}.user-avatar-button{background:0 0;border:none;padding:0;cursor:pointer;width:44px;height:44px;display:flex;align-items:center;justify-content:center}.user-avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,var(--accent-400),var(--accent-600));display:flex;align-items:center;justify-content:center;color:var(--accent-contrast);font-weight:600;font-size:.9rem;text-transform:uppercase;transition:var(--transition-fast)}.user-avatar-button:hover .user-avatar{transform:scale(1.06);box-shadow:var(--shadow-md)}.avatar-menu{border:1px solid var(--border-default);box-shadow:var(--shadow-lg);border-radius:var(--radius-md);padding:8px 0;min-width:232px}.avatar-menu.show{display:block!important;position:fixed!important;top:calc(var(--shell-topbar-h) + 4px)!important;right:12px!important;left:auto!important;bottom:auto!important;margin:0!important;transform:none!important;z-index:3000!important}.avatar-menu .dropdown-item{padding:12px 16px;font-size:.875rem;transition:var(--transition-fast)}.avatar-menu .dropdown-item:hover{background:var(--accent-50);color:var(--accent-700)}.avatar-menu .dropdown-item .ico,.avatar-menu .dropdown-item i{width:16px;text-align:center}.avatar-menu .dropdown-item .ico{width:17px;height:17px}.app-topmenu{display:flex;align-self:stretch;align-items:stretch;gap:2px;flex:0 1 auto;min-width:0;margin-left:6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.app-topmenu::-webkit-scrollbar{display:none}.app-topmenu .nav-item{display:flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;margin:8px 0;padding:0 14px;border:none;border-radius:var(--radius-md);background:0 0;color:var(--text-secondary);font-size:.95rem;font-weight:600;letter-spacing:.005em;line-height:1;white-space:nowrap;cursor:pointer;transition:var(--transition-fast)}.app-topmenu .nav-item .ico{width:18px;height:18px}.app-topmenu .nav-item:hover{background:var(--surface-2);color:var(--text-primary)}.app-topmenu .nav-item.active{background:var(--accent-50);color:var(--accent-700)}html[data-bs-theme=dark] .app-topmenu .nav-item.active{background:var(--surface-2);color:var(--accent-300)}@media (min-width:992px) and (max-width:1099.98px){.app-topmenu .nav-item{padding:0 10px}.app-topmenu .nav-item .nav-label{display:none}}.topbar-search{display:flex;align-items:center;gap:6px;flex:0 1 240px;min-width:132px;height:36px;padding:0 10px;border:1px solid var(--border-default);border-radius:var(--radius-pill);background:var(--surface-2);transition:var(--transition-fast)}.topbar-search:focus-within{background:var(--surface-1);border-color:var(--accent-400);box-shadow:var(--focus-ring)}.topbar-search .search-ico{width:16px;height:16px;flex-shrink:0;color:var(--text-muted)}.topbar-search .search-input{flex:1 1 auto;min-width:0;border:none;outline:0;background:0 0;color:var(--text-primary);font-size:.875rem}.topbar-search .search-input::placeholder{color:var(--text-muted)}.topbar-search .search-input::-webkit-search-cancel-button,.topbar-search .search-input::-webkit-search-decoration{-webkit-appearance:none;display:none}.search-clear{display:flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0;padding:0;border:none;border-radius:50%;background:0 0;color:var(--text-muted);cursor:pointer}.search-clear:hover{background:var(--surface-3);color:var(--text-primary)}.search-clear .ico{width:13px;height:13px}.search-panel{position:fixed;z-index:3000;max-height:min(70vh,560px);overflow-y:auto;overscroll-behavior:contain;padding:6px 0;border:1px solid var(--border-default);border-radius:var(--radius-md);background:var(--surface-1);box-shadow:var(--shadow-lg)}.search-panel[hidden]{display:none}.search-group-title{padding:8px 14px 4px;font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted)}.search-hit{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-height:44px;padding:7px 14px;border:none;background:0 0;text-align:left;cursor:pointer;transition:var(--transition-fast)}.search-hit.is-active,.search-hit:hover{background:var(--accent-50)}html[data-bs-theme=dark] .search-hit.is-active,html[data-bs-theme=dark] .search-hit:hover{background:var(--surface-2)}.search-hit-main{font-size:.875rem;font-weight:600;color:var(--text-primary);overflow-wrap:anywhere}.search-hit-sub{font-size:.75rem;color:var(--text-muted);overflow-wrap:anywhere}.search-hit mark{padding:0;background:0 0;color:var(--accent-600);font-weight:700}html[data-bs-theme=dark] .search-hit mark{color:var(--accent-300)}.search-note{padding:12px 14px;font-size:.8rem;color:var(--text-muted)}.search-foot{padding:8px 14px 4px;margin-top:4px;border-top:1px solid var(--border-default);font-size:.72rem;color:var(--text-muted)}@media (max-width:767.98px){.topbar-search{flex:0 0 auto;width:38px;height:38px;min-width:0;padding:0;justify-content:center;border-radius:50%}.topbar-search .search-clear,.topbar-search .search-input{display:none}body.search-open .topbar-search{position:fixed;top:var(--shell-topbar-h);left:0;right:0;width:auto;height:52px;padding:0 12px;justify-content:flex-start;border-radius:0;border-left:none;border-right:none;background:var(--surface-1);z-index:calc(var(--z-topbar) + 1)}body.search-open .topbar-search .search-input{display:block}body.search-open .topbar-search .search-clear{display:flex}#themeQuickToggle{display:none}.sync-pill{position:relative;width:38px;height:38px;padding:0;justify-content:center;border-radius:50%;cursor:pointer}.sync-pill .sync-dot{width:10px;height:10px}.sync-pill .sync-label{display:none}.topbar-right .sync-pill{order:-1}.sync-pill::before{content:'';position:absolute;inset:-3px;border-radius:50%}.sync-sheet:not([hidden]){display:flex}}.app-rail{position:fixed;top:var(--shell-topbar-h);left:0;bottom:0;width:var(--shell-rail-w);display:flex;flex-direction:column;gap:2px;padding:10px 6px;background:var(--surface-1);border-right:1px solid var(--border-default);overflow-y:auto;overflow-x:hidden;z-index:var(--z-rail);transition:width .22s cubic-bezier(.4, 0, .2, 1)}body.rail-pinned .app-rail{width:var(--shell-rail-w-pinned)}.app-rail .nav-item{display:flex;align-items:center;justify-content:center;gap:0;min-height:46px;padding:0;border:none;border-radius:var(--radius-md);background:0 0;color:var(--text-secondary);font-size:.875rem;font-weight:500;cursor:pointer;white-space:nowrap;overflow:hidden;transition:var(--transition-fast);flex-shrink:0}.app-rail .nav-item .ico{width:21px;height:21px;flex-shrink:0}.app-rail .nav-item .nav-label{display:none}body.rail-pinned .app-rail .nav-item{justify-content:flex-start;gap:12px;padding:0 14px}body.rail-pinned .app-rail .nav-item .nav-label{display:inline}.app-rail .nav-item:hover{background:var(--surface-2);color:var(--text-primary)}.app-rail .nav-item.active{background:var(--accent-50);color:var(--accent-700)}.app-rail .nav-item.active{box-shadow:inset 3px 0 0 var(--accent-500)}html[data-bs-theme=dark] .app-rail .nav-item.active{background:var(--surface-2);color:var(--accent-300)}.rail-spacer{flex:1}.rail-pin{min-height:44px;border:none;border-radius:var(--radius-md);background:0 0;color:var(--text-muted);cursor:pointer;transition:var(--transition-fast);flex-shrink:0}.rail-pin:hover{background:var(--surface-2);color:var(--text-primary)}.rail-pin .ico{width:18px;height:18px;transition:transform .22s ease}body.rail-pinned .rail-pin .ico{transform:rotate(180deg)}.app-main{position:fixed;top:var(--shell-topbar-h);left:0;right:0;bottom:0;display:flex;flex-direction:column;overflow:hidden;padding:8px;padding-left:0;padding-right:0;background:var(--surface-0)}@media (min-width:992px){.app-rail{display:none}.app-main{left:0}.app-tabbar,.data-sheet,.sheet-backdrop{display:none!important}.app-topbar{padding-left:0;column-gap:0}.topbar-left{flex:0 0 var(--sched-content-x);padding-left:12px}.topbar-right{flex:1 1 auto;min-width:0;margin-left:0}.topbar-right .sync-pill{margin-left:auto}}@media (max-width:991.98px){.app-rail{display:none!important}.app-topmenu{display:none}.app-main{bottom:var(--shell-tabbar-h);padding:4px;padding-left:0;padding-right:0}}.app-tabbar{position:fixed;left:0;right:0;bottom:0;height:var(--shell-tabbar-h);padding-bottom:env(safe-area-inset-bottom,0);display:grid;grid-template-columns:1fr 76px 1fr;align-items:stretch;background:var(--surface-1);border-top:1px solid var(--border-default);z-index:var(--z-topbar)}.app-tabbar .tab-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:none;background:0 0;color:var(--text-muted);font-size:.66rem;font-weight:600;letter-spacing:.005em;cursor:pointer;padding:6px 2px;transition:var(--transition-fast);min-height:44px}.app-tabbar .tab-btn .ico{width:22px;height:22px}.app-tabbar .tab-btn.active{color:var(--accent-600)}html[data-bs-theme=dark] .app-tabbar .tab-btn.active{color:var(--accent-400);background:0 0}.tab-create-wrap{display:flex;align-items:flex-start;justify-content:center}.tab-create{width:52px;height:52px;margin-top:-16px;display:flex;align-items:center;justify-content:center;border:3px solid var(--surface-1);border-radius:50%;background:var(--accent-600);color:var(--accent-contrast);cursor:pointer;box-shadow:var(--shadow-md);transition:var(--transition-fast)}.tab-create .ico{width:24px;height:24px;stroke-width:2.1}.tab-create:active{transform:scale(.94)}.sheet-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:var(--z-backdrop);opacity:0;transition:opacity .2s ease}.sheet-backdrop.show{opacity:1}.data-sheet{position:fixed;left:0;right:0;bottom:0;background:var(--surface-1);border-radius:var(--radius-lg) var(--radius-lg) 0 0;box-shadow:var(--shadow-xl);z-index:var(--z-drawer);padding:8px 16px calc(16px + env(safe-area-inset-bottom,0px));transform:translateY(100%);transition:transform .25s cubic-bezier(.4, 0, .2, 1)}.data-sheet.show{transform:translateY(0)}.sheet-handle{width:40px;height:4px;border-radius:2px;background:var(--border-strong);margin:6px auto 12px}.sheet-title{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;font-weight:700;color:var(--text-muted);margin:0 0 10px 4px}.sheet-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.sheet-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:76px;border:1px solid var(--border-default);border-radius:var(--radius-md);background:var(--surface-1);color:var(--text-secondary);font-size:.72rem;font-weight:600;cursor:pointer;transition:var(--transition-fast)}.sheet-item .ico{width:22px;height:22px;color:var(--accent-500)}.sheet-item:active,.sheet-item:hover{background:var(--accent-50);border-color:var(--accent-200);color:var(--accent-700)}.sheet-item.active{border-color:var(--accent-500);background:var(--accent-50);color:var(--accent-700)}html[data-bs-theme=dark] .sheet-item.active,html[data-bs-theme=dark] .sheet-item:active,html[data-bs-theme=dark] .sheet-item:hover{background:var(--surface-2);color:var(--accent-300)}.avatar-menu .dropdown-item.perm-locked,.nav-item.perm-locked{opacity:.42;filter:grayscale(1);cursor:not-allowed}.app-rail .nav-item.perm-locked:hover,.app-topmenu .nav-item.perm-locked:hover{background:0 0;color:var(--text-secondary)}.sheet-item.perm-locked:active,.sheet-item.perm-locked:hover{background:var(--surface-1);border-color:var(--border-default);color:var(--text-secondary)}.nav-item.perm-locked{position:relative}.nav-item.perm-locked::after{content:'\f023';font-family:'Font Awesome 6 Free',FontAwesome;font-weight:900;position:absolute;font-size:.55rem;color:var(--text-secondary)}.app-rail .nav-item.perm-locked::after{top:6px;right:8px}.app-topmenu .nav-item.perm-locked::after{top:2px;right:4px}.app-tabbar .tab-btn.perm-locked::after{top:4px;right:calc(50% - 18px)}.sheet-item.perm-locked::after{top:8px;right:10px}.avatar-menu .dropdown-item.perm-locked::after{content:'\f023';font-family:'Font Awesome 6 Free',FontAwesome;font-weight:900;position:static;font-size:.65rem;margin-left:8px}#toast-container{z-index:var(--z-toast)}@media (max-width:991.98px){#toast-container{bottom:var(--shell-tabbar-h)!important}}.app-toast{border:1px solid var(--border-default);border-radius:var(--radius-md);background:var(--surface-3);box-shadow:var(--shadow-lg);overflow:hidden}.app-toast .toast-body{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;color:var(--text-primary);font-size:.85rem}.app-toast .app-toast-message{flex:1;min-width:0;overflow-wrap:anywhere}.app-toast .btn-close{flex-shrink:0;margin-top:1px}.app-toast-icon{font-size:1rem;margin-top:1px}.app-toast-success{border-left:4px solid var(--success-500)}.app-toast-success .app-toast-icon{color:var(--success-500)}.app-toast-info,.app-toast-primary{border-left:4px solid var(--accent-500)}.app-toast-info .app-toast-icon,.app-toast-primary .app-toast-icon{color:var(--accent-500)}.app-toast-warning{border-left:4px solid var(--warning-500)}.app-toast-warning .app-toast-icon{color:var(--warning-500)}.app-toast-danger,.app-toast-error{border-left:4px solid var(--error-500)}.app-toast-danger .app-toast-icon,.app-toast-error .app-toast-icon{color:var(--error-500)}.sync-progress-toast{min-width:280px;max-width:350px}@media (max-width:576px){.sync-progress-toast{min-width:260px;max-width:calc(100vw - 2rem)}.toast-container.mobile-top{top:1rem!important;bottom:auto!important}}.sync-progress-toast .toast-body{padding:1rem}.sync-progress-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem}.sync-progress-title{font-weight:600;font-size:.95rem;color:var(--text-primary)}.sync-progress-percentage{font-weight:700;font-size:1.1rem;color:var(--accent-600)}.sync-progress-bar-container{width:100%;height:10px;background-color:var(--surface-2);border-radius:5px;overflow:hidden;margin-bottom:.75rem}.sync-progress-bar{height:100%;background:linear-gradient(90deg,var(--accent-500) 0,var(--accent-300) 100%);transition:width .3s ease;border-radius:5px}.sync-progress-details{font-size:.875rem;color:var(--text-muted);text-align:center}.sync-tables-count{font-weight:500;margin-bottom:.25rem}.sync-current-status{font-size:.8rem;display:flex;align-items:center;justify-content:center;margin-top:.5rem}.sync-current-status .ico,.sync-current-status i{margin-right:.5rem}.sync-spinner{display:inline-block;width:14px;height:14px;border:2px solid var(--accent-500);border-radius:50%;border-top-color:transparent;animation:spin .8s linear infinite;margin-right:.5rem}.sync-complete-icon{font-size:2.5rem;margin-bottom:.5rem}.sync-complete-message{text-align:center;padding:.5rem 0}.sync-complete-message .fw-bold{font-size:1rem;margin-bottom:.5rem}.sync-complete-message .text-muted{font-size:.85rem}.sw-update-banner{display:none;position:fixed;top:0;left:0;right:0;background:linear-gradient(90deg,var(--accent-600),var(--accent-500));color:var(--accent-contrast);padding:12px;text-align:center;z-index:calc(var(--z-toast) + 1);box-shadow:var(--shadow-md);font-size:.9rem}.sw-update-banner button{margin-left:10px;background:var(--surface-1);color:var(--accent-600);border:none;padding:8px 16px;border-radius:var(--radius-sm);font-weight:600;cursor:pointer}@media print{.app-rail,.app-tabbar,.app-topbar,.data-sheet,.sheet-backdrop{display:none!important}.app-main{position:static!important;padding:0!important}@page{margin:0}}.sw-update-toast{position:fixed;top:20px;right:20px;background:var(--success-600);color:#fff;padding:15px 20px;border-radius:var(--radius-md);box-shadow:var(--shadow-lg);z-index:calc(var(--z-toast) + 1)}#commit-blocker{display:none;position:fixed;inset:0;z-index:11000;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:color-mix(in srgb,var(--surface-0) 65%,transparent);backdrop-filter:blur(3px)}#commit-blocker .cb-spinner{width:42px;height:42px;border:4px solid var(--border-default);border-top-color:var(--warning-500);border-radius:50%;animation:cb-spin .8s linear infinite}#commit-blocker .cb-message{font-size:.95rem;font-weight:600;color:var(--text-primary)}#commit-blocker.cb-quiet{background:0 0;backdrop-filter:none;cursor:progress}#commit-blocker.cb-quiet>*{visibility:hidden}@keyframes cb-spin{to{transform:rotate(360deg)}}