*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden}
body{font-family:Inter,-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:13px;line-height:18px;color:#1d1f25;background:#fff;-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;text-align:left}
input{font:inherit;color:inherit}
.ic{flex:none;display:block}
#app{display:flex;height:100%;width:100%}

/* rail */
.rail{width:56px;flex:none;height:100%;border-right:1px solid #e6e6e6;display:flex;flex-direction:column;align-items:center;padding:16px 0;position:relative;background:#fff}
.rail .mark{width:24px;height:24px;margin:0 0 12px;display:block}
.rail .rbtn{width:28px;height:36px;display:flex;align-items:center;justify-content:center;color:#1d1f25;border-radius:6px;cursor:pointer}
.rail .spacer{flex:1}
.rail .rbtn.sm{height:40px;width:28px;color:#1d1f25;position:relative}
.rail .badge{position:absolute;left:14px;top:6px;min-width:13px;height:13px;border-radius:9999px;background:#31353e;color:#fff;font-size:8px;line-height:13px;text-align:center;font-weight:500}
.rail .avatar{width:28px;height:28px;border-radius:50%;background:#e5e9f0;margin-top:8px;display:flex;align-items:center;justify-content:center;color:#616670;box-shadow:rgba(0,0,0,.32) 0 0 1px,rgba(0,0,0,.08) 0 0 2px,rgba(0,0,0,.08) 0 1px 3px;border:1px solid #fff}

/* main column */
.main{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;position:relative}
.topbar{height:57px;flex:none;border-bottom:1px solid #e6e6e6;display:flex;align-items:center;position:relative;background:#fff}
.topbar .left{display:flex;align-items:center;padding-left:16px;min-width:0;width:464px;flex:0 1 464px}
.topbar .right{flex:none}
.logo-tile{width:32px;height:32px;border-radius:6px;border:1px solid rgba(0,0,0,.1);overflow:hidden;flex:none;margin-right:8px;display:block}
.logo-tile img{width:100%;height:100%;display:block}
.base-name>span{overflow:hidden;text-overflow:ellipsis}
.base-name{min-width:0;font-family:"Inter Display",Inter,sans-serif;font-size:17px;font-weight:675;line-height:24px;display:flex;align-items:center;white-space:nowrap;cursor:pointer}
.base-name .ic{margin-left:4px;color:#1d1f25}
.navtabs{position:absolute;left:50%;transform:translateX(-50%);top:0;height:56px;display:flex;gap:16px;margin:0;padding:0;list-style:none}
.navtabs a{display:flex;align-items:center;height:56px;font-weight:500;color:#616670;text-decoration:none;position:relative;cursor:pointer}
.navtabs a.on{color:#1d1f25}
.navtabs a.on:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:#3b66a3}
.topbar .right{margin-left:auto;display:flex;align-items:center;gap:8px;padding-right:16px}
.tbtn{height:28px;display:flex;align-items:center;padding:0 8px;border-radius:6px;background:#fff;box-shadow:rgba(0,0,0,.32) 0 0 1px,rgba(0,0,0,.08) 0 0 2px,rgba(0,0,0,.08) 0 1px 3px;font-weight:500;gap:6px;cursor:pointer}
.tbtn.sq{width:28px;justify-content:center;padding:0}
.tbtn.share{background:#3b66a3;color:#fff;padding:0 12px}
.tbtn.plain{box-shadow:none;width:28px;justify-content:center;padding:0}
.tbtn.plain:hover{background:rgba(0,0,0,.05)}

/* page canvases */
.page{flex:1;min-height:0;position:relative;display:flex;flex-direction:column}
.empty-canvas{flex:1;background:#f6f8fc}

/* table strip */
.tabstrip{height:32px;flex:none;background:#f1f5ff;display:flex;align-items:stretch;padding-left:0;position:relative}
.tabstrip .tab{display:flex;align-items:center;padding:0 12px;color:rgba(0,0,0,.65);cursor:pointer;white-space:nowrap;position:relative;height:32px}
.tabstrip .tab+.tab:not(.active):before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:1px;background:rgba(0,0,0,.12)}
.tabstrip .tab.active{background:#fff;color:#1d1f25;font-weight:500;border-radius:3px 3px 0 0;box-shadow:rgba(0,0,0,.32) 0 0 1px,rgba(0,0,0,.08) 0 0 2px,rgba(0,0,0,.08) 0 1px 3px;z-index:1}
.tabstrip .tab.active+.tab:before,.tabstrip .tab:has(+.tab.active):after{display:none}
.tabstrip .tab .ic{margin-left:4px;color:#616670}
.tabstrip .tab .info{margin-left:4px;color:#91959c}
.tabstrip .tbi{display:flex;align-items:center;justify-content:center;width:40px;color:rgba(0,0,0,.65);cursor:pointer}
.tabstrip .tools{margin-left:auto;display:flex;align-items:center;padding-right:16px;color:rgba(0,0,0,.65);cursor:pointer;gap:0}
.tabstrip .tools .ic{margin-left:0}

/* data page */
.datapage{flex:1;min-height:0;display:flex;flex-direction:column}
.dataarea{flex:1;min-height:0;display:flex}
.sidebar{width:280px;flex:none;border-right:1px solid #e6e6e6;background:#fff;display:flex;flex-direction:column;min-height:0}
.sidebar .create{margin:10px 8px 0;height:32px;display:flex;align-items:center;gap:8px;padding:0 12px;border-radius:6px;font-size:13px;cursor:pointer}
.sidebar .create:hover{background:rgba(0,0,0,.05)}
.sidebar .find{margin:4px 8px 0;height:32px;position:relative}
.sidebar .find input{width:100%;height:32px;border:0;background:#fff;border-radius:4px;padding:0 28px 0 36px;outline:none;font-size:13px}
.sidebar .find input::placeholder{color:#616670}
.sidebar .find .ic.s{position:absolute;left:12px;top:9px;color:#616670}
.sidebar .find .ic.g{position:absolute;right:6px;top:8px;color:#616670}
.sidebar .vlist{margin:8px 8px 0;padding:0;list-style:none}
.sidebar .vlist li{height:32px;display:flex;align-items:center;gap:8px;padding:0 4px;border-radius:3px;background:rgba(0,0,0,.05);font-weight:500}
.sidebar .vlist li .ic{color:#616670}
.gridcol{flex:1;min-width:0;display:flex;flex-direction:column;position:relative}
.viewbar{height:48px;flex:none;display:flex;align-items:center;background:#fff;position:relative;z-index:3;border-bottom:1px solid #e6e6e6}
.viewbar .vleft{display:flex;align-items:center;height:47px;padding-left:12px;gap:8px;flex:none}
.viewbar .vleft.w{width:280px}
.viewbar .vname{display:flex;align-items:center;gap:8px;font-weight:500;cursor:pointer;height:28px;padding:0 4px;border-radius:3px}
.viewbar .vname .ic.l{color:#3b66a3}
.viewbar .vname .ic.d{color:#1d1f25}
.viewbar .hamb{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:3px;cursor:pointer}
.viewbar .hamb:hover{background:rgba(0,0,0,.05)}
.viewbar .vtools{margin-left:auto;display:flex;align-items:center;padding-right:12px}
.vt{height:28px;display:flex;align-items:center;gap:4px;padding:0 8px;margin:0 1px;border-radius:3px;color:#616670;cursor:pointer;white-space:nowrap;position:relative}
.vt:hover{background:rgba(0,0,0,.05)}
.vt.on-hide{background:#c4ecff;color:#1d1f25}
.vt.on-filter{background:#cfdfff;color:#1d1f25}
.vt.on-group{background:#fee2d5;color:#1d1f25}
.vt.on-sort{background:#ffdce5;color:#1d1f25}
.vt.on-search{background:rgba(0,0,0,.05)}
.searchbox{display:flex;align-items:center;height:28px;border-radius:3px;margin-left:8px}
.searchbox input{width:200px;height:28px;border:1px solid #c7c9cc;border-radius:4px;padding:0 8px;outline:none;font-size:13px;background:#fff}
.searchbox input:focus{border-color:#166ee1;box-shadow:0 0 0 1px #166ee1}

/* grid */
.gridwrap{flex:1;min-height:0;position:relative;background:#f6f8fc}
.gridscroll{position:absolute;inset:0 0 32px 0;overflow:auto;background:#f6f8fc}
.gridscroll::-webkit-scrollbar{width:10px;height:10px}
.gridscroll::-webkit-scrollbar-thumb{background:rgba(0,0,0,.28);border-radius:7px;box-shadow:inset 0 0 0 1px #fff}
.gridscroll::-webkit-scrollbar-track,.gridscroll::-webkit-scrollbar-corner{background:transparent}
.gridinner{position:relative}
.ghead{position:sticky;top:0;z-index:5;height:32px;display:flex;background:#fff;width:max-content;min-width:100%}
.gcell{height:32px;flex:none;border-right:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1);position:relative}
.ghead .gcell{background:#fff;display:flex;align-items:center;padding:0 6px;gap:4px;font-weight:500;overflow:hidden;white-space:nowrap}
.ghead .gcell .ti{color:#616670}
.ghead .gcell .nm{overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.ghead .gcell .hv{color:#616670;display:none}
.ghead .gcell:hover .hv{display:block}
.ghead .gcell.hinfo .ic.i{color:#91959c}
.frozen{position:sticky;left:0;z-index:4;display:flex;flex:none;box-shadow:rgba(0,0,0,.04) 4px 0 0}
.ghead .frozen{z-index:6}
.ghead .rn{width:84px;background:#fff;border-right:0;display:flex;align-items:center;padding-left:20px}
.gridrows{position:absolute;left:0;top:32px;width:100%}
.grow{position:absolute;left:0;display:flex;width:max-content;background:#fff}
.grow .rn{width:84px;height:100%;flex:none;border-bottom:1px solid rgba(0,0,0,.1);background:#fff;display:flex;align-items:flex-start;position:relative}
.grow .rn .num{position:absolute;left:12px;top:0;height:32px;width:32px;line-height:32px;text-align:left;color:#616670;font-size:11px;padding-left:0}
.grow .rn .cb{position:absolute;left:12px;top:8px;display:none}
.grow:hover .rn .num{display:none}
.grow:hover .rn .cb{display:block}
.grow .rn .exp{position:absolute;left:51px;top:3px;width:24px;height:24px;border-radius:3px;background:#fff;box-shadow:rgba(0,0,0,.32) 0 0 1px,rgba(0,0,0,.08) 0 0 2px,rgba(0,0,0,.08) 0 1px 3px;display:none;align-items:center;justify-content:center;color:#1d1f25;cursor:pointer}
.grow:hover .rn .exp{display:flex}
.cbx{width:16px;height:16px;border:1px solid #91959c;border-radius:3px;background:#fff;box-shadow:rgba(0,0,0,.08) 0 0 2px,rgba(0,0,0,.08) 0 1px 3px}
.grow .gcell{background:#fff;overflow:hidden}
.grow:hover .gcell{background:#f8f9fb}
.grow:hover .rn{background:#f8f9fb}
.grow .gcell.sel{box-shadow:inset 0 0 0 2px #166ee1;z-index:2;overflow:visible}
.cc{padding:0 7px;height:100%;display:flex;align-items:center;white-space:nowrap;overflow:hidden;gap:4px}
.cc.r{justify-content:flex-end}
.cc.c{justify-content:center}
.cc .t{overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.cc.num{justify-content:flex-end}
.cc.num .t{flex:none}
.cc .dt{width:81px;flex:none}
.cc .dt2{flex:none}
.lk{color:#0b61d6;text-decoration:underline}
.chip{display:inline-block;vertical-align:middle;box-sizing:border-box;height:20px;padding:0 8px;border-radius:9999px;font-size:13px;line-height:20px;white-space:nowrap;flex:none;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.rchip{display:inline-flex;align-items:center;height:20px;padding:0 4px;border-radius:3px;background:#f0f2f7;font-size:13px;line-height:20px;white-space:nowrap;flex:none;box-shadow:inset 0 0 0 1px rgba(0,0,0,.04);max-width:100%;overflow:hidden;text-overflow:ellipsis}
.gaddc{width:94px;background:#fff;display:flex;align-items:center;justify-content:center;color:#1d1f25;cursor:default;border-bottom:1px solid rgba(0,0,0,.1);border-right:1px solid rgba(0,0,0,.1)}
.grow .gend{display:none;width:94px;flex:none;height:32px;border-bottom:1px solid rgba(0,0,0,.1);background:#fff}
.addrow{position:absolute;left:0;height:32px;display:flex;width:max-content;min-width:100%}
.addrow .frozen{background:#fff;border-bottom:1px solid rgba(0,0,0,.1);width:264px;height:32px;align-items:center;padding-left:20px;box-shadow:none}
.addrow .rest{flex:1;min-width:0;border-bottom:1px solid rgba(0,0,0,.1);background:#fff;width:calc(100% - 264px);min-width:0}
.ggroup{position:absolute;left:0;height:32px;display:flex;background:#f6f8fc;width:100%}
.ggroup .frozen{background:#f6f8fc;box-shadow:none;width:264px;align-items:center;padding-left:20px;gap:8px;font-weight:500}
.footer{position:absolute;left:0;right:0;bottom:0;height:32px;background:#fff;border-top:1px solid #e6e6e6;display:flex;align-items:center;padding-left:8px;font-size:12px;color:#1d1f25;z-index:7}
.footer .cnt{padding-left:0}
.addfab{position:absolute;left:8px;bottom:28px;z-index:8;display:flex;align-items:center;height:36px;pointer-events:none}
.addfab .plus{width:36px;height:36px;border-radius:9999px;background:#fff;box-shadow:rgba(0,0,0,.32) 0 0 1px,rgba(0,0,0,.08) 0 0 2px,rgba(0,0,0,.08) 0 1px 3px;display:flex;align-items:center;justify-content:center;pointer-events:auto}
.addfab .addw{margin-left:-4px;height:36px;padding:0 12px 0 10px;border-radius:0 9999px 9999px 0;background:#fff;box-shadow:rgba(0,0,0,.32) 0 0 1px,rgba(0,0,0,.08) 0 0 2px,rgba(0,0,0,.08) 0 1px 3px;display:flex;align-items:center;gap:6px;pointer-events:auto;font-size:13px}

/* menus */
.menu{position:fixed;z-index:50;background:#fff;border-radius:6px;box-shadow:rgba(0,0,0,.32) 0 0 1px,rgba(0,0,0,.08) 0 0 2px,rgba(0,0,0,.16) 0 4px 16px;padding:8px 0;min-width:240px;max-height:70vh;overflow:auto;font-size:13px}
.menu .mi{height:32px;display:flex;align-items:center;gap:8px;padding:0 16px;cursor:pointer;white-space:nowrap}
.menu .mi:hover{background:rgba(0,0,0,.05)}
.menu .mi.sel{background:rgba(0,0,0,.05);font-weight:500}
.menu .mh{padding:4px 16px 8px;color:#616670;font-size:12px}
.menu .mrow{display:flex;align-items:center;gap:8px;padding:4px 16px}
.menu hr{border:0;border-top:1px solid #e6e6e6;margin:6px 0}
.menu select,.menu input[type=text]{height:28px;border:1px solid #d0d1d4;border-radius:3px;background:#fff;padding:0 6px;font-size:13px;outline:none}
.menu input[type=text]{width:130px}
.menu .x{width:24px;height:24px;display:flex;align-items:center;justify-content:center;color:#616670;border-radius:3px;cursor:pointer}
.menu .x:hover{background:rgba(0,0,0,.05)}
.menu .link{padding:6px 16px;color:#0b61d6;cursor:pointer;display:flex;align-items:center;gap:6px}
.sw{width:28px;height:16px;border-radius:9999px;background:#d0d1d4;position:relative;flex:none}
.sw:after{content:"";position:absolute;left:2px;top:2px;width:12px;height:12px;border-radius:50%;background:#fff;transition:left .1s}
.sw.on{background:#2d7ff9}
.sw.on:after{left:14px}

/* expanded record */
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.3);z-index:30;display:flex;align-items:flex-start;justify-content:center;padding-top:88px}
.modal{width:1104px;max-width:calc(100vw - 48px);height:calc(100vh - 100px);background:#fff;border-radius:6px;box-shadow:rgba(0,0,0,.24) 0 0 1px,rgba(0,0,0,.16) 0 0 2px,rgba(0,0,0,.2) 0 4px 20px;display:flex;flex-direction:column;position:relative;}
.mtop{height:48px;flex:none;border-bottom:1px solid #e6e6e6;display:flex;align-items:center;padding:0 14px 0 12px;gap:6px}
.mtop .nav{width:20px;height:20px;display:flex;align-items:center;justify-content:center;color:#616670;border-radius:3px;cursor:pointer}
.mtop .nav:hover{background:rgba(0,0,0,.05)}
.mtop .sp{flex:1}
.mtop .ib{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;color:#1d1f25;cursor:pointer}
.mtop .ib:hover{background:rgba(0,0,0,.05)}
.mtop .ib.act{background:rgba(0,0,0,.05);width:28px;height:28px;border-radius:6px}
.mtop .vl{width:1px;height:20px;background:#e6e6e6;margin:0 6px 0 4px}
.mbody{flex:1;min-height:0;display:flex}
.mleft{flex:1;min-width:0;overflow:auto;padding:0 0 40px 0}
.mleft::-webkit-scrollbar{width:10px}
.mleft::-webkit-scrollbar-thumb{background:rgba(0,0,0,.28);border-radius:7px;box-shadow:inset 0 0 0 1px #fff}
.mform{padding:40px 78px 0 66px}
.mprim .lab{display:flex;align-items:center;gap:6px;color:#616670;height:24px;margin-left:10px}
.mprim .val{height:42px;margin-top:2px;border:2px solid #166ee1;border-radius:6px;font-size:24px;line-height:38px;padding:0 8px;font-family:Inter,sans-serif;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;letter-spacing:-.01em}
.mprim{padding-bottom:16px;margin:0 0 24px 0;position:relative}
.mprim:after{content:"";position:absolute;left:8px;right:8px;bottom:0;height:1px;background:#e6e6e6}
.frow{padding:0 8px 12px 8px;display:flex;min-height:56px;padding-bottom:12px;align-items:flex-start}
.frow .fl{width:175px;flex:none;display:flex;gap:6px;color:#616670;padding-top:8px;padding-left:2px;line-height:18px}
.frow .fl .ic{margin-top:1px}
.frow .fv{flex:1;min-width:0}
.box{min-height:34px;border:1px solid #dfe1e5;border-radius:4px;box-shadow:rgba(0,0,0,.08) 0 1px 2px;display:flex;align-items:center;padding:0 8px;gap:6px;min-width:0;background:#fff}
.box.dd{justify-content:space-between}
.box.dd .ic{color:#616670;margin-left:auto}
.box.date{width:178px;display:inline-flex}
.box.long{min-height:74px;align-items:flex-start;padding:7px 8px;white-space:pre-wrap;line-height:18px}
.box.chk{width:24px;height:24px;min-height:24px;box-sizing:border-box;border-radius:4px;padding:0;justify-content:center;margin-top:5px}
.box.time{width:110px;display:inline-flex;margin-left:0}
.dtwrap{display:flex;gap:0}
.dtwrap .box.date{width:138px}
.dtwrap .box.time{width:128px}
.lcards{display:flex;flex-direction:column;gap:6px}
.lcard{height:32px;border:1px solid #dfe1e5;border-radius:4px;box-shadow:rgba(0,0,0,.08) 0 1px 2px;display:flex;align-items:center;padding:0 10px;background:#fff;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.attach{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 8px;border:1px solid #dfe1e5;border-radius:4px;box-shadow:rgba(0,0,0,.08) 0 1px 2px;cursor:default}
.athumb{width:225px;height:150px;margin-top:8px;display:block;border-radius:2px;object-fit:cover}
.mright{width:304px;flex:none;border-left:1px solid #e6e6e6;display:flex;flex-direction:column}
.mright .chead{height:53px;border-bottom:1px solid #e6e6e6;display:flex;align-items:center;padding:0 12px 0 16px;color:#616670;gap:8px}
.mright .chead .sp{flex:1}
.mright .cbody{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 24px 30px;text-align:center}
.mright .cbody .t1{font-weight:500;margin-top:14px}
.mright .cbody .t2{font-size:11px;line-height:17px;color:#616670;margin-top:6px}
.mright .cbody .ib2{margin-top:14px;height:24px;padding:0 8px;border-radius:3px;background:#f2f2f2;font-size:11px;display:flex;align-items:center}
.mright .cfoot{height:72px;box-sizing:border-box;border-top:1px solid #e6e6e6;padding:15px 14px 0}
.mright .cfoot .cin{height:42px;border:1px solid #dfe1e5;border-radius:4px;box-shadow:rgba(0,0,0,.08) 0 1px 2px;color:#616670;display:flex;align-items:center;padding:0 10px}
.toast{position:fixed}

[hidden]{display:none!important}
.tabstrip{margin-bottom:-1px}
.ghead .gcell .i{color:#8a8e97;flex:none}

.footer .cnt{position:absolute;left:0;top:0;bottom:0;width:264px;box-sizing:border-box;background:#fff;display:flex;align-items:center;padding-left:8px;z-index:2}
.footer .sumw{position:absolute;left:0;right:0;top:0;bottom:0;overflow:hidden}
.footer .sumi{position:absolute;left:0;top:0;bottom:0}
.sumc{position:absolute;top:0;height:100%;display:flex;align-items:center;justify-content:flex-end;gap:6px;padding-right:9px;box-sizing:border-box;white-space:nowrap}
.sumc .sl{font-size:11px;color:#616670}
.sumc .sv{font-size:12px;color:#4f5560;font-variant-numeric:tabular-nums}

.addrec{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:1px solid #dfe1e5;border-radius:4px;box-shadow:rgba(0,0,0,.08) 0 1px 2px;background:#fff;font-size:13px;color:#1d1f25;margin-top:1px}
.lcards .addrec{align-self:flex-start}
.chip .cx{display:inline-flex;vertical-align:middle;margin-left:4px;color:#616670}

/* narrow viewports: tabs leave absolute centring, base name truncates, lesser buttons hide */
@media (max-width:1100px){
  .navtabs{position:static;transform:none;flex:none;margin-left:auto;margin-right:16px}
  .topbar .left{width:auto;flex:1 1 0}
  .topbar .right{margin-left:0}
}
@media (max-width:700px){
  .topbar .right .tbtn.plain,.topbar .right .tbtn.sq,.topbar .right .tbtn:not(.share):not(.plain):not(.sq){display:none}
  .navtabs{gap:10px;margin-right:10px}
  .topbar .left{padding-left:8px}
  .logo-tile{display:none}
  .topbar .right{padding-right:8px}
}
@media (max-width:520px){
  .navtabs li:nth-child(n+3){display:none}
  .rail{display:none}
}
