:root{
  --ws-green-1:#0d8a8a;
  --ws-green-2:#057883;
  --ws-green-3:#016871;
  --ws-yellow-1:#f7eb1a;
  --ws-yellow-2:#efd40f;
  --ws-active-green:#04c44b;
  --ws-navy:#195d7a;
  --ws-blue-deep:#0f1c45;

  --surface-page:#ffffff;
  --surface-tint:#f9f9f9;
  --surface-card:#f4f4f4;
  --surface-panel:#edeeed;
  --border-subtle:#e0e0e0;
  --border-default:#cacfce;
  --text-primary:#14171a;
  --text-body:#4d5654;
  --text-muted:#657574;
  --text-on-brand:#ffffff;

  --shadow-1:2px 0px 16px 0px rgba(0,0,0,0.07);
  --shadow-2:0px 4px 16px 0px rgba(0,0,0,0.10);
  --shadow-3:0px 8px 24px 0px rgba(0,0,0,0.20);
}

*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }
body{
  background:var(--surface-tint);
  font-family:"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- login / no-access screen ---------- */
.ws-login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.ws-login-card{
  width:100%; max-width:380px; background:var(--surface-page); border:1px solid var(--border-subtle);
  border-radius:18px; box-shadow:var(--shadow-2); padding:32px 28px;
}
.ws-login-lockup{ display:flex; align-items:center; gap:10px; margin-bottom:18px; }
.ws-login-word{ font-family:"Manrope",sans-serif; font-weight:800; font-size:20px; letter-spacing:-0.01em; color:var(--text-primary); }
.ws-login-word span{ color:var(--ws-green-1); }
.ws-login-sub{ font-size:14px; color:var(--text-muted); line-height:1.5; margin:0 0 20px; }
.ws-login-error{ background:#fbe9e7; border:1px solid #e3b3ac; color:#8a2f22; font-size:13.5px; border-radius:10px; padding:10px 14px; margin-bottom:16px; }
.ws-login-label{ display:block; font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.04em; margin:0 0 6px; }
.ws-login-input{
  width:100%; border:1px solid var(--border-default); border-radius:10px; padding:11px 14px; font-size:14.5px;
  color:var(--text-primary); background:var(--surface-page); outline:none; margin-bottom:16px; font-family:inherit;
}
.ws-login-input:focus{ border-color:var(--ws-green-1); }
.ws-login-btn{
  display:inline-flex; align-items:center; justify-content:center; width:100%; text-decoration:none;
  border-radius:24px; border:none; padding:12px 20px; margin-top:4px;
  font-family:"Manrope",sans-serif; font-weight:700; font-size:15px; cursor:pointer;
  background:var(--ws-green-1); color:#fff; transition:background .1s ease;
}
.ws-login-btn:hover{ background:var(--ws-green-2); color:#fff; }
.ws-login-btn-link{ margin-top:16px; }
.ws-login-link{
  display:block; text-align:center; margin-top:18px; font-size:13.5px; color:var(--text-muted); text-decoration:none;
}
.ws-login-link:hover{ color:var(--ws-green-1); text-decoration:underline; }
.ws-login-textarea{ resize:vertical; min-height:64px; font-family:inherit; }
.ws-login-honeypot{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
select.ws-login-input{ appearance:none; -webkit-appearance:none; background-repeat:no-repeat; background-position:right 14px center; background-size:9px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' stroke='%23657574' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>"); }

/* ---------- app shell ---------- */
#ws-wip-root *{ box-sizing:border-box; }
#ws-wip-root{
  background:var(--surface-tint);
  color:var(--text-body);
  font-family:"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size:15px;
  line-height:1.5;
  display:flex;
  flex-direction:column;
  min-height:100vh;
}
#ws-wip-root button{ font-family:inherit; cursor:pointer; }
#ws-wip-root input, #ws-wip-root select, #ws-wip-root textarea{ font-family:inherit; }

#ws-wip-root .topbar{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:16px 24px; background:var(--surface-page); border-bottom:1px solid var(--border-subtle); flex-wrap:wrap;
}
#ws-wip-root .lockup{ display:flex; align-items:center; gap:9px; }
#ws-wip-root .lockup .word{ font-family:"Manrope", sans-serif; font-weight:800; font-size:17px; letter-spacing:-0.01em; color:var(--text-primary); white-space:nowrap; }
#ws-wip-root .lockup .word span{ color:var(--ws-green-1); }
#ws-wip-root .topbar-right{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

#ws-wip-root .whoami{
  display:flex; align-items:center; gap:8px;
  border:1px solid var(--border-default); border-radius:20px; padding:6px 14px 6px 6px;
  font-size:13px; color:var(--text-body);
}
#ws-wip-root .whoami .lvl{
  font-family:"Inter",sans-serif; font-weight:700; font-size:10.5px; text-transform:uppercase; letter-spacing:0.04em;
  color:#fff; background:var(--ws-green-1); border-radius:20px; padding:3px 9px;
}
#ws-wip-root .whoami-avatar{
  width:20px; height:20px; border-radius:50%; background:var(--ws-navy); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:9px; font-weight:700; flex-shrink:0;
}
#ws-wip-root .logout-link, #ws-wip-root .text-link{ color:var(--text-muted); font-size:13px; text-decoration:none; padding:8px 6px; }
#ws-wip-root .logout-link:hover, #ws-wip-root .text-link:hover{ color:var(--ws-green-1); text-decoration:underline; }

