/* DigiConnect · Digizenship theme */
:root{--brand:#54b9d1;--brand-ink:#1f7f97;--brand-soft:#e7f5f9;--brand-2:#cddbde;--ink:#303e4e;--muted:#8a94a0;--teal:#1f8f7e;--line:#c7d6e1;--bg:#f5f8fa;--danger:#c4566a;--ok:#36b895;--warn:#e2a400;
  --safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px)}
*{box-sizing:border-box}html,body{height:100%}body{margin:0;background:var(--bg);color:var(--ink);font:14px 'DM Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;-webkit-tap-highlight-color:transparent}
button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer;border:0;background:none}button:disabled{opacity:.55;cursor:default}
:focus-visible{outline:3px solid #9fd6e5;outline-offset:2px}a{color:var(--brand-ink)}
svg.i{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
h1,h2,h3,p{margin:0}h1,h2,h3{font-family:Manrope,'DM Sans',system-ui,sans-serif}
.hidden{display:none!important}.muted{color:var(--muted)}.tiny{font-size:11px;color:var(--muted)}.grow{flex:1;min-width:0}.row{display:flex;align-items:center;gap:10px}.wrap{flex-wrap:wrap}
.primary{background:var(--brand);color:#fff;border-radius:11px;padding:11px 16px;font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:7px}
.secondary{background:var(--brand-2);color:var(--ink);border-radius:11px;padding:11px 16px;font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:7px}
.ghost{color:var(--brand-ink);font-weight:600;font-size:13px;padding:8px 10px;border-radius:9px}.ghost:hover{background:var(--brand-soft)}
.danger{background:#fdf0f2;color:var(--danger);border-radius:11px;padding:11px 16px;font-size:13px;font-weight:600}
.full{width:100%}.primary svg.i,.secondary svg.i{width:16px;height:16px}
.ib{width:38px;height:38px;display:inline-grid;place-items:center;border-radius:11px;color:#6e7a86;flex-shrink:0;position:relative}.ib:hover{background:#f0f4f6}.ib.soft{background:var(--brand-soft);color:var(--brand-ink)}
.field{display:block;margin:14px 0;font-size:12px;color:#5d6b79}.field input,.field select,.field textarea{width:100%;display:block;border:1px solid #dfe7ee;background:#fafcfd;padding:12px;border-radius:11px;margin-top:7px;color:var(--ink);font-size:14px}
.field textarea{min-height:80px;resize:vertical}.field small{display:block;margin-top:6px;color:var(--muted);font-size:11px}
.fields2{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
/* avatars */
.avatar{height:46px;width:46px;border-radius:16px;display:grid;place-items:center;font-weight:700;font-size:14px;flex-shrink:0;position:relative;letter-spacing:.3px}
.avatar small{position:absolute;width:11px;height:11px;background:var(--ok);border:2px solid #fff;border-radius:50%;right:-1px;bottom:1px}
.avatar.sm{width:30px;height:30px;font-size:10px;border-radius:10px}.avatar.lg{width:80px;height:80px;border-radius:26px;font-size:24px}
.av0{background:#ddf1f7;color:#2c8aa3}.av1{background:#dcefe9;color:#3c8770}.av2{background:#f9e7dc;color:#b98162}.av3{background:#dfeaf9;color:#6087b8}.av4{background:#f5dfe9;color:#b0698b}.av5{background:#f1ead5;color:#9a843f}
/* shell */
.shell{display:flex;height:100dvh;max-width:1800px;margin:auto}
.rail{width:88px;background:#fff;border-right:1px solid var(--line);display:flex;align-items:center;flex-direction:column;padding:26px 10px 18px;gap:10px;flex-shrink:0}
.logo{width:46px;height:46px;background:var(--brand);color:#fff;border-radius:15px;display:grid;place-items:center;margin-bottom:24px;box-shadow:0 5px 15px #54b9d140}.logo svg.i{width:26px;height:26px}
.nav{width:66px;height:60px;display:flex;align-items:center;justify-content:center;gap:5px;flex-direction:column;color:#8b96a1;font-size:10px;font-weight:600;border-radius:14px;position:relative}
.nav.active{background:var(--brand-soft);color:var(--brand-ink)}.nav .dot{position:absolute;top:6px;right:12px;min-width:16px;height:16px;border-radius:8px;background:var(--brand);color:#fff;font-size:9px;display:grid;place-items:center;padding:0 4px}
.rail .spacer{flex:1}.nav .avatar{width:28px;height:28px;border-radius:9px;font-size:10px}
.side{width:360px;background:#fff;display:flex;flex-direction:column;border-right:1px solid var(--line);flex-shrink:0;min-height:0}
.sidetop{padding:28px 22px 14px}.brandline{display:flex;align-items:center;justify-content:space-between;gap:8px}.brandline h1{font-size:24px;font-weight:800;letter-spacing:-1px}.accent{color:var(--brand)}
.search{display:flex;align-items:center;gap:9px;background:#f3f7f9;padding:10px 13px;border-radius:11px;color:#8b96a1;margin-top:18px}.search svg.i{width:17px;height:17px}
.search input{border:0;outline:none;background:none;min-width:0;width:100%;font-size:13px}
.filters{display:flex;gap:6px;margin-top:14px;overflow-x:auto;scrollbar-width:none}.chip{padding:7px 12px;background:#f3f7f9;color:#6e7a86;font-size:12px;font-weight:600;border-radius:8px;white-space:nowrap}.chip.active{background:var(--brand);color:#fff}
.listbody{overflow:auto;flex:1;padding:4px 10px 10px}
.chatrow{display:flex;text-align:left;align-items:center;width:100%;padding:13px 11px;gap:12px;border-radius:13px}.chatrow:hover{background:#f6f9fa}.chatrow.selected{background:var(--brand-soft)}
.rowhead{display:flex;gap:6px;align-items:center}.name{font-weight:700;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rowtime{font-size:10px;color:#97a1aa;margin-left:auto;white-space:nowrap}
.preview{font-size:12px;color:#7d8893;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;gap:6px;align-items:center}.preview span{overflow:hidden;text-overflow:ellipsis}
.count{min-width:19px;height:19px;border-radius:7px;background:var(--brand);color:#fff;display:grid;place-items:center;font-size:10px;font-weight:700;padding:0 5px;margin-left:auto;flex-shrink:0}
.count.muted{background:#b8c3cc}.badge{color:var(--teal);font-size:12px;font-weight:700}
.tag{display:inline-block;background:var(--brand-soft);color:var(--brand-ink);font-size:9px;font-weight:700;letter-spacing:.4px;padding:3px 6px;border-radius:5px;vertical-align:middle;white-space:nowrap}
.tag.biz{background:#e7f4ef;color:#2f8a6f}.tag.warn{background:#fff4d6;color:#8a6a12}.tag.grey{background:#eef2f5;color:#6e7a86}
.sidefoot{border-top:1px solid var(--line);padding:12px 22px;display:flex;gap:9px;align-items:center;color:#8b96a1;font-size:11px}
.conn{width:8px;height:8px;border-radius:50%;background:var(--ok)}.conn.off{background:var(--warn)}
.main{flex:1;min-width:0;display:flex;flex-direction:column;background:#f9fbfc;position:relative}
.topbar{min-height:78px;background:#fff;display:flex;align-items:center;padding:12px 24px;gap:12px;border-bottom:1px solid var(--line);flex-shrink:0}
.topbar h2{font-size:15px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar h2 .badge,.topbar h2 .dzmark{margin-left:5px;vertical-align:middle}.topbar .status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status{font-size:11px;color:var(--teal);margin-top:4px}.status.typing{color:var(--brand-ink);font-style:italic}
.topactions{margin-left:auto;display:flex;gap:6px}.back{display:none}
.thread{flex:1;overflow:auto;padding:22px 32px 16px;background-image:radial-gradient(#b9c9d22e .7px,transparent .7px);background-size:18px 18px}
.day{text-align:center;margin:16px 0;font-size:10px;color:#8e99a3;letter-spacing:.8px}.day span{padding:6px 13px;border:1px solid var(--line);border-radius:20px;background:#fff}
.msg{display:flex;gap:8px;margin:6px 0;align-items:flex-end}.msg.out{justify-content:flex-end}.msg.cont{margin-top:2px}
.bubble{background:#fff;border:1px solid #e8eef2;padding:9px 13px;border-radius:15px 15px 15px 4px;max-width:min(560px,78%);font-size:14px;line-height:1.5;box-shadow:0 1px 2px #303e4e08;white-space:pre-wrap;overflow-wrap:anywhere}
.out .bubble{background:#e3f4f9;border-color:#d3ecf3;border-radius:15px 15px 4px 15px}
.who{font-size:11px;font-weight:700;color:var(--brand-ink);margin-bottom:3px}
.stamp{display:block;text-align:right;font-size:10px;color:#94a0aa;margin-top:3px;line-height:1}.ticks{margin-left:4px;letter-spacing:-2px}.ticks.read{color:#2b9fc0}
.bubble img.att{display:block;max-width:100%;max-height:320px;border-radius:10px;margin:-3px -6px 4px;cursor:zoom-in}
.filecard{display:flex;gap:10px;align-items:center;text-decoration:none;color:inherit;background:#f3f7f9;border-radius:10px;padding:9px 11px;margin-bottom:3px}.out .filecard{background:#d4ebf2}
.sysmsg{text-align:center;margin:10px 0}.sysmsg span{display:inline-block;background:#eef3f6;color:#5d6b79;font-size:11px;padding:6px 12px;border-radius:9px}
.pcard,.ocard{width:min(300px,100%);background:#fff;border:1px solid #e3eaef;border-radius:14px;overflow:hidden;white-space:normal;margin:2px -4px 4px}
.pcard .pimg{height:150px;background:var(--brand-soft) center/cover;display:grid;place-items:center;color:var(--brand-ink)}.pcard .pbody{padding:11px 12px}
.pcard h4,.ocard h4{margin:0 0 4px;font-size:14px}.price{font-weight:700}.ocard{padding:13px}.ocard .oitems{font-size:12px;color:#5d6b79;margin:8px 0;line-height:1.7}
.ocard .oactions{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.ocard .oactions button{padding:8px 11px;font-size:12px}
.st{display:inline-block;font-size:10px;font-weight:700;padding:3px 8px;border-radius:6px;text-transform:uppercase;letter-spacing:.4px}
.st-pending{background:#fff4d6;color:#8a6a12}.st-confirmed{background:var(--brand-soft);color:var(--brand-ink)}.st-ready{background:#e8e7fb;color:#5b55b5}.st-completed{background:#e2f5ed;color:#2b8a68}.st-cancelled{background:#f6e6ea;color:var(--danger)}
.typingline{font-size:11px;color:var(--brand-ink);padding:0 32px 4px;height:16px;font-style:italic}
.composerwrap{padding:10px 18px calc(10px + var(--safe-b));background:#fff;border-top:1px solid var(--line)}
.composer{display:flex;align-items:flex-end;gap:6px}.composer textarea{flex:1;min-width:0;outline:none;border:0;background:#f3f7f9;border-radius:12px;padding:12px 14px;font-size:14px;resize:none;max-height:140px;line-height:1.4}
.send{width:44px;height:44px;border-radius:13px;background:var(--brand);color:#fff;display:grid;place-items:center;flex-shrink:0}
.blockedbar{padding:14px;text-align:center;font-size:12px;color:var(--muted);background:#fff;border-top:1px solid var(--line)}
.empty{padding:40px 20px;text-align:center;color:var(--muted);font-size:13px;line-height:1.7}.empty svg.i{width:44px;height:44px;color:#b8d9e3;margin-bottom:10px}
.welcome{flex:1;display:grid;place-items:center;text-align:center;padding:30px}.welcome .logo{margin:0 auto 18px;width:64px;height:64px;border-radius:20px}.welcome h2{font-size:24px;margin-bottom:8px}
/* detail panel */
.detail{width:300px;background:#fff;border-left:1px solid var(--line);padding:22px 20px;overflow:auto;flex-shrink:0}
.detailtitle{display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:700;color:#6e7a86}
.dhead{text-align:center;margin:22px 0 16px}.dhead .avatar{margin:0 auto 12px}.dhead h3{font-size:16px}.dhead p{font-size:12px;color:var(--muted);margin-top:5px}
.quick{display:flex;justify-content:center;gap:16px;margin:4px 0 18px}.quick button{font-size:10px;color:#6e7a86;display:flex;flex-direction:column;gap:6px;align-items:center}
.quick i{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:var(--brand-soft);color:var(--brand-ink)}.quick .on i{background:#fff4d6;color:var(--warn)}
.section{border-top:1px solid var(--line);padding:16px 0}.section h3{font-size:12px;margin-bottom:9px}.section p{font-size:12px;line-height:1.7;color:#6e7a86}
.info{display:flex;gap:10px;align-items:flex-start;margin:10px 0;color:#5d6b79;font-size:12px;line-height:1.6}.info svg.i{width:16px;height:16px;margin-top:1px}
.togrow{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin:10px 0;gap:14px}
.toggle{width:38px;height:22px;border-radius:20px;background:#d5dee5;padding:2px;display:flex;justify-content:flex-start;flex-shrink:0}.toggle.on{background:var(--brand);justify-content:flex-end}.toggle:after{content:'';background:#fff;border-radius:50%;width:18px;height:18px;box-shadow:0 1px 3px #0002}
/* pages */
.page{padding:30px 36px 40px;overflow:auto;flex:1}.page .inner{max-width:980px}
.eyebrow{font-size:10px;color:#7d8893;letter-spacing:2px;text-transform:uppercase;margin-bottom:8px}.page h2.title{font-size:27px;letter-spacing:-1px;margin-bottom:6px}.sub{color:#7d8893;line-height:1.6;font-size:13px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin-top:20px}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px}.card h3{font-size:15px;margin-bottom:6px}.card>p{font-size:13px;color:#7d8893;line-height:1.6;margin-bottom:12px}
.card+.card{margin-top:16px}.cardhead{display:flex;align-items:center;gap:10px;justify-content:space-between;margin-bottom:10px}
.setting{padding:14px 0;display:flex;justify-content:space-between;align-items:center;gap:16px;border-top:1px solid var(--line)}.setting p{font-size:12px;color:#7d8893;margin-top:3px}.setting strong{font-size:13px}
.setting select{border:1px solid #dfe7ee;border-radius:9px;padding:8px;background:#fff}
.hero{padding:26px;background:linear-gradient(135deg,#e7f5f9,#d6eef5);border-radius:18px;display:flex;align-items:center;justify-content:space-between;margin-top:20px;gap:16px}
.hero h3{font-size:20px;margin-bottom:6px}.hero p{font-size:13px;color:#5d6b79}.heromark{color:#9fd3e3}.heromark svg.i{width:72px;height:72px}
.bizcard{display:flex;flex-direction:column;gap:10px;text-align:left;cursor:pointer}.bizcard:hover{border-color:#c5e5ee}.bizcard .row h3{margin:0}
.dzmark{width:32px;height:32px;border-radius:10px;background:var(--brand);color:#fff;display:inline-grid;place-items:center;font:800 13px Manrope,system-ui,sans-serif;letter-spacing:-.5px;flex-shrink:0}
.dzmark.sm{width:20px;height:20px;border-radius:6px;font-size:9px}
.dzline{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--brand-ink);text-decoration:none;font-weight:600}
/* shop */
.bizhero{background:#fff;border:1px solid var(--line);border-radius:18px;padding:24px;display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap}
.bizhero .avatar{width:72px;height:72px;border-radius:22px;font-size:24px}.bizhero h2{font-size:24px;letter-spacing:-.5px}
.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;margin-top:16px}
.product{background:#fff;border:1px solid var(--line);border-radius:15px;overflow:hidden;display:flex;flex-direction:column}
.product .pimg{aspect-ratio:4/3;background:var(--brand-soft) center/cover;display:grid;place-items:center;color:#9fd3e3}.product .pimg svg.i{width:40px;height:40px}
.product .pb{padding:12px;display:flex;flex-direction:column;gap:6px;flex:1}.product h4{margin:0;font-size:14px}.product p{font-size:12px;color:#7d8893;line-height:1.5;flex:1}
.qty{display:inline-flex;align-items:center;gap:4px;background:var(--brand-soft);border-radius:10px;padding:2px}.qty button{width:30px;height:30px;border-radius:8px;font-weight:700;color:var(--brand-ink)}.qty span{min-width:22px;text-align:center;font-weight:700}
.cartbar{position:sticky;bottom:0;margin:18px -36px -40px;background:#fff;border-top:1px solid var(--line);padding:14px 36px calc(14px + var(--safe-b));display:flex;align-items:center;gap:14px;box-shadow:0 -8px 30px #303e4e10}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:18px 0 0;overflow-x:auto;scrollbar-width:none}.tabs button{padding:11px 14px;font-weight:600;font-size:13px;color:#6e7a86;border-bottom:2px solid transparent;white-space:nowrap}
.tabs button.active{color:var(--brand-ink);border-color:var(--brand)}
table.list{width:100%;border-collapse:collapse;font-size:13px}table.list th{text-align:left;font-size:11px;color:var(--muted);font-weight:600;padding:8px 10px;border-bottom:1px solid var(--line)}
table.list td{padding:11px 10px;border-bottom:1px solid var(--line);vertical-align:middle}.thumb{width:44px;height:44px;border-radius:10px;background:var(--brand-soft) center/cover;flex-shrink:0}
.stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-top:16px}.stat{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}.stat b{display:block;font-size:24px;font-family:Manrope,sans-serif}.stat span{font-size:12px;color:var(--muted)}
/* modal, toast */
.modalback{position:fixed;inset:0;background:#1c262f66;backdrop-filter:blur(4px);z-index:30;display:flex;align-items:center;justify-content:center;padding:18px}
.modal{background:#fff;width:440px;max-width:100%;max-height:90dvh;overflow:auto;border-radius:22px;padding:24px;box-shadow:0 25px 100px #11192230}.modal.wide{width:620px}
.modal h2{font-size:20px;letter-spacing:-.4px;margin:2px 0 8px}.modal>p,.modal .lead{font-size:13px;color:#7d8893;line-height:1.6;margin-bottom:12px}.modal .close{float:right;margin:-6px -6px 0 0}
.modal .primary.full,.modal .secondary.full{margin-top:8px;padding:13px}
.toast{position:fixed;bottom:calc(24px + var(--safe-b));left:50%;transform:translateX(-50%);padding:12px 20px;background:#263340;color:#fff;border-radius:12px;z-index:50;font-size:13px;box-shadow:0 8px 35px #1c262f40;max-width:90%;text-align:center}
.toast.err{background:#a8445a}
.warnbox{background:#fff8e6;color:#7a5d10;font-size:12px;padding:10px 12px;border-radius:10px;line-height:1.6;margin:10px 0}
.consent{display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-top:1px solid var(--line);font-size:12px;color:var(--muted);line-height:1.6}.consent strong{color:var(--ink);font-size:13px}.consent input{margin-top:4px;accent-color:var(--brand);width:17px;height:17px}
.qrbox{display:flex;gap:22px;align-items:center;margin:8px 0 14px}.qrbox .qr{width:200px;height:200px;flex-shrink:0;border:1px solid var(--line);border-radius:14px;padding:8px;background:#fff}.qrbox .qr svg{width:100%;height:100%}
.qrbox ol{padding-left:18px;margin:0;font-size:13px;line-height:2}.paircode{font:700 22px ui-monospace,Menlo,monospace;letter-spacing:3px;color:var(--ink);text-align:center;margin:6px 0}
.scanner{position:relative;border-radius:16px;overflow:hidden;background:#1d2833;aspect-ratio:1;margin:8px 0 12px}.scanner video{width:100%;height:100%;object-fit:cover}.scanner:after{content:'';position:absolute;inset:18%;border:3px solid var(--brand);border-radius:16px}
.picklist{max-height:50dvh;overflow:auto;margin:6px -6px}.pick{display:flex;gap:12px;align-items:center;width:100%;text-align:left;padding:10px 8px;border-radius:12px}.pick:hover{background:#f3f7f9}.pick input{accent-color:var(--brand);width:18px;height:18px}
/* auth */
.auth{min-height:100dvh;display:grid;place-items:center;padding:24px;background:linear-gradient(160deg,#f5f8fa,#e7f5f9)}
.authcard{background:#fff;border:1px solid var(--line);border-radius:24px;padding:32px;width:100%;max-width:420px;box-shadow:0 20px 60px #303e4e12}
.authcard .logo{margin:0 0 20px}.authcard h1{font-size:26px;letter-spacing:-1px;margin-bottom:8px}.authcard .lead{color:#7d8893;line-height:1.6;margin-bottom:8px}
.phoneinput{display:flex;gap:8px}.phoneinput select{width:120px;flex-shrink:0}.codeinput{font:700 26px ui-monospace,Menlo,monospace!important;letter-spacing:10px;text-align:center}
.devcode{background:#fff4d6;color:#7a5d10;border-radius:10px;padding:10px 12px;font-size:12px;margin:10px 0}.authfoot{text-align:center;margin-top:16px;font-size:12px;color:var(--muted)}
.ordiv{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:18px 0}.ordiv:before,.ordiv:after{content:'';flex:1;height:1px;background:var(--line)}
/* call overlay */
.callov{position:fixed;inset:0;z-index:40;background:#17222c;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 20px calc(30px + var(--safe-b))}
.callov video.remote{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#17222c}.callov video.local{position:absolute;right:18px;bottom:calc(120px + var(--safe-b));width:min(30vw,180px);aspect-ratio:3/4;object-fit:cover;border-radius:14px;border:2px solid #ffffff40;z-index:2;transform:scaleX(-1);background:#000}
.callinfo{position:relative;z-index:2;text-align:center;margin-bottom:auto;margin-top:8vh}.callinfo .avatar{margin:0 auto 18px}.callinfo h2{font-size:26px}.callinfo p{color:#b9c6d0;margin-top:8px}
.callov.hasvideo .callinfo{margin-top:0}.callov.hasvideo .callinfo .avatar{display:none}
.callbtns{position:relative;z-index:2;display:flex;gap:clamp(8px,2vw,18px);margin-top:auto;flex-wrap:wrap;justify-content:center}.callbtns button{width:clamp(44px,12vw,62px);height:clamp(44px,12vw,62px);border-radius:50%;background:#ffffff26;color:#fff;display:grid;place-items:center}.callbtns button.off{background:#fff;color:#17222c}
.callbtns .end{background:#d9566c}.callbtns .accept{background:var(--ok)}.callbtns svg.i{width:26px;height:26px}
.ring{animation:ring 1.4s ease-in-out infinite}@keyframes ring{50%{transform:scale(1.07)}}
@media(prefers-reduced-motion:reduce){.ring{animation:none}}
/* responsive */
@media(min-width:1500px){.side{width:390px}.detail{width:320px}}
@media(max-width:1180px){.detail{display:none}.side{width:330px}.detail.open{display:block;position:absolute;right:0;top:0;bottom:0;z-index:6;box-shadow:-10px 0 40px #303e4e18}}
@media(max-width:760px){
  .rail{position:fixed;bottom:0;left:0;right:0;width:100%;height:calc(66px + var(--safe-b));z-index:8;flex-direction:row;border-right:0;border-top:1px solid var(--line);padding:4px 6px var(--safe-b);gap:0;justify-content:space-around}
  .rail .logo,.rail .spacer,.rail .deskonly{display:none}.nav{height:56px;width:62px;font-size:10px;gap:3px}
  .side{width:100%;border:0;padding-bottom:calc(66px + var(--safe-b))}.sidetop{padding:calc(18px + var(--safe-t)) 18px 12px}
  .main{display:none}.shell.inchat .side,.shell.inchat .rail{display:none}.shell.inchat .main{display:flex;width:100%}
  .shell.page .side{display:none}.shell.page .main{display:flex;padding-bottom:calc(66px + var(--safe-b))}
  .topbar{min-height:64px;padding:calc(8px + var(--safe-t)) 10px 8px;gap:8px}.topbar .avatar{width:40px;height:40px;border-radius:14px}.topactions{gap:0}.back{display:inline-grid}
  .thread{padding:14px 10px}.bubble{max-width:86%}.composerwrap{padding:8px 8px calc(8px + var(--safe-b))}.composer{gap:2px}.typingline{padding:0 12px 2px}
  .page{padding:22px 16px 30px}.page h2.title{font-size:23px}.hero{padding:20px}.heromark{display:none}.fields2{grid-template-columns:1fr}
  .cartbar{margin:16px -16px -30px;padding:12px 16px calc(12px + var(--safe-b))}.detail.open{width:100%}.qrbox{flex-direction:column}
  .toast{bottom:calc(84px + var(--safe-b))}.modalback{align-items:flex-end;padding:0}.modal{border-radius:22px 22px 0 0;padding-bottom:calc(24px + var(--safe-b))}
  table.list .hide-sm{display:none}
}

/* v0.6 call screen */
.callov video.local.hidden{display:none}
.callpath{font-size:12px;color:#9fd6e5!important;margin-top:4px!important;min-height:1em}
.callsound{position:relative;z-index:3;margin:14px auto 0;background:#fff;color:#17222c;border-radius:22px;padding:11px 18px;font-weight:700;font-size:14px;box-shadow:0 6px 24px #0005}
.callov.hasvideo .callinfo{background:linear-gradient(#0009,#0000);padding:12px 18px 26px;border-radius:0 0 18px 18px;margin-top:calc(-30px + var(--safe-t,0px));width:100%}
.callbtns button:disabled{opacity:.6}

/* Message actions stay visible on touch screens and available to keyboard users. */
.bubble{position:relative;padding-right:34px}
.message-actions{position:absolute;right:3px;top:3px;border:0;background:transparent;color:var(--muted);font-size:20px;width:28px;height:28px;border-radius:8px;cursor:pointer}
.message-actions:hover,.message-actions:focus-visible{background:var(--brand-soft);color:var(--brand)}
.reactions{display:flex;gap:4px;flex-wrap:wrap;clear:both;margin-top:7px}
.reaction{font-size:13px;border:1px solid var(--line);background:white;border-radius:14px;padding:3px 7px;cursor:pointer}
.reaction.mine{border-color:var(--brand);background:var(--brand-soft)}
.reaction-picker{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0}
.reaction-picker button{border:0;border-radius:12px;background:var(--brand-soft);font-size:26px;min-width:48px;min-height:48px;cursor:pointer}
.message-options{display:grid;gap:8px}.message-options button{text-align:left;padding:12px}
.quoted{display:block;text-align:left;border:0;border-left:3px solid var(--brand);border-radius:6px;background:rgba(80,180,200,.12);padding:8px;margin:0 0 8px;width:100%;max-width:320px;cursor:pointer}
.quoted strong,.quoted span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.replybar{display:flex;align-items:center;border-left:3px solid var(--brand);padding:10px 14px;background:var(--brand-soft);border-radius:8px;margin:8px 12px;font-size:13px;gap:8px}
.replybar .grow{min-width:0}.replybar .grow div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:65vw}
.message-highlight .bubble{outline:2px solid var(--brand)}

form[data-form="message-edit"] textarea{box-sizing:border-box;width:100%;resize:vertical;min-height:110px;border:1px solid var(--line);border-radius:12px;padding:12px;font:inherit;margin:12px 0}

/* Anchored message dropdown: no backdrop, blur or centered dialog. */
.message-popover{position:fixed;z-index:1500;visibility:hidden;width:min(328px,calc(100vw - 16px));box-sizing:border-box;background:var(--panel,#fff);color:var(--text,#304050);border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 32px #193a4826;overflow:auto;padding:7px}
.message-popover .reaction-picker{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:0;margin:0;padding:0 0 7px;border-bottom:1px solid var(--line)}
.message-popover .reaction-picker button{min-width:0;min-height:38px;padding:0;font-size:24px;border-radius:50%;background:transparent;transition:transform .12s}
.message-popover .reaction-picker button:hover,.message-popover .reaction-picker button:focus-visible,.message-popover .reaction-picker button[aria-pressed="true"]{background:var(--brand-soft);transform:scale(1.08)}
.message-popover .message-options{display:grid;gap:2px;padding-top:5px}
.message-popover .message-options button{border:0;background:transparent;text-align:left;padding:10px 12px;border-radius:9px;min-height:40px;font:inherit;font-size:14px;color:inherit;cursor:pointer}
.message-popover .message-options button:hover,.message-popover .message-options button:focus-visible{background:var(--brand-soft)}
.message-popover .message-options .delete-action{color:var(--danger)}
.message-selected{box-shadow:0 0 0 2px var(--brand)}
/* v0.9: shared actions and the Together workspace. */
.conversation-tabs{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 24px;background:#fff;border-bottom:1px solid var(--line);flex-shrink:0}
.conversation-tabs [role=tablist]{display:flex;gap:6px}.conversation-tabs [role=tab]{display:flex;align-items:center;gap:7px;padding:10px 14px;border-radius:11px;color:var(--muted);font-weight:600}
.conversation-tabs [role=tab].active{background:var(--brand-soft);color:var(--brand-ink)}
.action-create-button{display:flex;align-items:center;gap:6px;color:var(--brand-ink);font-weight:700;border:1px solid var(--line);border-radius:11px;padding:9px 12px}
.action-create-button:hover{background:var(--brand-soft)}
.together-workspace{flex:1;min-height:0;overflow:auto;padding:28px;background:linear-gradient(180deg,#f0fafc,var(--bg) 300px)}
.together-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px}.together-intro h2{font-size:26px;margin:7px 0}.together-intro p,.request-hero p{color:var(--muted);line-height:1.6}
.together-count{text-align:center;min-width:96px;background:white;border:1px solid var(--line);border-radius:18px;padding:15px}.together-count b{display:block;font:800 30px Manrope,system-ui;color:var(--brand-ink)}.together-count span{font-size:11px;color:var(--muted)}
.workspace-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:16px}.workspace-heading .filters{margin:0;align-items:center}
.action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));align-items:start;gap:18px;margin:16px 0}
.action-card{white-space:normal;background:white;border:1px solid var(--line);border-radius:18px;padding:20px;min-width:0;color:var(--ink);overflow-wrap:anywhere}
.action-card-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}.action-type{display:flex;align-items:center;gap:7px;color:var(--brand-ink);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.07em}.action-type .i{width:18px;height:18px}
.action-status{font-size:10px;line-height:1.3;font-weight:700;border-radius:20px;padding:6px 9px;white-space:nowrap;background:#f0f3f6;color:#71808c}.status-proposed{background:#fff2d8;color:#977015}.status-accepted{background:#e9f5ff;color:#347298}.status-in_progress{background:#e7f5f9;color:#1f7f97}.status-done{background:#e0f5ec;color:#258666}.status-cancelled,.status-declined{background:#f9edf0;color:#a35167}
.action-card h3{font-size:17px;line-height:1.5;margin:0 0 7px}.action-description{font-size:13px;color:#70808d;line-height:1.65;white-space:pre-wrap;margin:0 0 12px}.action-card .quoted{margin:12px 0;max-width:100%}
.action-detail{display:flex;align-items:center;gap:9px;font-size:12px;margin:14px 0;color:var(--brand-ink)}.action-detail small{display:block;font-size:10px;color:var(--muted);margin-top:3px}.action-price{font:800 25px Manrope,system-ui;margin:14px 0 6px}
.action-progress{display:flex;list-style:none;padding:0;margin:20px 0;gap:0}.action-progress li{flex:1;position:relative;text-align:center;font-size:9px;color:#9ba8b2;z-index:0}.action-progress li:not(:last-child):after{content:'';position:absolute;left:calc(50% + 13px);right:calc(-50% + 13px);top:11px;height:2px;background:#e8eef3;z-index:-1}.action-progress li.reached:not(:last-child):after{background:#afe0ec}
.action-progress span{display:grid;place-items:center;width:24px;height:24px;margin:0 auto 6px;border-radius:50%;background:#edf2f5;color:#9aa9b2;font-size:10px;font-weight:700}.action-progress .reached{color:var(--brand-ink)}.action-progress .reached span{background:var(--brand);color:white}.action-closed{font-size:12px;color:var(--muted);margin:15px 0}
.action-people{display:flex;flex-wrap:wrap;gap:6px 14px;color:var(--muted);font-size:10px;margin:12px 0}.action-people b{color:#667985;font-weight:600}.action-buttons{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.action-buttons button{font-size:12px;min-height:36px;padding:8px 11px}.action-buttons .ghost{background:#f4f7f9}
.action-history{font-size:10px;border-top:1px solid var(--line);padding-top:11px;margin-top:15px;color:var(--muted)}.action-history summary{cursor:pointer}.action-history div{display:flex;flex-direction:column;gap:2px;border-left:2px solid var(--brand-soft);padding:7px 10px;margin-top:6px}.action-history time{font-size:9px;color:#9aabb7}
.action-assignee{display:grid;font-size:11px;gap:6px;margin:14px 0}.action-assignee select,.request-filters select{padding:9px 10px;border-radius:10px;border:1px solid var(--line);background:white;min-height:38px;max-width:100%}
.msg.action-message .bubble{width:400px;max-width:92%;background:white}.msg.action-message .action-card{padding:5px 0;border:0;border-radius:0;background:transparent;width:100%}.msg.action-message .action-card h3{font-size:15px}.msg.action-message .action-type{font-size:10px}.msg.action-message .stamp{margin-top:7px}
.workspace-empty{border:1px dashed #bfdde6;background:#fff;border-radius:18px;text-align:center;padding:34px 20px;grid-column:1/-1}.workspace-empty>.i{width:38px;height:38px;color:var(--brand)}.workspace-empty h3{margin:12px 0 5px}.workspace-empty p{color:var(--muted);margin-bottom:17px;line-height:1.6}.workspace-note{font-size:12px;color:var(--muted);padding:20px 0}
.workspace-recent{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:22px;margin-top:32px}.workspace-recent>section{min-width:0}.workspace-recent h3{display:flex;align-items:center;gap:8px;margin-bottom:6px}.workspace-recent .ocard{margin-top:14px;background:white}
.workspace-file{display:flex;align-items:center;gap:10px;padding:12px;background:white;border:1px solid var(--line);border-radius:12px;margin-top:8px;text-decoration:none;color:var(--ink)}.workspace-file span{flex:1;min-width:0}.workspace-file b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.workspace-file small{display:block;color:var(--muted);font-size:10px;margin-top:4px}
.action-kind-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0 0}.action-kind-grid button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:7px;border:1px solid var(--line);border-radius:16px;padding:18px;background:#f7fbfc}.action-kind-grid button:hover{border-color:var(--brand);background:var(--brand-soft)}.action-kind-grid .i{color:var(--brand-ink);width:26px;height:26px}.action-kind-grid small{color:var(--muted);font-size:11px}.action-form-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
.request-hero{display:flex;justify-content:space-between;gap:20px;align-items:center;border-radius:18px;padding:24px;background:linear-gradient(120deg,#e5f6fa,#f0fafb);margin-top:20px}.request-hero h3{font-size:21px;margin:7px 0}.request-counts{display:flex;gap:18px;text-align:center;flex-shrink:0}.request-counts span{font-size:11px;color:var(--muted)}.request-counts b{display:block;color:var(--brand-ink);font-size:28px}.request-filters{display:flex;align-items:flex-end;gap:12px;margin:20px 0;flex-wrap:wrap}.request-filters label{display:grid;gap:5px;font-size:11px;min-width:155px}
@media(max-width:720px){.conversation-tabs{padding:7px 10px}.conversation-tabs [role=tab]{padding:9px 10px;font-size:12px}.conversation-tabs [role=tab] .i{width:18px;height:18px}.action-create-button{padding:9px}.action-create-button span{display:none}.together-workspace{padding:20px 12px}.together-intro{gap:12px}.together-intro h2{font-size:21px}.together-intro .eyebrow{font-size:9px}.together-count{min-width:76px;padding:12px 8px}.action-card{padding:16px}.request-hero{flex-direction:column;align-items:flex-start;padding:20px}.request-counts{width:100%;justify-content:flex-start;text-align:left}.request-filters label{min-width:125px;flex:1}.action-buttons button{min-height:40px}.action-kind-grid button{padding:15px}.msg.action-message .bubble{max-width:96%}}

.request-overview{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px;border-radius:16px;background:var(--brand-soft);margin:20px 0}.request-overview p{font-size:12px;color:var(--muted);margin-top:5px}@media(max-width:720px){.request-overview{align-items:flex-start;flex-direction:column}}

/* Subscription preparation */
.billing-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:28px 0 20px}.billing-hero h2{font-size:28px;margin:6px 0}.billing-hero p{margin:6px 0;color:var(--muted)}
.billing-summary{display:grid;grid-template-columns:1fr 1fr;gap:20px}.billing-summary h3{margin:6px 0}.billing-notice{padding:20px;border-radius:18px;background:var(--brand-soft);margin:18px 0}.billing-notice p{margin:8px 0 0;line-height:1.6}
.billing-plans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:22px 0}.billing-plan{display:flex;flex-direction:column;gap:12px;margin:0!important;min-width:0}.billing-plan.chosen{outline:2px solid var(--brand)}.billing-plan h3{margin:4px 0}.billing-price{font-size:28px;font-weight:750}.billing-price small{font-size:13px;font-weight:400}.billing-plan ul{padding-left:20px;line-height:1.9;flex:1}.billing-plan>small{font-size:12px;line-height:1.5;color:var(--muted)}.billing-plan p{line-height:1.5}.billing-plan button:disabled{opacity:.7;cursor:default}
@media(max-width:1000px){.billing-plans{grid-template-columns:1fr}.billing-hero{align-items:flex-start;flex-direction:column}.billing-summary{grid-template-columns:1fr}.billing-price{font-size:26px}}

/* Business tools */
.tools-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:25px 0 18px}.tools-head h2{font-size:27px;margin:7px 0}.tools-head p{color:var(--muted);line-height:1.6}.tools-list{display:grid;gap:14px;margin-top:18px}.tools-list .card{margin:0}.tools-list h3{margin:0 0 6px}.tools-list p{line-height:1.6}.tools-controls{display:flex;align-items:end;gap:16px;margin-top:16px}.tools-controls label{display:flex;flex-direction:column;gap:6px;min-width:180px}.tools-controls select,.request-filters input{border:1px solid var(--line);border-radius:10px;padding:10px;background:white;font:inherit;color:var(--ink)}.tools-note{white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;background:var(--bg);border-radius:12px}.tools-overdue{border-left:4px solid var(--warn)}.tools-check{display:flex;align-items:center;gap:12px;padding:12px 0;line-height:1.5}.tools-check input{width:19px;height:19px;accent-color:var(--brand)}.tools-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.tools-columns .card{margin:0}.tools-chart{display:grid;gap:10px;margin:16px 0}.tools-chart-row{display:grid;grid-template-columns:95px 1fr 40px;align-items:center;gap:12px;font-size:13px}.tools-chart-row>div{background:var(--brand-soft);height:12px;border-radius:8px}.tools-chart-row i{display:block;background:var(--brand);height:12px;border-radius:8px}.tools-table{overflow-x:auto}.tools-list .row>.grow{min-width:0;overflow-wrap:anywhere}.tabs{overflow-x:auto;max-width:100%}.tabs>button{white-space:nowrap;flex-shrink:0}
@media(max-width:760px){.tools-head{align-items:flex-start;flex-direction:column}.tools-columns{grid-template-columns:1fr}.tools-controls{align-items:stretch;flex-direction:column}.tools-controls label{min-width:0}.tools-list .row{flex-wrap:wrap}.tools-list .row .grow{flex-basis:65%}.request-filters{flex-wrap:wrap}.tools-chart-row{grid-template-columns:85px 1fr 30px;gap:8px}}

.tabs{position:relative}
@media(max-width:760px){.business-manage-head{flex-wrap:wrap;align-items:center}.business-manage-head>.grow{flex-basis:calc(100% - 70px);min-width:0}.business-manage-head>.secondary{margin-left:58px}.page .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.page .stat{padding:14px}.page .stat b{font-size:22px;overflow-wrap:anywhere}}

/* Visible controls for overflowing business menus, including touch layouts. */
.business-tabbar{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:6px;margin-top:18px;border-bottom:1px solid var(--line);min-width:0}
.business-tabbar.has-overflow{grid-template-columns:36px minmax(0,1fr) 36px}
.business-tabbar .tabs{margin:0;border:0;min-width:0;overscroll-behavior-x:contain}
.business-tabbar .tab-scroll{display:none;width:36px;height:36px;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:10px;background:var(--brand-soft);color:var(--brand-ink);flex-shrink:0}
.business-tabbar.has-overflow .tab-scroll{display:inline-flex}
.business-tabbar .tab-scroll[data-direction="1"] .i{transform:rotate(180deg)}
.business-tabbar .tab-scroll:disabled{opacity:.3;cursor:default}
.business-tabbar .tab-scroll:focus-visible{outline:2px solid var(--brand-ink);outline-offset:2px}
@media(prefers-reduced-motion:reduce){#business-tabs{scroll-behavior:auto}}

/* Clear boundaries and consistent alignment across business cards and controls. */
.grid>.card,.grid>.card+.card{margin-top:0;height:100%}
.bizcard{min-height:148px;justify-content:flex-start}
.bizcard .row{width:100%;align-items:center}
.bizcard h3{overflow-wrap:anywhere;line-height:1.45}
.bizcard>p{margin:0;line-height:1.65}
.cardhead{min-height:34px}.cardhead>h3{margin-bottom:0}
.setting>.row{min-width:0}.setting>.primary,.setting>.secondary{flex-shrink:0}
.search{border:1px solid var(--line);background:#f6f9fb}
.search:focus-within{border-color:var(--brand-ink);box-shadow:0 0 0 2px #54b9d124}
.field input,.field select,.field textarea,.setting select{border-color:var(--line)}
.chip{border:1px solid var(--line)}.chip.active{border-color:var(--brand)}
.business-tabbar .tabs>button{border:1px solid var(--line);border-radius:9px;padding:9px 13px;margin:6px 0;background:#fff}
.business-tabbar .tabs>button.active{border-color:var(--brand-ink);background:var(--brand-soft);box-shadow:inset 0 -2px var(--brand-ink);color:var(--brand-ink)}
.business-tabbar .tabs>button:hover{background:var(--brand-soft);border-color:#7bbccd}

/* Compact frame sizing: content sets height, with consistent small insets. */
.page{padding:24px 28px 30px}
.page .card{padding:14px;border-radius:13px}
.page .card+.card{margin-top:12px}
.page .grid{gap:12px;margin-top:14px;grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr))}
.page .grid>.card,.page .grid>.card+.card{margin-top:0}
.page .bizcard{min-height:0;gap:8px}
.page .cardhead{min-height:28px;margin-bottom:6px}
.page .setting{padding:9px 0;gap:12px}
.page .card .setting:last-child{padding-bottom:0}
.page .card .avatar:not(.lg),.page .bizhero .avatar{width:38px;height:38px;border-radius:12px;font-size:12px}
.page .card .avatar.sm{width:30px;height:30px;font-size:10px}
.page .primary,.page .secondary{padding:9px 13px;min-height:36px;border-radius:9px}
.page .ghost{padding:7px 9px}
.page .search{padding:9px 12px;min-height:38px;margin-top:12px}
.page .stats{gap:10px;margin-top:12px}
.page .stat{padding:12px;border-radius:11px}
.page .stat b{font-size:22px}
.page .hero,.page .bizhero{padding:18px;border-radius:14px;gap:12px}
.page .hero{margin-top:16px}
.page .field{margin:10px 0}
.page .field input,.page .field select,.page .field textarea{padding:10px;margin-top:5px;border-radius:9px}
.page .business-tabbar{margin-top:14px}
.page .business-tabbar .tabs>button{padding:8px 11px;margin:5px 0}
.page .request-overview{padding:14px;margin:14px 0;gap:12px;border-radius:13px}
.page .action-card{padding:14px;border-radius:13px}
.page .tools-head{margin:18px 0 12px;gap:12px}
.page .tools-head h2{font-size:24px}
.page .tools-list{gap:12px;margin-top:12px}
.page .tools-columns{gap:12px;margin-top:12px}
.page .tools-columns .card{margin-top:0}
.page .billing-hero{margin:18px 0 14px}
.page .billing-summary{gap:14px}
.page .billing-notice{padding:14px;margin:14px 0;border-radius:13px}
.page .billing-plans{gap:12px;margin:16px 0}
.page .billing-plan{gap:8px}
.page .billing-price{font-size:24px}
.page .billing-plan ul{margin:4px 0;line-height:1.75}
.page .empty{padding:28px 16px}
.modal{padding:18px;border-radius:17px}
@media(max-width:760px){
 .page{padding:18px 14px 24px}
 .page .primary,.page .secondary,.page .ghost{min-height:44px}
 .page .field input,.page .field select,.page .search{min-height:44px}
 .page .card{padding:12px}
 .page .setting{padding:10px 0}
 .page .business-tabbar .tabs>button{min-height:40px}
 .business-tabbar .tab-scroll{height:40px}
 .page .stat{padding:11px}
 .modal{padding-bottom:calc(18px + var(--safe-b));border-radius:17px 17px 0 0}
}
.page .tools-list>.card+.card{margin-top:0}

.page .bizcard>p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
