:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --surface-3: #ecedf0;
  --text: #1a1a2e;
  --text-2: #3c3c50;
  --text-muted: #7c7c8a;
  --text-dim: #a0a0ad;
  --accent: #e8366d;
  --accent-hover: #d42d60;
  --accent-light: #fef2f5;
  --accent-glow: rgba(232,54,109,.06);
  --accent-border: rgba(232,54,109,.2);
  --green: #10b981; --green-bg: rgba(16,185,129,.08);
  --blue: #3b82f6; --blue-bg: rgba(59,130,246,.08);
  --orange: #f59e0b; --orange-bg: rgba(245,158,11,.08);
  --red: #ef4444; --red-bg: rgba(239,68,68,.06);
  --purple: #8b5cf6; --purple-bg: rgba(139,92,246,.08);
  --role-adm: #e11d48; --role-adm-bg: rgba(225,29,72,.08);
  --role-be: #3b82f6; --role-be-bg: rgba(59,130,246,.08);
  --role-fe: #10b981; --role-fe-bg: rgba(16,185,129,.08);
  --role-mob: #e8366d; --role-mob-bg: rgba(232,54,109,.08);
  --role-and: #34a853; --role-and-bg: rgba(52,168,83,.08);
  --role-ios: #007aff; --role-ios-bg: rgba(0,122,255,.08);
  --role-qa: #f59e0b; --role-qa-bg: rgba(245,158,11,.08);
  --role-des: #8b5cf6; --role-des-bg: rgba(139,92,246,.08);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.1);
  --shadow-xl: 0 24px 48px rgba(0,0,0,.12);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); overflow: hidden; height: 100vh; -webkit-font-smoothing: antialiased; }
input, button, select, textarea { font-family: inherit; }
::selection { background: rgba(232,54,109,.14); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.18); }

/* ===== LAYOUT ===== */
.app { display: flex; height: 100vh; flex-direction: column; }
.body-wrap { display: flex; flex: 1; overflow: hidden; }

/* ===== TOPBAR ===== */
.topbar { height: 52px; background: rgba(255,255,255,.85); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); border-bottom: 1px solid rgba(0,0,0,.06); display: flex; align-items: center; padding: 0 16px; gap: 12px; flex-shrink: 0; position: relative; z-index: 50; }
.topbar .logo { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; letter-spacing: -.5px; }
.topbar .logo-icon { width: 28px; height: 28px; background: linear-gradient(135deg, #e8366d, #d42d60); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 800; position: relative; }
.topbar .logo-icon::after { content: ''; position: absolute; top: 5px; right: 6px; width: 4px; height: 4px; background: rgba(255,255,255,.5); border-radius: 50%; }
.topbar .logo-text { color: var(--text); font-weight: 800; letter-spacing: -.5px; }
.topbar .sep { width: 1px; height: 18px; background: var(--surface-3); }
.squad-sel { background: var(--surface-2); border: none; border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: all .15s; }
.squad-sel:hover { background: var(--accent-glow); color: var(--accent); }
.search-trigger { flex: 1; max-width: 380px; margin: 0 auto; }
.search-trigger button { width: 100%; background: var(--surface-2); border: none; border-radius: 8px; padding: 7px 14px; font-size: 13px; color: var(--text-dim); cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all .15s; text-align: left; }
.search-trigger button:hover { background: var(--accent-glow); color: var(--text-muted); }
.search-trigger button kbd { margin-left: auto; background: var(--surface-3); border-radius: 5px; padding: 2px 6px; font-size: 10px; font-weight: 500; border: none; }
.topbar .icon-btn { width: 32px; height: 32px; border-radius: 8px; border: none; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.topbar .icon-btn:hover { background: var(--accent-glow); color: var(--accent); }
.topbar .avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--purple)); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(232,54,109,.2); transition: transform .15s; }
.topbar .avatar:hover { transform: scale(1.05); }

/* ===== SIDEBAR ===== */
.sidebar { width: 200px; background: var(--surface); border-right: 1px solid rgba(0,0,0,.04); padding: 12px 0; flex-shrink: 0; display: flex; flex-direction: column; }
.nav-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-dim); padding: 14px 14px 6px; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 8px 14px; margin: 1px 8px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all .12s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-glow); color: var(--accent); font-weight: 600; }
.nav-item .ni { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; opacity: .45; }
.nav-item .ni svg { width: 16px; height: 16px; }
.nav-item.active .ni { opacity: 1; }
.nav-item.nav-sub { padding-left: 40px; font-size: 12px; }
.nav-item.nav-sub .ni { width: 15px; height: 15px; }
.nav-item.nav-sub .ni svg { width: 14px; height: 14px; }
.nav-bottom { margin-top: auto; padding: 12px 14px; border-top: 1px solid var(--surface-2); }
.nav-bottom .hint { font-size: 11px; color: var(--text-dim); line-height: 1.6; }
.nav-bottom kbd { background: var(--surface-2); border-radius: 4px; padding: 1px 5px; font-size: 10px; font-weight: 500; }

/* ===== MAIN ===== */
.main { flex: 1; overflow: hidden; position: relative; background: var(--bg); }
.view { display: none; height: 100%; flex-direction: column; overflow-y: auto; }
.view.active { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== BOARD FILTERS ===== */
.board-filters { display: flex; gap: 6px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--surface-2); box-shadow: var(--shadow-xs); flex-wrap: wrap; align-items: center; flex-shrink: 0; position: relative; z-index: 10; }
.fbtn { background: var(--surface-2); border: none; border-radius: 8px; padding: 6px 12px; font-size: 11px; color: var(--text-muted); cursor: pointer; font-weight: 500; transition: all .15s; position: relative; }
.fbtn:hover { background: var(--surface-3); color: var(--text-2); }
.fbtn.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.fbtn-preset { font-weight: 600; }
.fbtn .filter-count { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; margin-left: 4px; }
.board-search { width: 200px; background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: 8px; padding: 6px 10px 6px 30px; font-size: 11px; color: var(--text); outline: none; transition: all .15s; font-family: inherit; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px center; }
.board-search:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px rgba(232,54,109,.06); background-color: var(--surface); width: 260px; }

/* ===== FILTER DROPDOWN ===== */
.filter-dropdown { position: absolute; top: 100%; left: 0; margin-top: 4px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 8px; min-width: 180px; z-index: 100; animation: dropIn .15s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.filter-dropdown label { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background .1s; }
.filter-dropdown label:hover { background: var(--surface-2); }
.filter-dropdown input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; }
.filter-dropdown .fd-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); padding: 4px 10px 2px; }

/* ===== BOARD ===== */
.board-scroll { flex: 1; overflow: auto; padding: 20px 24px; }

