/* Shared layout for every app (ui.doazul.com/v1). Built from ~/projects/app-layout/src by build.sh; edit there.
   Colors, fonts, the header and left menu (bottom bar on phones), buttons, pills, avatars, dialogs, toast.
   Change it here and every app follows. No breaking changes inside v1. */
/* Header and menu. The header color is one setting per app: --app-header (mountShell({color}) sets it).
   Change the default here and every app that doesn't set its own follows. */
:root{--app-header:#0f6cbd}
body.shell{margin:0;height:100dvh;overflow:hidden}
body.shell .app-header{position:fixed;top:0;left:0;right:0;height:58px;background:var(--app-header);color:#fff;display:flex;align-items:center;gap:18px;padding:0 18px 0 16px;z-index:15;font-family:'Segoe UI',-apple-system,BlinkMacSystemFont,Arial,sans-serif}
body.shell .app-header strong{font-size:20px;min-width:220px;font-weight:600}
body.shell .app-header .page-title{font-size:16px;font-weight:500;opacity:.92;flex:1}
body.shell .hub{width:28px;height:28px;display:grid;place-items:center}
body.shell .hub img{width:28px;height:28px;border-radius:6px}
body.shell .owner{width:34px;height:34px;object-fit:cover;border-radius:50%}
body.shell .app-rail{position:fixed;top:58px;left:0;bottom:0;width:70px;background:#f8f9fb;border-right:1px solid #e5e5e5;display:flex;flex-direction:column;padding-top:10px;gap:8px;z-index:14;font-family:'Segoe UI',-apple-system,BlinkMacSystemFont,Arial,sans-serif}
body.shell .app-rail a{display:flex;position:relative;flex-direction:column;align-items:center;gap:8px;padding:15px 0;font-size:11px;color:#555;text-decoration:none}
body.shell .app-rail svg{width:25px;height:25px}
body.shell .app-rail a.active{color:#0f6cbd;background:#fff}
body.shell .app-rail a.active:before{content:'';position:absolute;left:0;top:8px;bottom:8px;width:3px;background:currentColor}
body.shell .app-rail a.push{margin-top:auto;margin-bottom:12px}
body.shell .shell-main{position:fixed;top:58px;left:70px;right:0;bottom:0;overflow:auto;overscroll-behavior:contain}
body.shell .page-bar{position:sticky;top:0;z-index:6;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;padding:8px 24px;background:#fff;border-bottom:1px solid #e5e5e5}
body.shell .page-bar>*:first-child{margin-left:0}
body.shell .bar{left:70px}
@media(max-width:680px){
 body.shell .app-header{height:54px;padding:0 12px;gap:12px}
 body.shell .app-header strong{font-size:16px;min-width:0}
 body.shell .app-header .page-title{font-size:14px}
 body.shell .hub,body.shell .hub img{width:26px;height:26px}
 body.shell .app-rail{top:auto;bottom:0;right:0;width:auto;height:62px;flex-direction:row;justify-content:space-around;padding:0;gap:0;border-right:0;border-top:1px solid #e5e5e5;background:#fff}
 body.shell .app-rail a{flex:1;padding:8px 0;gap:4px;font-size:10px;margin:0}
 body.shell .app-rail a.push{margin:0}
 body.shell .app-rail svg{width:23px;height:23px}
 body.shell .app-rail a.active:before{top:0;bottom:auto;width:30px;height:2px;left:calc(50% - 15px)}
 body.shell .shell-main{top:54px;left:0;bottom:62px}
 body.shell .bar{left:0;bottom:62px}
}
body.shell .owner.initials{display:grid;place-items:center;background:#fff;color:var(--app-header);font-weight:700;font-size:15px}
body.shell .app-rail a .badge{position:absolute;top:8px;right:12px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#d1242f;color:#fff;font-size:11px;font-weight:700;display:grid;place-items:center}
@media(max-width:680px){body.shell .app-rail a .badge{top:2px;right:calc(50% - 22px)}}
:root{--blue:#0f6cbd;--ink:#1f2328;--mute:#616a73;--line:#e5e5e5;--bg:#f3f4f6;--card:#fff;--ok:#1a7f37;--warn:#9a6700}
*{box-sizing:border-box}
body{font-family:'Segoe UI',-apple-system,BlinkMacSystemFont,Arial,sans-serif;color:var(--ink);background:var(--bg);font-size:14px}
button,input,select,textarea{font:inherit}
.btn{border:1px solid #c8ccd1;background:#fff;border-radius:6px;padding:6px 12px;cursor:pointer;color:var(--ink)}
.btn:hover{background:#f6f8fa}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}.btn.primary:hover{background:#0c5aa0}
.btn.danger{color:#b42318;border-color:#f0b4ae}.btn.small{padding:3px 9px;font-size:12px}
#live{font-size:12px;color:var(--ok);display:flex;align-items:center;gap:6px}#live:before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor}
#live.bad{color:#b42318}
.wrap{padding:20px 24px 40px;max-width:1400px}
h2{font-size:15px;margin:0 0 10px;font-weight:600}
.muted{color:var(--mute)}
.av{--h:210;display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;flex:none;background:hsl(var(--h) 70% 92%);color:hsl(var(--h) 60% 32%);font-weight:700;font-size:13px}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#c8ccd1;margin-right:5px}.dot.on{background:#2da44e}.dot.via{background:#bf8700}
.pill{display:inline-block;font-size:11px;padding:1px 8px;border-radius:999px;background:#eef1f4;color:#444;margin:2px 3px 0 0}
.empty{color:var(--mute);font-size:13px;padding:14px;text-align:center;border:1px dashed #d0d4d9;border-radius:8px}
#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:#1f2328;color:#fff;padding:9px 16px;border-radius:8px;opacity:0;transition:.2s;z-index:50;pointer-events:none}
#toast.show{opacity:1;transform:translateX(-50%)}
input[type=text],textarea,select{border:1px solid #c8ccd1;border-radius:6px;padding:6px 9px;background:#fff}
dialog{border:0;border-radius:10px;padding:0;box-shadow:0 10px 40px rgba(0,0,0,.25);width:min(520px,94vw)}
dialog form{padding:20px;display:grid;gap:10px}dialog h3{margin:0 0 4px;font-size:16px}
dialog label{display:grid;gap:4px;font-size:12px;color:var(--mute)}
dialog .row{display:flex;gap:8px;justify-content:flex-end;margin-top:6px}
@media(max-width:680px){.wrap{padding:14px 12px 30px}}