#ws-wip-root .btn{
  display:inline-flex; align-items:center; gap:7px;
  border-radius:24px; border:none; padding:10px 20px;
  font-family:"Manrope",sans-serif; font-weight:700; font-size:14.5px;
  transition:transform .08s ease;
}
#ws-wip-root .btn:active{ transform:scale(0.97); }
#ws-wip-root .btn-primary{ background:var(--ws-green-1); color:var(--text-on-brand); }
#ws-wip-root .btn-primary:hover{ background:var(--ws-green-2); }
#ws-wip-root .btn-ghost{ background:transparent; color:var(--text-muted); border:1px solid var(--border-default); }
#ws-wip-root .btn-ghost:hover{ background:var(--surface-card); color:var(--text-primary); }
#ws-wip-root .btn-danger{ background:transparent; color:#c0392b; border:1px solid #e3b3ac; }
#ws-wip-root .btn-danger:hover{ background:#fbe9e7; }
#ws-wip-root .btn-sm{ padding:7px 15px; font-size:13px; }
#ws-wip-root .btn:disabled{ opacity:0.55; cursor:default; transform:none; }

#ws-wip-root .filterbar{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:14px 24px; background:var(--surface-page); border-bottom:1px solid var(--border-subtle);
}
#ws-wip-root .search{
  display:flex; align-items:center; gap:8px;
  background:var(--surface-tint); border:1px solid var(--border-subtle); border-radius:20px;
  padding:8px 14px; min-width:220px;
}
#ws-wip-root .search svg{ flex-shrink:0; color:var(--text-muted); }
#ws-wip-root .search input{ border:none; background:transparent; outline:none; color:var(--text-primary); font-size:14px; width:100%; box-shadow:none; }
#ws-wip-root .search input::placeholder{ color:var(--text-muted); }
#ws-wip-root .filter-spacer{ flex:1; }
#ws-wip-root .result-count{ font-size:13px; color:var(--text-muted); white-space:nowrap; }

#ws-wip-root .filter-dd{ position:relative; flex-shrink:0; }
#ws-wip-root .filter-dd-btn{
  display:inline-flex; align-items:center; gap:7px;
  border:1px solid var(--border-default); background:var(--surface-page); color:var(--text-body);
  border-radius:20px; padding:8px 14px; font-size:13px; font-weight:500; white-space:nowrap;
}
#ws-wip-root .filter-dd-btn:hover{ border-color:var(--ws-green-1); }
#ws-wip-root .filter-dd-btn svg{ transition:transform .12s ease; flex-shrink:0; color:var(--text-muted); }
#ws-wip-root .filter-dd.open .filter-dd-btn svg{ transform:rotate(180deg); }
#ws-wip-root .filter-dd-btn.active{ background:var(--ws-green-1); border-color:var(--ws-green-1); color:#fff; }
#ws-wip-root .filter-dd-btn.active svg{ color:#fff; }
#ws-wip-root .filter-dd-panel{
  display:none; position:absolute; top:calc(100% + 8px); left:0; min-width:220px; max-height:320px; overflow-y:auto;
  background:var(--surface-page); border:1px solid var(--border-subtle); border-radius:12px; box-shadow:var(--shadow-2);
  padding:6px; z-index:40;
}
#ws-wip-root .filter-dd.open .filter-dd-panel{ display:block; }
#ws-wip-root .filter-dd-option{
  display:flex; align-items:center; gap:9px; padding:8px 9px; border-radius:8px; font-size:13.5px; color:var(--text-body); cursor:pointer;
}
#ws-wip-root .filter-dd-option:hover{ background:var(--surface-tint); }
#ws-wip-root .filter-dd-option.selected{ color:var(--text-primary); font-weight:600; }
#ws-wip-root .filter-dd-option .box{
  width:15px; height:15px; border-radius:5px; border:1.5px solid var(--border-default); flex-shrink:0;
  display:flex; align-items:center; justify-content:center; color:#fff;
}
#ws-wip-root .filter-dd-option.selected .box{ background:var(--ws-green-1); border-color:var(--ws-green-1); }
#ws-wip-root .filter-dd-option .box svg{ display:none; }
#ws-wip-root .filter-dd-option.selected .box svg{ display:block; }
#ws-wip-root .filter-dd-option .dd-dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }

#ws-wip-root .board-wrap{ flex:1; overflow-x:auto; padding:20px 24px 32px; }
#ws-wip-root .col-dot{ width:9px; height:9px; border-radius:50%; flex-shrink:0; }

#ws-wip-root .tscroll{ overflow-x:auto; }
#ws-wip-root .list-inner{ min-width:980px; }
#ws-wip-root .list-grid-row{ display:grid; grid-template-columns:2fr 84px 0.9fr 66px 1fr 50px 150px 100px; gap:12px; align-items:center; }
#ws-wip-root .priority-pill{
  display:inline-block; padding:3px 10px; border-radius:20px; font-family:"Inter",sans-serif;
  font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.03em; color:#fff; white-space:nowrap;
}
#ws-wip-root .list-hours{ font-size:12.5px; color:var(--text-muted); font-variant-numeric:tabular-nums; white-space:nowrap; }
#ws-wip-root .list-header-row{
  padding:10px 16px; margin-bottom:10px;
  font-family:"Inter",sans-serif; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-muted);
}
#ws-wip-root .sort-btn{
  background:none; border:none; padding:0; margin:0; cursor:pointer; display:inline-flex; align-items:center; gap:4px;
  font-family:inherit; font-size:inherit; font-weight:inherit; text-transform:inherit; letter-spacing:inherit; color:inherit; box-shadow:none;
}
#ws-wip-root .sort-btn:hover{ color:var(--text-primary); }
#ws-wip-root .sort-btn .sort-arrow{ font-size:9px; width:8px; display:inline-block; opacity:0; color:var(--ws-green-1); }
#ws-wip-root .sort-btn.active{ color:var(--text-primary); }
#ws-wip-root .sort-btn.active .sort-arrow{ opacity:1; }
#ws-wip-root .stage-block{
  background:var(--surface-page); border:1px solid var(--border-subtle); border-radius:14px;
  margin-bottom:16px; overflow:hidden; box-shadow:var(--shadow-1); transition:border-color .12s ease, background .12s ease;
}
#ws-wip-root .stage-block.dragover{ border-color:var(--ws-green-1); background:var(--surface-tint); }
#ws-wip-root .stage-block-head{ display:flex; align-items:center; gap:9px; padding:13px 16px; border-bottom:1px solid var(--border-subtle); cursor:pointer; user-select:none; }
#ws-wip-root .stage-block.collapsed .stage-block-head{ border-bottom:none; }
#ws-wip-root .stage-block-head .col-dot{ width:9px; height:9px; }
#ws-wip-root .stage-block-head .glabel{ font-family:"Manrope",sans-serif; font-weight:700; font-size:14.5px; color:var(--text-primary); }
#ws-wip-root .stage-block-head .gcount{ font-family:"Inter",sans-serif; font-size:12px; font-weight:600; color:var(--text-muted); background:var(--surface-tint); border-radius:10px; padding:2px 9px; }
#ws-wip-root .stage-chevron{ margin-left:auto; color:var(--text-muted); transition:transform .15s ease; flex-shrink:0; }
#ws-wip-root .stage-block.collapsed .stage-chevron{ transform:rotate(-90deg); }
#ws-wip-root .list-grid-row.list-row{ padding:12px 16px; cursor:pointer; touch-action:none; }
#ws-wip-root .list-grid-row.list-row.draggable{ cursor:grab; }
#ws-wip-root .list-grid-row.list-row.dragging{ opacity:0.35; cursor:grabbing; }