/* ===== ROLE SWITCHER ===== */
.role-switcher-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.role-label { font-size: 10px; font-weight: 600; color: var(--text-muted); background: var(--surface-2); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.role-switcher { position: absolute; top: 100%; right: 0; margin-top: 8px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; min-width: 220px; z-index: 100; animation: dropIn .15s ease; }
.rs-item { padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .1s; }
.rs-item:hover { background: var(--surface-2); }
.rs-item.current { background: var(--accent-glow); color: var(--accent); font-weight: 600; }
.rs-item .rs-av { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0; }

/* ===== TIMING ===== */
.tcard .cycle-ind { font-size: 9px; color: var(--blue); display: inline-flex; align-items: center; gap: 3px; background: var(--blue-bg); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.timing-section { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.timing-card { background: var(--surface-2); border-radius: var(--radius); padding: 10px 14px; flex: 1; min-width: 100px; }
.timing-card .tm-label { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.timing-card .tm-val { font-size: 16px; font-weight: 700; margin-top: 2px; letter-spacing: -.3px; }
.timing-card .tm-val.green { color: var(--green); }
.timing-card .tm-val.blue { color: var(--blue); }
.timing-timeline { margin-top: 8px; }
.timing-timeline .tl-item { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 11px; }
.timing-timeline .tl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.timing-timeline .tl-status { font-weight: 600; color: var(--text-2); min-width: 80px; }
.timing-timeline .tl-time { color: var(--text-dim); }
.tcard.no-drag { cursor: default; }
.tcard.no-drag:hover { transform: none; }

/* ===== SWIMLANE ===== */
.swimlane { background: var(--surface); border-radius: var(--radius-lg); margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.swim-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; transition: background .15s; border-bottom: 1px solid var(--surface-2); }
.swim-header:hover { background: var(--accent-glow); }
.swimlane-toggle { font-size: 12px; color: var(--text-dim); cursor: pointer; padding: 4px 6px; border-radius: 4px; transition: background .15s, color .15s; user-select: none; flex-shrink: 0; }
.swimlane-toggle:hover { background: var(--surface-2); color: var(--text); }
.swimlane.collapsed .swim-header { border-bottom: none; }
.swim-header .fc-id, .swim-header .fc-name { cursor: pointer; }
.swim-header .fc-id { font-size: 11px; color: var(--text-dim); font-family: 'Inter', monospace; font-weight: 600; background: var(--surface-2); padding: 3px 8px; border-radius: 5px; flex-shrink: 0; }
.swim-header .fc-name { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fc-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.swim-header .fc-prog { width: 100px; height: 5px; background: var(--surface-3); border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.swim-header .fc-prog-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #f472b6); transition: width .3s ease; }
.swim-header .fc-pct { font-size: 12px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.swim-header .fc-chips { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.fc-chip { font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: opacity .15s, box-shadow .15s; }
.fc-chip:hover { opacity: .85; box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.fc-chip.active-filter { box-shadow: 0 0 0 2px currentColor; }
.fc-dates { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

/* ===== COLUMNS ===== */
.board-cols { display: flex; min-height: 140px; gap: 0; overflow-x: auto; padding: 0 4px; }
.board-col { flex: 1 1 0; min-width: 150px; padding: 12px; transition: background .15s; border-radius: 6px; margin: 8px 4px 12px; }
.col-head { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); padding: 0 4px 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--surface-2); margin-bottom: 10px; }
.col-head .col-count { display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 9px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; color: var(--text-dim); }
.col-empty { border: 2px dashed var(--surface-3); border-radius: var(--radius); padding: 24px 8px; text-align: center; font-size: 11px; color: var(--text-dim); opacity: .5; }

/* ===== TICKET CARD ===== */
.tcard { background: var(--surface); border: 1px solid var(--surface-3); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; cursor: grab; transition: all .18s ease; position: relative; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04); }
.tcard:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tcard .pri { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 0 2px 2px 0; }
.tcard .th { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tcard .tid { font-size: 10px; color: var(--text-dim); font-family: 'Inter', monospace; font-weight: 500; }
.tcard .tt { font-size: 12.5px; font-weight: 600; line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.tcard .tf { display: flex; justify-content: space-between; align-items: center; }
.tcard .av { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tcard .av.unassigned { background: transparent; border: 2px dashed var(--surface-3); color: var(--text-dim); font-size: 10px; box-shadow: none; }
.card-pickup-label { font-size: 9px; color: var(--orange); font-weight: 600; letter-spacing: .2px; }
.btn-pickup { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 6px; border: none; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn-pickup:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(232,54,109,.3); }
.tcard .sp { font-size: 10px; font-weight: 600; color: var(--text-dim); background: var(--surface-2); padding: 2px 8px; border-radius: 5px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 600; letter-spacing: .2px; }
.type-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; letter-spacing: .2px; }
.type-badge.type-task { background: var(--blue-bg); color: var(--blue); }
.type-badge.type-bug { background: var(--red-bg); color: var(--red); }

/* Card states */
.tcard.dragging { opacity: .4; transform: scale(.97); box-shadow: var(--shadow-xs); }
.tcard.focused { box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); transform: translateY(-2px); }
.board-col.drag-over { background: var(--accent-glow); border-radius: var(--radius); outline: 2px dashed var(--accent-border); outline-offset: -2px; }

/* Card animation */
.tcard { animation: cardIn .25s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== STATUS BADGES ===== */
.status-badge { padding: 3px 9px; border-radius: 6px; font-size: 10px; font-weight: 600; display: inline-block; letter-spacing: .1px; cursor: default; }
.sb-todo { background: var(--surface-2); color: var(--text-muted); }
.sb-prog { background: var(--blue-bg); color: var(--blue); }
.sb-review { background: var(--purple-bg); color: var(--purple); }
.sb-done { background: var(--green-bg); color: var(--green); }
.sb-ready-uat { background: rgba(6,182,212,.08); color: #0891b2; }
.sb-released { background: rgba(16,185,129,.15); color: #059669; }
.sb-blocked { background: var(--red-bg); color: var(--red); }
.sb-pending { background: rgba(245,158,11,.1); color: #d97706; }
.sb-approved { background: rgba(16,185,129,.1); color: #059669; }
.sb-approved-comments { background: rgba(59,130,246,.1); color: #2563eb; }
.sb-rejected { background: rgba(239,68,68,.08); color: #dc2626; }
.sb-feat-done { background: rgba(16,185,129,.18); color: #047857; }

/* ===== FEATURE STATUS DROPDOWN ===== */
.fc-status-dropdown-wrap { display: inline-block; position: relative; }
.fc-status-btn { cursor: pointer !important; }
.fc-status-btn:hover { opacity: .85; }
.fc-status-dd { position: absolute; top: 100%; left: 0; margin-top: 4px; background: var(--surface); border: 1px solid var(--surface-3); border-radius: var(--radius); box-shadow: var(--shadow-md); z-index: 100; min-width: 150px; padding: 4px; }
.fc-status-dd .sd-item { padding: 6px 10px; border-radius: 6px; cursor: pointer; transition: background .12s; }
.fc-status-dd .sd-item:hover { background: var(--surface-2); }
.fc-status-dd .sd-item.current { background: var(--surface-2); }

/* Feature detail review actions */
.fd-review-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.fd-action-approve { background: var(--green, #22c55e); color: #fff; padding: 8px 20px; border-radius: 8px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; transition: all .12s; }
.fd-action-approve:hover { background: #16a34a; box-shadow: 0 2px 8px rgba(34,197,94,.25); }
.fd-action-comments { background: transparent; color: var(--text); padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 600; border: 1px solid var(--surface-3); cursor: pointer; transition: all .12s; }
.fd-action-comments:hover { border-color: var(--text-dim); background: var(--surface-1); }
.fd-action-reject { background: transparent; color: var(--red, #ef4444); padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 600; border: 1px solid rgba(239,68,68,.2); cursor: pointer; transition: all .12s; }
.fd-action-reject:hover { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.4); }

/* ===== BUTTONS ===== */
.btn { padding: 8px 16px; border-radius: var(--radius); font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: all .15s; }
.btn-ghost { background: var(--surface-2); color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text-2); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 4px rgba(232,54,109,.25); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 3px 10px rgba(232,54,109,.3); transform: translateY(-.5px); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: rgba(239,68,68,.12); }

/* ===== OVERLAY BASE ===== */
.overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 200px; background: rgba(0,0,0,.18); z-index: 200; display: none; backdrop-filter: blur(6px) saturate(120%); -webkit-backdrop-filter: blur(6px) saturate(120%); }
.overlay.open { display: flex; }
.overlay-right { justify-content: flex-end; }
.overlay-center { justify-content: center; align-items: center; }
.overlay-top { justify-content: center; padding-top: 12vh; }

/* Delete Confirmation Modal */
.delete-confirm-panel { background: #fff; border-radius: 16px; padding: 32px; max-width: 380px; width: 90%; text-align: center; animation: modalIn .2s ease; box-shadow: 0 20px 60px rgba(0,0,0,.12); }
.dcp-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--red-bg, rgba(239,68,68,.08)); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.dcp-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; letter-spacing: -.2px; }
.dcp-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 24px; }
.dcp-actions { display: flex; gap: 8px; justify-content: center; }
.dcp-cancel { padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; border: 1px solid var(--surface-3); background: transparent; color: var(--text-muted); cursor: pointer; transition: all .12s; }
.dcp-cancel:hover { border-color: var(--text-dim); color: var(--text); }
.dcp-delete { padding: 8px 24px; border-radius: 8px; font-size: 13px; font-weight: 600; border: none; background: var(--red, #ef4444); color: #fff; cursor: pointer; transition: all .12s; }
.dcp-delete:hover { background: #dc2626; box-shadow: 0 2px 8px rgba(239,68,68,.3); }

/* Version Prompt (Release) */
.version-prompt-panel { background: #fff; border-radius: 16px; padding: 32px; max-width: 400px; width: 90%; text-align: center; animation: modalIn .2s ease; box-shadow: 0 20px 60px rgba(0,0,0,.12); }
.vp-icon { width: 52px; height: 52px; border-radius: 50%; background: rgba(232,54,109,.08); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.vp-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: -.2px; }
.vp-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }
.vp-input { width: 100%; padding: 10px 14px; border: 1px solid var(--surface-3); border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text); background: var(--surface); outline: none; transition: border-color .15s; box-sizing: border-box; text-align: center; }
.vp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,54,109,.08); }
.vp-input::placeholder { color: var(--text-dim); }
.vp-actions { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.vp-cancel { padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.vp-confirm { padding: 8px 24px; border-radius: 8px; font-size: 13px; font-weight: 600; }

/* ===== TICKET DETAIL PANEL ===== */
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.ticket-panel { width: 500px; height: 100%; background: var(--surface); box-shadow: -16px 0 48px rgba(0,0,0,.06); display: flex; flex-direction: column; animation: slideIn .2s cubic-bezier(.16,1,.3,1); overflow: hidden; }
.ticket-panel.expanded { width: 100%; max-width: 100%; box-shadow: none; animation: none; }
.ticket-panel.expanded .tp-head { max-width: 800px; }
.ticket-panel.expanded .tp-meta { max-width: 800px; }
.ticket-panel.expanded .tp-tabs { padding: 0 24px; }
.ticket-panel.expanded .tp-tab-content > div { max-width: 800px; }
.tp-head { padding: 20px 24px; flex-shrink: 0; border-bottom: 1px solid var(--surface-2); }
.tp-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.tp-close-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tp-id { font-size: 11px; color: var(--text-dim); font-family: 'Inter', monospace; font-weight: 500; background: var(--surface-2); padding: 3px 8px; border-radius: 5px; }
.tp-feature-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--accent); cursor: pointer; padding: 4px 8px; margin: 6px 0 0; border-radius: 6px; transition: background .12s; }
.tp-feature-link:hover { background: var(--accent-glow); }
.tp-feature-link svg { opacity: .7; stroke: var(--accent); }
.tp-feature-name { color: var(--text-muted); font-weight: 500; }
.tp-title { font-size: 18px; font-weight: 700; margin: 8px 0 12px; line-height: 1.35; letter-spacing: -.2px; cursor: pointer; padding: 4px 6px; margin: 4px -6px 8px; border-radius: 6px; transition: background .15s; }
.tp-title:hover { background: var(--surface-2); }
.tp-title.editing { background: var(--surface-2); outline: 2px solid var(--accent); outline-offset: 0; }
.tp-badges { display: flex; gap: 6px; align-items: center; }
.tp-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 24px 8px; flex-shrink: 0; }
.tp-meta-item { background: var(--surface-2); border-radius: var(--radius); padding: 10px 14px; font-size: 11px; flex: 1; min-width: 90px; }
.tp-meta-item .tl { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.tp-meta-item .tv { font-weight: 600; margin-top: 3px; }
.tp-meta-item.clickable { cursor: pointer; transition: background .12s; }
.tp-meta-item.clickable:hover { background: var(--accent-glow); }
.tp-meta-status { flex-basis: 100%; min-width: 100%; background: var(--surface-2); border-radius: var(--radius); padding: 10px 14px; font-size: 11px; display: flex; align-items: center; justify-content: space-between; border-left: 3px solid var(--accent); }
.tp-meta-status .tl { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.tp-meta-status .tv { font-weight: 600; margin-top: 0; }
.tp-meta-status.clickable { cursor: pointer; transition: background .12s; }
.tp-meta-status.clickable:hover { background: var(--accent-glow); }
/* Expanded ticket full-page view — rendered inside #main, not overlay */
.main.ticket-expanded-main { padding: 0; overflow: hidden; }
.main.ticket-expanded-main .ticket-panel { width: 100%; height: 100%; box-shadow: none; animation: none; border-left: none; }
.main.ticket-expanded-main .ticket-panel .tp-head { max-width: 800px; }
.main.ticket-expanded-main .ticket-panel .tp-meta { max-width: 800px; }
.main.ticket-expanded-main .ticket-panel .tp-tabs { padding: 0 24px; }
.main.ticket-expanded-main .ticket-panel .tp-tab-content > div { max-width: 800px; }
.tp-section { padding: 16px 24px; border-top: 1px solid var(--surface-2); }
.tp-section h4 { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); margin-bottom: 8px; }
.tp-section p { font-size: 13px; color: var(--text-muted); line-height: 1.65; }
.tp-ac { list-style: none; }
.tp-ac li { padding: 4px 0; font-size: 13px; display: flex; align-items: flex-start; gap: 8px; color: var(--text-2); }
.tp-ac li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--accent); flex-shrink: 0; margin-top: 6px; }
.activity-item { padding: 12px 0; border-bottom: 1px solid var(--surface-2); font-size: 13px; color: var(--text-2); display: flex; gap: 12px; line-height: 1.5; }
.activity-item:last-child { border-bottom: none; }
.activity-item strong { color: var(--text); font-weight: 600; }
.activity-item .at { font-size: 10px; color: var(--text-dim); margin-top: 3px; }
.activity-item .act-av { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; margin-top: 1px; }
.activity-item .act-body { flex: 1; }

/* Ticket detail tabs */
.tp-tabs { display: flex; border-bottom: 1px solid var(--surface-2); padding: 0 24px; flex-shrink: 0; position: sticky; top: 0; background: var(--surface); z-index: 5; }
.tp-tab { padding: 10px 14px; font-size: 12px; font-weight: 500; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s; position: relative; }
.tp-tab:hover { color: var(--text-2); }
.tp-tab.active { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.tp-tab-content { flex: 1; }

/* Editable meta dropdowns */
.tp-meta-dropdown { position: absolute; top: 100%; left: 0; margin-top: 4px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; min-width: 140px; z-index: 50; animation: dropIn .15s ease; }
.tp-meta-dropdown .md-item { padding: 7px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .1s; }
.tp-meta-dropdown .md-item:hover { background: var(--surface-2); }
.tp-meta-dropdown .md-item.current { background: var(--accent-glow); color: var(--accent); font-weight: 600; }
.tp-sp-seg { display: flex; gap: 4px; padding: 6px; }
.tp-sp-seg .sp-opt { width: 36px; height: 30px; border-radius: 6px; border: none; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .12s; display: flex; align-items: center; justify-content: center; }
.tp-sp-seg .sp-opt:hover { background: var(--accent-glow); color: var(--text-2); }
.tp-sp-seg .sp-opt.on { background: var(--accent); color: #fff; }
.tp-desc-edit { width: 100%; min-height: 120px; border: 1.5px solid var(--accent-border); border-radius: var(--radius-lg); padding: 14px 16px; font-size: 13px; color: var(--text); line-height: 1.7; resize: vertical; outline: none; background: var(--surface); font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.tp-desc-edit:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,54,109,.08); }
.ticket-desc-editor { border: 1.5px solid var(--accent-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.ticket-desc-editor .ql-toolbar { border: none; border-bottom: 1px solid var(--surface-3); background: var(--surface-2); padding: 6px 8px; }
.ticket-desc-editor .ql-container { border: none; font-size: 13px; font-family: 'Inter', sans-serif; min-height: 120px; }
.ticket-desc-editor .ql-editor { min-height: 120px; line-height: 1.7; color: var(--text); }
.ticket-desc-editor .ql-editor img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.ticket-desc-editor .ql-editor.ql-drag-over { background: var(--accent-glow); outline: 2px dashed var(--accent-border); outline-offset: -4px; }
.tp-desc-content .ql-editor img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
/* Image resize toolbar — appended to body, above everything */
.ql-img-resize-toolbar { position: absolute; transform: translateX(-50%); display: flex; gap: 2px; background: var(--text); border-radius: 6px; padding: 3px 4px; box-shadow: var(--shadow-lg); z-index: 99999; pointer-events: auto; }
.ql-img-resize-btn { border: none; background: transparent; color: #fff; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 4px; cursor: pointer; font-family: 'Inter', sans-serif; white-space: nowrap; }
.ql-img-resize-btn:hover { background: rgba(255,255,255,.15); }
.ql-img-resize-btn.active { background: var(--accent); }
.ticket-desc-editor .ql-editor img { cursor: pointer; transition: outline .15s; }
.tp-desc-placeholder { border: 1.5px dashed var(--surface-3); border-radius: var(--radius-lg); padding: 20px; text-align: center; cursor: pointer; transition: all .15s; }
.tp-desc-placeholder:hover { border-color: var(--accent-border); background: var(--accent-glow); }
.tp-desc-placeholder .dp-icon { font-size: 24px; margin-bottom: 6px; opacity: .4; }
.tp-desc-placeholder .dp-text { font-size: 12px; color: var(--text-dim); }
.tp-desc-placeholder .dp-hint { font-size: 10px; color: var(--text-dim); margin-top: 4px; opacity: .6; }
/* Project search */
.project-search-wrap { position: relative; max-width: 400px; margin-bottom: 20px; }
.project-search-wrap .ps-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .35; pointer-events: none; }
.project-search-wrap input { width: 100%; border: 1.5px solid var(--surface-3); border-radius: 10px; padding: 10px 14px 10px 38px; font-size: 13px; color: var(--text); background: var(--surface); outline: none; transition: all .15s; }
.project-search-wrap input:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px rgba(232,54,109,.06); }
.project-search-wrap input::placeholder { color: var(--text-dim); }
/* PM dropdown */
.pm-dropdown-wrap { position: relative; }
.pm-dropdown { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; max-height: 200px; overflow-y: auto; animation: dropIn .15s ease; }
.pm-dropdown .pm-item { padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .1s; }
.pm-dropdown .pm-item:hover { background: var(--surface-2); }
.pm-dropdown .pm-item .pm-av { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; }

/* Feature entry search dropdown */
.feat-entry-wrap { position: relative; }
.feat-entry-dd { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--surface-2); padding: 6px; z-index: 50; max-height: 220px; overflow-y: auto; animation: dropIn .15s ease; }
.feat-entry-item { padding: 8px 12px; border-radius: 6px; cursor: pointer; transition: background .1s; }
.feat-entry-item:hover { background: var(--surface-2); }
.feat-entry-item-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.feat-entry-item-meta { font-size: 10px; color: var(--text-dim); font-weight: 500; margin-top: 2px; }
.feat-entry-empty { padding: 12px; font-size: 12px; color: var(--text-dim); text-align: center; }
.feat-selected-chip { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--accent-glow); border: 1px solid var(--accent-border); border-radius: 8px; margin-top: 6px; }
.feat-selected-id { font-size: 10px; font-weight: 700; color: var(--accent); font-family: 'Inter', monospace; background: rgba(232,54,109,.1); padding: 2px 6px; border-radius: 4px; }
.feat-selected-name { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.feat-selected-clear { background: none; border: none; cursor: pointer; color: var(--text-dim); font-size: 14px; padding: 0 2px; transition: color .12s; }
.feat-selected-clear:hover { color: var(--red); }
.feat-prd-link { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; background: var(--surface-1); border: 1px solid var(--surface-2); border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--accent); text-decoration: none; margin: 2px 4px 2px 0; transition: all .12s; }
.feat-prd-link:hover { border-color: var(--accent-border); background: var(--accent-glow); }

/* Status dropdown */
.status-dropdown { position: absolute; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; min-width: 160px; z-index: 50; animation: dropIn .15s ease; }
.status-dropdown .sd-item { padding: 7px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .1s; }
.status-dropdown .sd-item:hover { background: var(--surface-2); }
.status-dropdown .sd-item.current { background: var(--accent-glow); color: var(--accent); font-weight: 600; }

/* Assignee dropdown */
.assignee-dropdown { position: absolute; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; min-width: 180px; z-index: 50; animation: dropIn .15s ease; }
.assignee-dropdown .ad-item { padding: 7px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .1s; }
.assignee-dropdown .ad-item:hover { background: var(--surface-2); }
.assignee-dropdown .ad-item.current { background: var(--accent-glow); font-weight: 600; }
.assignee-dropdown .ad-item .ad-av { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; }

/* ===== PANEL CLOSE ===== */
.panel-close { width: 28px; height: 28px; border-radius: 8px; border: none; background: var(--surface-2); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; color: var(--text-muted); transition: all .12s; }
.panel-close:hover { background: var(--red-bg); color: var(--red); }

/* ===== CREATE PANEL ===== */
@keyframes modalIn { from { transform: scale(.96) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.create-panel { width: 860px; max-height: 90vh; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); display: flex; flex-direction: column; animation: modalIn .2s cubic-bezier(.16,1,.3,1); }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--surface-2); display: flex; justify-content: space-between; align-items: center; }
.panel-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.panel-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.panel-foot { padding: 14px 20px; border-top: 1px solid var(--surface-2); display: flex; gap: 8px; justify-content: space-between; align-items: center; background: var(--surface-2); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.panel-foot .foot-hint { font-size: 11px; color: var(--text-dim); }
.panel-foot kbd { background: var(--surface-3); border-radius: 4px; padding: 1px 5px; font-size: 10px; font-weight: 500; }
.ctx-box { background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.ctx-box .cl { font-size: 9px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); font-weight: 600; }
.ctx-box .cv { font-size: 13px; font-weight: 600; margin-top: 1px; }
.ctx-box .cs { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.flabel { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin: 14px 0 5px; }
.flabel .req { color: var(--red); }
.seg { display: flex; background: var(--surface-2); border-radius: 8px; overflow: hidden; gap: 2px; padding: 2px; }
.seg-btn { flex: 1; padding: 7px 4px; text-align: center; font-size: 11px; font-weight: 600; background: transparent; color: var(--text-dim); cursor: pointer; border: none; border-radius: 6px; transition: all .12s; }
.seg-btn:hover { background: var(--surface-3); color: var(--text-2); }
.seg-btn.on { color: #fff; }

/* Create rows */
.create-rows { margin-top: 16px; }
.create-row-header { display: flex; padding: 0 0 6px; font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); border-bottom: 1px solid var(--surface-2); }
.create-row-header > div { padding: 0 4px; }
.crh-expand { width: 20px; }
.crh-num { width: 28px; text-align: center; }
.crh-title { flex: 1; }
.crh-sp { width: 160px; text-align: center; }
.crh-assignee { width: 140px; }
.crh-del { width: 24px; }
.crow { display: flex; align-items: center; border-bottom: 1px solid var(--surface-2); transition: background .1s; }
.crow:hover { background: var(--surface-2); }
.crow.active { background: var(--accent-glow); }
.crow .cr-num { width: 28px; text-align: center; font-size: 11px; color: var(--text-dim); flex-shrink: 0; }
.crow .cr-title { flex: 1; padding: 0 4px; }
.crow .cr-title input { width: 100%; border: none; background: transparent; padding: 9px 4px; font-size: 13px; color: var(--text); outline: none; }
.crow .cr-title input::placeholder { color: var(--text-dim); }
.crow.active .cr-title { border-left: 2px solid var(--accent); padding-left: 2px; }
.crow .cr-sp { width: 160px; display: flex; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; }
.sp-chip { width: 32px; height: 32px; border-radius: 8px; border: none; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .12s; padding: 0; }
.sp-chip:hover { background: var(--accent-glow); color: var(--text-2); }
.sp-chip.on { background: var(--accent); color: #fff; box-shadow: 0 1px 4px rgba(232,54,109,.2); }
.crow .cr-assignee { width: 140px; font-size: 13px; color: var(--text-muted); padding: 0 8px; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.crow .cr-assignee .cav { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; }
.cr-assignee-admin { position: relative; }
.cr-assignee-input { width: 90px; border: none; background: transparent; font-size: 12px; color: var(--text); outline: none; padding: 4px 2px; cursor: pointer; }
.cr-assignee-input:focus { background: var(--surface); border-radius: 4px; box-shadow: 0 0 0 1.5px var(--accent-border); }
.cr-assignee-dropdown { display: none; position: absolute; top: 100%; left: 0; z-index: 50; background: var(--surface); border: 1px solid var(--border, var(--surface-3)); border-radius: 8px; box-shadow: var(--shadow-md); min-width: 180px; max-height: 200px; overflow-y: auto; }
.cr-assignee-dropdown.open { display: block; }
.cr-assignee-dd-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; font-size: 12px; color: var(--text); transition: background .08s; }
.cr-assignee-dd-item:hover { background: var(--accent-glow); }
.cr-assignee-dd-item .cav { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0; }
.crow .cr-del { width: 24px; text-align: center; flex-shrink: 0; font-size: 12px; color: var(--text-dim); cursor: pointer; opacity: 0; transition: opacity .1s; border: none; background: none; }
.crow:hover .cr-del { opacity: 1; }
.crow .cr-del:hover { color: var(--red); }
.cr-expand { width: 20px; text-align: center; font-size: 9px; color: var(--text-dim); cursor: pointer; flex-shrink: 0; background: none; border: none; }
.cr-expand:hover { color: var(--accent); }
.crow-detail { max-height: 0; overflow: hidden; transition: max-height .2s ease, padding .2s ease; padding: 0 14px 0 48px; background: var(--surface-2); }
.crow-detail.open { max-height: 200px; padding: 10px 14px 12px 48px; border-top: 1px solid var(--surface-2); }
.crow-desc { width: 100%; border: none; border-radius: 6px; padding: 8px 10px; font-size: 12px; color: var(--text); resize: vertical; background: var(--surface); outline: none; transition: all .12s; }
.crow-desc:focus { box-shadow: 0 0 0 2px var(--accent-border); }
.crow-ghost { display: flex; align-items: center; border-bottom: 1px solid var(--surface-2); opacity: .35; padding: 8px 0; }
.crow-ghost .cr-num { width: 28px; text-align: center; font-size: 11px; color: var(--text-dim); }
.crow-ghost .cr-hint { flex: 1; padding: 0 12px; font-size: 12px; color: var(--text-dim); font-style: italic; }
.create-info { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--text-dim); }

/* ===== FEATURE CREATE PANEL ===== */
.feature-panel { width: 560px; max-height: 85vh; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); display: flex; flex-direction: column; animation: modalIn .2s cubic-bezier(.16,1,.3,1); }
.finput { width: 100%; border: none; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--text); background: var(--surface-2); outline: none; transition: all .15s; }
.finput:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--accent-border); }
.finput::placeholder { color: var(--text-dim); }
.ftextarea { width: 100%; border: none; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--text); background: var(--surface-2); outline: none; transition: all .15s; resize: vertical; }
.ftextarea:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--accent-border); }
.ftextarea::placeholder { color: var(--text-dim); }
.fgrid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fdate { width: 100%; border: none; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--text); background: var(--surface-2); outline: none; transition: all .15s; }
.fdate:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--accent-border); }
.fform-group { margin-bottom: 16px; }

/* ===== SEARCH ===== */
@keyframes popIn { from { transform: scale(.97) translateY(6px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.search-modal { width: 520px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); overflow: hidden; animation: popIn .15s cubic-bezier(.16,1,.3,1); align-self: flex-start; }
.search-input { display: flex; align-items: center; padding: 14px 16px; gap: 10px; border-bottom: 1px solid var(--surface-2); }
.search-input .si { font-size: 16px; color: var(--text-dim); }
.search-input input { border: none; background: transparent; font-size: 14px; color: var(--text); flex: 1; outline: none; }
.search-input input::placeholder { color: var(--text-dim); }
.sresults { padding: 6px; max-height: 320px; overflow-y: auto; }
.sresult { padding: 9px 12px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background .1s; }
.sresult:hover, .sresult.active { background: var(--accent-glow); }
.sresult .sr-id { font-size: 10px; color: var(--text-dim); font-family: 'Inter', monospace; }
.sresult .sr-title { font-size: 13px; color: var(--text-2); }
.search-hint { padding: 10px 14px; font-size: 10px; color: var(--text-dim); text-align: center; border-top: 1px solid var(--surface-2); }

/* ===== SHORTCUTS ===== */
.shortcuts-panel { width: 480px; max-height: 70vh; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); overflow: auto; animation: popIn .15s cubic-bezier(.16,1,.3,1); padding: 22px; }
.shortcuts-panel h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.sk-group { margin-bottom: 16px; }
.sk-group h4 { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; }
.sk-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 12px; }
.sk-row .sk-label { color: var(--text-muted); }
.sk-row kbd { background: var(--surface-2); border-radius: 5px; padding: 2px 7px; font-size: 10px; color: var(--text-2); font-weight: 500; }

/* ===== FEATURE LIST ===== */
.flist { padding: 20px; overflow-y: auto; flex: 1; }
.flist-card { background: var(--surface); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 10px; cursor: pointer; transition: all .18s ease; box-shadow: var(--shadow-sm); }
.flist-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.flist-header { padding: 14px 20px; background: var(--surface); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.flist-header h2 { font-size: 16px; font-weight: 700; }

/* ===== ROADMAP / GANTT ===== */
.roadmap-view { padding: 24px 28px; overflow-y: auto; height: 100%; background: var(--surface); }
.roadmap-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.roadmap-header h2 { font-size: 16px; font-weight: 700; }
.roadmap-chart { border: 1px solid var(--surface-2); border-radius: var(--radius-lg); overflow: hidden; }
.roadmap-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--surface-2); min-height: 56px; }
.roadmap-row:last-child { border-bottom: none; }
.roadmap-row.rm-header { background: var(--surface-2); min-height: 36px; position: sticky; top: 0; z-index: 3; }
.roadmap-label { width: 220px; min-width: 220px; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; gap: 2px; border-right: 1px solid var(--surface-2); background: var(--surface); flex-shrink: 0; }
.roadmap-row.rm-header .roadmap-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); flex-direction: row; align-items: center; background: var(--surface-2); }
.roadmap-label .rm-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roadmap-label .rm-meta { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text-dim); }
.roadmap-bar-area { flex: 1; position: relative; cursor: pointer; display: flex; align-items: center; padding: 8px 0; }
.roadmap-row.rm-header .roadmap-bar-area { padding: 0; cursor: default; }
.roadmap-bar-area:hover { background: var(--accent-glow); }
.roadmap-row.rm-header .roadmap-bar-area:hover { background: transparent; }
.rm-week { position: absolute; top: 0; bottom: 0; border-right: 1px solid var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 600; color: var(--text-dim); letter-spacing: .3px; }
.rm-grid-line { position: absolute; top: 0; bottom: 0; border-right: 1px dashed var(--surface-2); pointer-events: none; }
.rm-bar { position: absolute; height: 28px; border-radius: 6px; display: flex; align-items: center; padding: 0 8px; font-size: 10px; font-weight: 600; color: #fff; overflow: hidden; min-width: 4px; transition: opacity .15s; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.rm-bar:hover { opacity: .85; }
.rm-bar .rm-bar-progress { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; opacity: .3; background: rgba(255,255,255,.4); }
.rm-bar .rm-bar-label { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-bar.bar-prog { background: var(--blue); }
.rm-bar.bar-done { background: var(--green); }
.rm-bar.bar-pending { background: var(--orange); }
.rm-bar.bar-rejected { background: var(--red); }
.rm-bar.bar-approved { background: #6366f1; }
.rm-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 2; pointer-events: none; }
.rm-today::before { content: 'Today'; position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 8px; font-weight: 700; color: var(--accent); white-space: nowrap; text-transform: uppercase; letter-spacing: .3px; }

/* ===== FEATURE DETAIL ===== */
.detail-scroll { overflow-y: auto; height: 100%; background: #fff; }
.detail-header { padding: 28px 32px; background: #fff; }
.detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 32px; margin: 16px 0 28px; padding: 20px 24px; background: #fff; border: 1px solid var(--surface-3); border-radius: var(--radius-lg); }
.detail-meta-item { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-2); }
.detail-meta-item .dmi-icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-dim); opacity: .65; }
.detail-meta-item .dmi-label { font-size: 10px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.detail-meta-item .dmi-val { font-weight: 600; color: var(--text); font-size: 13px; }
.detail-meta-item .dmi-sep { width: 1px; height: 14px; background: var(--surface-3); margin-left: 2px; }
.fd-edit-meta .detail-meta-item { gap: 10px; }
.fd-edit-field { font-size: 12px !important; padding: 5px 8px !important; border: 1px solid var(--surface-3) !important; border-radius: 6px !important; background: var(--surface) !important; color: var(--text) !important; min-width: 140px; }
.fd-edit-field:focus { border-color: var(--accent) !important; outline: none; }
.fd-pm-wrap { position: relative; }
.fd-pm-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--surface-3); border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 50; max-height: 180px; overflow-y: auto; margin-top: 2px; }
.fd-pm-item:hover { background: var(--accent-glow); }
.pri-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.pri-pill.pri-critical { background: var(--red-bg); color: var(--red); }
.pri-pill.pri-high { background: var(--orange-bg); color: var(--orange); }
.pri-pill.pri-medium { background: var(--blue-bg); color: var(--blue); }
.pri-pill.pri-low { background: var(--green-bg); color: var(--green); }
.pri-pill svg { width: 11px; height: 11px; }
.intake-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--purple-bg); color: var(--purple); }
.detail-desc-section { margin: 10px 0 4px; padding: 14px 20px; background: #fff; border: 1px solid var(--surface-3); border-radius: var(--radius-lg); }
.detail-desc-section .dds-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.detail-desc-section .dds-label svg { width: 13px; height: 13px; opacity: .5; }
.detail-desc-section .dds-text { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.detail-tabs { display: flex; background: #fff; padding: 0 24px; border-top: 1px solid var(--surface-3); border-bottom: 1px solid var(--surface-3); position: sticky; top: 0; z-index: 5; gap: 4px; }
.dtab { padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all .12s; }
.dtab:hover { color: var(--text); }
.dtab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.role-tabs { display: flex; background: var(--surface); padding: 8px 20px 0; flex-shrink: 0; gap: 4px; }
.rtab { padding: 6px 14px; font-size: 11px; font-weight: 500; color: var(--text-dim); cursor: pointer; border-radius: 20px; transition: all .15s; border: 1px solid transparent; }
.rtab:hover { color: var(--text); background: var(--surface-2); }
.rtab.active { color: var(--accent); background: var(--accent-glow); border-color: var(--accent-border); font-weight: 600; }
.detail-content { padding-bottom: 60px; background: #fff; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: var(--surface); }
.pagination .pg-info { font-size: 12px; color: var(--text-muted); }
.pagination .pg-btns { display: flex; gap: 4px; }
.pagination .pg-btn { width: 32px; height: 32px; border-radius: var(--radius); border: 1px solid var(--surface-3); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .12s; }
.pagination .pg-btn:hover:not(.disabled):not(.active) { border-color: var(--accent-border); color: var(--accent); background: var(--accent-glow); }
.pagination .pg-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .pg-btn.disabled { opacity: .3; cursor: default; }
.pagination .pg-nav { height: 32px; width: auto; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--surface-3); background: var(--surface); font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: all .12s; display: flex; align-items: center; gap: 4px; }
.pagination .pg-nav:hover:not(.disabled) { border-color: var(--accent-border); color: var(--accent); background: var(--accent-glow); }
.pagination .pg-nav.disabled { opacity: .3; cursor: default; }
.pagination .pg-nav svg { width: 14px; height: 14px; }
.ticket-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.ticket-table th { text-align: left; padding: 10px 14px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); border-bottom: 2px solid var(--surface-2); background: var(--surface); position: sticky; top: 0; z-index: 2; }
.ticket-table td { padding: 12px 14px; font-size: 12.5px; color: var(--text-2); border-bottom: 1px solid var(--surface-2); vertical-align: middle; }
.ticket-table tbody tr { cursor: pointer; transition: background .12s; }
.ticket-table tbody tr:hover td { background: var(--accent-glow); }
.ticket-table .tt-id { font-family: 'Inter', monospace; font-size: 10px; color: var(--text-dim); font-weight: 500; white-space: nowrap; }
.ticket-table .tt-title { font-weight: 500; color: var(--text); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-table .tt-assignee { display: flex; align-items: center; gap: 6px; }
.ticket-table .tt-av { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0; }
.ticket-table .tt-sp { font-weight: 700; color: var(--text-muted); text-align: center; }
.ticket-table .tt-time { font-size: 11px; color: var(--text-dim); }
.matrix-table { width: 100%; border-collapse: collapse; }
.matrix-table th { background: var(--surface-2); text-align: left; padding: 9px 14px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); position: sticky; top: 0; }
.matrix-table td { padding: 9px 14px; border-bottom: 1px solid var(--surface-2); font-size: 12px; }
.matrix-table tr { cursor: pointer; transition: background .1s; }
.matrix-table tbody tr:hover td { background: var(--accent-glow); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin: 12px 0; }
.role-card { background: #fff; border: 1px solid var(--surface-3); border-radius: var(--radius); padding: 14px 16px; text-align: center; transition: all .12s; }
.role-card:hover { background: var(--accent-glow); }
.role-card .rl { font-size: 10px; font-weight: 700; margin-bottom: 2px; }
.role-card .rc { font-size: 15px; font-weight: 700; }
.role-card .rs { font-size: 9px; color: var(--text-dim); }
.role-card .rb { height: 3px; border-radius: 3px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.role-card .rbf { height: 100%; border-radius: 3px; transition: width .3s ease; }

/* ===== COMMENTS ===== */
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--surface-2); }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-header .c-av { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; }
.comment-header .c-name { font-size: 12px; font-weight: 600; color: var(--text); }
.comment-header .c-time { font-size: 10px; color: var(--text-dim); }
.comment-text { font-size: 13px; color: var(--text-2); line-height: 1.55; padding-left: 32px; }
.comment-input-wrap { display: flex; align-items: center; gap: 6px; padding: 12px 0; }
.comment-input-wrap input { flex: 1; border: 1px solid var(--surface-3); background: var(--surface); border-radius: 20px; padding: 9px 14px; font-size: 13px; color: var(--text); outline: none; transition: all .15s; }
.comment-input-wrap input:focus { border-color: var(--accent-border); box-shadow: 0 0 0 2px rgba(232,54,109,.06); }
.comment-action-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--surface-3); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: all .12s; flex-shrink: 0; }
.comment-action-btn svg { width: 16px; height: 16px; }
.comment-action-btn:hover { background: var(--accent-light); color: var(--accent); border-color: var(--accent-border); }
.comment-send-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--accent); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; transition: all .12s; flex-shrink: 0; }
.comment-send-btn svg { width: 15px; height: 15px; }
.comment-send-btn:hover { background: var(--accent-hover); transform: scale(1.05); }

