/* App frame styles (shell.js). Colors are theme variables only (UI_GUIDE.md §3). Owner: A · CRM. */
body.sh-on{font-family:var(--font);background:var(--bg);color:var(--fg)}
.sh-top{position:sticky;top:0;z-index:15}
.sh-bar{display:flex;align-items:center;gap:14px;padding:8px 20px;min-height:58px;background:var(--head-bg);color:var(--head-fg);border-bottom:1px solid var(--border)}
:root[data-mode=light] .sh-bar{border-bottom:0}
.sh-co{display:flex;align-items:center;gap:10px;min-width:0;flex:0 1 auto}
.sh-logo{width:36px;height:36px;border-radius:10px;background:var(--accent);color:var(--accent-fg);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px;flex:none;overflow:hidden}
.sh-logo img{width:100%;height:100%;object-fit:contain;background:#FFFFFF}
.sh-co-name{font-size:17px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--head-fg)}
.sh-co-pick select{min-height:36px;padding:4px 30px 4px 10px;border-radius:10px;border:1px solid color-mix(in srgb,var(--head-fg) 30%,transparent);background:transparent;color:var(--head-fg);font:800 16px var(--font);max-width:260px}
.sh-co-pick select option{color:#111111;background:#FFFFFF}
.sh-views{display:inline-flex;gap:2px;padding:3px;border-radius:999px;background:color-mix(in srgb,var(--head-fg) 10%,transparent);margin:0 auto}
.sh-view{padding:7px 16px;border-radius:999px;font-weight:700;font-size:14px;text-decoration:none;color:var(--head-muted);min-height:34px;display:inline-flex;align-items:center}
.sh-view[aria-current]{background:var(--head-on);color:var(--head-on-fg)}
.sh-viewname{margin:0 auto;font-weight:700;color:var(--head-muted)}
.sh-right{display:flex;align-items:center;gap:6px;flex:none}
.sh-icon{display:inline-flex;align-items:center;gap:8px;min-width:40px;min-height:40px;justify-content:center;border-radius:10px;border:0;background:transparent;color:var(--head-fg);cursor:pointer;font:600 14px var(--font);padding:0 8px}
.sh-icon:hover{background:color-mix(in srgb,var(--head-fg) 12%,transparent)}
.sh-icon svg,.sh-bottom svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sh-menu-wrap{position:relative}
.sh-menu{position:absolute;right:0;top:calc(100% + 6px);width:270px;background:var(--surface);color:var(--fg);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.28);padding:6px;display:flex;flex-direction:column;z-index:40}
.sh-menu a,.sh-menu>button{display:flex;align-items:center;min-height:44px;padding:0 12px;border-radius:8px;text-decoration:none;color:var(--fg);background:none;border:0;font:600 14px var(--font);cursor:pointer;text-align:left}
.sh-menu a:hover,.sh-menu>button:hover{background:var(--surface-2)}
.sh-menu-me{padding:10px 12px 8px;border-bottom:1px solid var(--border);margin-bottom:4px;display:flex;flex-direction:column;gap:2px}
.sh-menu-me span{font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}
.sh-menu-sec{padding:8px 12px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin:4px 0}
.sh-menu-sec>span{display:block;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.sh-seg{display:flex;background:var(--surface-2);border-radius:999px;padding:3px;gap:2px}
.sh-seg button{flex:1;border:0;background:none;border-radius:999px;min-height:34px;font:700 12.5px var(--font);color:var(--muted);cursor:pointer}
.sh-seg a{flex:1;display:flex;align-items:center;justify-content:center;border-radius:999px;min-height:34px;font:700 12.5px var(--font);color:var(--muted);text-decoration:none}
.sh-seg button[aria-checked=true],.sh-seg a[aria-checked=true]{background:var(--nav-on);color:var(--nav-on-fg)}
.sh-menu-views{border-top:0;margin-top:0}
.sh-phone-only{display:none}
.sh-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:8px 20px;background:var(--surface);border-bottom:1px solid var(--border)}
.sh-tabs a{display:inline-flex;align-items:center;gap:6px;padding:7px 16px;min-height:36px;border-radius:999px;text-decoration:none;color:var(--fg);font-weight:700;font-size:14px}
.sh-tabs a:hover{background:var(--surface-2)}
.sh-tabs a[aria-current=page]{background:var(--nav-on);color:var(--nav-on-fg)}
.sh-badge{font-style:normal;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--bad-bg);color:var(--bad);border:1px solid var(--bad-bd);font-size:12px;font-weight:800;display:inline-flex;align-items:center;justify-content:center}
.sh-bottom{display:none}
.sh-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--surface);color:var(--fg);border:1px solid var(--border);padding:10px 16px;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.25);z-index:60;font-weight:600;font-size:14px}
.sh-on :focus-visible{outline:2px solid var(--accent-text);outline-offset:2px}
.sr{position:absolute;left:-9999px}
@media (max-width:720px){
  .sh-bar{padding:6px 12px;gap:8px;min-height:52px}
  .sh-views,.sh-tabs,.sh-user-name{display:none}
  .sh-viewname{display:none}
  .sh-viewname.sh-phone-only{display:inline;margin:0 auto 0 0;font-size:14px;color:var(--head-muted)}
  .sh-co-name{font-size:16px}
  body.sh-on{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  .sh-bottom{display:flex;position:fixed;left:0;right:0;bottom:0;height:calc(72px + env(safe-area-inset-bottom));padding:0 8px env(safe-area-inset-bottom);background:var(--surface);border-top:1px solid var(--border);z-index:18;align-items:center;justify-content:space-around}
  .sh-bottom a,.sh-bottom>button:not(.sh-add){flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:56px;text-decoration:none;color:var(--muted);font:700 12px var(--font);background:none;border:0;cursor:pointer}
  .sh-bottom a[aria-current=page]{color:var(--accent-text)}
  .sh-add{width:52px;height:52px;border-radius:999px;border:0;background:var(--accent);color:var(--accent-fg);display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none;margin:0 6px}
  .sh-add svg{width:24px;height:24px;stroke-width:2.4}
  .sh-menu{position:fixed;left:8px;right:8px;width:auto;top:auto;bottom:calc(80px + env(safe-area-inset-bottom))}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