body.ws-wip-dragging, body.ws-wip-dragging *{ cursor:grabbing !important; }
body.ws-wip-dragging{ user-select:none; }
.drag-ghost{
  position:fixed; top:0; left:0; z-index:2000; pointer-events:none;
  display:flex; flex-direction:column; align-items:flex-start; gap:6px;
  width:240px; padding:12px 14px; border-radius:13px;
  background:var(--surface-page); border:1px solid var(--border-subtle);
  box-shadow:var(--shadow-3); transform:rotate(-2deg); will-change:left, top;
}
.drag-ghost-title{
  font-family:"Manrope",sans-serif; font-weight:700; font-size:14px; color:var(--text-primary);
  line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.drag-ghost-module{ font-size:12px; color:var(--text-muted); }
#ws-wip-root .list-grid-row.list-row:hover{ background:var(--surface-tint); }
#ws-wip-root .list-grid-row.list-row + .list-grid-row.list-row{ border-top:1px solid var(--border-subtle); }
#ws-wip-root .list-title-cell{ display:flex; align-items:center; gap:8px; min-width:0; }
#ws-wip-root .list-title{ font-family:"Manrope",sans-serif; font-weight:700; font-size:14.5px; color:var(--text-primary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#ws-wip-root .list-stale-dot{ width:7px; height:7px; border-radius:50%; background:#c99700; flex-shrink:0; }
#ws-wip-root .list-module{ font-size:12.5px; color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#ws-wip-root .list-owner{ display:flex; align-items:center; gap:7px; white-space:nowrap; min-width:0; }
#ws-wip-root .list-owner .owner-name{ font-size:13px; color:var(--text-body); overflow:hidden; text-overflow:ellipsis; }
#ws-wip-root .list-updated{ font-size:12.5px; color:var(--text-muted); white-space:nowrap; }
#ws-wip-root .list-empty{ padding:40px 16px; text-align:center; color:var(--text-muted); font-size:14px; }
#ws-wip-root .stage-block-empty{ padding:13px 16px; color:var(--text-muted); font-size:13px; font-style:italic; }

#ws-wip-root .avatar{ width:22px; height:22px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:9.5px; font-weight:700; color:#fff; }
#ws-wip-root .owner-name{ font-size:12.5px; color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#ws-wip-root .figma-btn{ display:flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:8px; border:1px solid var(--border-subtle); background:var(--surface-tint); color:var(--text-body); flex-shrink:0; text-decoration:none; }
#ws-wip-root .figma-btn:hover{ border-color:var(--ws-green-1); color:var(--ws-green-1); }
#ws-wip-root .status-select{
  appearance:none; -webkit-appearance:none; border:none; border-radius:20px; padding:5px 24px 5px 11px; font-size:12px; font-weight:600;
  background-repeat:no-repeat; background-position:right 8px center; background-size:9px; box-shadow:none; min-height:0; line-height:normal;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' stroke='%23ffffffaa' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
  width:fit-content; max-width:100px; justify-self:start; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
#ws-wip-root .status-select:disabled{ opacity:0.85; }

#ws-wip-root .overlay{ position:fixed; inset:0; background:rgba(10,14,13,0.45); display:flex; align-items:center; justify-content:center; padding:20px; z-index:1000; opacity:0; pointer-events:none; transition:opacity .15s ease; }
#ws-wip-root .overlay.open{ opacity:1; pointer-events:auto; }
#ws-wip-root .modal{ background:var(--surface-page); border-radius:16px; width:100%; max-width:440px; padding:24px; box-shadow:var(--shadow-3); max-height:88vh; overflow-y:auto; }
#ws-wip-root .modal.modal-wide{ max-width:560px; }
#ws-wip-root .modal.modal-sm{ max-width:380px; }
#ws-wip-root .activity-row{ display:flex; align-items:flex-start; gap:10px; padding:11px 0; border-bottom:1px solid var(--border-subtle); }
#ws-wip-root .activity-row:last-child{ border-bottom:none; }
#ws-wip-root .activity-body{ flex:1; min-width:0; }
#ws-wip-root .activity-summary{ font-size:13.5px; color:var(--text-body); line-height:1.45; }
#ws-wip-root .activity-summary strong{ color:var(--text-primary); }
#ws-wip-root .activity-dot{ display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:6px; vertical-align:middle; }
#ws-wip-root .activity-time{ font-size:12px; color:var(--text-muted); margin-top:3px; }
#ws-wip-root .activity-loading{ padding:24px; text-align:center; color:var(--text-muted); font-size:13.5px; }
#ws-wip-root .modal h3{ font-family:"Manrope",sans-serif; font-size:19px; font-weight:700; color:var(--text-primary); margin:0 0 18px; }
#ws-wip-root .field{ margin-bottom:14px; }
#ws-wip-root .field label{ display:block; font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.04em; margin-bottom:6px; }
#ws-wip-root .field input, #ws-wip-root .field select, #ws-wip-root .field textarea{ width:100%; border:1px solid var(--border-default); border-radius:10px; padding:9px 12px; font-size:14px; color:var(--text-primary); background:var(--surface-page); outline:none; box-shadow:none; }
#ws-wip-root .field input:disabled, #ws-wip-root .field select:disabled, #ws-wip-root .field textarea:disabled{ background:var(--surface-tint); color:var(--text-muted); }
#ws-wip-root .field input:focus, #ws-wip-root .field select:focus, #ws-wip-root .field textarea:focus{ border-color:var(--ws-green-1); }
#ws-wip-root .field textarea{ resize:vertical; min-height:56px; }
#ws-wip-root .field input.field-invalid, #ws-wip-root .field select.field-invalid{ border-color:#c0392b; }
#ws-wip-root .field-error{ color:#c0392b; font-size:12px; margin-top:6px; }
#ws-wip-root .field-row{ display:flex; gap:10px; }
#ws-wip-root .field-row .field{ flex:1; }
#ws-wip-root .modal-actions{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:20px; }
#ws-wip-root .modal-actions-right{ display:flex; gap:8px; }

#ws-wip-root .stage-row{ display:flex; align-items:center; gap:8px; padding:7px 0; }
#ws-wip-root .stage-row input{ flex:1; border:1px solid var(--border-default); border-radius:8px; padding:7px 10px; font-size:14px; color:var(--text-primary); background:var(--surface-page); outline:none; box-shadow:none; }
#ws-wip-root .stage-row input:focus{ border-color:var(--ws-green-1); }
#ws-wip-root .icon-btn{ width:26px; height:26px; border-radius:7px; border:1px solid var(--border-subtle); background:var(--surface-page); color:var(--text-muted); display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
#ws-wip-root .icon-btn:hover:not(:disabled){ border-color:var(--ws-green-1); color:var(--ws-green-1); }
#ws-wip-root .icon-btn:disabled{ opacity:0.35; cursor:default; }
#ws-wip-root .icon-btn.danger:hover:not(:disabled){ border-color:#c0392b; color:#c0392b; }
#ws-wip-root .hint{ font-size:12.5px; color:var(--text-muted); margin:2px 0 0; }
#ws-wip-root .loading-state{ padding:60px 24px; text-align:center; color:var(--text-muted); font-size:14px; }
#ws-wip-root .error-state{ padding:16px 24px; margin:20px 24px; background:#fbe9e7; border:1px solid #e3b3ac; border-radius:12px; color:#8a2f22; font-size:13.5px; }

#ws-wip-root .req-badge{
  display:inline-flex; align-items:center; justify-content:center; min-width:17px; height:17px; padding:0 5px;
  border-radius:20px; background:#c0392b; color:#fff; font-size:11px; font-weight:700; margin-left:2px;
}
#ws-wip-root .request-row{ padding:14px 0; border-bottom:1px solid var(--border-subtle); }
#ws-wip-root .request-row:last-child{ border-bottom:none; }
#ws-wip-root .request-top{ display:flex; align-items:flex-start; gap:10px; }
#ws-wip-root .request-who{ flex:1; min-width:0; }
#ws-wip-root .request-name{ font-family:"Manrope",sans-serif; font-weight:700; font-size:14px; color:var(--text-primary); }
#ws-wip-root .request-email{ font-family:"Inter",sans-serif; font-weight:400; font-size:12.5px; color:var(--text-muted); }
#ws-wip-root .request-meta{ font-size:12.5px; color:var(--text-muted); margin-top:2px; }
#ws-wip-root .request-note{ font-size:13px; color:var(--text-body); font-style:italic; margin:8px 0 0 42px; }
#ws-wip-root .request-actions{ display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:10px; }
#ws-wip-root .request-role-label{ font-size:11.5px; font-weight:600; text-transform:uppercase; letter-spacing:0.03em; color:var(--text-muted); margin-right:-2px; }
#ws-wip-root .req-role-select{ margin-right:auto; }
#ws-wip-root .request-resolved-note{ font-size:12px; color:var(--text-muted); }
#ws-wip-root .approval-notice{
  background:var(--surface-tint); border:1px solid var(--ws-green-1); border-radius:12px; padding:12px 14px; margin-bottom:14px; font-size:13.5px; color:var(--text-body);
}
#ws-wip-root .approval-notice-link{ display:flex; gap:8px; margin-top:8px; }
#ws-wip-root .approval-notice-link input{
  flex:1; border:1px solid var(--border-default); border-radius:8px; padding:7px 10px; font-size:12.5px; color:var(--text-muted); background:var(--surface-page);
}

@media (max-width:782px){
  #ws-wip-root .topbar{ padding:14px 16px; }
  #ws-wip-root .filterbar{ padding:12px 16px; }
  #ws-wip-root .board-wrap{ padding:16px; }
}