/* ===== WORK PACKAGES ===== */
.wp-view { display: flex; flex-direction: column; height: 100%; overflow-y: auto; background: var(--surface); padding: 20px 24px; gap: 16px; }
.wp-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.wp-header h2 { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.wp-header .wp-count { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-left: 8px; }
.wp-filter-card { background: var(--bg); border-radius: var(--radius-lg); padding: 14px 18px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.wp-filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wp-filter-row .wf-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); margin-right: 2px; white-space: nowrap; }
.wp-search { width: 260px; background: var(--surface); border: 1px solid var(--surface-3); border-radius: 8px; padding: 7px 12px 7px 32px; font-size: 12px; color: var(--text); outline: none; transition: all .15s; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a0a0ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px center; }
.wp-search:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px rgba(232,54,109,.06); background-color: var(--surface); }
.wp-filter-row .wf-sep { width: 1px; height: 18px; background: var(--surface-3); margin: 0 2px; }
.wp-filter-dd-wrap { position: relative; }
.wp-filter-dd { position: absolute; top: 100%; left: 0; margin-top: 4px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--surface-2); padding: 6px; min-width: 240px; z-index: 100; animation: dropIn .15s ease; max-height: 280px; overflow-y: auto; }
.wp-dd-search-wrap { padding: 0 6px 6px; border-bottom: 1px solid var(--surface-2); margin-bottom: 4px; }
.wp-dd-search { width: 100%; border: 1px solid var(--surface-3); background: var(--surface-2); border-radius: 6px; padding: 6px 8px; font-size: 12px; color: var(--text); font-family: inherit; outline: none; }
.wp-dd-search:focus { border-color: var(--accent); background: var(--surface); }
.wp-filter-dd label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background .1s; }
.wp-filter-dd label:hover { background: var(--surface-2); }
.wp-filter-dd input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; flex-shrink: 0; }
.wp-table-card { background: var(--bg); border-radius: var(--radius-lg); flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.wp-table-wrap { flex: 1; overflow: auto; }
.wp-table { width: 100%; border-collapse: collapse; }
.wp-table th { background: var(--surface); text-align: left; padding: 10px 14px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); position: sticky; top: 0; cursor: pointer; user-select: none; white-space: nowrap; transition: background .1s; z-index: 2; border-bottom: 2px solid var(--surface-2); }
.wp-table th:hover { color: var(--text-2); }
.wp-table th .sort-arrow { font-size: 9px; margin-left: 3px; opacity: .25; }
.wp-table th.sorted { color: var(--accent); }
.wp-table th.sorted .sort-arrow { opacity: 1; color: var(--accent); }
.wp-table td { padding: 10px 14px; border-bottom: 1px solid rgba(0,0,0,.04); font-size: 12px; background: var(--surface); }
.wp-table tbody tr { cursor: pointer; transition: background .1s; }
.wp-table tbody tr:hover td { background: var(--accent-glow); }
.wp-table .wp-id { font-family: 'Inter', monospace; font-size: 10px; color: var(--text-dim); font-weight: 500; }
.wp-table .wp-subject { font-weight: 600; color: var(--text); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-table .wp-feature-link { font-size: 11px; color: var(--blue); cursor: pointer; font-weight: 500; white-space: nowrap; }
.wp-table .wp-feature-link:hover { text-decoration: underline; }
.wp-table .wp-assignee { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.wp-table .wp-av { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0; }
.wp-table-card .pagination { background: var(--surface); border-top: 1px solid var(--surface-2); }
.wp-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-light); color: var(--accent); font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 5px; cursor: pointer; transition: all .12s; }
.wp-chip:hover { background: var(--accent); color: #fff; }
.wp-chip-clear { background: var(--surface-3); color: var(--text-muted); }
.wp-chip-clear:hover { background: var(--red-bg); color: var(--red); }

/* Date range filter dropdown */
.wp-date-dd { min-width: 200px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.wp-date-field { display: flex; align-items: center; gap: 8px; }
.wp-date-flabel { font-size: 11px; font-weight: 600; color: var(--text-dim); width: 36px; flex-shrink: 0; }
.wp-date-input { flex: 1; border: 1px solid var(--surface-3); background: var(--surface-2); border-radius: 6px; padding: 6px 8px; font-size: 12px; color: var(--text); font-family: inherit; outline: none; transition: border-color .12s; }
.wp-date-input:focus { border-color: var(--accent); background: var(--surface); }

/* Export CSV dropdown */
.wp-export-wrap { position: relative; }
.wp-export-dd { position: absolute; top: 100%; right: 0; margin-top: 4px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--surface-2); min-width: 180px; z-index: 100; animation: dropIn .15s ease; overflow: hidden; }
.wp-export-item { padding: 9px 14px; font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background .1s; }
.wp-export-item:hover { background: var(--accent-glow); color: var(--accent); }
.wp-group-row td { background: var(--surface-2); padding: 10px 14px; transition: background .1s; border-bottom: 1px solid rgba(0,0,0,.04); }
.wp-group-row:hover td { background: var(--surface-3); }
.wp-group-toggle { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; font-size: 9px; color: var(--text-dim); transition: transform .15s; flex-shrink: 0; cursor: pointer; border-radius: 4px; }
.wp-group-toggle:hover { background: var(--surface-3); }
.wp-group-toggle.open { transform: rotate(90deg); }
.wp-group-info { display: flex; align-items: center; gap: 10px; }
.wp-group-id { font-size: 10px; font-family: 'Inter', monospace; font-weight: 600; color: var(--text-dim); background: var(--surface); padding: 2px 7px; border-radius: 5px; }
.wp-group-name { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: -.1px; }
.wp-feature-link { cursor: pointer; transition: color .15s; }
.wp-feature-link:hover { color: var(--accent); }
.wp-group-version { font-size: 10px; font-weight: 600; color: var(--text-muted); background: var(--surface); padding: 2px 7px; border-radius: 5px; }
.wp-version-input { width: 90px; padding: 6px 10px; border: 1px solid var(--surface-3); border-radius: 8px; font-size: 11px; background: var(--surface); color: var(--text); outline: none; transition: border-color .15s; }
.wp-version-input:focus { border-color: var(--accent); }
.wp-version-input::placeholder { color: var(--text-dim); }
.wp-group-stats { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.wp-group-stats .wgs-item { font-size: 10px; font-weight: 600; color: var(--text-dim); }
.wp-group-stats .wgs-item strong { color: var(--text-2); }
.wp-group-prog { width: 60px; height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.wp-group-prog-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #f472b6); transition: width .3s ease; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px); background: var(--text); color: #fff; padding: 10px 22px; border-radius: 10px; font-size: 13px; font-weight: 500; z-index: 500; opacity: 0; pointer-events: none; box-shadow: 0 8px 32px rgba(0,0,0,.15); transition: all .3s cubic-bezier(.16,1,.3,1); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== HOME DASHBOARD ===== */
.home-view { padding: 24px 28px; overflow-y: auto; height: 100%; background: #fff; }
.home-header { margin-bottom: 24px; }
.home-header h1 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.home-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius-lg); padding: 18px 20px; border: 1px solid var(--surface-3); }
.stat-card .sc-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); }
.stat-card .sc-val { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin: 4px 0 2px; }
.stat-card .sc-sub { font-size: 11px; color: var(--text-muted); }
.home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.home-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--surface-3); overflow: hidden; }
.home-card-head { padding: 16px 20px; border-bottom: 1px solid var(--surface-2); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.home-card-body { padding: 16px 20px; }
.project-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--surface-2); cursor: pointer; transition: all .1s; }
.project-row:last-child { border-bottom: none; }
.project-row:hover { background: var(--accent-glow); margin: 0 -20px; padding: 12px 20px; border-radius: 8px; }
.project-row .pr-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0; }
.project-row .pr-info { flex: 1; }
.project-row .pr-name { font-size: 13px; font-weight: 600; }
.project-row .pr-squad { font-size: 11px; color: var(--text-muted); }
.project-row .pr-prog { display: flex; align-items: center; gap: 8px; }
.project-row .pr-bar { width: 80px; height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.project-row .pr-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #f472b6); }
.project-row .pr-pct { font-size: 11px; font-weight: 700; color: var(--accent); }
.workload-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--surface-2); }
.workload-item:last-child { border-bottom: none; }
.workload-item .wl-av { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; }
.workload-item .wl-info { flex: 1; }
.workload-item .wl-name { font-size: 12px; font-weight: 600; }
.workload-item .wl-role { font-size: 10px; color: var(--text-dim); }
.workload-item .wl-bar { flex: 1; height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.workload-item .wl-fill { height: 100%; border-radius: 4px; }
.workload-item .wl-count { font-size: 11px; font-weight: 600; color: var(--text-2); min-width: 50px; text-align: right; }

/* ===== PROJECTS PAGE ===== */
.projects-view { padding: 24px 28px; overflow-y: auto; height: 100%; background: #fff; }
.projects-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.projects-header h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.project-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.project-card { background: #fff; border-radius: var(--radius-lg); padding: 20px 24px; cursor: pointer; transition: all .18s ease; border: 1px solid var(--surface-3); }
.project-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); border-color: var(--accent-border); }
.project-card.active-project { border-color: var(--accent); }
.project-card.locked { opacity: .45; pointer-events: none; }
.project-card .pc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.project-card .pc-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: #fff; flex-shrink: 0; }
.project-card .pc-title { font-size: 16px; font-weight: 700; }
.project-card .pc-squad { font-size: 11px; color: var(--text-muted); }
.project-card .pc-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; }
.project-card .pc-stats { display: flex; gap: 12px; margin-bottom: 12px; }
.project-card .pcs-item { font-size: 11px; color: var(--text-muted); }
.project-card .pcs-item strong { color: var(--text); font-weight: 700; }
.project-card .pc-progress { margin-top: 10px; }
.project-card .pc-bar { height: 5px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.project-card .pc-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #f472b6); transition: width .3s ease; }
.project-card .pc-pct { display: flex; justify-content: space-between; font-size: 11px; margin-top: 4px; }
.project-card .pc-pct span:first-child { color: var(--text-muted); }
.project-card .pc-pct span:last-child { font-weight: 700; color: var(--accent); }
.project-card .pc-members { display: flex; gap: -4px; margin-top: 12px; }
.project-card .pc-av { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; border: 2px solid var(--surface); margin-left: -6px; }
.project-card .pc-av:first-child { margin-left: 0; }
.project-card-add { background: #fff; border: 1.5px dashed var(--surface-3); border-radius: var(--radius-lg); padding: 20px 24px; cursor: pointer; transition: all .18s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; gap: 8px; }
.project-card-add:hover { border-color: var(--accent-border); background: var(--accent-glow); }
.project-card-add .pca-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--text-dim); transition: all .15s; }
.project-card-add:hover .pca-icon { background: var(--accent-light); color: var(--accent); }
.project-card-add .pca-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.project-create-panel { width: 520px; max-height: 85vh; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); display: flex; flex-direction: column; animation: modalIn .2s cubic-bezier(.16,1,.3,1); }

