@font-face { font-family: Inter; src: url(/fonts/Inter-Regular.otf); font-weight: 400; }
@font-face { font-family: Inter; src: url(/fonts/Inter-Medium.otf); font-weight: 500; }
@font-face { font-family: Inter; src: url(/fonts/Inter-SemiBold.otf); font-weight: 600; }
@font-face { font-family: Poppins; src: url(/fonts/Poppins-Medium.ttf); font-weight: 500; }
@font-face { font-family: Poppins; src: url(/fonts/Poppins-SemiBold.ttf); font-weight: 600; }
@font-face { font-family: Poppins; src: url(/fonts/Poppins-Bold.ttf); font-weight: 700; }
@font-face { font-family: Wordmark; src: url(/fonts/BigShoulders.ttf); font-weight: 100 900; }

:root {
  --ink: #0D1B2A; --oxford: #1B263B; --steel: #415A77; --shadow: #778DA9; --platinum: #E0E1DD; --paper: #F4F4F1; --amber: #D69A2D;
  --ok: #3E7A62; --warn: #B7801F; --bad: #A64B43; --card: #FFFFFF; --line: #DADBD6; --text: #1B263B; --muted: #5C6B80;
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 Inter, system-ui, sans-serif; color: var(--text); background: var(--paper); }
h1, h2, h3 { font-family: Poppins, sans-serif; font-weight: 600; margin: 0; color: var(--ink); }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
a { color: var(--steel); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--shadow); outline-offset: 0; border-color: var(--shadow); }
textarea { resize: vertical; min-height: 70px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; letter-spacing: .02em; }

.btn { border: 0; border-radius: 8px; padding: 9px 16px; background: var(--oxford); color: #fff; font-weight: 600; }
.btn:hover { background: var(--ink); }
.btn.ghost { background: transparent; color: var(--oxford); border: 1px solid var(--line); }
.btn.ghost:hover { background: #fff; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { background: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); margin-right: 8px; vertical-align: middle; }
.dot.live { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--platinum); color: var(--oxford); }
.tag.ok { background: #DCEAE3; color: var(--ok); } .tag.warn { background: #F4E8D0; color: var(--warn); } .tag.bad { background: #F1DDDB; color: var(--bad); }
.tag.ai { background: var(--oxford); color: #fff; }
.stat b { display: block; font-family: Poppins; font-size: 26px; color: var(--ink); font-weight: 600; }
.stat span { font-size: 12px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid #ECECE8; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 26px; }
.err { color: var(--bad); font-size: 13px; margin-top: 8px; }

/* layout */
.shell { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.side { background: var(--ink); color: var(--platinum); padding: 18px 12px; overflow-y: auto; display: flex; flex-direction: column; }
.brand { font-family: Wordmark; font-weight: 900; font-size: 30px; letter-spacing: .04em; color: #fff; padding: 2px 10px 0; }
.brandline { position: relative; height: 2px; background: var(--steel); margin: 6px 10px 4px; border-radius: 2px; }
.brandline i { position: absolute; top: -3px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); transform: translateX(-50%); }
.pby { font-size: 10px; color: var(--shadow); padding: 0 10px 16px; letter-spacing: .08em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--platinum); text-decoration: none; font-size: 13.5px; }
.nav a:hover { background: var(--oxford); }
.nav a.on { background: var(--steel); color: #fff; }
.nav a .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--shadow); }
.nav a.on .pip { background: var(--amber); }
.navhead { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--shadow); padding: 14px 10px 4px; display: flex; justify-content: space-between; }
.me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--oxford); font-size: 12.5px; }
.main { overflow-y: auto; }
.top { padding: 22px 30px 0; }
.content { padding: 18px 30px 40px; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }

/* segmented */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 7px 14px; font-weight: 600; color: var(--muted); font-size: 13px; }
.seg button.on { background: var(--oxford); color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font-size: 12.5px; color: var(--oxford); }
.chip.on { background: var(--oxford); color: #fff; border-color: var(--oxford); }

/* board */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.col { background: #EDEDE9; border-radius: var(--r); padding: 10px; min-height: 140px; }
.col h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 2px 4px 8px; display: flex; justify-content: space-between; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px; margin-bottom: 8px; }
.item .t { font-weight: 600; font-size: 13px; }
.item .m { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item select { padding: 3px 6px; font-size: 11.5px; width: auto; margin-top: 6px; }

/* setup */
.center { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 30px; }
.wizard { width: min(880px, 100%); background: var(--paper); border-radius: 18px; overflow: hidden; display: grid; grid-template-columns: 250px 1fr; min-height: 560px; }
.wizard .left { background: var(--oxford); color: var(--platinum); padding: 28px 22px; display: flex; flex-direction: column; }
.wizard .right { padding: 30px 34px; display: flex; flex-direction: column; }
.steps { margin-top: 26px; }
.steps div { padding: 7px 0; color: var(--shadow); font-size: 13.5px; }
.steps div.on { color: #fff; font-weight: 600; }
.steps div.done { color: var(--platinum); }
.pillar { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: #fff; margin-bottom: 10px; }
.pillar .ph { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 6px 8px; border-radius: 7px; border: 1px solid transparent; cursor: pointer; }
.check:hover { background: var(--paper); }
.check input { width: auto; margin: 0; accent-color: var(--oxford); }
.login { width: min(400px, 100%); background: var(--paper); border-radius: 18px; padding: 34px; }

/* mascot chat */
.mascot-btn { position: fixed; right: 26px; bottom: 26px; width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--ink); box-shadow: 0 8px 24px rgba(13,27,42,.35); display: grid; place-items: center; z-index: 20; }
.mascot-btn svg { width: 44px; height: 44px; }
.dock { position: fixed; right: 26px; bottom: 100px; width: 380px; height: min(560px, calc(100vh - 140px)); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgba(13,27,42,.25); display: flex; flex-direction: column; z-index: 21; overflow: hidden; }
.dock .dh { background: var(--ink); color: #fff; padding: 12px 14px; display: flex; gap: 10px; align-items: center; }
.dock .dh svg { width: 34px; height: 34px; }
.msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; font-size: 13.5px; }
.msg.user { align-self: flex-end; background: var(--oxford); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .meta { display: block; font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.confirm { align-self: stretch; background: #FFF8EA; border: 1px solid #EAD3A2; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.composer textarea { min-height: 42px; max-height: 140px; }
.thinking { align-self: flex-start; font-size: 12px; color: var(--muted); }
.chatpage { display: grid; grid-template-columns: 240px 1fr; gap: 14px; height: calc(100vh - 150px); }
.chatpage .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; }
.chatlist a { display: block; padding: 9px 12px; text-decoration: none; color: var(--text); border-bottom: 1px solid #EEE; font-size: 13px; }
.chatlist a.on { background: var(--paper); font-weight: 600; }
.bar { height: 8px; background: var(--platinum); border-radius: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--steel); }
.bar i.hot { background: var(--warn); }
.modal-bg { position: fixed; inset: 0; background: rgba(13,27,42,.55); display: grid; place-items: center; z-index: 40; padding: 20px; }
.modal { background: var(--paper); border-radius: 16px; padding: 24px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; }
@media print { .side, .mascot-btn, .dock, .noprint { display: none !important; } .shell { display: block; height: auto; } .main { overflow: visible; } body { background: #fff; } }

/* ---------- online platform ---------- */
.shell { grid-template-rows: 52px 1fr; }
.topbar { grid-column: 1 / 3; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 10px; border-bottom: 1px solid var(--oxford); }
.side { padding-top: 12px; }
.waffle { width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--platinum); display: grid; place-items: center; }
.waffle:hover { background: var(--oxford); } .waffle svg { width: 20px; height: 20px; }
.tbco { color: var(--platinum); font-size: 13.5px; padding-left: 10px; border-left: 1px solid var(--steel); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--steel); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; text-decoration: none; }
.launcher { position: fixed; top: 58px; left: 10px; width: 372px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(13,27,42,.28); padding: 14px; z-index: 30; }
.ltiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13,27,42,.10); border-color: var(--shadow); }
.tile .ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--oxford); color: #fff; }
.tile .ico svg { width: 22px; height: 22px; }
.tile .tn { font-family: Poppins; font-weight: 600; color: var(--ink); margin-top: 10px; }
.tile .ts { font-size: 12px; color: var(--muted); margin-top: 2px; min-height: 34px; }
.tile.soon .ico { background: var(--platinum); color: var(--steel); }
.tile.small { padding: 10px; text-align: center; } .tile.small .ico { margin: 0 auto; } .tile.small .tn { font-size: 12px; margin-top: 6px; }
.tile.pick { cursor: pointer; } .tile.pick.on { border-color: var(--oxford); box-shadow: 0 0 0 1px var(--oxford); } .tile.pick .ts { margin-bottom: 8px; }
.hero { background: linear-gradient(120deg, var(--ink), var(--oxford) 60%, var(--steel)); border-radius: 16px; padding: 22px 28px; display: flex; gap: 22px; align-items: center; }
.hero .hm { width: 130px; flex: none; }
.askbox { flex: 1; min-width: 260px; border: 0; padding: 12px 14px; border-radius: 10px; }
.amberbtn { background: var(--platinum); color: var(--ink); } .amberbtn:hover { background: #fff; }
.opts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.opts .chip { text-align: left; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.opts .chip:hover { background: var(--oxford); color: #fff; border-color: var(--oxford); }
.thinking { display: flex; align-items: center; gap: 6px; } .thinking .tm { width: 30px; display: inline-block; }
.appcheck { align-items: flex-start; border: 1px solid var(--line); background: #fff; padding: 10px; } .appcheck input { margin-top: 3px; }
.mascot-btn { width: 72px; height: 72px; background: var(--ink); border: 2px solid var(--steel); transition: transform .2s; }
.mascot-btn:hover { transform: scale(1.08); } .mascot-btn svg { width: 54px; height: 58px; }
.dock { bottom: 110px; } .dock .dh svg { width: 40px; height: 44px; }

/* landing */
.landing { min-height: 100vh; background: radial-gradient(1200px 600px at 80% 0%, var(--oxford), var(--ink)); color: #fff; padding: 0 6vw 60px; }
.lbar { display: flex; align-items: center; height: 72px; }
.lhero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; align-items: center; padding: 40px 0 30px; }
.lh { color: #fff; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.08; }
.lp { color: var(--platinum); font-size: 17px; max-width: 560px; margin: 16px 0; }
.lchip { border: 1px solid var(--steel); color: var(--platinum); border-radius: 99px; padding: 4px 12px; font-size: 12.5px; }
.lmasc { max-width: 300px; margin: 0 auto; width: 100%; }
.ledit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.edcard { background: var(--paper); color: var(--text); border-radius: 16px; padding: 24px; }
@media (max-width: 820px) { .lhero, .ledit { grid-template-columns: 1fr; } .lmasc { max-width: 180px; } }

/* mascot */
.masc { width: 100%; height: auto; display: block; overflow: visible; }
.masc .m-float { animation: m-bob 3.2s ease-in-out infinite; }
.masc .m-shadow { transform-box: fill-box; transform-origin: center; animation: m-shadow 3.2s ease-in-out infinite; }
.masc .m-eye { transform-box: fill-box; transform-origin: center; animation: m-blink 4.6s infinite; }
.masc .m-pupil { transition: transform .09s linear; }
.masc .m-spark { animation: m-glow 2s ease-in-out infinite; transform-origin: 60px 9px; }
.masc .m-heart { transform-box: fill-box; transform-origin: center; animation: m-beat 1.6s ease-in-out infinite; }
.masc .m-arm-l, .masc .m-arm-r { transform-box: fill-box; transform-origin: 50% 0%; }
.masc .m-happy, .masc .m-sleep, .masc .m-brow, .masc .m-oh, .masc .m-flat, .masc .m-zz, .masc .m-dots { display: none; }
.masc.wave .m-arm-r, .mascot-btn:hover .m-arm-r { animation: m-wave .9s ease-in-out infinite; }
.masc.happy .m-open { display: none; } .masc.happy .m-happy { display: block; }
.masc.happy .m-float { animation: m-hop .45s ease-in-out infinite; }
.masc.happy .m-arm-l { animation: m-cheer-l .45s ease-in-out infinite; } .masc.happy .m-arm-r { animation: m-wave .45s ease-in-out infinite; }
.masc.happy .m-spark { animation: m-spin .9s linear infinite; }
.masc.sleep .m-open, .masc.sleep .m-smile { display: none; } .masc.sleep .m-sleep, .masc.sleep .m-flat { display: block; }
.masc.sleep .m-zz { display: block; animation: m-zz 2.4s ease-in-out infinite; } .masc.sleep .m-float { animation-duration: 5s; } .masc.sleep .m-spark { opacity: .35; animation: none; }
.masc.worried .m-brow, .masc.worried .m-flat { display: block; } .masc.worried .m-smile { display: none; }
.masc.worried .m-float { animation: m-shake .35s linear 3; }
.masc.surprised .m-smile { display: none; } .masc.surprised .m-oh { display: block; }
.masc.surprised .m-eye { animation: none; transform: scale(1.14); } .masc.surprised .m-float { animation: m-hop .35s ease-out 2; }
.masc.think .m-smile { display: none; } .masc.think .m-dots { display: block; }
.masc.think .m-dots circle { animation: m-dot 1s ease-in-out infinite; } .masc.think .m-dots circle:nth-child(2) { animation-delay: .15s; } .masc.think .m-dots circle:nth-child(3) { animation-delay: .3s; }
.masc.think .m-pupil { transform: translate(3px, -4.5px) !important; } .masc.think .m-spark { animation: m-spin 1.1s linear infinite; }
@keyframes m-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes m-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes m-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes m-shadow { 0%, 100% { transform: scaleX(1); opacity: .18; } 50% { transform: scaleX(.82); opacity: .1; } }
@keyframes m-blink { 0%, 44%, 48%, 100% { transform: scaleY(1); } 46% { transform: scaleY(.08); } }
@keyframes m-glow { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes m-spin { to { transform: rotate(360deg); } }
@keyframes m-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
@keyframes m-wave { 0%, 100% { transform: rotate(-150deg); } 50% { transform: rotate(-115deg); } }
@keyframes m-cheer-l { 0%, 100% { transform: rotate(150deg); } 50% { transform: rotate(115deg); } }
@keyframes m-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes m-zz { 0% { opacity: 0; transform: translate(0, 4px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(4px, -8px); } }
@media (prefers-reduced-motion: reduce) { .masc * { animation: none !important; } }
.mascot-btn { overflow: visible; } .mascot-btn:active { transform: scale(.94); }
.mbubble { position: fixed; right: 112px; bottom: 44px; max-width: 270px; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 4px 14px; padding: 12px 30px 12px 14px; font-size: 13px; box-shadow: 0 10px 28px rgba(13,27,42,.2); z-index: 22; animation: m-pop .25s ease-out; }
.mbubble .chip { display: block; margin-top: 8px; cursor: pointer; background: var(--oxford); color: #fff; border-color: var(--oxford); }
.mbubble .mx { position: absolute; top: 4px; right: 6px; border: 0; background: transparent; color: var(--muted); font-size: 16px; }
@keyframes m-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@media print { .mbubble { display: none; } }

/* ERP */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); } .tabs a.on { color: var(--ink); border-bottom-color: var(--amber); }
.modal table input, .modal table select { padding: 6px 8px; }
@media print { .tabs, .topbar, .launcher { display: none !important; }
  body.printdoc #app { display: none; } body.printdoc .modal-bg { position: static; background: #fff; padding: 0; display: block; } body.printdoc .modal { width: 100% !important; max-height: none; background: #fff; padding: 0; } body.printdoc .modal > .row { display: none; } }

/* projects */
.pcard { cursor: pointer; } .pcard:hover { border-color: var(--shadow); } .pcard.drag { opacity: .4; } .pcard.donec .t { text-decoration: line-through; color: var(--muted); }
.col.over { outline: 2px dashed var(--shadow); outline-offset: -4px; }
.ttitle { font: 600 20px Poppins, sans-serif; border-color: transparent; padding: 6px 4px; margin: 2px 0 6px; } .ttitle:hover { border-color: var(--line); }
.tl { overflow-x: auto; } .tlrow { display: grid; grid-template-columns: 220px 1fr; align-items: center; min-width: 760px; border-bottom: 1px solid #ECECE8; }
.tlname { padding: 8px 10px 8px 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tltrack { position: relative; height: 34px; } .tlhead .tltrack span { position: absolute; top: 9px; font-size: 11px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.tlbar { position: absolute; top: 8px; height: 18px; border-radius: 9px; background: var(--steel); } .tlbar.done { background: var(--ok); opacity: .6; } .tlbar.late { background: var(--bad); }
.tltoday { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--amber); }
/* team chat */
.tcg { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tcrow { display: flex; align-items: center; gap: 8px; padding: 8px 12px; text-decoration: none; color: var(--text); font-size: 13.5px; } .tcrow:hover { background: var(--paper); } .tcrow.on { background: var(--platinum); font-weight: 600; }
.tcname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tcun { background: var(--amber); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.tchead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tcmsgs { gap: 2px; background: #fff; } .tcm { max-width: 78%; } .tcm.mine { align-self: flex-end; }
.tch { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; } .tcm.mine .tch { flex-direction: row-reverse; }
.tcb { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; white-space: pre-wrap; word-wrap: break-word; font-size: 13.5px; margin-left: 34px; width: fit-content; }
.tcm.mine .tcb { background: var(--oxford); color: #fff; border-color: var(--oxford); margin: 0 34px 0 auto; } .tcm.mine .tcb a { color: var(--platinum); }
.tcmsgs ~ .composer { padding-right: 104px; }

/* official documents */
.a4modal { width: min(calc(210mm + 48px), 100%) !important; } .sheetwrap { overflow-x: auto; padding: 2px; }
.sheet { position: relative; width: 210mm; min-height: 297mm; background: #fff; margin: 0 auto; box-shadow: 0 1px 10px rgba(13,27,42,.18); overflow: hidden; color: var(--text); }
.sheet .lh { position: absolute; top: var(--by); left: var(--bx); width: var(--bw); height: auto; max-height: 110mm; display: block; }
.sheet .lf { position: absolute; bottom: var(--by); left: var(--bx); width: var(--bw); height: auto; max-height: 110mm; display: block; }
.sheet.fullpage .lh { top: 0; left: 0; width: 210mm; height: 297mm; max-height: none; }
.a4t { width: 100%; border-collapse: collapse; position: relative; } .a4t > * > tr > td { padding: 0; border: 0; }
.sp-top { height: var(--top); } .sp-bot { height: var(--bot); } .a4t > tbody > tr > td.a4c { padding: 0 var(--side); vertical-align: top; }
.sheet.haslh .coname { display: none; } .signrow, .docprint tr, .official tr { break-inside: avoid; }
.sheet.guide .a4c > div { min-height: calc(297mm - var(--top) - var(--bot) - 1mm); box-sizing: border-box; border: 1px dashed var(--steel); padding: 5mm; display: flex; flex-direction: column; justify-content: space-between; }
.draftmark { text-align: center; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; color: var(--bad); border: 1px dashed var(--bad); border-radius: 8px; padding: 6px; margin-bottom: 14px; }
.signrow { display: flex; align-items: flex-end; gap: 16px; margin-top: 26px; }
.qrbox { display: flex; gap: 12px; align-items: center; } .qrbox img { width: 96px; height: 96px; }
.signbox { position: relative; text-align: center; min-width: 210px; } .signbox .sig { height: 52px; max-width: 200px; object-fit: contain; display: block; margin: 0 auto; position: relative; z-index: 1; }
.signbox .stamp { position: absolute; right: 100%; bottom: 0; height: 104px; max-width: 150px; object-fit: contain; opacity: .9; margin-right: 6px; }
.signline { border-top: 1px solid var(--ink); padding-top: 4px; font-weight: 600; }
.brandprev { background: repeating-conic-gradient(#ECECE8 0 25%, #fff 0 50%) 0 0 / 18px 18px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.brandprev img { max-width: 100%; } .brandprev.wide img { max-height: 150px; } .brandprev.sq img { max-height: 130px; }
/* operations */
.steps2 { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; } .st2 { display: flex; gap: 2px; align-items: flex-start; opacity: .55; } .st2.ok, .st2.bad, .st2.cur { opacity: 1; }
.st2 .dot { margin-top: 6px; background: var(--shadow); } .st2.ok .dot { background: var(--ok); } .st2.bad .dot { background: var(--bad); } .st2.cur .dot { background: var(--amber); }
.tmark { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); }
@media print { body.printdoc .modal { background: #fff; } .draftmark { color: #000; border-color: #000; } }
@media print { body.printdoc .official .docprint .tag { display: none; } }
@media print { html, body { height: auto; } body.printdoc { background: #fff; } body.printdoc .modal-bg { inset: auto; } body.printdoc .modal { overflow: visible; border-radius: 0; } body.printdoc .modal > h2, body.printdoc .modal > div:not(.row) { margin: 0 !important; }
  body.printdoc .sheetwrap { overflow: visible; padding: 0; } body.printdoc .sheet { box-shadow: none; min-height: 0; overflow: visible; position: static; margin: 0; }
  body.printdoc .sheet .lh, body.printdoc .sheet .lf { position: fixed; } body.printdoc.preprinted .sheet .lh, body.printdoc.preprinted .sheet .lf { visibility: hidden; }
  body.printdoc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
/* automations */
.bell { position: relative; background: none; border: 0; color: var(--platinum); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; } .bell:hover { background: rgba(255,255,255,.08); } .bell svg { width: 20px; height: 20px; }
.bell i { position: absolute; top: 0; right: 0; min-width: 15px; height: 15px; border-radius: 99px; background: var(--amber); color: #fff; font: 700 10px/15px Inter, sans-serif; text-align: center; display: none; padding: 0 3px; } .bell.has i { display: block; }
.notes { left: auto; right: 16px; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.note { display: block; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--text); border-left: 3px solid transparent; } .note:hover { background: var(--paper); } .note.new { border-left-color: var(--amber); background: #FBF6EA; }
.rec { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); } .rec:hover { border-color: var(--shadow); } .rec .tag { min-width: 86px; text-align: center; }
/* mail */
.mailpage { display: grid; grid-template-columns: 230px 360px 1fr; gap: 14px; height: calc(100vh - 150px); } .mailpage > .panel { min-height: 0; }
.mbox { padding: 8px; border-radius: 10px; margin-bottom: 4px; } .mbox.on { background: var(--paper); } .mbn { display: flex; gap: 6px; align-items: center; text-decoration: none; color: var(--text); }
.mfold { display: grid; margin-top: 6px; } .mfold a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--steel); font-size: 14px; } .mfold a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--amber); }
.mlist { overflow-y: auto; flex: 1; } .mrow { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); } .mrow:hover { background: var(--paper); } .mrow.on { background: #EEF1F5; box-shadow: inset 3px 0 0 var(--steel); }
.mrow.unread b, .mrow.unread > div:nth-child(2) { font-weight: 700; color: var(--ink); } .mrow.unread { box-shadow: inset 3px 0 0 var(--amber); }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .star { color: var(--amber); }
.mread { padding: 18px 22px; overflow-y: auto; } .mhead h2 { margin: 0 0 12px; } .mbody { white-space: pre-wrap; line-height: 1.6; word-break: break-word; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.whocard { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 12px; font-size: 14px; display: grid; gap: 4px; }
@media (max-width: 1100px) { .mailpage { grid-template-columns: 200px 1fr; } .mread { grid-column: 1 / -1; } }
.empty .masc { width: 104px; height: 114px; display: block; margin: 0 auto 10px; } .empty > div { max-width: 560px; margin: 0 auto; } .empty .btn { margin-top: 14px; }
/* studio */
.studio { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; } .studio-make { position: sticky; top: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--paper); padding: 4px; border-radius: 12px; margin-bottom: 14px; } .seg .chip { border: 0; padding: 9px; font-weight: 600; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--text); padding: 6px 12px; border-radius: 99px; cursor: pointer; font: inherit; font-size: 13px; } .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fromimg { display: flex; gap: 10px; align-items: center; background: var(--paper); border-radius: 10px; padding: 8px; margin-bottom: 10px; } .fromimg img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; align-items: start; }
.gcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; } .gmedia { aspect-ratio: var(--ar); background: var(--paper); display: grid; place-items: center; }
.gmedia img, .gmedia video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; } .gmedia video { cursor: default; }
.gwait { text-align: center; color: var(--steel); padding: 12px; } .gwait .masc { width: 70px; height: 76px; display: block; margin: 0 auto 6px; }
.gmedia:has(.gwait) { background: linear-gradient(110deg, var(--paper) 30%, #fff 50%, var(--paper) 70%); background-size: 250% 100%; animation: shimmer 1.6s linear infinite; } @keyframes shimmer { to { background-position: -150% 0; } }
.gfail { text-align: center; color: var(--bad); padding: 14px; } .gtext { padding: 10px 12px 4px; } .gact { padding: 4px 12px 12px; flex-wrap: wrap; gap: 6px; }
.ell2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } .studio-make { position: static; } }
