/* ================================================================
   Operation Workspace — base styles (command-center theme)
   ================================================================ */
:root{
  --blue:#E93735; --blue-dark:#C42A28; --dark:#0F172A; --slate:#475569;
  --amber:#D97706; --green:#16A34A; --red:#DC2626;
  --bg:#F1F5F9; --card:#FFFFFF; --line:#E2E8F0; --muted:#64748B;
  --nav-w:248px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:'IBM Plex Sans Thai','IBM Plex Sans','Segoe UI',system-ui,sans-serif;
  background:var(--bg); color:var(--dark); font-size:14px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--blue);text-decoration:none}
/* Lucide line icons — consistent sizing/stroke everywhere */
.lucide,svg.lucide,[data-lucide]{width:1em;height:1em;stroke-width:1.9;vertical-align:-0.13em;display:inline-block}
.ow-ic .lucide{width:18px;height:18px}

/* ---- Layout: sidebar + content ---- */
.ow-has-nav{padding-left:var(--nav-w)}
#ow-topbar{display:none}
#ow-sidebar{
  position:fixed; top:0; left:0; bottom:0; width:var(--nav-w);
  background:var(--dark); color:#CBD5E1; padding:14px 12px; overflow-y:auto; z-index:50;
  display:flex; flex-direction:column; gap:2px;
}
.ow-brand{display:flex; align-items:center; gap:10px; padding:6px 8px 14px; color:#fff}
.ow-logo-chip{display:inline-grid; place-items:center; width:34px; height:34px; border-radius:9px;
  background:var(--blue); color:#fff; font-weight:700; font-size:14px}
.ow-logo-img{height:30px}
.ow-brand-text{font-weight:700; font-size:15px; color:#fff; line-height:1.15}
.ow-event{padding:8px; background:rgba(255,255,255,.05); border-radius:10px; margin-bottom:10px}
.ow-event label{display:block; font-size:11px; color:#94A3B8; margin-bottom:4px; text-transform:uppercase; letter-spacing:.04em}
.ow-event select{width:100%; padding:8px; border-radius:8px; border:1px solid #334155;
  background:#1E293B; color:#fff; font-family:inherit; font-size:13px}
.ow-nav-group{font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:#64748B;
  margin:9px 8px 3px; font-weight:600}
.ow-nav-link{display:flex; align-items:center; gap:10px; padding:5px 10px; border-radius:8px;
  color:#CBD5E1; font-size:13.5px; font-weight:500}
.ow-nav-link:hover{background:rgba(255,255,255,.07); color:#fff}
.ow-nav-link.active{background:var(--blue); color:#fff}
.ow-nav-link.ext{color:#94A3B8}
.ow-nav-link.disabled{color:#475569; cursor:default}
.ow-ic{width:20px; text-align:center}
.ow-soon{margin-left:auto; font-size:10px; background:#1E293B; color:#64748B; padding:1px 7px; border-radius:99px}
.ow-nav-foot{margin-top:auto; display:flex; align-items:center; gap:9px; padding:12px 6px 4px;
  border-top:1px solid #1E293B}
.ow-avatar{width:32px; height:32px; border-radius:50%; background:var(--blue); color:#fff;
  display:grid; place-items:center; font-weight:700; flex:0 0 auto}
.ow-user{display:flex; flex-direction:column; min-width:0}
.ow-user b{color:#fff; font-size:13px}
.ow-user small{color:#64748B; font-size:10.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:120px}
.ow-badge{background:var(--amber); color:#fff; font-size:9px; padding:1px 6px; border-radius:99px; width:fit-content; margin:2px 0}
.ow-logout{margin-left:auto; color:#64748B; font-size:18px; padding:4px 8px}
.ow-logout:hover{color:#fff}

/* ---- Content ---- */
.ow-main{max-width:none; margin:0; padding:26px 32px 60px}
.ow-page-head{display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:20px; flex-wrap:wrap}
.ow-page-head h1{margin:0; font-size:24px}
.ow-page-head .sub{color:var(--muted); font-size:13px; margin-top:3px}
.ow-eventpill{background:#fff; border:1px solid var(--line); border-radius:99px; padding:6px 14px;
  font-weight:600; font-size:13px; color:var(--dark)}
.ow-eventpill b{color:var(--blue)}

/* ---- Cards / grid ---- */
.ow-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px}
.ow-card{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px}
.ow-card h3{margin:0 0 4px; font-size:15px}
.ow-card .meta{color:var(--muted); font-size:12px}
.ow-sec-no{display:inline-grid; place-items:center; width:26px; height:26px; border-radius:8px;
  background:#FDEEEE; color:var(--blue); font-weight:700; font-size:13px; margin-bottom:8px}
.ow-prog{height:8px; border-radius:99px; background:#E2E8F0; overflow:hidden; margin:10px 0 6px}
.ow-prog > i{display:block; height:100%; background:var(--green)}
.ow-prog-label{font-size:11.5px; color:var(--muted)}

.ow-tiles{display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; margin-top:10px}
.ow-tile{display:flex; align-items:center; gap:12px; background:#fff; border:1px solid var(--line);
  border-radius:12px; padding:14px; color:var(--dark)}
.ow-tile:hover{border-color:var(--blue); box-shadow:0 2px 10px rgba(233,55,53,.08)}
.ow-tile .emoji{font-size:22px}
.ow-tile b{display:block; font-size:14px}
.ow-tile small{color:var(--muted); font-size:11.5px}

/* ---- Table ---- */
.ow-toolbar{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:14px}
.ow-toolbar .grow{flex:1}
table.ow-tbl{width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden}
table.ow-tbl th, table.ow-tbl td{padding:10px 12px; text-align:left; border-bottom:1px solid var(--line); font-size:13px; vertical-align:top}
table.ow-tbl th{background:#F8FAFC; color:var(--slate); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.03em}
table.ow-tbl tr:last-child td{border-bottom:none}
table.ow-tbl tr:hover td{background:#FAFBFF}
.ow-secchip{font-size:11px; color:var(--slate); background:#F1F5F9; padding:2px 8px; border-radius:99px; white-space:nowrap}

/* ---- Status pills ---- */
.pill{display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; padding:3px 10px; border-radius:99px}
.pill::before{content:""; width:7px; height:7px; border-radius:50%; background:currentColor}
.pill.todo{color:var(--red); background:#FEF2F2}
.pill.doing{color:var(--amber); background:#FFFBEB}
.pill.done{color:var(--green); background:#F0FDF4}

/* ---- Buttons / inputs ---- */
.btn{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:#fff;
  color:var(--dark); padding:8px 14px; border-radius:9px; font-family:inherit; font-size:13px; font-weight:600; cursor:pointer}
.btn:hover{border-color:var(--blue)}
.btn.primary{background:var(--blue); border-color:var(--blue); color:#fff}
.btn.primary:hover{background:var(--blue-dark)}
.btn.sm{padding:5px 10px; font-size:12px}
.btn.danger{color:var(--red); border-color:#FECACA}

/* ---- Tabs (Venue areas etc.) ---- */
.ow-tabs{display:flex; flex-wrap:wrap; gap:8px; margin:2px 0 18px; padding-bottom:14px; border-bottom:1px solid var(--line)}
.ow-tab{display:inline-flex; align-items:center; gap:7px; padding:8px 14px; border:1px solid var(--line);
  background:#fff; color:var(--slate); border-radius:10px; font-family:inherit; font-size:13px; font-weight:600;
  cursor:pointer; transition:background .15s, border-color .15s, color .15s, box-shadow .15s; white-space:nowrap}
.ow-tab:hover{border-color:var(--blue); color:var(--blue); background:#FFF8F8}
.ow-tab.active{background:var(--blue); border-color:var(--blue); color:#fff; box-shadow:0 4px 12px rgba(233,55,53,.28)}
.ow-tab .ow-tab-n{display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px;
  padding:0 6px; border-radius:999px; background:var(--bg); color:var(--muted); font-size:11px; font-weight:700; line-height:1}
.ow-tab:hover .ow-tab-n{background:#FBDCDC; color:var(--blue)}
.ow-tab.active .ow-tab-n{background:rgba(255,255,255,.26); color:#fff}

input,select,textarea{font-family:inherit; font-size:13px; padding:9px 11px; border:1px solid var(--line);
  border-radius:9px; background:#fff; color:var(--dark); width:100%}
input:focus,select:focus,textarea:focus{outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(233,55,53,.12)}
.field{margin-bottom:12px}
.field label{display:block; font-size:12px; font-weight:600; color:var(--slate); margin-bottom:5px}
.row2{display:grid; grid-template-columns:1fr 1fr; gap:12px}

/* ---- Modal ---- */
.ow-modal-bg{position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:200; display:none; align-items:flex-start; justify-content:center; padding:40px 16px; overflow:auto}
.ow-modal-bg.open{display:flex}
.ow-modal{background:#fff; border-radius:16px; width:100%; max-width:560px; padding:22px; box-shadow:0 24px 60px rgba(0,0,0,.3)}
.ow-modal h2{margin:0 0 16px; font-size:18px}
.ow-modal-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:18px}

.ow-empty{text-align:center; color:var(--muted); padding:50px 20px}
.ow-empty .big{font-size:40px; margin-bottom:8px}

/* ---- Segmented toggle (List / Gantt) ---- */
.ow-seg{display:inline-flex; background:#fff; border:1px solid var(--line); border-radius:9px; overflow:hidden}
.ow-seg button{border:none; background:none; padding:7px 14px; font-family:inherit; font-size:13px; font-weight:600; color:var(--slate); cursor:pointer}
.ow-seg button.active{background:var(--blue); color:#fff}
.pill.tl-toggle{border:none; cursor:pointer; font-family:inherit}

/* ---- Timeline (day groups) ---- */
.tl-day{margin-bottom:22px}
.tl-day-head{font-size:15px; font-weight:700; color:var(--dark); margin:0 0 8px; padding-bottom:6px; border-bottom:2px solid var(--blue); display:inline-flex; align-items:center; gap:6px}
/* plain (colorless) section header — File Registry */
.tl-day-head.reg-head{border-bottom:1px solid var(--line); color:var(--dark)}
.reg-secno{display:inline-grid; place-items:center; width:24px; height:24px; border-radius:7px; background:#F1F5F9; color:var(--slate); font-size:13px; font-weight:700}
.tl-wb{margin-top:2px}

/* ---- Gantt ---- */
.gantt{background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px 18px}
.gantt-axis{position:relative; height:20px; margin-left:170px; border-bottom:1px solid var(--line); margin-bottom:8px}
.gantt-tick{position:absolute; top:0; bottom:-4px; border-left:1px dashed #E2E8F0}
.gantt-tick span{position:absolute; top:0; left:3px; font-size:10px; color:var(--muted); white-space:nowrap}
.gantt-row{display:flex; align-items:center; gap:0; min-height:30px; cursor:pointer; border-radius:6px}
.gantt-row:hover{background:#FAFBFF}
.gantt-label{width:170px; flex:0 0 170px; font-size:12.5px; font-weight:500; padding-right:10px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.gantt-track{position:relative; flex:1; height:24px}
.gantt-bar{position:absolute; top:3px; height:18px; background:var(--blue); color:#fff; border-radius:5px;
  font-size:10.5px; line-height:18px; padding:0 6px; overflow:hidden; white-space:nowrap; min-width:2px}
.gantt-bar.done{background:var(--green)}
.gantt-ms{position:absolute; top:4px; width:14px; height:14px; background:var(--amber); transform:rotate(45deg) translateX(-7px); border-radius:2px}
.gantt-ms.done{background:var(--green)}
@media (max-width:860px){
  .gantt-axis{margin-left:110px}
  .gantt-label{width:110px; flex-basis:110px; font-size:11px}
}

/* ---- RACI / Org board ---- */
.raci-phase{margin-bottom:24px}
.raci-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; margin-top:10px}
.raci-zone{background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px 14px}
.raci-zone-head{font-size:13.5px; font-weight:700; color:var(--dark); margin-bottom:8px; padding-bottom:7px;
  border-bottom:1px solid var(--line); display:flex; align-items:center; gap:7px}
.raci-row{display:flex; align-items:center; gap:8px; padding:7px 4px; border-radius:8px; cursor:pointer; border-bottom:1px solid #F1F5F9}
.raci-row:last-child{border-bottom:none}
.raci-row:hover{background:#FAFBFF}
.raci-main{flex:1; min-width:0}
.raci-main b{font-size:13px; font-weight:600}
.raci-person{display:flex; flex-wrap:wrap; gap:4px; margin-top:4px}
.chip{font-size:11px; background:#FDEEEE; color:var(--blue-dark); padding:1px 8px; border-radius:99px; font-weight:600}
.raci-time{font-size:11px; color:var(--slate); background:#F1F5F9; padding:2px 8px; border-radius:6px; white-space:nowrap; flex:0 0 auto}
.raci-tag{flex:0 0 auto; width:22px; height:22px; border-radius:6px; display:grid; place-items:center;
  font-size:11px; font-weight:700; color:#fff}
.raci-tag.r-R{background:var(--green)} .raci-tag.r-A{background:var(--blue)}
.raci-tag.r-C{background:var(--amber)} .raci-tag.r-I{background:var(--slate)}
.ow-avatar.sm{width:24px; height:24px; font-size:11px}
.pill.skip{color:var(--slate); background:#F1F5F9}
/* inline-editable org rows */
.raci-zone-head .lucide{width:16px;height:16px;color:var(--blue)}
.raci-addbtn{margin-left:auto; border:none; background:none; color:var(--blue); cursor:pointer; padding:3px 5px; border-radius:6px; line-height:0}
.raci-addbtn:hover{background:#FDEEEE}
.raci-row .raci-sel{flex:0 0 auto; width:48px; text-align:center; font-weight:700; padding:6px 2px}
.raci-sel.r-R{color:var(--green)} .raci-sel.r-A{color:var(--blue)} .raci-sel.r-C{color:var(--amber)} .raci-sel.r-I{color:var(--slate)}
.raci-row .raci-time-in{flex:0 0 auto; width:82px}
.raci-row .raci-main{display:flex; flex-direction:column; flex:1; min-width:0}
.tl-day-head .lucide{width:18px;height:18px;color:var(--blue);vertical-align:-0.18em}

/* ---- E5 Field-Data ---- */
.fd-row{display:flex; align-items:center; gap:8px; padding:7px 4px; border-bottom:1px solid #F1F5F9}
.fd-row:last-child{border-bottom:none}
.fd-label{flex:1; font-size:13px; font-weight:500; min-width:0}
.fd-val{width:96px; flex:0 0 96px; text-align:right; font-weight:700; font-size:14px; padding:6px 8px}
.fd-unit{font-size:11.5px; color:var(--muted); width:38px; flex:0 0 38px}
.fd-edit{border:none; background:none; color:var(--muted); cursor:pointer; font-size:13px; padding:4px 6px; border-radius:6px; flex:0 0 auto}
.fd-edit:hover{background:#F1F5F9; color:var(--blue)}
.fd-sum{margin-left:auto; font-size:12px; font-weight:700; color:var(--blue); background:#FDEEEE; padding:2px 10px; border-radius:99px}

/* ---- E6 Run-of-Show ---- */
.ros{background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden}
.ros-row{display:flex; gap:12px; padding:11px 14px; border-bottom:1px solid var(--line); cursor:pointer}
.ros-row:last-child{border-bottom:none}
.ros-row:hover{background:#FAFBFF}
.ros-time{flex:0 0 64px; font-weight:700; color:var(--blue); font-size:13.5px}
.ros-body{flex:1; min-width:0}
.ros-body b{font-size:13.5px}
.ros-mc{font-size:12.5px; color:var(--slate); margin-top:3px; font-style:italic}
.ros-photo{font-size:12px; color:var(--amber); margin-top:3px}

/* ---- E8 Checklist ---- */
.ck-row{display:flex; align-items:center; gap:9px; padding:6px 2px}
.ck-box{flex:0 0 auto; width:22px; height:22px; border-radius:6px; border:2px solid var(--line); background:#fff;
  cursor:pointer; color:#fff; font-size:13px; font-weight:700; display:grid; place-items:center; line-height:1}
.ck-box.on{background:var(--green); border-color:var(--green)}
.ck-item{flex:1; font-size:13px; min-width:0}
.ck-item.done{color:var(--muted); text-decoration:line-through}
.ck-qty{font-size:11.5px; color:var(--slate); background:#F1F5F9; padding:2px 8px; border-radius:6px; white-space:nowrap}

/* ---- E7 Leaflet map ---- */
#ow-map{height:520px; border:1px solid var(--line); border-radius:12px; z-index:0}
.leaflet-container{font-family:inherit}

/* ---- Workboard (Asana-like inline-edit + drag-reorder table) ---- */
.wb-group{margin-bottom:20px}
.wb-group-head{display:flex; align-items:center; gap:8px; font-size:14px; font-weight:700; color:var(--dark); margin:0 0 8px}
.wb-group-head .lucide{color:var(--blue); width:18px; height:18px}
table.wb{width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden}
table.wb th{background:#F8FAFC; color:var(--slate); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.03em; padding:8px 8px; text-align:left; border-bottom:1px solid var(--line)}
table.wb td{padding:3px 6px; border-bottom:1px solid var(--line); vertical-align:middle}
table.wb tr:last-child td{border-bottom:none}
.wb-row.wb-dragging{opacity:.4}
.wb-row.wb-over td{box-shadow:inset 0 2px 0 var(--blue)}
.wb-drag{width:26px; color:#CBD5E1; cursor:grab; text-align:center}
.wb-drag:active{cursor:grabbing}
.wb-drag .lucide{width:16px; height:16px}
.wb-del{width:34px; text-align:center}
.wb-delbtn{border:none; background:none; color:#CBD5E1; cursor:pointer; padding:5px; border-radius:6px; line-height:0}
.wb-delbtn:hover{color:var(--red); background:#FEF2F2}
.wb-delbtn .lucide{width:15px; height:15px}
.wb-in{width:100%; border:1px solid transparent; background:transparent; border-radius:7px; padding:7px 8px;
  font-family:inherit; font-size:13px; color:var(--dark)}
.wb-in:hover{background:#F8FAFC}
.wb-in:focus{outline:none; background:#fff; border-color:var(--blue); box-shadow:0 0 0 3px rgba(233,55,53,.12)}
select.wb-in{cursor:pointer}
.wb-in.st-todo,.wb-in.st-pending{color:var(--red); font-weight:600}
.wb-in.st-doing{color:var(--amber); font-weight:600}
.wb-in.st-done{color:var(--green); font-weight:600}
.wb-in.st-skip{color:var(--slate); font-weight:600}
.wb-in.st-R{color:var(--green); font-weight:700} .wb-in.st-A{color:var(--blue); font-weight:700}
.wb-in.st-C{color:var(--amber); font-weight:700} .wb-in.st-I{color:var(--slate); font-weight:700}
.wb-add{margin-top:10px; color:var(--blue); border-style:dashed}
.wb-add .lucide{width:15px; height:15px}
.wb-check{display:grid; place-items:center; width:24px; height:24px; margin:0 auto; border-radius:6px;
  border:2px solid var(--line); background:#fff; color:#fff; cursor:pointer; line-height:0}
.wb-check.on{background:var(--green); border-color:var(--green)}
.wb-check .lucide{width:15px; height:15px}
.wb-url{display:flex; align-items:center; gap:3px}
.wb-url .wb-in{flex:1; min-width:0}
.wb-open{flex:0 0 auto; color:var(--blue); padding:5px; border-radius:6px; line-height:0}
.wb-open:hover{background:#FDEEEE}
.wb-open .lucide{width:15px; height:15px}
/* layered-list group icon (Map) */
.tl-day-head .layer-ic{width:18px;height:18px;vertical-align:-0.18em;margin-right:4px}

/* ---- Mobile ---- */
@media (max-width:860px){
  .ow-has-nav{padding-left:0; padding-top:52px}
  #ow-topbar{display:flex; align-items:center; gap:12px; position:fixed; top:0; left:0; right:0; height:52px;
    background:var(--dark); color:#fff; padding:0 14px; z-index:60}
  #ow-burger{background:none; border:none; color:#fff; font-size:22px; cursor:pointer}
  .ow-topbar-brand{font-weight:700}
  #ow-sidebar{transform:translateX(-100%); transition:transform .2s; top:52px}
  .ow-nav-open #ow-sidebar{transform:translateX(0)}
  #ow-scrim{display:none; position:fixed; inset:52px 0 0 0; background:rgba(0,0,0,.4); z-index:40}
  .ow-nav-open #ow-scrim{display:block}
  .ow-main{padding:18px 16px 60px}
  .row2{grid-template-columns:1fr}
}

/* Venue — layout image + directory */
.vn-layout{background:#fff; border:1px solid var(--line,#E5E7EB); border-radius:14px; padding:14px; margin-bottom:6px}
.vn-imgwrap{text-align:center; background:#F8FAFC; border-radius:10px; padding:8px; min-height:80px; display:flex; align-items:center; justify-content:center}
.vn-img{max-width:100%; max-height:520px; border-radius:8px; box-shadow:0 2px 12px rgba(0,0,0,.12)}
.vn-noimg{color:#94A3B8; font-size:13.5px; display:flex; align-items:center; gap:8px; padding:24px}
.vn-noimg i{width:18px; height:18px}
.vn-ctrl{display:flex; gap:8px; align-items:center; margin-top:10px; flex-wrap:wrap}
.vn-ctrl input{flex:1; min-width:200px; font-family:inherit; font-size:13px; padding:8px 12px; border:1px solid var(--line,#E5E7EB); border-radius:9px}

/* ================= OPLAN — My Tasks ================= */
.my-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 16px}
.my-chip{border:1px solid var(--line,#E2E8F0);background:#fff;border-radius:20px;padding:6px 14px;font:inherit;font-size:13px;cursor:pointer;color:var(--muted,#64748B)}
.my-chip.on{background:var(--blue,#1d4ed8);color:#fff;border-color:var(--blue,#1d4ed8)}
.my-hi{font-size:12.5px;color:var(--muted,#64748B);margin-left:6px}
.my-sec{margin:0 0 16px}
.my-sec-head{display:flex;align-items:center;gap:8px;font-weight:700;font-size:14px;color:var(--dark,#0f172a);margin:0 0 8px}
.my-sec-head i{width:17px;height:17px;color:var(--blue,#1d4ed8)}
.my-c{margin-left:auto;font-size:12px;font-weight:600;color:var(--muted,#64748B);background:#fff;border:1px solid var(--line,#E2E8F0);border-radius:20px;padding:2px 10px}
.my-rows{display:flex;flex-direction:column;gap:6px}
.my-row{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line,#E2E8F0);border-radius:11px;padding:10px 13px;text-decoration:none;color:inherit;transition:all .12s}
.my-row:hover{border-color:var(--blue,#1d4ed8);transform:translateX(2px);box-shadow:0 3px 12px rgba(29,78,216,.08)}
.my-row.done{opacity:.6}
.my-dot{width:9px;height:9px;border-radius:50%;background:var(--amber,#d97706);flex:none}
.my-dot.d{background:var(--green,#16a34a)}
.my-t{flex:1;min-width:0;font-size:13.5px;font-weight:500;color:var(--dark,#0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.my-t small{color:var(--muted,#64748B);font-weight:400;margin-left:8px;font-size:11.5px}
.my-row.done .my-t{text-decoration:line-through}
.my-ev{font-size:11px;background:#EEF2FF;color:#4338CA;border-radius:6px;padding:1px 8px;font-weight:600;white-space:nowrap}
.my-due{font-size:12px;color:var(--muted,#64748B);white-space:nowrap}
.my-st{font-size:11px;font-weight:700;border-radius:20px;padding:2px 10px;white-space:nowrap;background:#FFF7ED;color:#c2620c}
.my-st.done{background:#F0FDF4;color:#16a34a}
.my-chev{width:15px;height:15px;color:#cbd5e1;flex:none}
.my-div{font-size:12px;font-weight:600;color:var(--muted,#64748B);text-align:center;margin:20px 0 12px;letter-spacing:.02em}

/* ================= OPLAN — Project Plan (Asana-style prep timeline) ================= */
.pl-overall{display:flex;align-items:center;gap:10px;min-width:200px}
.pl-overall .bar{flex:1;height:8px;background:#E2E8F0;border-radius:99px;overflow:hidden;min-width:90px}
.pl-overall .bar>i{display:block;height:100%;background:var(--blue);border-radius:99px;transition:width .3s}
.pl-overall b{font-size:12px;color:var(--dark);white-space:nowrap}
.pl-legend{font-size:11.5px;color:var(--muted);margin:-4px 0 14px;display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.pl-legend .k{background:#EEF2FF;color:#4338CA;border-radius:6px;padding:1px 7px;font-weight:700}

/* List view — grouped by due month */
.pl-group{margin-bottom:20px}
.pl-group-head{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;color:var(--dark);margin:0 0 8px;padding-bottom:6px;border-bottom:2px solid var(--blue)}
.pl-group-head .lucide{width:17px;height:17px;color:var(--blue)}
.pl-rows{display:flex;flex-direction:column;gap:6px}
.pl-row{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid var(--line);border-radius:11px;padding:9px 13px;cursor:pointer;transition:all .12s}
.pl-row:hover{border-color:var(--blue);box-shadow:0 3px 12px rgba(233,55,53,.08)}
.pl-row.done{opacity:.62}
.pl-check{width:22px;height:22px;flex:none;border:1.6px solid #CBD5E1;border-radius:50%;display:grid;place-items:center;background:#fff;cursor:pointer;color:#fff;padding:0}
.pl-check.on{background:var(--green);border-color:var(--green)}
.pl-check .lucide{width:14px;height:14px}
.pl-wbs{font-size:11px;font-weight:700;color:var(--muted);background:#F1F5F9;border-radius:6px;padding:2px 7px;flex:none;min-width:34px;text-align:center}
.pl-name{flex:1;min-width:0;font-size:13.5px;font-weight:600;color:var(--dark);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pl-row.done .pl-name{text-decoration:line-through}
.pl-wk{flex:none;font-size:10.5px;font-weight:700;color:#4338CA;background:#EEF2FF;border-radius:6px;padding:2px 7px;white-space:nowrap;min-width:70px;text-align:center}
.pl-wk.cust{color:var(--muted);background:#F1F5F9}
.pl-av{width:26px;height:26px;border-radius:50%;flex:none;display:grid;place-items:center;font-size:10.5px;font-weight:700;color:#fff;background:var(--slate);letter-spacing:-.02em}
.pl-av.none{background:#E2E8F0;color:#94A3B8}
.pl-bar{width:66px;height:7px;background:#E2E8F0;border-radius:99px;overflow:hidden;flex:none}
.pl-bar>i{display:block;height:100%;background:var(--blue);border-radius:99px}
.pl-due{font-size:12px;color:var(--slate);white-space:nowrap;flex:none;min-width:72px;text-align:right}
.pl-due.over{color:var(--red);font-weight:700}
.pl-due.ms{color:var(--amber);font-weight:700}
.pl-st{flex:none}
.pl-chev{width:15px;height:15px;color:#cbd5e1;flex:none}

/* Date-based Gantt (months across the top) */
.gantt-tick.mo{border-left:1px solid #E2E8F0}
.gantt-tick.mo span{font-weight:700;color:var(--slate)}
.gantt-today{position:absolute;top:-4px;bottom:0;width:0;border-left:2px solid var(--red);z-index:3}
.gantt-today span{position:absolute;top:-15px;left:-16px;font-size:9px;font-weight:700;color:var(--red);background:#fff;padding:0 3px;white-space:nowrap}
.gantt-bar.overdue{background:var(--red)}
.gantt-bar.todo{background:#93A3B8}
.gantt-bar.doing{background:var(--blue)}
.gantt-bar .pctfill{position:absolute;inset:0;background:rgba(255,255,255,.28);border-radius:0 5px 5px 0;pointer-events:none}
.gantt-row.done{opacity:.72}
.gantt-label.clk{cursor:pointer}
.gantt-label.clk:hover{color:var(--blue)}
.gantt-owntag{position:absolute;left:calc(100% + 6px);top:50%;transform:translateY(-50%);font-size:10.5px;color:var(--muted);white-space:nowrap}

/* ---- Right detail drawer (Asana task panel) ---- */
.ow-drawer-bg{position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:210;display:none}
.ow-drawer-bg.open{display:block}
.ow-drawer{position:fixed;top:0;right:0;height:100%;width:440px;max-width:94vw;background:#fff;box-shadow:-14px 0 44px rgba(0,0,0,.22);z-index:211;transform:translateX(100%);transition:transform .22s ease;display:flex;flex-direction:column}
.ow-drawer-bg.open .ow-drawer{transform:translateX(0)}
.owd-top{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line)}
.owd-top .owd-status{margin-right:auto}
.owd-x{border:none;background:none;color:var(--muted);cursor:pointer;padding:6px;border-radius:8px;line-height:0}
.owd-x:hover{background:#F1F5F9;color:var(--dark)}
.owd-body{flex:1;overflow:auto;padding:18px}
.owd-wbs{display:inline-block;font-size:11px;font-weight:700;color:#4338CA;background:#EEF2FF;border-radius:6px;padding:2px 8px;margin-bottom:8px}
.owd-title-in{width:100%;font-size:19px;font-weight:700;color:var(--dark);border:1px solid transparent;background:transparent;padding:6px 8px;border-radius:8px;margin:0 0 14px}
.owd-title-in:hover{background:#F8FAFC}
.owd-title-in:focus{background:#fff;border-color:var(--blue)}
.owd-seg{display:inline-flex;border:1px solid var(--line);border-radius:9px;overflow:hidden;margin-bottom:4px}
.owd-seg button{border:none;background:none;padding:7px 15px;font:inherit;font-size:12.5px;font-weight:600;color:var(--slate);cursor:pointer}
.owd-seg button.a-todo.on{background:#93A3B8;color:#fff}
.owd-seg button.a-doing.on{background:var(--amber);color:#fff}
.owd-seg button.a-done.on{background:var(--green);color:#fff}
.owd-range{display:flex;align-items:center;gap:8px}
.owd-range input[type=range]{flex:1}
.owd-range b{font-size:13px;color:var(--dark);min-width:42px;text-align:right}
.owd-dur{font-size:12px;color:var(--muted);margin-top:-6px;margin-bottom:6px}
.owd-formula{font-size:12px;color:var(--slate);background:#FFF8F8;border:1px solid #E0E7FF;border-radius:8px;padding:8px 10px;margin-bottom:14px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;line-height:1.5}
.owd-formula .lucide{width:15px;height:15px;color:var(--blue);flex:none}
.owd-formula .linkbtn{border:none;background:none;color:var(--blue);font:inherit;font-size:12px;font-weight:600;cursor:pointer;padding:0;text-decoration:underline}
.owd-foot{display:flex;gap:10px;align-items:center;padding:14px 18px;border-top:1px solid var(--line)}
@media(max-width:520px){.ow-drawer{width:100%}}