/* ===== REVIEW BOARD ===== */
.review-board-view { padding: 24px 28px; overflow-y: auto; height: 100%; background: #fff; }
.review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.review-header h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.review-filters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.review-pipeline { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.review-column { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-height: 120px; }
.review-col-head { padding: 14px 18px; border-bottom: 1px solid var(--surface-2); display: flex; align-items: center; justify-content: space-between; }
.review-col-head h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.review-col-head .rch-count { font-size: 10px; font-weight: 700; background: var(--surface-2); padding: 2px 7px; border-radius: 10px; color: var(--text-dim); }
.review-col-body { padding: 10px; }
.rc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rc-empty { grid-column: 1 / -1; text-align: center; padding: 40px; color: var(--text-dim); font-size: 13px; }
.review-card { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; transition: all .15s ease; cursor: pointer; border: 1px solid var(--surface-3); border-left: 3px solid transparent; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; }
.review-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.review-card.rc-pending { border-left-color: #d97706; }
.review-card.rc-approved { border-left-color: #059669; }
.review-card.rc-rejected { border-left-color: #dc2626; }
.review-card.rc-done { border-left-color: var(--surface-3); opacity: .6; }
.review-card .rc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-card .rc-id { font-size: 10px; color: var(--text-dim); font-family: 'Inter', monospace; font-weight: 500; }
.review-card .rc-title { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.review-card .rc-meta { display: flex; gap: 8px; font-size: 10px; color: var(--text-dim); flex-wrap: wrap; align-items: center; }
.review-card .rc-meta strong { color: var(--text-2); font-weight: 600; }
.review-card .rc-progress { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.review-card .rc-progress-track { flex: 1; height: 4px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.review-card .rc-progress-fill { height: 100%; border-radius: 3px; background: var(--accent); }
.review-card .rc-progress-label { font-size: 10px; font-weight: 700; color: var(--accent); }
.review-card .rc-actions { display: flex; gap: 4px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.review-card .rc-actions .btn { font-size: 10px; padding: 5px 10px; }
@media (max-width: 768px) { .rc-grid { grid-template-columns: 1fr; } }
.btn-approve { background: var(--green); color: #fff; }
.btn-approve:hover { background: #059669; }
.btn-reject { background: transparent; color: var(--red); border: 1px solid var(--red-bg); }
.btn-reject:hover { background: var(--red-bg); }

/* ===== APPROVAL PANEL ===== */
.approval-panel { width: 520px; max-height: 85vh; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); display: flex; flex-direction: column; animation: modalIn .2s cubic-bezier(.16,1,.3,1); }

/* ===== DELETE CONFIRM ===== */
.confirm-modal { width: 420px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); animation: modalIn .2s cubic-bezier(.16,1,.3,1); padding: 24px; }
.confirm-modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.confirm-modal p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.confirm-modal .cm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 1px 3px rgba(239,68,68,.2); }
.btn-danger:hover { background: #dc2626; }

/* ===== SIDEBAR PROJECT LABEL ===== */
.nav-project-label { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin: 2px 8px 4px; border-radius: 8px; background: var(--accent-glow); border: 1px solid var(--accent-border); cursor: pointer; transition: all .12s; }
.nav-project-label:hover { background: var(--accent-light); }
.nav-project-label .npl-icon { width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #fff; flex-shrink: 0; }
.nav-project-label .npl-name { font-size: 12px; font-weight: 700; color: var(--accent); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-project-label .npl-close { font-size: 10px; color: var(--text-dim); opacity: 0; transition: opacity .12s; }
.nav-project-label:hover .npl-close { opacity: 1; }
.nav-divider { height: 1px; background: var(--surface-2); margin: 4px 14px; }

/* ===== PROJECT INSIGHT ===== */
.insight-view { padding: 24px 28px; overflow-y: auto; height: 100%; background: #fff; }
.insight-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.insight-header-left { display: flex; align-items: center; gap: 14px; }
.insight-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #fff; flex-shrink: 0; }
.insight-title { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.insight-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.insight-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.insight-stat { background: #fff; border-radius: var(--radius-lg); padding: 16px 18px; border: 1px solid var(--surface-3); }
.insight-stat .is-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); }
.insight-stat .is-val { font-size: 24px; font-weight: 800; letter-spacing: -.3px; margin: 3px 0 1px; }
.insight-stat .is-sub { font-size: 10px; color: var(--text-muted); }
.insight-progress-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--surface-3); padding: 20px; margin-bottom: 16px; }
.insight-progress-card h3 { font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.insight-feature-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--surface-2); }
.insight-feature-row:last-child { border-bottom: none; }
.insight-feature-row .ifr-id { font-size: 10px; color: var(--text-dim); font-family: 'Inter', monospace; font-weight: 600; background: #fff; border: 1px solid var(--surface-3); padding: 3px 8px; border-radius: 5px; min-width: 56px; text-align: center; }
.insight-feature-row .ifr-name { flex: 1; font-size: 13px; font-weight: 600; }
.insight-feature-row .ifr-bar { width: 120px; height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.insight-feature-row .ifr-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #f472b6); transition: width .3s ease; }
.insight-feature-row .ifr-pct { font-size: 11px; font-weight: 700; color: var(--accent); min-width: 36px; text-align: right; }
.insight-feature-row .ifr-stats { font-size: 10px; color: var(--text-muted); min-width: 60px; }
.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.insight-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--surface-3); overflow: hidden; }
.insight-card-head { padding: 14px 18px; border-bottom: 1px solid var(--surface-2); font-size: 12px; font-weight: 700; }
.insight-card-body { padding: 14px 18px; }
.velocity-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.velocity-row .vr-label { font-size: 11px; color: var(--text-muted); min-width: 80px; }
.velocity-row .vr-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.velocity-row .vr-fill { height: 100%; border-radius: 4px; transition: width .3s ease; }
.velocity-row .vr-val { font-size: 11px; font-weight: 700; min-width: 30px; text-align: right; }

/* ===== IMAGE UPLOAD ===== */
.img-upload-btn { width: 32px; height: 32px; border-radius: 8px; border: none; background: var(--surface-2); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-dim); font-size: 14px; transition: all .12s; flex-shrink: 0; }
.img-upload-btn:hover { background: var(--accent-glow); color: var(--accent); }
.img-preview { margin-top: 8px; }
.img-preview img { max-width: 100%; max-height: 200px; border-radius: 8px; border: 1px solid var(--surface-2); object-fit: cover; }
.comment-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.comment-images img { max-width: 180px; max-height: 120px; border-radius: 8px; border: 1px solid var(--surface-2); object-fit: cover; cursor: pointer; transition: transform .15s; }
.comment-images img:hover { transform: scale(1.03); }
.desc-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.desc-images img { max-width: 240px; max-height: 160px; border-radius: 8px; border: 1px solid var(--surface-2); object-fit: cover; cursor: pointer; transition: transform .15s; }
.desc-images img:hover { transform: scale(1.03); }
.img-upload-pending { display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.img-upload-pending img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; border: 1px solid var(--surface-2); }
.img-upload-pending .iup-name { font-size: 11px; color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-upload-pending .iup-remove { font-size: 10px; color: var(--red); cursor: pointer; border: none; background: none; padding: 4px; }
.img-lightbox { display: flex; align-items: center; justify-content: center; padding: 24px; }
.img-lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 12px; box-shadow: var(--shadow-xl); object-fit: contain; }
.img-lightbox .lb-close { position: fixed; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; border: none; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 210; }
.img-lightbox .lb-close:hover { background: rgba(0,0,0,.7); }

/* ===== LOGIN SCREEN ===== */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg);
}
.login-card {
  width: 400px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  text-align: center;
}
.login-card .login-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #e8366d, #d42d60);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 16px;
  position: relative;
}
.login-card .login-logo::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,.5);
  border-radius: 50%;
}
.login-card h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 4px;
}
.login-card .login-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.login-form label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
}
.login-form input {
  width: 100%;
  border: 1.5px solid var(--surface-3);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: all .15s;
}
.login-form input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(232,54,109,.06);
}
.login-form input::placeholder { color: var(--text-dim); }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  margin-top: 4px;
}
.login-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232,54,109,.25);
}
.login-btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(232,54,109,.3);
  transform: translateY(-.5px);
}
.login-btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.login-btn-google {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.login-btn-google:hover {
  background: var(--surface-2);
  border-color: var(--text-dim);
}
.login-btn-google svg {
  width: 18px;
  height: 18px;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  font-size: 11px;
  color: var(--text-dim);
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--surface-3);
}
.login-error {
  background: var(--red-bg);
  color: var(--red);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  display: none;
}
.login-error.show { display: block; }

