:root {
  --bg: #FFF8F0; --card: #fff; --ink: #2A1A10; --muted: #7D6656; --line: #F2E1D0; --soft: #FFF4E8;
  --navy: #2A1A10; --yel: #FFC531; --pri: #FF6A00; --z1: #FF9F1C; --z2: #FF6A00; --z3: #FF4D00; --zg: linear-gradient(120deg, #FF9F1C 0%, #FF6A00 55%, #FF4D00 100%); --crit: #D7263D; --cream: #FFF3E3; --bad: #f04438; --warn: #f79009; --ok: #12b76a;
  --lw: 340px; --rowh: 38px; --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, "Noto Sans Thai", "Noto Sans Lao", "Noto Sans SC", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sp { flex: 1; }
.muted { color: var(--muted); }
.sm { font-size: 12.5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.center { display: grid; place-items: center; min-height: 60vh; text-align: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }

/* top bar */
.top { background: var(--zg); box-shadow: 0 2px 12px rgba(255,77,0,.25); color: #fff; display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; position: sticky; top: 0; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; }
.bt { font-weight: 700; font-size: 16px; line-height: 1.1; }
.bs { font-size: 11.5px; color: rgba(255,255,255,.88); }
.logo { width: 36px; height: 36px; border-radius: 10px; display: block; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.logo.big { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 8px; box-shadow: 0 8px 24px rgba(255,77,0,.3); }
.seg { display: inline-flex; background: rgba(255,255,255,.2); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; color: rgba(255,255,255,.95); padding: 6px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: #fff; }
.seg button.on { background: #fff; color: var(--z3); font-weight: 700; box-shadow: 0 1px 4px rgba(120,40,0,.2); }
.seg.light { background: #FBE7D3; }
.seg.light button { color: var(--muted); padding: 5px 10px; }
.seg.light button.on { background: #fff; color: var(--z3); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.lang select { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; padding: 5px 8px; }
.lang option { color: var(--ink); }
.user { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.45); color: #fff; border-radius: 20px; padding: 3px 10px 3px 3px; cursor: pointer; max-width: 220px; }
.user img { width: 24px; height: 24px; border-radius: 50%; }
.user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }

.main { padding: 14px 16px 40px; max-width: 1600px; margin: 0 auto; }
.banner { border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.banner.warn { background: #fff6e0; border: 1px solid #ffd98a; color: #7a4b00; }
.banner.info { background: #FFF0E0; border: 1px solid #FFCB94; color: #9A3D00; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.stat[data-act] { cursor: pointer; }
.stat b { font-size: 22px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat.hero { background: var(--zg); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(255,77,0,.25); }
.stat.hero b { color: #fff; font-size: 28px; }
.stat.hero span { color: rgba(255,255,255,.92); }
.stat.bad b { color: var(--bad); }
.stat.warn b { color: var(--warn); }
.mini { display: block; height: 4px; background: #F7E2CE; border-radius: 3px; margin-top: 4px; overflow: hidden; }
.mini > i { display: block; height: 100%; background: var(--zg); border-radius: 3px; }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar input, .toolbar select { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 10px; min-width: 0; }
.toolbar input[type=search] { width: 200px; }
.btn { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { border-color: #FFB877; }
.btn.pri { background: var(--zg); border-color: var(--z2); color: #fff; font-weight: 600; }
.btn.pri:hover { filter: brightness(1.05); box-shadow: 0 4px 12px rgba(255,77,0,.3); }
.btn.lg { height: 44px; padding: 0 20px; font-weight: 600; background: #fff; color: var(--ink); border-color: var(--line); margin-top: 8px; }
.btn.danger { color: var(--bad); border-color: #fecdca; }
.btn.ghost { background: transparent; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.ic { border: 0; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.ic:hover { background: #FBE7D3; color: var(--z3); }
.hint { color: var(--muted); font-size: 12px; margin: 8px 2px; }
.hint.first { margin-top: 0; }

/* gantt */
.gwrap { overflow: auto; max-height: calc(100vh - 290px); min-height: 320px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); position: relative; overscroll-behavior: contain; }
.gantt { width: calc(var(--lw) + var(--tw)); position: relative; }
.gh { display: flex; position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.gc { position: sticky; left: 0; z-index: 21; width: var(--lw); flex: none; background: #fff; border-right: 1px solid var(--line); padding: 8px 12px; font-weight: 600; color: var(--muted); display: flex; align-items: flex-end; }
.gs { width: var(--tw); flex: none; }
.gmr, .gdr { display: flex; }
.gm { flex: none; padding: 5px 6px; font-weight: 600; font-size: 12px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.gd { flex: none; text-align: center; font-size: 10.5px; color: var(--muted); border-left: 1px solid #f0f1f5; padding: 2px 0 3px; line-height: 1.15; border-top: 1px solid #f0f1f5; }
.gd b { display: block; color: var(--ink); font-weight: 600; font-size: 12px; }
.gd.we { background: var(--soft); }
.gd.td { background: var(--z2); }
.gd.td b, .gd.td small { color: #fff; }
.gd.wk { text-align: left; padding-left: 4px; font-size: 11px; }
.gb { position: relative; }
.gov { position: absolute; top: 0; bottom: 0; left: var(--lw); width: var(--tw); pointer-events: none; z-index: 0; }
.we-band { position: absolute; top: 0; bottom: 0; background: var(--soft); }
.wk-line { position: absolute; top: 0; bottom: 0; border-left: 1px solid #eef0f5; }
.kd { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--c); }
.kd span { position: sticky; top: 0; display: inline-block; margin: 3px 0 0 4px; background: var(--c); color: #fff; font-size: 10.5px; padding: 1px 7px; border-radius: 6px; white-space: nowrap; font-weight: 600; }
.today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--z3); }
.today span { position: absolute; top: 22px; left: -1px; transform: translateX(-50%); background: var(--z3); color: #fff; font-size: 10px; padding: 0 6px; border-radius: 6px; white-space: nowrap; }
.gr { display: flex; height: var(--rowh); border-bottom: 1px solid #f1f2f6; position: relative; z-index: 1; }
.gr:hover .gl { background: #FFF8F0; }
.gl { position: sticky; left: 0; z-index: 3; width: var(--lw); flex: none; background: #fff; border-right: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 8px 0 24px; cursor: pointer; min-width: 0; }
.gr.ws .gl { padding-left: 8px; font-weight: 700; background: var(--soft); }
.gr.ws .gl .ic { opacity: 0; }
.gr.ws:hover .gl .ic { opacity: 1; }
.car { width: 12px; color: var(--muted); font-size: 11px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; margin-right: 6px; vertical-align: middle; }
.gl .dot { margin-right: 0; }
.cnt { font-size: 11.5px; color: #9A3D00; font-weight: 600; background: #FFE8D1; padding: 0 7px; border-radius: 10px; }
.tn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sti { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gt { position: relative; width: var(--tw); flex: none; }
.bar { position: absolute; top: 8px; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, #fff); border: 1px solid color-mix(in srgb, var(--c) 65%, #fff); cursor: grab; overflow: hidden; touch-action: auto; }
.bar.dragging { cursor: grabbing; box-shadow: 0 4px 12px rgba(16,24,40,.25); z-index: 5; }
.bar .fill { height: 100%; background: var(--c); opacity: .9; }
.bar.st-done { opacity: .7; }
.bar.st-blocked { background: repeating-linear-gradient(45deg, #fee4e2 0 6px, #fff 6px 12px); border-color: var(--bad); }
.bar.late, .ms.late { outline: 2px solid var(--bad); outline-offset: 1px; }
.rz { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.rz.l { left: 0; } .rz.r { right: 0; }
.ms { position: absolute; top: 10px; width: 18px; height: 18px; transform: rotate(45deg); background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--c); cursor: pointer; border-radius: 3px; }
.ms.st-done { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.blab { position: absolute; top: 10px; font-size: 11.5px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.blab em { color: #c4c8d4; font-style: normal; }
.sumbar { position: absolute; top: 16px; height: 6px; border-radius: 4px; background: color-mix(in srgb, var(--c) 45%, #fff); }

/* avatars & chips */
.av { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; flex: none; }
.av.lg { width: 44px; height: 44px; font-size: 18px; }
.av-none { background: #F7E9DB; color: #C2A48C; }
.avs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; margin: 1px 3px 1px 0; background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); white-space: nowrap; }
.tag { font-size: 10.5px; background: #FFE8D1; color: #C24E00; border-radius: 6px; padding: 0 6px; }

/* list */
.tbl-wrap { padding: 0; overflow: auto; max-height: calc(100vh - 290px); }
.tbl { width: 100%; border-collapse: collapse; min-width: 980px; }
.tbl th { position: sticky; top: 0; background: #fff; text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 9px 10px; border-bottom: 1px solid var(--line); z-index: 2; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid #f1f2f6; vertical-align: middle; }
.tbl tr.wsr td { background: var(--soft); font-weight: 700; }
.tbl tr.late td.tt { color: var(--bad); }
.tbl td.tt { cursor: pointer; min-width: 280px; }
.tbl td.tt:hover { color: var(--pri); }
.tbl .nw { white-space: nowrap; }
.tbl .num { text-align: right; }
.inl { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 3px 4px; max-width: 190px; cursor: pointer; }
.inl:hover, .inl:focus { border-color: var(--line); background: #fff; }
.inl.st { color: var(--c); font-weight: 600; }
.pbar { display: inline-block; width: 60px; height: 6px; background: #F7E2CE; border-radius: 3px; overflow: hidden; vertical-align: middle; }
.pbar i { display: block; height: 100%; background: var(--zg); }

/* checklist */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
.ccard { padding: 0; border-top: 4px solid var(--c); overflow: hidden; }
.ccard header { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.ccard h3 { margin: 0; font-size: 15px; flex: 1; }
.mini.wide { margin: 0 12px 6px; }
.clist { list-style: none; margin: 0; padding: 0 4px 6px; }
.clist li { display: grid; grid-template-columns: 26px 1fr auto; grid-template-areas: "cb txt due" "cb own own"; gap: 2px 6px; padding: 7px 8px; border-radius: 8px; align-items: start; }
.clist li:hover { background: var(--soft); }
.clist .cb { grid-area: cb; padding-top: 1px; }
.clist .ctext { grid-area: txt; cursor: pointer; }
.clist .due { grid-area: due; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.clist .due.bad { color: #fff; background: var(--bad); padding: 0 6px; border-radius: 6px; }
.clist .due.soon { color: #7a4b00; background: #fff1c2; padding: 0 6px; border-radius: 6px; }
.clist .own { grid-area: own; justify-self: start; font-size: 12px; color: var(--muted); padding: 1px 4px; margin-left: -4px; }
.clist li.done .ctext { color: #98a2b3; text-decoration: line-through; }
.cb input { position: absolute; opacity: 0; width: 0; height: 0; }
.cb span { display: inline-block; width: 18px; height: 18px; border: 2px solid #c4c8d4; border-radius: 5px; cursor: pointer; position: relative; }
.cb input:checked + span { background: var(--ok); border-color: var(--ok); }
.cb input:checked + span::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cb input:focus-visible + span { outline: 2px solid var(--pri); outline-offset: 2px; }

/* team */
.sec { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.main > .view > .card + .card { margin-top: 12px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.mcard { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.mi { min-width: 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mi > b { cursor: pointer; }
.mact { display: flex; gap: 6px; margin-top: 4px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tcard { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.tcard:hover { background: var(--soft); border-color: #FFB877; }

/* drawer & modal */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: #fff; z-index: 60; box-shadow: -12px 0 32px rgba(16,24,40,.18); transform: translateX(100%); transition: transform .2s ease; display: flex; }
.drawer.open { transform: none; }
.dform { display: flex; flex-direction: column; width: 100%; }
.dform header, .mbox header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dform h3, .mbox h3 { margin: 0; font-size: 16px; }
.dbody { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.dform footer, .mbox footer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.fld input:not([type=checkbox]):not([type=range]):not([type=color]), .fld select, .fld textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .toolbar input:focus, .toolbar select:focus { outline: 2px solid color-mix(in srgb, var(--pri) 35%, transparent); border-color: var(--pri); }
.fld input[type=color] { width: 60px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chips .chk { border: 1px solid var(--line); border-radius: 16px; padding: 3px 10px 3px 6px; font-size: 12.5px; }
.chips .chk:has(input:checked) { background: #FFF0E0; border-color: #FFB877; color: #C24E00; }
.chk.line { font-size: 13.5px; }
.modal { position: fixed; inset: 0; background: rgba(42,26,16,.45); z-index: 80; display: grid; place-items: center; padding: 16px; }
.mbox { background: #fff; border-radius: 14px; width: min(520px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 48px rgba(16,24,40,.3); }
.mbody { padding: 14px 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #2A1A10; border-left: 4px solid var(--z2); color: #fff; padding: 9px 16px; border-radius: 10px; z-index: 100; font-size: 13px; box-shadow: 0 8px 24px rgba(16,24,40,.25); max-width: calc(100% - 32px); }
.auth { max-width: 380px; padding: 32px 28px; }
.auth h2 { margin: 4px 0; }
.auth { display: flex; flex-direction: column; gap: 12px; text-align: left; width: min(380px, 100%); }
.auth h2, .auth > p, .auth .logo { text-align: center; }
.auth .fld input { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; font-size: 15px; }
.btn.lg2 { height: 44px; justify-content: center; font-weight: 600; font-size: 15px; }
.btn:disabled { opacity: .6; cursor: wait; }
.pwerr { margin: 0; color: var(--bad); font-size: 13px; text-align: center; }
.empty h2 { margin-top: 0; }

@media (max-width: 760px) {
  :root { --lw: 175px; --rowh: 40px; }
  .top { padding: 8px 12px; gap: 8px; }
  .bs { display: none; }
  .seg button { padding: 6px 9px; font-size: 13px; }
  .plans, .views { order: 5; width: 100%; }
  .main { padding: 10px 12px 40px; }
  .toolbar input[type=search] { width: 100%; }
  .toolbar select { flex: 1 1 30%; }
  .gl { padding-left: 10px; gap: 5px; font-size: 12.5px; }
  .gl .av { display: none; }
  .gwrap, .tbl-wrap { max-height: calc(100vh - 230px); }
  .cgrid { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .stat { padding: 8px 10px; }
  .stat b { font-size: 18px; }
  .stat.hero b { font-size: 20px; }
}

/* ===== Reverse planning ===== */
.rp { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rp-title { margin: 0; padding: 14px 18px; font-size: 18px; font-weight: 700; letter-spacing: .2px; text-align: center; color: var(--ink); border-top: 10px solid; border-image: var(--zg) 1; }
.rp-scroll { overflow-x: auto; overflow-y: hidden; }
.rp-inner { position: relative; }
.rp-head { display: flex; position: relative; }
.rp-corner { position: sticky; left: 0; z-index: 6; width: var(--lw); flex: none; background: #fff; }
.rp-hc { position: relative; height: 58px; flex: none; }
.rp-mr { position: absolute; left: 0; right: 0; top: 0; height: 30px; background: var(--zg); border-radius: 8px 8px 0 0; }
.rp-m { position: absolute; top: 0; height: 28px; color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; white-space: nowrap; overflow: hidden; }
.rp-wr { position: absolute; left: 0; right: 0; top: 30px; height: 28px; background: #fff; border-left: 2px solid #FFB877; border-right: 2px solid #FFB877; }
.rp-w { position: absolute; top: 0; height: 28px; border-left: 1px solid #FFD2A6; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.rp-w b { font-size: 11px; color: var(--z3); }
.rp-w small { font-size: 10px; color: var(--muted); }
.rp-body { display: flex; position: relative; }
.rp-lanes { position: sticky; left: 0; z-index: 5; width: var(--lw); flex: none; background: #fff; }
.rp-lane { position: absolute; left: 6px; right: 8px; padding: 3px 0; display: flex; }
.rp-lane span { flex: 1; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 14px; line-height: 1.2; border-radius: 10px; box-shadow: 0 3px 8px rgba(194,78,0,.18); padding: 4px 8px; color: var(--ink); }
.rp-lane.a span { background: var(--zg); color: #fff; }
.rp-lane.b span { background: #FFE2C2; color: #8A3500; }
.rp-canvas { position: relative; flex: none; background: var(--cream); overflow: hidden; border-left: 2px solid #FFB877; border-right: 2px solid #FFB877; }
.rp-band { position: absolute; left: 0; right: 0; border-bottom: 1px dashed rgba(255,106,0,.28); }
.rp-band.alt { background: rgba(255,159,28,.08); }
.rp-gl { position: absolute; top: 0; bottom: 0; border-left: 1px solid rgba(255,106,0,.18); }
.rp-kd { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--c); opacity: .9; }
.rp-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--z3); opacity: .8; }
.rp-today span { position: absolute; top: 2px; left: 3px; background: var(--z3); color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; white-space: nowrap; }
.rp-golive { position: absolute; top: 0; bottom: 0; width: 5px; margin-left: -2px; background: var(--ink); z-index: 3; }
.rp-golive::before { content: ""; position: absolute; top: 2px; left: -4px; width: 13px; height: 13px; border-radius: 50%; background: var(--z3); box-shadow: 0 0 0 3px #fff; }
.rp-svg { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; overflow: visible; }
.rp-svg path { fill: none; }
.rp-e-n path { stroke: #6B4A33; stroke-width: 1.2; opacity: .75; }
.rp-e-c path { stroke: var(--crit); stroke-width: 2.2; }
.rp-e-x path { stroke: #f79009; stroke-width: 1.8; stroke-dasharray: 5 3; }
.rp-svg path.dim { opacity: .15; }
.rp-mk-n { fill: #6B4A33; } .rp-mk-c { fill: #D7263D; } .rp-mk-x { fill: #f79009; }
.rp-box { position: absolute; height: 34px; z-index: 4; cursor: pointer; filter: drop-shadow(0 2px 3px rgba(150,60,0,.28)); transition: transform .1s; }
.rp-box:hover { transform: translateY(-1px); z-index: 6; }
.rp-in { position: absolute; inset: 0; background: #fff; clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%, 7px 50%); display: flex; flex-direction: column; justify-content: center; padding: 0 16px 0 13px; line-height: 1.2; }
.rp-in span { font-size: 12px; font-weight: 500; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rp-in em { font-style: normal; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-st { position: absolute; left: 9px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; opacity: .9; }
.rp-box.crit .rp-in { background: var(--crit); }
.rp-box.crit .rp-in span, .rp-box.crit .rp-in em { color: #fff; }
.rp-box.done .rp-in { background: #d3f9d8; }
.rp-box.crit.done .rp-in { background: #2f9e44; }
.rp-box.late .rp-in span { color: #c92a2a; font-weight: 700; }
.rp-box.crit.late .rp-in span { color: #fff; text-decoration: underline wavy #ffd43b; }
.rp-box.dim, .rp-ms.dim { opacity: .22; }
.rp-ms { position: absolute; z-index: 4; display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.rp-ms i { width: 18px; height: 18px; transform: rotate(45deg); background: var(--z1); border: 2px solid #fff; box-shadow: 0 2px 4px rgba(150,60,0,.35); margin: 2px 0 5px; }
.rp-ms.crit i { background: var(--crit); }
.rp-ms.done i { background: #12b76a; }
.rp-ms span { font-size: 11px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.15; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.rp-foot { display: flex; position: relative; }
.rp-fc { position: sticky; left: 0; z-index: 5; width: var(--lw); flex: none; background: #fff; padding: 6px 8px; }
.rp-fcanvas { position: relative; flex: none; background: var(--cream); border: 2px solid #FFB877; border-top: 0; border-radius: 0 0 8px 8px; }
.rp-ph { position: absolute; height: 20px; background: var(--c); clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); display: flex; align-items: center; padding: 0 14px 0 6px; overflow: hidden; }
.rp-ph span { font-size: 11.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.rp-mark { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.rp-mark i { width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 14px solid var(--ink); }
.rp-mark.big i { border-bottom-color: var(--z3); }
.rp-mark span { font-size: 11px; font-weight: 700; font-style: italic; color: var(--ink); white-space: nowrap; text-align: center; line-height: 1.15; display: flex; flex-direction: column; }
.rp-mark.big span { color: var(--z3); font-size: 12.5px; letter-spacing: 1px; }
.rp-mark small { font-weight: 500; font-style: normal; opacity: .85; letter-spacing: 0; font-size: 10px; }
.rp-leg { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; color: var(--ink); }
.rp-leg > div { display: flex; align-items: center; gap: 6px; line-height: 1.15; }
.rp-leg svg { flex: none; }
.rp-leg .lc { stroke: #D7263D; stroke-width: 2.2; } .rp-leg .ln { stroke: #6B4A33; stroke-width: 1.3; } .rp-leg .lx { stroke: #f79009; stroke-width: 1.8; stroke-dasharray: 5 3; }
.lg-ms { width: 11px; height: 11px; transform: rotate(45deg); background: var(--z1); border: 1px solid #fff; box-shadow: 0 0 0 1px var(--z2); margin: 0 11px 0 11px; flex: none; }
.lg-box { width: 34px; height: 12px; background: #fff; border: 1px solid #C2A48C; flex: none; }
.lg-box.cr { background: #D7263D; border-color: #D7263D; }
.deplist { max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.deplist .chk { align-items: flex-start; font-size: 12.5px; }
.deplist small { color: var(--muted); margin-right: 4px; }
@media (max-width: 760px) {
  .rp-title { font-size: 13.5px; padding: 10px; }
  .rp-lane span { font-size: 11.5px; padding: 2px 4px; }
  .rp-leg { font-size: 9.5px; }
}
@media print {
  @page { size: A3 landscape; margin: 8mm; }
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .top, .stats, .toolbar, .banner, .hint, .drawer, .modal, .toast { display: none !important; }
  .main { padding: 0; max-width: none; }
  .rp { border: 0; }
  .rp-scroll { overflow: visible; }
}

/* Zappy CI typography & accents */
.bt, .rp-title, .auth h2, .empty h2, .ccard h3, .sec, .stat b, .dform h3, .mbox h3, .rp-m { font-family: Prompt, "Noto Sans Lao", "Noto Sans SC", Inter, sans-serif; }
.bt { font-weight: 700; font-size: 17px; letter-spacing: .3px; }
.ccard { border-top-width: 5px; }
.auth { border-top: 6px solid var(--z2); }
.fld input:focus, .fld select:focus, .fld textarea:focus, .toolbar input:focus, .toolbar select:focus { outline-color: rgba(255,106,0,.35); }
.cb input:checked + span { background: var(--z2); border-color: var(--z2); }
.cb input:focus-visible + span { outline-color: var(--z2); }

.neterr .btn { justify-content: center; text-decoration: none; }
.neterr code { word-break: break-all; }

/* inline owner / support inputs */
.own-in { width: 150px; max-width: 100%; border: 1px dashed #F2C9A3; background: #FFFCF8; border-radius: 6px; padding: 4px 7px; cursor: text; font-size: 13px; }
.own-in:hover, .own-in:focus { border: 1px solid var(--z2); background: #fff; outline: none; }
.own-in::placeholder { color: #C9A88D; }
.own-in:not(:placeholder-shown) { border-style: solid; border-color: transparent; background: transparent; font-weight: 600; color: var(--ink); }
.own-in:not(:placeholder-shown):hover, .own-in:not(:placeholder-shown):focus { border-color: var(--z2); background: #fff; }
.supc { min-width: 170px; }
.pchip { display: inline-flex; align-items: center; gap: 2px; background: #FFF0E0; color: #8A3500; border-radius: 12px; padding: 1px 4px 1px 8px; font-size: 12px; margin: 1px 4px 1px 0; white-space: nowrap; }
.pchip-x { border: 0; background: transparent; color: #C2A48C; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 3px; }
.pchip-x:hover { color: var(--crit); }
.sup-in { width: 100px; }
.clist .own { grid-area: own; justify-self: start; }
.clist .own .own-in { font-size: 12px; padding: 2px 6px; width: 170px; }