/* ===== LOADING ===== */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg);
  flex-direction: column;
  gap: 16px;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== NEW ROLE COLORS ===== */
:root {
  --role-pm: #8b5cf6; --role-pm-bg: rgba(139,92,246,.08);
  --role-res: #06b6d4; --role-res-bg: rgba(6,182,212,.08);
  --role-uid: #f59e0b; --role-uid-bg: rgba(245,158,11,.08);
  --role-uxw: #ec4899; --role-uxw-bg: rgba(236,72,153,.08);
  --role-de: #14b8a6; --role-de-bg: rgba(20,184,166,.08);
  --role-pre: #f97316; --role-pre-bg: rgba(249,115,22,.08);
  --role-soc: #6366f1; --role-soc-bg: rgba(99,102,241,.08);
  --role-inf: #78716c; --role-inf-bg: rgba(120,113,108,.08);
}

/* ===== ENTRY STATUS BADGES ===== */
.sb-draft { background: var(--surface-2); color: var(--text-muted); }
.sb-archived { background: rgba(120,113,108,.1); color: #78716c; }

/* ===== SHARED SMALL AVATAR ===== */
.av-sm { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0; }

/* ===== FORM TEXTAREA (shared) ===== */
.form-textarea { width: 100%; border: 1px solid var(--surface-3); border-radius: var(--radius); padding: 9px 14px; font-size: 13px; color: var(--text); background: var(--surface); outline: none; resize: vertical; transition: all .15s; }
.form-textarea:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px rgba(232,54,109,.06); }
.form-textarea::placeholder { color: var(--text-dim); }

/* ===== QUILL OVERRIDES ===== */
.ql-toolbar { background: var(--surface-2); border: none !important; border-bottom: 1px solid var(--surface-3) !important; border-radius: 10px 10px 0 0; padding: 8px 10px !important; }
.ql-container { border: none !important; border-radius: 0 0 10px 10px; background: var(--surface-2); color: var(--text); min-height: 160px; }
.ql-editor { font-size: 14px; font-family: inherit; line-height: 1.7; padding: 16px 18px; }
.ql-editor.ql-blank::before { color: var(--text-dim); font-style: normal; font-size: 14px; }
.ql-snow .ql-stroke { stroke: var(--text-muted); }
.ql-snow .ql-fill { fill: var(--text-muted); }
.ql-snow .ql-picker { color: var(--text-muted); }
.ql-snow .ql-picker-options { background: #fff; border-color: var(--surface-3); border-radius: 8px; box-shadow: var(--shadow-md); }
.ql-snow .ql-active .ql-stroke { stroke: var(--accent); }
.ql-snow .ql-active .ql-fill { fill: var(--accent); }
.ql-snow .ql-active { color: var(--accent); }
.ql-snow button:hover .ql-stroke { stroke: var(--accent); }
.ql-snow button:hover .ql-fill { fill: var(--accent); }
.ql-snow a { color: var(--accent); }
.ql-editor pre.ql-syntax { background: #fff; border-radius: 8px; padding: 14px 16px; font-size: 12.5px; color: var(--text); }
.ql-toolbar .ql-formats { margin-right: 12px; }
.wl-editor-container .ql-toolbar { border-radius: 10px 10px 0 0; }
.wl-editor-container .ql-container { border-radius: 0 0 10px 10px; }

/* ===== WORKLIB — WHITE BACKGROUND ON VIEW CONTAINERS ===== */
#view-library,
#view-my-entries,
#view-entry-detail,
#view-entry-form,
#view-collections,
#view-requests { background: #fff; }

/* ===== WORKLIB — LIBRARY VIEW ===== */
.wl-library { padding: 32px 40px; }

/* Page header */
.wl-page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.wl-page-header h2 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; color: var(--text); margin-bottom: 4px; }
.wl-page-subtitle { font-size: 12px; color: var(--text-dim); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.wl-stat-chip { display: inline-flex; align-items: center; font-size: 11px; color: var(--text-muted); }
.wl-stat-chip + .wl-stat-chip::before { content: '\00b7'; margin-right: 8px; color: var(--text-dim); }

/* Search */
.wl-search-wrap { position: relative; margin-bottom: 16px; }
.wl-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.wl-search-input { width: 100%; border: none; border-radius: 12px; padding: 13px 18px 13px 46px; font-size: 14px; color: var(--text); background: var(--surface-2); outline: none; transition: all .2s; }
.wl-search-input:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--accent-border); }
.wl-search-input::placeholder { color: var(--text-dim); }

/* Toolbar (filters + sort) */
.wl-toolbar { display: flex; flex-direction: column; margin-bottom: 20px; gap: 0; }
.wl-toolbar-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wl-toolbar-sep { width: 1px; height: 20px; background: var(--surface-3); margin: 0 4px; flex-shrink: 0; }
.wl-pill-group { display: flex; gap: 4px; flex-wrap: wrap; }
.wl-filter-label { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; align-self: center; margin-right: 4px; }

/* Filter pills */
.wl-pill { border: 1px solid var(--surface-3); background: transparent; border-radius: 20px; padding: 5px 14px; font-size: 11px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .15s; white-space: nowrap; }
.wl-pill:hover { border-color: var(--text-dim); color: var(--text-2); background: var(--surface-2); }
.wl-pill.active { border-color: var(--accent); background: var(--accent-glow); color: var(--accent); }
.wl-pill-tag { font-size: 10px; padding: 4px 12px; }
.wl-pill-clear { border-color: transparent; color: var(--red); font-weight: 500; }
.wl-pill-clear:hover { background: var(--red-bg); border-color: transparent; color: var(--red); }

/* Sort & Group dropdowns */
.wl-sort-select { border: 1px solid var(--surface-3); border-radius: 8px; padding: 6px 10px; font-size: 11px; font-weight: 600; color: var(--text-muted); background: transparent; cursor: pointer; outline: none; appearance: auto; }
.wl-sort-select:focus { border-color: var(--accent-border); }
.wl-group-select { border: 1px solid var(--surface-3); border-radius: 8px; padding: 6px 10px; font-size: 11px; font-weight: 600; color: var(--text-muted); background: transparent; cursor: pointer; outline: none; appearance: auto; }
.wl-group-select:focus { border-color: var(--accent-border); }

/* Group sections */
.wl-group-section { margin-bottom: 28px; }
.wl-group-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--surface-2); cursor: pointer; transition: background .1s; border-radius: 6px; padding: 8px 10px; }
.wl-group-header:hover { background: var(--surface-1); }
.wl-group-toggle { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; font-size: 8px; color: var(--text-dim); transition: transform .15s; flex-shrink: 0; }
.wl-group-toggle.open { transform: rotate(90deg); }
.wl-group-title { font-size: 13px; font-weight: 700; color: var(--text); }
.wl-group-count { font-size: 11px; color: var(--text-dim); font-weight: 500; }

/* Grid */
.wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* Entry Card — Grid View */
.wl-entry-card { background: #fff; border: 1px solid var(--surface-3); border-radius: 14px; cursor: pointer; transition: all .2s ease; position: relative; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.wl-entry-card:hover { border-color: var(--accent-border); box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.wl-card-draft { border-style: dashed; border-color: var(--accent); background: #fff9fb; }
.wl-card-draft:hover { border-color: var(--accent); }
.wl-row-draft { border-left: 3px dashed var(--accent); background: #fff9fb; }
.wl-card-link-preview { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 12px; font-weight: 600; letter-spacing: .2px; border-radius: 14px 14px 0 0; white-space: nowrap; overflow: hidden; }
.wl-card-link-host { opacity: .9; }
.wl-card-link-path { opacity: .6; font-weight: 400; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.wl-card-link-more { background: rgba(255,255,255,.2); padding: 1px 7px; border-radius: 10px; font-size: 10px; font-weight: 700; margin-left: auto; flex-shrink: 0; }
.wl-card-link-empty { background: var(--surface-1); color: var(--text-dim); border-bottom: 1px solid var(--surface-2); }
.wl-card-body { padding: 14px 18px 16px; }
.wl-card-badges { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.wl-card-role-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: .2px; }
.wl-card-private-badge { font-size: 11px; opacity: .5; }
.wl-card-title { font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; letter-spacing: -.15px; }
.wl-card-excerpt { font-size: 12px; color: var(--text-muted); line-height: 1.55; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wl-card-footer { display: flex; align-items: center; }
.wl-card-author { display: flex; align-items: center; gap: 8px; }
.wl-card-author-avatar { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 800; color: #fff; flex-shrink: 0; }
.wl-card-author-info { display: flex; flex-direction: column; }
.wl-card-author-name { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.2; }
.wl-card-author-meta { font-size: 10px; color: var(--text-dim); font-weight: 500; line-height: 1.3; }

/* Tag chips (small) */
.wl-tag-chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; letter-spacing: .1px; }

/* Search highlight */
mark.wl-highlight { background: rgba(232,54,109,.12); color: var(--accent); border-radius: 2px; padding: 0 2px; }

/* View Mode Toggle */
.wl-view-toggle { display: flex; align-items: center; gap: 2px; background: var(--surface-1); border: 1px solid var(--surface-2); border-radius: 8px; padding: 2px; }
.wl-view-btn { background: transparent; border: none; border-radius: 6px; padding: 5px 8px; cursor: pointer; color: var(--text-dim); display: flex; align-items: center; justify-content: center; transition: all .15s; }
.wl-view-btn:hover { color: var(--text-muted); background: var(--surface-2); }
.wl-view-btn.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Toolbar layout */
.wl-toolbar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wl-toolbar-right { display: flex; align-items: center; gap: 8px; }

/* Filter Button & Dropdown Panel */
.wl-filter-dropdown-wrap { position: relative; }
.wl-filter-btn { display: flex; align-items: center; gap: 5px; padding: 5px 12px; border: 1px solid var(--surface-3); border-radius: 8px; background: transparent; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.wl-filter-btn:hover { border-color: var(--accent-border); color: var(--text); }
.wl-filter-btn.active { border-color: var(--accent-border); color: var(--accent); background: var(--accent-glow); }
.wl-filter-btn.has-filters { border-color: var(--accent); color: var(--accent); }
.wl-filter-badge { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 10px; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* Filter Panel — horizontal layout */
.wl-filter-panel { position: absolute; top: calc(100% + 6px); left: 0; background: #fff; border: 1px solid var(--surface-2); border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.1); z-index: 50; padding: 16px 20px; display: flex; gap: 0; min-width: 720px; }
.wl-fp-col-group { display: flex; flex-direction: column; gap: 12px; padding: 0 18px; }
.wl-fp-col-group:first-child { padding-left: 0; }
.wl-fp-col-group:last-child { padding-right: 0; }
.wl-fp-col-group + .wl-fp-col-group { border-left: 1px solid var(--surface-1); }
.wl-fp-section { }
.wl-fp-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); margin-bottom: 6px; }
.wl-fp-divider { display: none; }

/* Inline pill toggles (Visibility & Team) */
.wl-fp-pill-row { display: flex; gap: 4px; flex-wrap: wrap; }
.wl-fp-pill { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--surface-3); background: transparent; font-size: 11px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .12s; }
.wl-fp-pill:hover { border-color: var(--accent-border); color: var(--text); }
.wl-fp-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Role chip grid */
.wl-fp-chip-grid { display: flex; flex-wrap: wrap; gap: 5px; max-width: 280px; }
.wl-fp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--surface-3); background: transparent; font-size: 11px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .12s; white-space: nowrap; }
.wl-fp-chip:hover { border-color: var(--text-dim); color: var(--text); }
.wl-fp-chip.active { border-width: 1.5px; font-weight: 700; }
.wl-fp-role-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* Author search + list */
.wl-fp-search-wrap { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--surface-2); border-radius: 8px; margin-bottom: 6px; background: var(--surface-1); }
.wl-fp-search-input { border: none; outline: none; background: transparent; font-size: 12px; font-family: inherit; color: var(--text); width: 100%; min-width: 140px; }
.wl-fp-search-input::placeholder { color: var(--text-dim); }
.wl-fp-author-list { max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; min-width: 190px; }
.wl-fp-author-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 7px; cursor: pointer; transition: background .1s; }
.wl-fp-author-row:hover { background: var(--surface-1); }
.wl-fp-author-row.active { background: var(--accent-glow); }
.wl-fp-avatar { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 7px; font-weight: 800; color: #fff; flex-shrink: 0; }
.wl-fp-author-name { font-size: 12px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-fp-author-role { font-size: 10px; color: var(--text-dim); font-weight: 500; flex-shrink: 0; }
.wl-fp-author-check { flex-shrink: 0; margin-left: auto; }
.wl-fp-no-results { padding: 12px 8px; font-size: 12px; color: var(--text-dim); text-align: center; }

/* Date range */
.wl-fp-dates { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.wl-date-input { padding: 5px 8px; border: 1px solid var(--surface-3); border-radius: 6px; font-size: 11px; font-family: inherit; color: var(--text); background: transparent; flex: 1; }
.wl-date-input:focus { border-color: var(--accent-border); outline: none; }

@media (max-width: 800px) {
  .wl-filter-panel { min-width: unset; flex-direction: column; gap: 0; width: 300px; }
  .wl-fp-col-group { padding: 10px 0; border-left: none !important; }
  .wl-fp-col-group + .wl-fp-col-group { border-top: 1px solid var(--surface-1); }
  .wl-fp-chip-grid { max-width: unset; }
}

/* Active Filter Chips */
.wl-active-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.wl-active-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--surface-1); color: var(--text-muted); border: 1px solid var(--surface-2); cursor: pointer; transition: all .12s; }
.wl-active-chip:hover { border-color: var(--red); color: var(--red); background: rgba(239,68,68,.05); }
.wl-chip-x { font-size: 13px; font-weight: 400; opacity: .5; margin-left: 2px; }
.wl-chip-clear-all { background: transparent; border-color: transparent; color: var(--text-dim); font-weight: 500; }
.wl-chip-clear-all:hover { color: var(--red); background: transparent; border-color: transparent; }

/* List View */
.wl-list-table { border: 1px solid var(--surface-2); border-radius: 12px; overflow: hidden; }
.wl-list-header { display: grid; grid-template-columns: 70px 1fr 120px 100px 90px 140px 80px; gap: 0; padding: 8px 16px; background: var(--surface-1); border-bottom: 1px solid var(--surface-2); }
.wl-list-header .wl-list-cell { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); }
.wl-list-row { display: grid; grid-template-columns: 70px 1fr 120px 100px 90px 140px 80px; gap: 0; padding: 10px 16px; border-bottom: 1px solid var(--surface-1); cursor: pointer; transition: background .12s; align-items: center; }
.wl-list-row:last-child { border-bottom: none; }
.wl-list-row:hover { background: var(--surface-1); }
.wl-list-cell { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-list-id { font-size: 10px; font-family: 'Inter', monospace; font-weight: 600; color: var(--text-dim); }
.wl-list-title { font-weight: 600; color: var(--text); }
.wl-list-title-cell { display: flex; align-items: center; gap: 6px; }
.wl-list-link-chip { display: inline-flex; padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 600; letter-spacing: .2px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-list-link-empty { color: var(--text-dim); font-size: 11px; }
.wl-list-author-cell { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }

/* Timeline View */
.wl-timeline { position: relative; padding-left: 24px; }
.wl-timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--surface-2); border-radius: 2px; }
.wl-timeline-item { position: relative; margin-bottom: 4px; }
.wl-timeline-date { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; padding: 16px 0 8px; margin-left: -24px; padding-left: 24px; }
.wl-timeline-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; background: #fff; border: 1px solid var(--surface-2); border-radius: 10px; cursor: pointer; transition: all .15s; }
.wl-timeline-card:hover { border-color: var(--surface-3); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.wl-timeline-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; position: absolute; left: -20px; z-index: 1; }
.wl-timeline-content { flex: 1; min-width: 0; }
.wl-timeline-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.wl-timeline-title { font-size: 13px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-timeline-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wl-timeline-author { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.wl-timeline-time { font-size: 10px; color: var(--text-dim); font-weight: 500; }

/* Empty state */
.wl-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px; text-align: center; }
.wl-empty h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.wl-empty p { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; line-height: 1.5; max-width: 300px; }

/* Pagination */
.wl-pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--surface-2); }
.wl-page-btn { border: 1px solid var(--surface-3); background: transparent; border-radius: 8px; padding: 7px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.wl-page-btn:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-glow); }
.wl-page-info { font-size: 12px; color: var(--text-dim); font-weight: 500; }

/* ===== WORKLIB — ENTRY DETAIL ===== */
.wl-detail { padding: 0; max-width: 100%; min-height: 100%; }

/* Top bar */
.wl-detail-topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; border-bottom: 1px solid var(--surface-2); position: sticky; top: 0; background: #fff; z-index: 5; }
.wl-detail-back { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; border: none; background: none; padding: 6px 12px; border-radius: 8px; transition: all .15s; }
.wl-detail-back:hover { background: var(--surface-2); color: var(--text); }
.wl-detail-topbar-actions { display: flex; align-items: center; gap: 6px; }
.wl-detail-action-btn { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; border: 1px solid var(--surface-3); background: transparent; padding: 6px 14px; border-radius: 8px; transition: all .15s; }
.wl-detail-action-btn:hover { border-color: var(--accent-border); color: var(--accent); background: var(--accent-glow); }
.wl-btn-edit { background: var(--accent); color: #fff !important; border-color: var(--accent) !important; }
.wl-btn-edit:hover { background: #d42d60; border-color: #d42d60 !important; color: #fff !important; }
.wl-btn-edit svg { stroke: #fff; }
.wl-btn-delete { color: var(--text-dim) !important; }
.wl-btn-delete:hover { border-color: var(--red) !important; color: var(--red) !important; background: rgba(239,68,68,.06); }

/* Hero section */
/* Body: main + sidebar layout */
.wl-detail-body { display: grid; grid-template-columns: 1fr 260px; min-height: calc(100vh - 120px); }
.wl-detail-main { padding: 32px 40px 60px; border-right: 1px solid var(--surface-2); min-width: 0; }
.wl-detail-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wl-detail-id { font-size: 12px; font-weight: 700; color: var(--text-dim); letter-spacing: .3px; font-family: var(--mono-font, 'SF Mono', 'Fira Code', monospace); }
.wl-detail-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.wl-badge-private { color: var(--text-dim); background: var(--surface-2); }
.wl-detail-title { font-size: 28px; font-weight: 800; letter-spacing: -.6px; line-height: 1.25; color: var(--text); margin: 0 0 24px; }

/* Sidebar */
.wl-detail-sidebar { padding: 28px 24px; background: var(--surface-1, #fafafa); }
.wl-sidebar-section { margin-bottom: 20px; }
.wl-sidebar-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); margin-bottom: 6px; }
.wl-sidebar-value { font-size: 13px; font-weight: 500; color: var(--text); }
.wl-sidebar-author { display: flex; align-items: center; gap: 8px; }
.wl-sidebar-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; }
.wl-sidebar-author-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.2; }
.wl-sidebar-author-role { font-size: 11px; color: var(--text-dim); font-weight: 500; }
.wl-sidebar-select { width: 100%; padding: 7px 12px; border: 1px solid var(--surface-3); border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; background: #fff; outline: none; transition: all .15s; appearance: auto; }
.wl-sidebar-select:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px rgba(232,54,109,.08); }

@media (max-width: 860px) {
  .wl-detail-body { grid-template-columns: 1fr; }
  .wl-detail-main { border-right: none; }
  .wl-detail-sidebar { border-top: 1px solid var(--surface-2); display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 20px; padding: 20px 40px; }
  .wl-sidebar-section { margin-bottom: 8px; }
  .wl-list-table { overflow-x: auto; }
  .wl-list-header, .wl-list-row { min-width: 700px; }
}

/* Tabs */
.wl-detail-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--surface-2); margin-bottom: 28px; }
.wl-detail-tab { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-dim); background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 18px; cursor: pointer; transition: all .15s; position: relative; bottom: -1px; }
.wl-detail-tab:hover { color: var(--text-muted); }
.wl-detail-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.wl-detail-tab-count { font-size: 10px; font-weight: 700; background: var(--surface-2); color: var(--text-dim); padding: 1px 7px; border-radius: 10px; min-width: 18px; text-align: center; }
.wl-detail-tab.active .wl-detail-tab-count { background: var(--accent-glow); color: var(--accent); }

/* Content area */
.wl-detail-content { padding: 0; }

/* Prose (rich text content) */
.wl-detail-prose { font-size: 15px; line-height: 1.75; color: var(--text); }
.wl-detail-prose p { margin: 0 0 12px; }
.wl-detail-prose h1, .wl-detail-prose h2, .wl-detail-prose h3 { margin: 24px 0 8px; font-weight: 700; }
.wl-detail-prose ul, .wl-detail-prose ol { padding-left: 24px; margin: 8px 0 16px; }
.wl-detail-prose li { margin: 4px 0; }
.wl-detail-prose a { color: var(--accent); text-decoration: underline; }
.wl-detail-prose code { font-size: 13px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-family: var(--mono-font, monospace); }
.wl-detail-prose pre { background: var(--surface-2); padding: 16px; border-radius: 10px; overflow-x: auto; margin: 16px 0; }
.wl-detail-prose-empty { color: var(--text-dim); font-style: italic; }

/* Evidence links */
.wl-detail-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--surface-2); }
.wl-detail-section-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 14px; letter-spacing: -.1px; }
/* Output links — primary content */
.wl-output-section { margin-bottom: 28px; }
.wl-output-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; letter-spacing: -.2px; }
.wl-output-title svg { color: var(--accent); }
.wl-output-links { display: flex; flex-direction: column; gap: 8px; }
.wl-output-link { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: #fff; border: 1.5px solid var(--surface-3); border-radius: 12px; text-decoration: none; color: var(--text); transition: all .18s; }
.wl-output-link:hover { border-color: var(--accent-border); box-shadow: 0 4px 16px rgba(232,54,109,.08); transform: translateY(-1px); }
.wl-output-link-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-glow); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wl-output-link-body { flex: 1; min-width: 0; }
.wl-output-link-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-output-link-url { display: block; font-size: 11px; color: var(--text-dim); margin-top: 2px; font-weight: 500; }
.wl-output-link-arrow { flex-shrink: 0; color: var(--text-dim); opacity: .4; transition: all .15s; }
.wl-output-link:hover .wl-output-link-arrow { opacity: 1; color: var(--accent); transform: translateX(2px); }
.wl-output-empty { text-align: center; padding: 32px 20px; color: var(--text-dim); }
.wl-output-empty p { font-size: 14px; font-weight: 600; margin: 10px 0 4px; color: var(--text-muted); }
.wl-output-empty span { font-size: 12px; }

/* Notes/description — secondary */
.wl-desc-section { padding-top: 20px; border-top: 1px solid var(--surface-2); }

/* Legacy detail links (kept for compatibility) */
.wl-detail-links { display: flex; flex-direction: column; gap: 6px; }
.wl-detail-link { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface-2); border-radius: 10px; text-decoration: none; color: var(--text-2); font-size: 13px; font-weight: 500; transition: all .15s; }
.wl-detail-link:hover { background: var(--accent-glow); color: var(--accent); }
.wl-detail-link svg { flex-shrink: 0; opacity: .5; }
.wl-detail-link:hover svg { opacity: 1; }

/* Comments */
.wl-comments-wrap { display: flex; flex-direction: column; gap: 0; }
.wl-comments-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px 32px; text-align: center; }
.wl-comments-empty p { font-size: 14px; font-weight: 600; color: var(--text-muted); margin: 0; }
.wl-comments-empty span { font-size: 12px; color: var(--text-dim); }
.wl-comments-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
.wl-comment { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--surface-2); }
.wl-comment:last-child { border-bottom: none; }
.wl-comment-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; }
.wl-comment-body { flex: 1; min-width: 0; }
.wl-comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.wl-comment-name { font-size: 13px; font-weight: 600; color: var(--text); }
.wl-comment-time { font-size: 11px; color: var(--text-dim); font-weight: 500; }
.wl-comment-text { font-size: 13px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }

/* Comment compose */
.wl-comment-compose { display: flex; gap: 12px; padding-top: 20px; border-top: 1px solid var(--surface-2); }
.wl-comment-compose-body { flex: 1; position: relative; }
.wl-comment-input { width: 100%; border: 1px solid var(--surface-3); background: var(--surface-2); border-radius: 12px; padding: 12px 50px 12px 16px; font-size: 13px; color: var(--text); outline: none; resize: none; transition: all .2s; font-family: inherit; line-height: 1.5; }
.wl-comment-input:focus { border-color: var(--accent-border); background: #fff; box-shadow: 0 0 0 4px rgba(232,54,109,.06); }
.wl-comment-input::placeholder { color: var(--text-dim); }
.wl-comment-send { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 8px; border: none; background: var(--accent); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.wl-comment-send:hover { background: var(--accent-hover); transform: scale(1.05); }

/* Linked items */
.wl-linked-list { display: flex; flex-direction: column; gap: 10px; }
.wl-linked-card { display: flex; align-items: center; gap: 16px; padding: 18px 22px; background: #fff; border: 1px solid var(--surface-3); border-radius: 14px; cursor: pointer; transition: all .18s; }
.wl-linked-card:hover { border-color: var(--accent-border); box-shadow: 0 4px 16px rgba(0,0,0,.04); transform: translateY(-1px); }
.wl-linked-card-missing { cursor: default; opacity: .6; }
.wl-linked-card-missing:hover { border-color: var(--surface-3); box-shadow: none; transform: none; }
.wl-linked-card-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wl-linked-card-body { flex: 1; min-width: 0; }
.wl-linked-card-type { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 2px; }
.wl-linked-card-name { font-size: 14px; font-weight: 700; color: var(--text); display: block; }
.wl-linked-progress { margin-top: 8px; }
.wl-linked-progress-bar { height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.wl-linked-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.wl-linked-progress-text { font-size: 11px; color: var(--text-dim); font-weight: 500; margin-top: 4px; display: block; }
.wl-linked-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; text-align: center; }
.wl-linked-empty p { font-size: 14px; font-weight: 600; color: var(--text-muted); margin: 0; }
.wl-linked-empty span { font-size: 12px; color: var(--text-dim); }

/* Evidence (form mode) */
.wl-evidence-list { display: flex; flex-direction: column; gap: 6px; }
.wl-evidence-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--surface-2); border-radius: 8px; transition: background .1s; }
.wl-evidence-item:hover { background: var(--surface-3); }
.wl-evidence-item a { color: var(--accent); font-size: 12px; word-break: break-all; flex: 1; text-decoration: none; font-weight: 500; }
.wl-evidence-item a:hover { text-decoration: underline; }

/* ===== WORKLIB — ENTRY FORM (Notion-style) ===== */
.wl-form { padding: 40px 52px 60px; max-width: 820px; margin: 0 auto; }
.wl-form h2 { font-size: 28px; font-weight: 800; letter-spacing: -.6px; margin-bottom: 0; color: var(--text); line-height: 1.2; }
.wl-form-group { margin-bottom: 28px; }
.wl-form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0; text-transform: none; }
.wl-form-input { width: 100%; border: none; border-bottom: 1.5px solid var(--surface-3); border-radius: 0; padding: 10px 2px; font-size: 14px; color: var(--text); background: transparent; outline: none; transition: border-color .2s; }
.wl-form-input:focus { border-bottom-color: var(--accent); box-shadow: none; }
.wl-form-input::placeholder { color: var(--text-dim); }
select.wl-form-input { cursor: pointer; appearance: auto; padding: 10px 2px; background: transparent; }
.wl-form-title { font-size: 22px; font-weight: 700; padding: 12px 2px; letter-spacing: -.3px; border-bottom-width: 2px; }
.wl-editor-container { min-height: 200px; }
.wl-autosave-indicator { font-size: 11px; color: var(--green); font-weight: 500; }
.wl-form-hint { font-size: 11px; color: var(--text-dim); margin: -4px 0 10px; font-weight: 500; }
.wl-form-actions { display: flex; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--surface-2); }

/* Two-column and three-column layout for small fields */
.wl-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 28px; }

/* Readonly display for auto-filled fields */
.wl-form-readonly { padding: 10px 14px; background: var(--surface-2); border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); border: 1px solid var(--surface-3); }

/* Template picker */
.wl-template-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.wl-template-btn { padding: 7px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--surface-3); cursor: pointer; transition: all .15s; }
.wl-template-btn:hover { background: var(--surface-3); color: var(--text); }
.wl-template-btn.active { background: var(--accent-glow); color: var(--accent); border-color: var(--accent-border); }
.wl-template-btn.recommended { border-style: dashed; border-color: var(--accent-border); }
.wl-template-hint { font-size: 10px; color: var(--text-dim); margin-top: 6px; font-weight: 500; }

/* Evidence links with label */
.wl-evidence-add-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.wl-evidence-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 8px 12px; background: var(--surface-2); border-radius: 8px; }
.wl-evidence-info { flex: 1; min-width: 0; }
.wl-evidence-label { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.wl-evidence-url { display: block; font-size: 11px; color: var(--accent); word-break: break-all; text-decoration: none; }
.wl-evidence-url:hover { text-decoration: underline; }

/* Related entries */
.wl-related-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; }
.wl-related-chips:empty { display: none; }
.wl-related-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--surface-3); }
.wl-related-chip-dir { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; }
.wl-related-chip-dir.upstream { background: rgba(59,130,246,.1); color: #3b82f6; }
.wl-related-chip-dir.downstream { background: rgba(16,185,129,.1); color: #10b981; }
.wl-related-add-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

/* Related entries in detail view */
.wl-related-list { display: flex; flex-direction: column; gap: 6px; }
.wl-related-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border-radius: 10px; cursor: pointer; transition: all .15s; font-size: 13px; }
.wl-related-item:hover { background: var(--surface-3); transform: translateX(2px); }
.wl-related-dir { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; flex-shrink: 0; }
.wl-related-dir.upstream { background: rgba(59,130,246,.1); color: #3b82f6; }
.wl-related-dir.downstream { background: rgba(16,185,129,.1); color: #10b981; }
.wl-related-id { font-weight: 700; color: var(--accent); font-size: 12px; flex-shrink: 0; }
.wl-related-title { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tag input */
.wl-tag-input-wrap { display: flex; flex-direction: column; gap: 10px; }
.wl-tags-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.wl-tags-chips:empty { display: none; }
.wl-tag-chip[data-tag] { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent-border); }
.wl-tag-suggestions { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--surface-3); border-radius: 10px; box-shadow: var(--shadow-md); overflow: hidden; }
.wl-tag-suggestions:empty { display: none; }
.wl-tag-suggestion { padding: 8px 14px; cursor: pointer; font-size: 12px; font-weight: 500; transition: background .1s; }
.wl-tag-suggestion:hover { background: var(--accent-glow); color: var(--accent); }

/* ===== WORKLIB — INSIGHTS ===== */
.wli { padding: 28px 32px; background: #fff; min-height: 100%; }

/* Header */
.wli-head-wrap { margin-bottom: 28px; }
.wli-head-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.wli-title { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.6px; }
.wli-desc { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* Date filter bar */
.wli-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wli-presets { display: flex; gap: 4px; }
.wli-preset-btn { background: transparent; border: 1px solid var(--surface-2); border-radius: 6px; padding: 5px 12px; font-size: 11px; font-weight: 600; color: var(--text-dim); cursor: pointer; transition: all .15s; white-space: nowrap; }
.wli-preset-btn:hover { border-color: var(--accent); color: var(--accent); }
.wli-preset-btn.--on { background: var(--accent); border-color: var(--accent); color: #fff; }
.wli-date-custom { display: flex; align-items: center; gap: 6px; }
.wli-date-icon { display: flex; align-items: center; color: var(--text-dim); flex-shrink: 0; }
.wli-date-input { background: #fff; border: 1px solid var(--surface-2); border-radius: 6px; padding: 5px 8px; font-size: 11px; color: var(--text); font-family: inherit; width: 120px; }
.wli-date-input:focus { outline: none; border-color: var(--accent); }
.wli-date-sep { color: var(--text-dim); font-size: 11px; }
.wli-date-clear { background: none; border: none; color: var(--text-dim); font-size: 15px; cursor: pointer; padding: 2px 4px; line-height: 1; border-radius: 4px; }
.wli-date-clear:hover { color: var(--red); }

/* Tabs */
.wli-tabs { display: flex; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.wli-tab { padding: 7px 18px; font-size: 12px; font-weight: 600; background: transparent; color: var(--text-dim); cursor: pointer; border: none; border-radius: 8px; transition: all .15s; white-space: nowrap; }
.wli-tab:hover { color: var(--text-muted); }
.wli-tab.--on { background: #fff; color: var(--text); box-shadow: var(--shadow-xs); }

/* ---- Stat cards ---- */
.wli-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.wli-card { border-radius: 14px; padding: 18px 20px; background: #fff; border: 1px solid var(--surface-3); position: relative; overflow: hidden; }
.wli-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.wli-card-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wli-card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); }
.wli-card-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.wli-card-num { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -1px; margin-bottom: 4px; color: var(--text); }
.wli-card-sub { font-size: 11.5px; font-weight: 500; color: var(--text-dim); }

/* ---- Blocks (section containers) ---- */
.wli-block { }
.wli-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wli-block-title { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.wli-block-sub { font-size: 11px; color: var(--text-dim); font-weight: 500; }

/* ---- 2-column grid ---- */
.wli-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 0; }
.wli-2col > div { background: #fff; border: 1px solid var(--surface-3); border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 28px; }

/* ---- Status stacked bar ---- */
.wli-status-wrap { background: #fff; border: 1px solid var(--surface-3); border-radius: 14px; padding: 20px 24px; margin-bottom: 14px; }
.wli-sbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-bottom: 10px; background: var(--surface-3); }
.wli-sbar-seg { transition: width .4s ease; min-width: 3px; }
.wli-sbar-seg:first-child { border-radius: 6px 0 0 6px; }
.wli-sbar-seg:last-child { border-radius: 0 6px 6px 0; }
.wli-sbar-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.wli-sbar-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.wli-sbar-item b { color: var(--text); font-weight: 700; }
.wli-sbar-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

/* ---- Monthly chart ---- */
.wli-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
.wli-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.wli-chart-bar-wrap { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.wli-chart-val { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.wli-chart-bar { width: 70%; max-width: 40px; border-radius: 6px 6px 3px 3px; background: var(--accent); opacity: .7; transition: height .4s ease, opacity .2s; }
.wli-chart-bar.--now { background: #6366f1; opacity: 1; }
.wli-chart-col:hover .wli-chart-bar { opacity: 1; }
.wli-chart-lbl { font-size: 11px; color: var(--text-dim); font-weight: 600; margin-top: 8px; }
.wli-chart-lbl.--now { color: #6366f1; }

/* ---- Horizontal bars ---- */
.wli-hbars { display: flex; flex-direction: column; gap: 10px; }
.wli-hbar { display: flex; align-items: center; gap: 10px; }
.wli-hbar-name { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); min-width: 105px; flex-shrink: 0; }
.wli-hbar-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.wli-hbar-track { flex: 1; height: 7px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.wli-hbar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }
.wli-hbar-val { font-size: 13px; font-weight: 700; color: var(--text); min-width: 22px; text-align: right; }

/* ---- Timeline (recent entries) ---- */
.wli-timeline { display: flex; flex-direction: column; }
.wli-tl-row { display: flex; gap: 14px; }
.wli-tl-line { display: flex; flex-direction: column; align-items: center; width: 12px; flex-shrink: 0; padding-top: 5px; }
.wli-tl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wli-tl-stem { flex: 1; width: 1.5px; background: var(--surface-3); margin-top: 4px; }
.wli-tl-body { flex: 1; padding-bottom: 18px; min-width: 0; }
.wli-tl-title { font-size: 13px; font-weight: 600; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wli-tl-meta { font-size: 11px; color: var(--text-dim); margin-top: 1px; display: block; }

/* ---- Contributors (workspace) ---- */
.wli-leaders { display: flex; flex-direction: column; gap: 4px; }
.wli-leader { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; transition: background .12s; }
.wli-leader:hover { background: var(--surface-2); }
.wli-leader-pos { width: 20px; font-size: 12px; font-weight: 700; color: var(--text-dim); text-align: center; flex-shrink: 0; }
.wli-leader-pos.--top { color: var(--accent); }
.wli-leader-av { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: #fff; flex-shrink: 0; }
.wli-leader-info { flex: 1; min-width: 0; }
.wli-leader-name { font-size: 12.5px; font-weight: 600; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.wli-leader-track { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.wli-leader-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s ease; }
.wli-leader-val { font-size: 13px; font-weight: 700; color: var(--text); min-width: 22px; text-align: right; flex-shrink: 0; }

/* ---- Misc ---- */
.wli-up { color: #22c55e; font-weight: 700; }
.wli-down { color: #ef4444; font-weight: 700; }
.wli-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 32px; text-align: center; }
.wli-empty-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--text-dim); }
.wli-empty h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.wli-empty p { font-size: 13px; color: var(--text-dim); max-width: 280px; }

/* My Entries date filter */
.wl-my-date-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }

@media (max-width: 800px) {
  .wli { padding: 20px 14px; }
  .wli-head-top { flex-direction: column; gap: 12px; }
  .wli-filter-bar { flex-direction: column; align-items: flex-start; }
  .wli-presets { flex-wrap: wrap; }
  .wli-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .wli-2col { grid-template-columns: 1fr; gap: 10px; }
  .wli-hbar-name { min-width: 80px; }
}

/* Tabs (generic worklib tabs) */
.wl-tabs { display: flex; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 20px; }
.wl-tab { flex: 1; padding: 9px 4px; text-align: center; font-size: 12px; font-weight: 600; background: transparent; color: var(--text-dim); cursor: pointer; border: none; border-radius: 8px; transition: all .15s; }
.wl-tab:hover { background: var(--surface-3); color: var(--text-2); }
.wl-tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.wl-request-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

/* Inline forms (collections & requests create) */
.wl-form-inline { background: var(--surface-2); border-radius: 14px; padding: 20px 24px; margin-bottom: 20px; animation: cardIn .2s ease; }
.wl-form-inline label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.wl-form-inline input,
.wl-form-inline textarea,
.wl-form-inline select { width: 100%; border: none; border-bottom: 1.5px solid var(--surface-3); border-radius: 0; padding: 10px 2px; font-size: 14px; color: var(--text); background: transparent; outline: none; margin-bottom: 14px; }
.wl-form-inline input:focus,
.wl-form-inline textarea:focus,
.wl-form-inline select:focus { border-bottom-color: var(--accent); box-shadow: none; }

/* ===== NOTIFICATIONS — Bell & Badge ===== */
.notif-wrap { position: relative; display: flex; align-items: center; }
.notif-bell { position: relative; background: none; border: none; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--text-muted); transition: background .15s, color .15s; }
.notif-bell:hover { background: var(--surface-2); color: var(--text); }
.notif-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; border-radius: 10px; display: flex; align-items: center; justify-content: center; line-height: 1; pointer-events: none; }

/* ===== NOTIFICATIONS — Dropdown ===== */
.notif-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 380px; max-height: 500px; background: var(--surface); border: 1px solid var(--surface-3); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); z-index: 999; display: flex; flex-direction: column; animation: modalIn .15s ease; }
.notif-dd-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--surface-2); }
.notif-dd-title { font-size: 14px; font-weight: 800; color: var(--text); letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.notif-dd-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; }
.notif-dd-markall { background: none; border: none; color: var(--accent); font-size: 11px; font-weight: 600; cursor: pointer; padding: 5px 10px; border-radius: 6px; transition: background .15s; }
.notif-dd-markall:hover { background: var(--accent-glow); }
.notif-dd-list { flex: 1; overflow-y: auto; max-height: 360px; }
.notif-dd-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px; cursor: pointer; transition: all .12s; border-left: 3px solid transparent; }
.notif-dd-item:hover { background: var(--surface-1); }
.notif-dd-item.unread { background: var(--accent-glow); border-left-color: var(--accent); }
.notif-dd-item.unread:hover { background: rgba(232,54,109,.08); }
.notif-dd-avatar-wrap { position: relative; flex-shrink: 0; width: 32px; height: 32px; }
.notif-dd-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; }
.notif-dd-type-dot { position: absolute; bottom: -3px; right: -3px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.notif-dd-item.unread .notif-dd-type-dot { border-color: #fef2f2; }
.notif-dd-type-dot svg { width: 9px; height: 9px; }
.notif-dd-body { flex: 1; min-width: 0; }
.notif-dd-msg { font-size: 12px; color: var(--text-2); line-height: 1.45; }
.notif-dd-item.unread .notif-dd-msg { color: var(--text); font-weight: 600; }
.notif-dd-meta { font-size: 10px; color: var(--text-dim); margin-top: 3px; }
.notif-dd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 8px; }
.notif-dd-empty { padding: 40px 16px; text-align: center; color: var(--text-dim); font-size: 12px; display: flex; flex-direction: column; align-items: center; }
.notif-dd-footer { padding: 12px 18px; border-top: 1px solid var(--surface-2); text-align: center; }
.notif-dd-viewall { background: none; border: none; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; padding: 6px 12px; border-radius: 8px; transition: background .15s; width: 100%; }
.notif-dd-viewall:hover { background: var(--accent-glow); }

/* ===== NOTIFICATIONS — Sidebar Badge ===== */
.nav-notif-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; border-radius: 10px; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* ===== NOTIFICATIONS — Page (Full-width two-column) ===== */
.np-page { padding: 28px 32px; }
.np-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.np-header-left { display: flex; align-items: center; gap: 10px; }
.np-title { font-size: 22px; font-weight: 800; color: var(--text); margin: 0; letter-spacing: -.3px; }
.np-header-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 12px; }
.np-header-project { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 8px; letter-spacing: .2px; }
.np-header-right { display: flex; align-items: center; gap: 8px; }

/* Layout */
.np-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }

/* Main column */
.np-main { min-width: 0; }

/* Tabs */
.np-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--surface-2); border-radius: 10px; padding: 3px; width: fit-content; }
.np-tab { background: none; border: none; padding: 8px 20px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-radius: 8px; transition: all .15s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.np-tab:hover { color: var(--text-2); }
.np-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.np-tab svg { opacity: .6; }
.np-tab.active svg { opacity: 1; }

/* Groups */
.np-group { margin-bottom: 24px; }
.np-group-label { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; padding: 0 4px 10px; }
.np-group-items { display: flex; flex-direction: column; gap: 6px; }

/* Cards */
.np-card { position: relative; background: var(--surface); border: 1px solid var(--surface-3); border-radius: var(--radius-lg); cursor: pointer; transition: all .15s; overflow: hidden; }
.np-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.np-card.unread { border-color: var(--accent-border); background: linear-gradient(135deg, var(--accent-glow), var(--surface)); }
.np-card.unread:hover { box-shadow: var(--shadow-md); }
.np-unread-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); border-radius: 3px 0 0 3px; }
.np-card-main { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; }
.np-left { flex-shrink: 0; }
.np-avatar-wrap { position: relative; width: 38px; height: 38px; }
.np-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.np-type-icon { position: absolute; bottom: -3px; right: -3px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.np-type-icon svg { width: 10px; height: 10px; }
.np-content { flex: 1; min-width: 0; }
.np-msg { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.np-msg-project { color: var(--accent); font-weight: 700; }
.np-card.unread .np-msg { color: var(--text); font-weight: 600; }
.np-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.np-sender { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.np-time { font-size: 11px; color: var(--text-dim); }
.np-project { font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 6px; letter-spacing: .3px; display: inline-flex; align-items: center; gap: 4px; }
.np-project-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.np-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.np-type-badge { font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; letter-spacing: .2px; }
.np-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Empty state */
.np-empty { padding: 80px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.np-empty-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--accent-glow); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.np-empty-icon svg { opacity: .6; }
.np-empty-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.np-empty-sub { font-size: 13px; color: var(--text-dim); max-width: 300px; line-height: 1.5; }

/* ===== NOTIFICATIONS — Sidebar ===== */
.np-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.np-sb-card { background: var(--surface); border: 1px solid var(--surface-3); border-radius: var(--radius-lg); padding: 18px 20px; }
.np-sb-card-title { font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; }
.np-sb-card-body { display: flex; flex-direction: column; gap: 8px; }

/* Overview stats */
.np-sb-stats { display: flex; gap: 8px; margin-bottom: 14px; }
.np-sb-stat { flex: 1; text-align: center; padding: 10px 0; background: var(--surface-2); border-radius: var(--radius); }
.np-sb-stat-val { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.3px; line-height: 1.2; }
.np-sb-stat-label { font-size: 9px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }
.np-sb-progress { }
.np-sb-progress-bar { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.np-sb-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #f472b6); border-radius: 4px; transition: width .3s; }
.np-sb-progress-label { font-size: 10px; color: var(--text-dim); font-weight: 600; text-align: right; }

/* Type breakdown */
.np-sb-type-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.np-sb-type-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.np-sb-type-icon svg { width: 12px; height: 12px; }
.np-sb-type-label { font-size: 11px; font-weight: 600; color: var(--text-2); min-width: 70px; }
.np-sb-type-bar { flex: 1; height: 4px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.np-sb-type-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.np-sb-type-count { font-size: 11px; font-weight: 700; color: var(--text); min-width: 16px; text-align: right; }

/* Project breakdown */
.np-sb-proj-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.np-sb-proj-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.np-sb-proj-name { font-size: 12px; font-weight: 600; color: var(--text-2); flex: 1; }
.np-sb-proj-count { font-size: 11px; font-weight: 700; color: var(--text); }
.np-sb-proj-unread { font-size: 9px; font-weight: 700; color: var(--accent); background: var(--accent-glow); padding: 2px 6px; border-radius: 4px; }

/* Sender rows */
.np-sb-sender-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.np-sb-sender-av { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0; }
.np-sb-sender-name { font-size: 12px; font-weight: 600; color: var(--text-2); flex: 1; }
.np-sb-sender-count { font-size: 11px; font-weight: 700; color: var(--text-dim); }

/* Timeline */
.np-sb-timeline-row { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; position: relative; }
.np-sb-timeline-time { font-size: 10px; font-weight: 600; color: var(--text-dim); min-width: 40px; padding-top: 1px; }
.np-sb-timeline-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.np-sb-timeline-msg { font-size: 11px; color: var(--text-2); line-height: 1.4; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sidebar interactive states */
.np-sb-type-row { border-radius: 6px; padding: 6px 8px; margin: -2px -8px; transition: background .12s; }
.np-sb-type-row:hover { background: var(--surface-2); }
.np-sb-type-row.active { background: var(--accent-glow); outline: 1.5px solid var(--accent-border); }
.np-sb-proj-row { border-radius: 6px; padding: 7px 8px; margin: -2px -8px; transition: background .12s; }
.np-sb-proj-row:hover { background: var(--surface-2); }
.np-sb-proj-row.active { background: var(--accent-glow); outline: 1.5px solid var(--accent-border); }

/* Active filter chips */
.np-active-filters { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.np-active-filters-label { font-size: 11px; font-weight: 600; color: var(--text-dim); }
.np-active-filter { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-glow); border: 1px solid var(--accent-border); padding: 4px 10px; border-radius: 20px; cursor: pointer; transition: background .12s; }
.np-active-filter:hover { background: rgba(232,54,109,.1); }
.np-filter-x { font-size: 14px; line-height: 1; margin-left: 2px; opacity: .6; }
.np-clear-all { background: none; border: 1px solid var(--surface-3); color: var(--text-muted); }
.np-clear-all:hover { background: var(--surface-2); }

/* ===== BREADCRUMBS ===== */
.breadcrumb { display: flex; align-items: center; }
.breadcrumb-link { transition: opacity .15s; }
.breadcrumb-link:hover { opacity: .7; }

/* ===== DATE INPUTS — force picker mode ===== */
input[type="date"] {
  cursor: pointer;
  position: relative;
}
input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

/* ===== INLINE EDIT ===== */
.inline-editable {
  cursor: pointer;
  padding: 3px 6px;
  margin: -3px -6px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all .15s;
}
.inline-editable:hover {
  background: var(--surface-2);
  border-color: var(--surface-3);
}
.inline-editable-badge {
  cursor: pointer;
  transition: all .15s;
}
.inline-editable-badge:hover {
  box-shadow: 0 0 0 2px var(--accent-border);
}
.inline-edit-input {
  border: 1.5px solid var(--accent) !important;
  border-radius: 6px;
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
  transition: all .15s;
}

/* ===== CUSTOM DROPDOWN ===== */
.custom-dd-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
}
.custom-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 100;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: ddSlideIn .15s ease;
}
@keyframes ddSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.custom-dd-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-dim);
  padding: 10px 14px 6px;
}
.custom-dd-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 6px 8px;
}
.custom-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all .1s;
}
.custom-dd-item:hover {
  background: var(--surface-2);
}
.custom-dd-item.selected {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}
.custom-dd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== APP HIDDEN ===== */
.app.hidden { display: none; }
.login-screen.hidden { display: none; }
.loading-screen.hidden { display: none; }
