/* =====================================================================
   Workgeniee — professional design system
   One accent hue (professional blue) · neutral blue-tinted surface ramp
   hairline elevation · consistent type, radius and spacing scales.
   ===================================================================== */

/* ---------- 1. Design tokens ---------- */
:root{
  /* Surfaces (blue-tinted neutral ramp) */
  --canvas:#f5f7fb;
  --bg:#f5f7fb;
  --bg-2:#eaeff7;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --surface-3:#eef2f8;
  --line:#e3e8f0;
  --border:#e3e8f0;
  --border-strong:#cbd5e1;
  --rail:rgba(15,27,45,.06);

  /* Text ramp */
  --text:#0f1b2d;
  --text-2:#3d4a5c;
  --muted:#5a6779;
  --muted-2:#7a8798;

  /* Accent — a single professional blue */
  --accent:#2563eb;
  --accent-2:#1d4ed8;
  --accent-3:#1e40af;
  --accent-soft:#dbeafe;
  --accent-tint:#eff6ff;

  /* Type tints — one blue family, differentiated by depth */
  --t-project:#475467;  --t-project-bg:#eef2f7;
  --t-epic:#1e40af;     --t-epic-bg:#e0ecff;
  --t-story:#1d4ed8;    --t-story-bg:#e8f0ff;
  --t-task:#2563eb;     --t-task-bg:#eff6ff;
  --t-subtask:#3b82f6;  --t-subtask-bg:#f5f9ff;

  /* Semantic (used sparingly, for meaning only) */
  --ok:#1a7f4b;      --ok-soft:#eaf7f0;      --ok-line:#c7e6d5;
  --warn:#b25e09;    --warn-soft:#fff7ed;    --warn-line:#fbd9a8;
  --danger:#b42318;  --danger-soft:#fef3f2;  --danger-line:#f7cdc8;

  /* Compatibility aliases (older rules/markup) */
  --success:#1a7f4b; --success-soft:#eaf7f0;
  --warning:#b25e09; --warning-soft:#fff7ed;
  --info:#2563eb;    --info-soft:#eff6ff;

  /* Elevation — used on hover and overlays only */
  --e1:0 1px 2px rgba(16,24,40,.06);
  --e2:0 6px 16px -6px rgba(16,24,40,.16), 0 2px 6px -2px rgba(16,24,40,.06);
  --e3:0 24px 48px -16px rgba(16,24,40,.26), 0 8px 18px -10px rgba(16,24,40,.12);
  --shadow-sm:var(--e1);
  --shadow-md:var(--e2);
  --shadow-lg:var(--e3);

  /* Radius scale */
  --r-xs:4px; --r-sm:6px; --r-ctl:8px; --r-tile:10px; --r-card:12px; --r-panel:14px;
  --radius:12px; --radius-sm:6px;

  /* Motion */
  --dur:.14s;
  --ease:cubic-bezier(.2,.8,.3,1);

  /* Type */
  --font:"Amazon Ember","Segoe UI Variable Text","Segoe UI",-apple-system,BlinkMacSystemFont,Inter,Roboto,"Helvetica Neue",Arial,sans-serif;
  --mono:ui-monospace,"SFMono-Regular","JetBrains Mono",Menlo,Consolas,"Liberation Mono",monospace;
}

[hidden]{display:none !important}

/* ---------- 2. Base ---------- */
*{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:#c2ccd8 transparent}
html,body{margin:0;height:100%}
body{
  font-family:var(--font);
  font-size:14px;
  line-height:1.5;
  color:var(--text);
  background-color:var(--canvas);
  background-image:
    radial-gradient(rgba(37,99,235,.06) 1px, transparent 1.2px),
    radial-gradient(1100px 700px at 100% -12%, rgba(37,99,235,.10), transparent 62%),
    radial-gradient(900px 620px at -12% 6%, rgba(59,130,246,.08), transparent 60%),
    linear-gradient(180deg, #f8faff 0%, #f4f7fd 42%, #f6f9fe 100%);
  background-size:22px 22px, auto, auto, auto;
  background-repeat:repeat, no-repeat, no-repeat, no-repeat;
  background-attachment:fixed;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
h1,h2,h3,h4{margin:0;font-weight:700;letter-spacing:-.012em;color:var(--text)}
p{margin:0}
a{color:var(--accent-2);text-decoration:none}
::selection{background:var(--accent-soft);color:var(--accent-3)}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-thumb{background:#c2ccd8;border-radius:999px;border:2px solid transparent;background-clip:content-box}
*::-webkit-scrollbar-thumb:hover{background:#a7b3c2;background-clip:content-box}
*::-webkit-scrollbar-track{background:transparent}
.muted{color:var(--muted)}
.mono{font-family:var(--mono);font-variant-numeric:tabular-nums;letter-spacing:.01em}
.big{font-size:30px;line-height:1}
.label{font-size:12px;font-weight:600;color:var(--muted)}
.value{font-size:28px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.sub{font-size:12.5px;color:var(--muted)}
.body{min-width:0}
.name{font-weight:600}
.title{font-weight:600;color:var(--text)}
.title-sub{font-size:11.5px;color:var(--muted)}

/* Focus: one consistent, high-contrast ring */
:focus{outline:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--r-sm)}

/* ---------- 3. Shell ---------- */
.shell{display:flex;height:100vh;overflow:hidden}
.main{flex:1;overflow:auto;position:relative}
.app{max-width:1440px;margin:0 auto;padding:28px 32px 64px}

/* ---------- 4. Sidebar ---------- */
.sidebar{
  width:256px;min-width:256px;
  background:var(--surface);
  border-right:1px solid var(--line);
  display:flex;flex-direction:column;
  padding:18px 14px 16px;gap:20px;
}
.brand{display:flex;align-items:center;gap:11px;padding:2px 8px}
.brand-mark{
  width:36px;height:36px;border-radius:var(--r-tile);flex:none;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#fff;font-weight:700;font-size:16px;display:grid;place-items:center;
  box-shadow:0 4px 10px -4px rgba(37,99,235,.55);letter-spacing:-.02em;
}
.brand-text{display:flex;flex-direction:column;min-width:0}
.brand-name{font-size:15px;font-weight:700;letter-spacing:-.015em;color:var(--text)}
.brand-tag{font-size:11.5px;color:var(--muted-2);line-height:1.3}
.nav-label{
  font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;
  color:var(--muted-2);padding:0 10px;
}
.nav{display:flex;flex-direction:column;gap:2px;margin-top:-12px}
.nav-item{
  position:relative;display:flex;align-items:center;gap:10px;width:100%;
  background:transparent;border:1px solid transparent;color:var(--text-2);
  padding:9px 10px 9px 12px;border-radius:var(--r-ctl);
  cursor:pointer;font-size:13.5px;font-weight:600;font-family:inherit;
  transition:background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  text-align:left;
}
.nav-item:hover{background:var(--surface-3);color:var(--text)}
.nav-item.active{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-2);font-weight:650}
.nav-item.active::before{
  content:"";position:absolute;left:-14px;top:7px;bottom:7px;width:3px;
  border-radius:0 3px 3px 0;background:var(--accent);
}
.nav-icon{width:18px;height:18px;flex:none;display:inline-grid;place-items:center;color:var(--muted)}
.nav-icon svg{width:18px;height:18px}
.nav-item:hover .nav-icon,.nav-item.active .nav-icon{color:currentColor}
.sidebar-foot{margin-top:auto;border-top:1px solid var(--line);padding-top:14px}
.conn{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--muted-2);padding:0 8px;line-height:1.4}
.conn-dot{width:7px;height:7px;margin-top:5px;border-radius:50%;background:var(--border-strong);flex:none}
.conn-dot.up{background:var(--ok);box-shadow:0 0 0 3px var(--ok-soft)}
.conn-dot.down{background:var(--danger);box-shadow:0 0 0 3px var(--danger-soft)}
.tour-start{
  display:flex;align-items:center;gap:9px;width:100%;min-height:38px;padding:5px 9px;
  border:1px solid var(--accent-soft);border-radius:var(--r-ctl);background:var(--accent-tint);
  color:var(--accent-2);font:650 12px/1.2 var(--font);text-align:left;cursor:pointer;
  transition:background var(--dur) var(--ease),border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease);
}
.tour-start:hover{background:#e5efff;border-color:#bfdbfe;box-shadow:var(--e1)}
.tour-start-icon{display:grid;place-items:center;width:25px;height:25px;flex:none;border-radius:50%;background:var(--accent);color:#fff}
.tour-start-icon svg{width:14px;height:14px}
.tour-start:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tour-layer{position:fixed;inset:0;z-index:1000;pointer-events:none}
.tour-shade{position:fixed;background:rgba(15,27,45,.48);pointer-events:auto}
.tour-popover{
  position:fixed;width:min(350px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow-y:auto;padding:15px 16px 14px;
  border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:var(--r-panel);
  background:var(--surface);box-shadow:var(--e3);color:var(--text);pointer-events:auto;
  animation:pop-in .16s var(--ease);
}
.tour-popover-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.tour-kicker{font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--accent-2)}
.tour-close{display:grid;place-items:center;width:27px;height:27px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--muted);font:400 20px/1 var(--font);cursor:pointer}
.tour-close:hover{border-color:var(--accent-soft);background:var(--accent-tint);color:var(--accent-2)}
.tour-progress{height:3px;margin:10px 0 9px;overflow:hidden;border-radius:99px;background:var(--surface-3)}
.tour-progress span{display:block;width:0;height:100%;border-radius:inherit;background:var(--accent);transition:width .16s var(--ease)}
.tour-step-count{font-size:10.5px;font-weight:650;color:var(--muted-2)}
.tour-step-name{margin-top:3px;font-size:16px;line-height:1.35;overflow-wrap:anywhere}
.tour-purpose{margin-top:7px;font-size:12.5px;line-height:1.55;color:var(--text-2)}
.tour-list{display:grid;gap:6px;margin:9px 0 0;padding:0;list-style:none}
.tour-list li{position:relative;padding-left:13px;font-size:12px;line-height:1.5;color:var(--text-2)}
.tour-list li::before{content:"";position:absolute;left:2px;top:.62em;width:5px;height:5px;border-radius:50%;background:var(--accent)}
.tour-list strong{font-weight:700;color:var(--text)}
.tour-context-note{margin-top:10px;padding-top:9px;border-top:1px solid var(--line);font-size:10.5px;line-height:1.45;color:var(--muted-2)}
.tour-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px}
.tour-actions button:disabled{opacity:.48;cursor:not-allowed}
/* The shades stop short of the highlighted control, so it is never lifted above the tour layer:
   on a phone the explanation card can overlap a tall control, and the card must stay on top. */
.tour-target{outline:3px solid var(--accent)!important;outline-offset:3px!important;box-shadow:0 0 0 6px rgba(37,99,235,.16)!important}
body.auth-only .tour-start{display:none}

/* ---------- 5. Top bar ---------- */
.topbar{
  position:sticky;top:0;z-index:30;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  height:60px;padding:0 32px;
  background:rgba(255,255,255,.9);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.topbar-left{display:flex;align-items:center;gap:8px;min-width:0}
.topbar-title{font-size:14.5px;font-weight:700;color:var(--text);letter-spacing:-.012em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-actions{display:flex;align-items:center;gap:8px;flex:none}
.topbar-btn,.icon-btn{
  display:inline-grid;place-items:center;
  width:34px;height:34px;border-radius:var(--r-ctl);
  background:var(--surface);border:1px solid var(--line);color:var(--text-2);
  cursor:pointer;transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.topbar-btn:hover,.icon-btn:hover{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-2)}
.topbar-btn svg,.icon-btn svg{width:17px;height:17px}
.notif-wrap,.cal-wrap,.user-wrap{position:relative}
.notif-bell{position:relative;width:34px;height:34px;border-radius:var(--r-ctl);display:grid;place-items:center}
.notif-bell svg{width:18px;height:18px}
.notif-badge{
  position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;
  background:var(--danger);color:#fff;font-size:10px;font-weight:700;
  display:grid;place-items:center;box-shadow:0 0 0 2px var(--surface);
}
.auth-only{display:inline-flex}
.user-chip{
  display:inline-flex;align-items:center;gap:9px;height:34px;padding:0 10px 0 4px;
  background:var(--surface);border:1px solid var(--line);border-radius:999px;
  color:var(--text);cursor:pointer;font-family:inherit;
  transition:border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.user-chip:hover{border-color:var(--accent-soft);background:var(--accent-tint)}
.user-avatar{
  width:26px;height:26px;border-radius:50%;flex:none;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;font-size:11px;font-weight:700;
}
.user-avatar.lg{width:40px;height:40px;font-size:14px}
.user-chip-text{display:flex;flex-direction:column;line-height:1.15;min-width:0;text-align:left}
.user-chip-name{font-size:12.5px;font-weight:650;white-space:nowrap}
.user-chip-sub{font-size:10.5px;color:var(--muted-2);white-space:nowrap}
.user-pop{
  position:absolute;top:46px;right:0;width:min(304px,calc(100vw - 24px));z-index:36;
  max-height:calc(100vh - 70px);overflow-x:hidden;overflow-y:auto;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-panel);
  box-shadow:var(--e3);animation:pop-in .16s var(--ease);
}
.user-pop-head{display:flex;align-items:center;gap:11px;padding:15px 14px 13px}
.user-pop-id{min-width:0;display:flex;flex-direction:column;gap:1px}
.user-pop-name{font-size:13.5px;font-weight:700;color:var(--text);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-pop-line{font-size:11.5px;font-weight:500;color:var(--muted);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-pop-meta{
  display:flex;align-items:center;gap:8px;margin:0 14px;padding:0 0 12px;
  border-bottom:1px solid var(--line);min-width:0;
}
.user-pop-meta .role-pill{flex:none}
.user-pop-provider{margin-left:auto;font-size:10.5px;font-weight:600;color:var(--muted-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-pop-group{padding:5px 6px 6px}
.user-pop-group + .user-pop-group{border-top:1px solid var(--line);padding-top:4px}
.user-pop-sect{
  padding:9px 9px 4px;font-size:9.5px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;
  color:var(--muted-2);line-height:1.4;
}
.user-pop-action{
  display:flex;align-items:center;gap:9px;width:100%;padding:8px 9px;border:none;border-radius:7px;
  background:transparent;color:var(--text);font-size:12.5px;font-weight:600;font-family:inherit;
  cursor:pointer;text-align:left;line-height:1.35;text-decoration:none;
  transition:background var(--dur) var(--ease),color var(--dur) var(--ease);
}
.user-pop-action:hover,.user-pop-action:focus-visible{background:var(--accent-tint);color:var(--accent-2)}
.user-pop-action svg{width:15px;height:15px;flex:none;color:var(--muted)}
.user-pop-action:hover svg,.user-pop-action:focus-visible svg{color:var(--accent)}
.up-text{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.up-meta{
  flex:none;max-width:112px;font-size:9.5px;font-weight:700;letter-spacing:.02em;color:var(--muted);
  background:var(--surface-2);border:1px solid var(--line);border-radius:5px;padding:1px 5px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* The project you are in: a label, not a link (the other projects, if any, are buttons). */
.user-pop-action.is-current-project,.user-pop-action.is-current-project:hover{cursor:default;background:transparent;color:var(--text)}
.user-pop-action.is-current-project svg{color:var(--accent)}
.user-pop-foot{border-top:1px solid var(--line);padding:5px 6px 6px}
.user-pop-action.is-signout{color:var(--danger)}
.user-pop-action.is-signout svg{color:var(--danger)}
.user-pop-action.is-signout:hover,.user-pop-action.is-signout:focus-visible{background:var(--danger-soft);color:var(--danger)}
.user-pop-hint{
  display:flex;flex-wrap:wrap;align-items:center;gap:3px;padding:9px 14px 10px;
  border-top:1px solid var(--line);background:var(--surface-2);
  font-size:10px;line-height:1.6;color:var(--muted-2);
}
.user-pop-hint kbd,.shortcut-kbd{
  display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;
  padding:0 4px;border:1px solid var(--line-strong);border-bottom-width:2px;border-radius:4px;
  background:var(--surface);font:600 9.5px/1 var(--mono);color:var(--text-2);
}
@media(max-width:640px){
  .user-pop{width:min(320px,calc(100vw - 20px));max-height:calc(100vh - 78px);overflow-y:auto}
}

/* ---------- 6. Page header ---------- */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px}
.page-title{position:relative;font-size:24px;font-weight:700;letter-spacing:-.022em;line-height:1.15;padding-left:14px}
.page-title::before{
  content:"";position:absolute;left:0;top:4px;bottom:4px;width:3px;border-radius:2px;
  background:var(--accent);
}
.page-sub{font-size:13.5px;color:var(--muted);margin-top:7px;max-width:720px;line-height:1.55;padding-left:14px}
.head-actions{display:flex;gap:10px;flex:none;align-items:center;flex-wrap:wrap;min-width:0}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:26px 0 12px}
.section-title{font-size:15.5px;font-weight:700;letter-spacing:-.015em}
.section-sub{font-size:12.5px;color:var(--muted);margin-top:3px}

/* ---------- 7. Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:1px solid transparent;cursor:pointer;font-family:inherit;
  background:linear-gradient(135deg,#3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
  color:#fff;padding:9px 14px;border-radius:var(--r-ctl);
  font-weight:650;font-size:13px;white-space:nowrap;
  box-shadow:0 1px 2px rgba(16,24,40,.14), inset 0 1px 0 rgba(255,255,255,.18);
  transition:box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
/* A bare inline <svg> has no intrinsic size: inside a flex button it either shrinks to
   0px (every label-with-icon button) or, when the button is wide enough, keeps the SVG
   default box and paints a 300px icon over the page (the sign-in arrow). Button icons
   are one fixed square; wrappers that need another size keep their own rule. */
.btn > svg{width:15px;height:15px;flex:none}
.btn:hover{box-shadow:0 6px 16px -6px rgba(37,99,235,.55), inset 0 1px 0 rgba(255,255,255,.18)}
.btn:active{box-shadow:inset 0 2px 4px rgba(10,24,50,.22)}
.btn.ghost{background:var(--surface);color:var(--text-2);border-color:var(--line);box-shadow:0 1px 2px rgba(16,24,40,.05)}
.btn.ghost:hover{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-2)}
.btn.danger{background:var(--surface);color:var(--danger);border-color:var(--danger-line);box-shadow:none}
.btn.danger:hover{background:var(--danger-soft);border-color:var(--danger)}
.btn.sm{padding:6px 11px;font-size:12.5px;border-radius:var(--r-sm);box-shadow:none}
.btn.icon{padding:0;width:34px;height:34px}
.btn[disabled]{opacity:.5;cursor:not-allowed;box-shadow:none}
.head-actions .btn#newItemBtn, .head-actions .btn#newVersionBtn{
  padding:12px 20px;font-size:14px;border-radius:var(--r-ctl);
}
.head-actions .btn#newItemBtn .nav-icon, .head-actions .btn#newVersionBtn .nav-icon{width:18px;height:18px}
.head-actions .btn#newItemBtn .nav-icon svg, .head-actions .btn#newVersionBtn .nav-icon svg{width:18px;height:18px}

/* ---------- 8. Form primitives ---------- */
.field{margin-bottom:16px}
.field label{
  display:block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted-2);margin-bottom:6px;
}
.field-hint{display:block;margin-top:6px;font-size:11.5px;color:var(--muted);line-height:1.45}
.input, select.input, textarea.input{
  width:100%;height:34px;background:var(--surface);border:1px solid var(--border-strong);
  color:var(--text);border-radius:var(--r-ctl);padding:0 11px;font-size:13px;font-family:inherit;
  transition:border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.input::placeholder{color:var(--muted-2)}
.input:hover, select.input:hover, textarea.input:hover{border-color:#a9b6c6}
/* The same rule for every other field: a click shows the field's own border, and the accent
   ring is kept for keyboard navigation only (body.kb). */
.input:focus, select.input:focus, textarea.input:focus{
  outline:none;border-color:var(--line);background:var(--surface);
}
body.kb .input:focus, body.kb select.input:focus, body.kb textarea.input:focus{
  border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);
}
textarea.input{height:auto;min-height:84px;padding:9px 11px;resize:vertical;line-height:1.5}
select.input{
  appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:30px;
  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='%235a6779' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;
}
.settings-divider{
  margin:20px 0 12px;padding-top:14px;border-top:1px solid var(--line);
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-2);
}

/* ---------- 9. Chips, badges, status, priority ---------- */
.badge{
  display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:var(--r-sm);
  font-size:11px;font-weight:650;line-height:18px;white-space:nowrap;
  background:var(--surface-3);border:1px solid var(--line);color:var(--text-2);
}
.badge .b-ic{width:12px;height:12px;display:inline-grid;place-items:center;flex:none}
.badge .b-ic svg{width:12px;height:12px}
.b-project{background:var(--t-project-bg);border-color:#dfe5ee;color:var(--t-project)}
.b-epic{background:var(--t-epic-bg);border-color:#c7dbff;color:var(--t-epic)}
.b-story{background:var(--t-story-bg);border-color:#cfe0ff;color:var(--t-story)}
.b-task{background:var(--t-task-bg);border-color:#dbeafe;color:var(--t-task)}
.b-subtask{background:var(--t-subtask-bg);border-color:#e2edff;color:var(--t-subtask)}
.badge-mini{font-size:11px;font-weight:650;color:var(--text)}

.status{
  display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:var(--r-sm);
  font-size:11px;font-weight:650;line-height:18px;white-space:nowrap;
  background:var(--surface-3);border:1px solid var(--line);color:var(--text-2);
}
.status::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;flex:none;opacity:.9}
.status.done{background:var(--ok-soft);border-color:var(--ok-line);color:var(--ok)}
.status.active{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-2)}
.status.cancel{background:var(--danger-soft);border-color:var(--danger-line);color:var(--danger)}
.status.muted{background:var(--surface-3);border-color:var(--line);color:var(--muted)}
.status-chip{display:inline-flex;align-items:center}

.priority{
  display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border-radius:var(--r-sm);
  font-size:11px;font-weight:650;line-height:18px;white-space:nowrap;
  background:transparent;border:1px solid transparent;color:var(--muted);
}
.priority svg{width:12px;height:12px;flex:none}
.p-label{font-weight:650}
.p-critical{color:var(--danger)}
.p-high{color:var(--warn)}
.p-medium{color:var(--accent-2)}
.p-low{color:var(--muted-2)}

.key{
  font-family:var(--mono);font-size:10.5px;font-weight:600;letter-spacing:.02em;
  color:var(--muted);background:var(--surface-3);border:1px solid var(--line);
  padding:1px 6px;border-radius:var(--r-xs);white-space:nowrap;font-variant-numeric:tabular-nums;
}
.count-pill{
  font-size:11px;font-weight:650;color:var(--muted);background:var(--surface-3);
  border:1px solid var(--line);border-radius:999px;padding:1px 8px;white-space:nowrap;
}
.fix-pill{
  display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;
  color:var(--accent-2);background:var(--accent-tint);border:1px solid var(--accent-soft);
  border-radius:var(--r-sm);padding:1px 7px;white-space:nowrap;
}
.derived-badge{
  display:inline-flex;align-items:center;gap:4px;font-size:10.5px;font-weight:650;
  color:var(--accent-2);background:var(--accent-tint);border:1px solid var(--accent-soft);
  padding:1px 7px;border-radius:var(--r-sm);white-space:nowrap;
}
.count-badge{
  display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 7px;
  border-radius:999px;background:var(--surface-3);border:1px solid var(--line);
  color:var(--muted);font-size:11px;font-weight:700;flex:none;font-variant-numeric:tabular-nums;
}
.count{margin-left:auto;font-size:11px;font-weight:650;color:var(--muted-2)}
.avatar{
  width:22px;height:22px;border-radius:50%;flex:none;display:inline-grid;place-items:center;
  background:var(--accent-tint);color:var(--accent-3);
  box-shadow:inset 0 0 0 1px var(--accent-soft);
  font-size:10px;font-weight:700;letter-spacing:-.01em;
}
.meta-chip{
  display:inline-flex;align-items:center;gap:7px;padding:5px 11px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface);color:var(--text-2);
  font-size:12px;font-weight:600;box-shadow:var(--e1);
}
.meta-chip svg{width:14px;height:14px;flex:none;color:var(--muted)}
.meta-chip.project svg{color:var(--t-project)}
.meta-chip.epic svg{color:var(--t-epic)}
.meta-chip.story svg{color:var(--t-story)}
.meta-chip.task svg{color:var(--t-task)}
.meta-chip.subtask svg{color:var(--t-subtask)}
.hier-meta{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.meta-pill{display:inline-flex;align-items:center;gap:6px}

/* Type icon tiles — one blue family */
.j-ic{
  width:22px;height:22px;flex:none;display:inline-grid;place-items:center;
  border-radius:var(--r-sm);background:var(--t-task-bg);color:var(--t-task);
}
.j-ic svg{width:14px;height:14px}
.j-ic-project{background:var(--t-project-bg);color:var(--t-project)}
.j-ic-epic{background:var(--t-epic-bg);color:var(--t-epic)}
.j-ic-story{background:var(--t-story-bg);color:var(--t-story)}
.j-ic-task{background:var(--t-task-bg);color:var(--t-task)}
.j-ic-subtask{background:var(--t-subtask-bg);color:var(--t-subtask)}
.j-ic-rocket{background:var(--accent-tint);color:var(--accent-2)}
.lg .j-ic, .j-ic.lg{width:28px;height:28px;border-radius:var(--r-tile)}
.col-ic{width:20px;height:20px;flex:none;display:inline-grid;place-items:center;border-radius:var(--r-sm);background:var(--surface-3);color:var(--muted)}
.col-ic svg{width:13px;height:13px}
.col-ic.project{background:var(--t-project-bg);color:var(--t-project)}
.col-ic.epic{background:var(--t-epic-bg);color:var(--t-epic)}
.col-ic.story{background:var(--t-story-bg);color:var(--t-story)}
.col-ic.task{background:var(--t-task-bg);color:var(--t-task)}
.col-ic.subtask{background:var(--t-subtask-bg);color:var(--t-subtask)}
.col-dot{width:8px;height:8px;border-radius:2px;background:var(--border-strong);flex:none}
.dot-backlog,.dot-planned,.dot-to_do,.dot-open,.dot-archived,.dot-cancelled{background:var(--border-strong)}
.dot-in_progress,.dot-active{background:var(--accent)}
.dot-in_review,.dot-testing{background:#3b82f6}
.dot-blocked{background:var(--danger)}
.dot-done,.dot-completed,.dot-released{background:var(--ok)}
.dot-unreleased{background:var(--warn)}

/* ---------- 10. Board & cards ---------- */
.board{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;align-items:start;padding-bottom:6px}
.board-col{
  min-width:0;display:flex;flex-direction:column;
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-card);
  max-height:calc(100vh - 232px);overflow:hidden;
  transition:border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.board-col:hover{border-color:var(--border-strong);box-shadow:var(--e1)}
.board-col-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:11px 12px;background:var(--surface);border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:1;
}
.board-col-title{
  display:flex;align-items:center;gap:8px;min-width:0;
  font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);
}
.board-col-title .j-ic,.board-col-title .col-ic,.board-col-title .col-dot{width:20px;height:20px}
.board-col-body{flex:1;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:8px}
.board-add{
  display:inline-flex;align-items:center;gap:4px;white-space:nowrap;
  border:1px solid var(--line);background:var(--surface);color:var(--accent-2);
  font-family:inherit;font-size:11.5px;font-weight:650;padding:4px 9px;border-radius:var(--r-sm);cursor:pointer;
  transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.board-add:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.board-add svg{width:12px;height:12px}
/* Jira keeps the create affordance at the foot of the column: pinned under the
   scrolling card list, full width, quiet until hovered. */
.board-col-foot{padding:8px 10px;border-top:1px solid var(--line);background:var(--surface)}
.board-add-foot{width:100%;justify-content:center;gap:6px;padding:7px 9px;color:var(--muted);font-size:12px}
.board-add-foot svg{width:13px;height:13px}
.board-add-foot:hover{color:var(--accent-2)}
.col-empty{
  display:flex;align-items:center;justify-content:center;gap:7px;
  color:var(--muted-2);font-size:12px;text-align:center;
  padding:22px 10px;border:1px dashed var(--line);border-radius:var(--r-ctl);background:rgba(255,255,255,.55);
}
.col-empty::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--border-strong)}
.board-no-match{
  display:flex;align-items:center;gap:10px;margin-top:14px;padding:16px 18px;
  border:1px solid var(--line);border-radius:var(--r-card);background:var(--surface);
  color:var(--text-2);font-size:13.5px;font-weight:600;
}
.board-no-match[hidden]{display:none}
.board-no-match svg{width:17px;height:17px;color:var(--accent);flex:0 0 auto}

/* ---------- Backlog sprint bar ---------- */
.sprint-bar{
  display:flex;align-items:center;gap:10px;min-width:0;margin:10px 0 14px;padding:9px 11px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);
}
.sprint-bar-ic{
  display:grid;place-items:center;flex:none;width:30px;height:30px;
  border-radius:var(--r-sm);background:var(--accent-tint);color:var(--accent-2);
}
.sprint-bar-ic svg{display:block;width:15px;height:15px}
.sprint-bar-main{display:flex;align-items:center;gap:10px;flex:1;min-width:0}
.sprint-bar .f-sprint{width:auto;max-width:240px}
.sprint-state{min-width:0;color:var(--muted);font-size:12px}
.sprint-total{flex:none;color:var(--muted);font-size:11.5px;white-space:nowrap}
.kanban-note>div{flex:1;min-width:0}
.kanban-note>div strong,.kanban-note>div .field-hint{display:block}
.kanban-note>div strong{font-size:12.5px}
@media(max-width:700px){
  .sprint-bar{flex-wrap:wrap}
  .sprint-bar-main{flex:1 1 200px}
  .sprint-total{margin-left:40px}
}

/* ---------- Work Hierarchy: one box per epic (nested, self-scrolling) ----------
   Each epic owns a box; its story → task → subtask family is nested inside with an
   indent rail, and the box body is the part that scrolls, so the page itself never
   becomes one long scroll to read a single epic. */
.board-epics{grid-template-columns:repeat(auto-fill,minmax(330px,1fr))}
/* The epic board fits on screen: the box is capped so its own body scrolls instead of
   pushing the page down, which is exactly what "separate box … without whole scrolling"
   asks for. `max()` keeps a usable box on a very short window. */
.board-epics .board-col{max-height:max(340px, calc(100vh - 336px))}
.epic-box .board-col-head{align-items:flex-start}
.epic-head-text{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1 1 auto}
.epic-head-key{font-size:12px;font-weight:800;letter-spacing:.02em;color:var(--text-2)}
.epic-head-name{
  font-size:11.5px;font-weight:600;text-transform:none;letter-spacing:0;color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px;
}
.epic-box .board-col-body{gap:7px}
.epic-node{position:relative;min-width:0}
/* Every family row is a dropdown: the chevron opens the branch below it, and the
   children nest one indent step deeper — so depth is expressed by the nesting itself
   (a level-3 row is three steps in), which stays true however deep a family goes. */
.epic-row{display:flex;align-items:flex-start;gap:6px;min-width:0}
.epic-row>.kcard{flex:1 1 auto;min-width:0;width:auto}
.epic-chev{
  flex:none;width:18px;height:18px;margin-top:2px;padding:0;display:grid;place-items:center;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-xs);color:var(--muted);
  cursor:pointer;transition:background var(--dur) var(--ease),border-color var(--dur) var(--ease),color var(--dur) var(--ease);
}
.epic-chev svg{width:11px;height:11px;transition:transform var(--dur) var(--ease)}
.epic-chev:hover{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-2)}
.epic-chev:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.epic-chev.open svg{transform:rotate(90deg)}
/* The board shows only the epics until a dropdown is opened, so the toolbar carries one
   control that opens the whole hierarchy at once. */
.expand-all{display:inline-flex;align-items:center;gap:6px;padding:7px 11px}
.expand-all-chev{display:inline-grid;place-items:center;width:12px;height:12px;flex:none}
.expand-all-chev svg{width:12px;height:12px;transition:transform var(--dur) var(--ease)}
.expand-all.all-open .expand-all-chev svg{transform:rotate(90deg)}
.expand-all-label{white-space:nowrap}
.epic-chev-spacer{flex:none;width:18px;height:18px;margin-top:2px}
/* A row under an epic is a *line* first — the type icon, the issue key and the title,
   nothing else — so a family reads as a list instead of a stack of tiles. Clicking the
   line (the row's own control, with the chevron drawn inside it) opens the row: the line
   stands aside and the work-item card the rest of the app uses takes its place, with that
   item's children as lines under it. Opened, the control shrinks back to the chevron so
   the row looks exactly like the epic's own row and can always be closed again. */
.epic-row-head{
  flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;text-align:left;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-tile);
  padding:7px 10px;font:inherit;color:var(--text);cursor:pointer;
  transition:background var(--dur) var(--ease),border-color var(--dur) var(--ease);
}
.epic-row-head:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.epic-row-head:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.epic-row-chev{flex:none;display:inline-grid;place-items:center;width:13px;height:13px;color:var(--muted)}
.epic-row-chev svg{width:11px;height:11px;transition:transform var(--dur) var(--ease)}
.epic-row-head.open .epic-row-chev svg{transform:rotate(90deg)}
.epic-row-text{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}
.epic-row-text .j-ic{flex:none}
.epic-row-key{flex:none;font-size:11.5px;font-weight:800;letter-spacing:.02em;color:var(--text-2);font-variant-numeric:tabular-nums}
.epic-row-name{
  flex:1 1 auto;min-width:0;font-size:13px;font-weight:600;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.epic-row-count{
  flex:none;font-size:10.5px;font-weight:700;color:var(--accent-2);background:var(--accent-tint);
  border:1px solid var(--accent-soft);border-radius:999px;padding:1px 7px;font-variant-numeric:tabular-nums;
}
/* closed: the line is the row. open: the line steps aside for the item's real card. */
.epic-node:not([data-depth="0"])>.epic-row>.kcard{display:none}
.epic-node:not([data-depth="0"]).open>.epic-row>.kcard{display:flex}
.epic-node:not([data-depth="0"]).open>.epic-row>.epic-row-head{
  flex:none;width:18px;height:18px;margin-top:2px;padding:0;justify-content:center;
}
.epic-node:not([data-depth="0"]).open>.epic-row>.epic-row-head .epic-row-text{display:none}
/* a leaf row owns an empty branch so every row stays a dropdown; it must not add a gap */
.epic-kids:empty{display:none}
.epic-kids{display:flex;flex-direction:column;gap:7px;margin:7px 0 0 14px}
/* A row inside an epic's dropdown is a *tree row*, not a board tile. The indent already says
   who its parent is, so the "▸ parent" line is dropped, the tile gets tighter, and the meta
   stays on one line — so opening an epic reads like Jira's hierarchy instead of a stack of
   tall cards. Everything the card shows elsewhere (key, title, status, badges, assignee,
   due date) is still here. */
.epic-kids .kcard{padding:8px 10px;gap:5px}
.epic-kids .kcard .j-subs .j-sub{display:none}
.epic-kids .kcard-title{font-size:13px}
.epic-kids .kcard-meta{flex-wrap:nowrap;gap:6px;margin-top:0;min-width:0}
.epic-kids .kcard-badges{flex:none}
.epic-kids .kcard-assignee{min-width:0;overflow:hidden;text-overflow:ellipsis}
.epic-kids .kcard-due{flex:none}
.epic-kids.collapsed{display:none}
.epic-node[data-depth="1"]::before,.epic-node[data-depth="2"]::before,.epic-node[data-depth="3"]::before{
  content:"";position:absolute;left:-8px;top:-4px;bottom:-4px;width:1px;background:var(--line);pointer-events:none;
}
.epic-node[data-depth="1"]::after,.epic-node[data-depth="2"]::after,.epic-node[data-depth="3"]::after{
  content:"";position:absolute;left:-8px;top:15px;width:7px;height:1px;background:var(--line);pointer-events:none;
}
.epic-node[data-depth="0"]>.epic-row>.kcard{border-left:3px solid var(--accent)}

.kcard{
  position:relative;display:flex;flex-direction:column;gap:8px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-tile);
  padding:11px 12px;cursor:pointer;
  transition:border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.kcard:hover{border-color:#c9d9f5;box-shadow:var(--e2)}
.kcard:active{border-color:var(--accent-soft)}
.kcard:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.kcard-top{display:flex;align-items:center;gap:8px;min-width:0}
.kcard-spacer{flex:1}
.kcard-pri{flex:none;display:inline-flex}
.kcard-title{font-size:13.5px;font-weight:600;color:var(--text);line-height:1.4;overflow-wrap:anywhere}
.kcard-sub{display:block;font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kcard-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11.5px;color:var(--muted);margin-top:2px}
.kcard-status{display:inline-flex}
.kcard-assignee{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;color:var(--text-2);margin-left:auto}
.kcard-assignee .avatar{width:18px;height:18px;font-size:9px}
.kcard-due{display:inline-flex;align-items:center;gap:4px;color:var(--muted);white-space:nowrap}
.kcard-due svg{width:12px;height:12px}
.kcard-due.overdue{color:var(--danger);font-weight:650}
.kcard-due.soon{color:var(--text);font-weight:650}
.kcard-badges{display:inline-flex;align-items:center;gap:7px}
.kcard-badge{display:inline-flex;align-items:center;gap:3px;color:var(--muted);font-size:11px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.kcard-badge svg{width:12px;height:12px}
/* The card's "⋯" actions chip: quiet until the card is hovered or the chip is
   focused, so the card face stays calm (Jira shows it on hover). */
.kcard-more{
  display:inline-grid;place-items:center;width:24px;height:24px;flex:none;
  border-radius:var(--r-sm);background:var(--surface-3);border:1px solid var(--line);
  color:var(--muted);cursor:pointer;opacity:.62;
  transition:background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.kcard-more svg{width:14px;height:14px}
.kcard:hover .kcard-more,.kcard:focus-within .kcard-more{opacity:1}
.kcard-more:hover,.kcard-more[aria-expanded="true"]{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-2);opacity:1}
.kcard-more:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* Drag & drop on status boards: a grab handle appears on the card, the column
   under the pointer says whether the drop is a legal workflow transition. */
.kcard-draggable{cursor:grab}
.kcard-grip{display:inline-grid;place-items:center;flex:none;color:var(--muted-2);opacity:.5;transition:opacity var(--dur) var(--ease)}
.kcard-grip svg{width:14px;height:14px}
.kcard:hover .kcard-grip,.kcard:focus-within .kcard-grip{opacity:1}
.kcard.dragging{opacity:.45}
.board-col.drop-ok{background:var(--accent-tint);border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-soft)}
.board-col.drop-no{border-color:var(--danger-line);box-shadow:inset 0 0 0 1px var(--danger-soft)}
.j-subs{display:flex;gap:6px;flex:0 1 auto;min-width:0;overflow:hidden;align-items:center}
.j-sub{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rcard{cursor:default}
.j-grip{color:var(--muted-2);display:inline-grid;place-items:center;user-select:none}
.j-grip svg{width:16px;height:16px}

/* ---------- 11. Overview: hero + stats ---------- */
.hero{
  position:relative;overflow:hidden;border-radius:var(--r-panel);
  padding:26px 28px;color:#fff;
  background:linear-gradient(118deg,#3b82f6 0%, #2563eb 52%, #1d4ed8 100%);
  box-shadow:0 18px 40px -20px rgba(37,99,235,.45);
}
.hero h1{font-size:22px;font-weight:700;letter-spacing:-.022em;color:#fff;margin-bottom:8px}
.hero p{font-size:13.5px;line-height:1.6;color:rgba(255,255,255,.9);max-width:640px}
.hero::after{
  content:"";position:absolute;right:-70px;top:-70px;width:240px;height:240px;border-radius:50%;
  background:rgba(255,255,255,.09);
}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-top:18px}
.stat{
  position:relative;overflow:hidden;background:var(--surface);
  border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:var(--r-card);
  padding:16px 18px;box-shadow:var(--e1);
  transition:border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.stat:hover{box-shadow:var(--e2);border-color:#cddcf7}
.stat .label{font-size:11.5px;font-weight:650;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.stat .value{margin-top:8px;font-size:28px}
.stat .ico{
  position:absolute;right:16px;top:16px;width:32px;height:32px;border-radius:var(--r-tile);
  display:grid;place-items:center;background:var(--accent-tint);color:var(--accent);
  border:1px solid var(--accent-soft);
}
.stat .ico svg{width:16px;height:16px}

/* ---------- 12. Toolbar & filters ---------- */
.toolbar{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);
  padding:11px 12px;margin-bottom:16px;
}
/* Quick filters live in the same toolbar card, separated by a hairline so the
   chip row reads as a second line of the filter bar (Jira does the same). */
.quick-row{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  border-top:1px solid var(--line);margin-top:2px;padding-top:10px}
.quick-label{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-2)}
.quick-chip{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface);color:var(--text-2);font-size:12px;font-weight:600;cursor:pointer;
  transition:background var(--dur),border-color var(--dur),color var(--dur)}
.quick-chip svg{width:13px;height:13px}
.quick-chip:hover{background:var(--accent-soft);border-color:#bfdbfe;color:var(--accent-2)}
.quick-chip[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-2)}
.filter-count{margin-left:auto;display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;border-radius:999px;
  border:1px solid var(--accent);background:var(--accent-tint);color:var(--accent-2);font-size:12px;font-weight:700;cursor:pointer}
.filter-count svg{width:13px;height:13px}
.filter-count:hover{background:var(--accent-soft)}
.toolbar .search{position:relative;flex:1;min-width:220px}
.toolbar .search input{padding-left:34px;background:var(--surface)}
.toolbar .search svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:var(--muted-2)}
/* The issue navigator's Search / JQL box is the same icon-in-field. Without these rules its
   magnifier drew at the full width of the filter panel, above the box. */
.nav-search-form .search{position:relative}
.nav-search-form .search input{width:100%;padding-left:34px;background:var(--surface)}
.nav-search-form .search svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:var(--muted-2);pointer-events:none}
.toolbar .input,.toolbar select.input{background:var(--surface);border-color:var(--border-strong);width:auto;min-width:132px}
/* The toolbar fields follow the same rule as every other control: a click is quiet, the
   accent ring belongs to keyboard navigation (body.kb). */
.toolbar .input:focus,.toolbar select.input:focus{border-color:var(--line);box-shadow:none}
body.kb .toolbar .input:focus,body.kb .toolbar select.input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.toolbar .btn{box-shadow:none}

/* ---------- 13. Hierarchy table ---------- */
.hier{border:1px solid var(--line);border-radius:var(--r-card);background:var(--surface);overflow:hidden;box-shadow:var(--e1)}
.hier-head,.hier-row{display:grid;grid-template-columns:150px minmax(0,1fr) 120px 120px 140px 96px;gap:12px;align-items:center;padding:11px 16px}
.hier-head{
  background:var(--surface-2);border-bottom:1px solid var(--line);
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-2);white-space:nowrap;
}
.hier-row{border-bottom:1px solid var(--line);transition:background var(--dur) var(--ease)}
.hier-row:last-child{border-bottom:none}
.hier-row:hover{background:var(--surface-2)}
.hier-body{background:var(--surface)}
.cell-level,.cell-work,.cell-status,.cell-priority,.cell-assignee{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px}
.cell-actions{display:flex;justify-content:flex-end;gap:6px}
.work-main{display:flex;align-items:center;gap:9px;min-width:0}
.item-title{font-weight:600;font-size:13px}
.rank{font-family:var(--mono);font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.row-actions{display:flex;gap:6px;justify-content:flex-end}

/* ---------- 14. Data table ---------- */
table.tbl{width:100%;border-collapse:collapse;font-size:13px}
.tbl th{
  text-align:left;padding:10px 14px;background:var(--surface-2);border-bottom:1px solid var(--line);
  color:var(--muted-2);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
}
.tbl td{padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
.tbl tr:last-child td{border-bottom:none}
.tbl tbody tr:hover{background:var(--surface-2)}

/* ---------- 15. Releases ---------- */
.release{
  display:grid;grid-template-columns:150px 1fr;gap:18px;padding:18px;
  border:1px solid var(--line);border-radius:var(--r-card);background:var(--surface);box-shadow:var(--e1);
}
.release + .release{margin-top:14px}
.release .vname{font-size:15px;font-weight:700;letter-spacing:-.01em}
.release .vdesc{font-size:12.5px;color:var(--muted);margin-top:4px;line-height:1.5}
.progress{height:6px;background:var(--surface-3);border-radius:999px;overflow:hidden;margin-top:10px}
.progress > div{height:100%;border-radius:999px;background:var(--accent);transition:width .3s var(--ease)}
.progress-meta{font-size:12px;color:var(--muted);margin-top:7px}
.roadmap-ver-meta{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-ctl);padding:10px 11px;margin-bottom:2px}
.roadmap-ver-meta .r-dates{font-size:11.5px;color:var(--muted);display:flex;gap:7px;align-items:center}
.roadmap-ver-meta .r-count{font-size:11.5px;color:var(--muted);margin-top:6px;font-weight:650}
.roadmap-ver-meta .progress{height:5px;margin-top:8px}

/* ---------- 16. Workflows board (legacy list view) ---------- */
.wf-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}
.wf-card{border:1px solid var(--line);border-radius:var(--r-card);background:var(--surface);overflow:hidden;box-shadow:var(--e1)}
.wf-head{display:flex;align-items:center;gap:9px;padding:14px 16px;border-bottom:1px solid var(--line)}
.wf-head .name{font-size:13.5px;font-weight:700}
.wf-body{padding:14px 16px}
.wf-col{width:300px;min-width:300px;max-height:none}
.wf-status-flow{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:14px}
.status-flow{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:14px}
.flow-arrow{color:var(--border-strong);font-size:11px}
.wf-node{
  display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:var(--r-sm);
  background:var(--surface);border:1px solid var(--line);font-size:11.5px;font-weight:600;color:var(--text-2);
}
.wf-node .node-dot{width:6px;height:6px;border-radius:50%;background:var(--border-strong)}
.wf-node.node-to_do .node-dot,.wf-node.node-backlog .node-dot{background:var(--border-strong)}
.wf-node.node-in_progress .node-dot{background:var(--accent)}
.wf-node.node-done .node-dot{background:var(--ok)}
.wf-node.node-cancelled .node-dot{background:var(--danger)}
.wf-trans-list,.trans-list{display:flex;flex-direction:column;gap:6px}
.wf-trans,.trans-item{
  display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:var(--r-ctl);
  background:var(--surface-2);border:1px solid var(--line);font-size:12px;color:var(--muted);
}
.wf-trans .badge-mini{color:var(--text)}
.wf-val{font-size:10.5px;font-weight:650;color:var(--warn);background:var(--warn-soft);border:1px solid var(--warn-line);padding:1px 7px;border-radius:var(--r-sm)}

/* ---------- 17. Hints, notes, prompts ---------- */
.rollup-prompt{
  display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;
  background:var(--ok-soft);border:1px solid var(--ok-line);color:var(--ok);
  font-size:12.5px;font-weight:600;padding:10px 12px;border-radius:var(--r-ctl);
}
.rollup-prompt.derived-prompt{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-2)}
.rollup-prompt .btn{box-shadow:none}
.rollup-hint{
  display:flex;align-items:center;gap:6px;margin-bottom:12px;padding:8px 10px;
  background:var(--ok-soft);border:1px solid var(--ok-line);color:var(--ok);
  font-size:12px;font-weight:600;border-radius:var(--r-ctl);
}
.r-items{display:flex;flex-direction:column;gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.r-item{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text)}
.r-item .r-ic{width:18px;height:18px;border-radius:var(--r-xs);display:inline-grid;place-items:center;flex:none;background:var(--surface-3);color:var(--muted)}
.r-item .r-ic svg{width:11px;height:11px}
.r-item .r-ic.project{background:var(--t-project-bg);color:var(--t-project)}
.r-item .r-ic.epic{background:var(--t-epic-bg);color:var(--t-epic)}
.r-item .r-ic.story{background:var(--t-story-bg);color:var(--t-story)}
.r-item .r-ic.task{background:var(--t-task-bg);color:var(--t-task)}
.r-item .r-ic.subtask{background:var(--t-subtask-bg);color:var(--t-subtask)}
.r-item .r-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.r-count{font-weight:700;color:var(--text)}
.r-dates{display:flex;align-items:center;gap:7px;font-size:11.5px;color:var(--muted)}

/* ---------- 18. Empty states ---------- */
/* The empty-state CARD. It is always a <div class="empty">, so the rule is scoped to a div:
   an inline element that merely carries the word "empty" — a calendar's blank cell, a
   detail's unset value — must never inherit a bordered, 52px-padded panel. That collision
   is what printed "None" as a boxed 125px card in the Details panel. */
div.empty{
  text-align:center;padding:52px 24px;color:var(--muted);
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-panel);box-shadow:var(--e1);
}
div.empty .big{display:block;font-size:32px;margin-bottom:12px}
div.empty h2{font-size:15.5px;font-weight:700;color:var(--text);margin-bottom:6px}
div.empty p{font-size:13px;color:var(--muted);line-height:1.55;max-width:520px;margin:0 auto}
div.empty .empty-action{margin-top:18px}

/* ---------- 19. Workflow flowchart (pictographical) ---------- */
/* The chart canvas is the reference diagram's canvas: a white panel with a soft blue
   dot grid. It stays white on purpose - only the diagram adopts the reference look. */
.wf-diagram{width:100%;overflow-x:auto;padding:0;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.wf-diagram svg{display:block;height:auto;max-width:none}
.fc-svg-canvas{opacity:1}
.fc-svg-node rect{fill:#eff6ff;stroke:#93c5fd;stroke-width:1.2}
.fc-svg-node text{fill:#1e3a8a;font-size:14px;font-weight:700;letter-spacing:.005em}
.fc-svg-node.cat-done rect{fill:#f0fdf4;stroke:#4ade80}
.fc-svg-node.cat-done text{fill:#166534}
.fc-svg-node.cat-cancelled rect{fill:#f8fafc;stroke:#cbd5e1}
.fc-svg-node.cat-cancelled text{fill:#64748b}
.fc-svg-node.current rect{fill:#dbeafe;stroke:var(--accent);stroke-width:2}
.fc-svg-node.current text{fill:var(--accent-3)}
.fc-svg-guard{fill:#ecfdf5;stroke:#16a34a;stroke-width:1.4}
.fc-svg-line{fill:none;stroke:var(--accent);stroke-width:1.9;opacity:.95}
.fc-svg-trans{cursor:pointer;outline:none}
.fc-svg-trans:hover .fc-svg-line{stroke:var(--accent-2);stroke-width:2.9;opacity:1}
.fc-svg-trans:focus-visible .fc-svg-line{stroke:var(--accent-3);stroke-width:3.1;opacity:1}
.fc-svg-hit{fill:none;stroke:transparent;stroke-width:12;pointer-events:stroke}
/* Connector names are printed on the chart (reference diagram), not hover-only; the
   white halo keeps them readable where a line passes behind the text. They never
   swallow pointer events, so every arrow stays clickable along its whole path. */
.fc-svg-labels{pointer-events:none}
.fc-svg-label{fill:#475569;font-size:11px;font-weight:600;letter-spacing:.01em;paint-order:stroke;stroke:#fff;stroke-width:3.2px;stroke-linejoin:round}

/* ---------- 20. Item detail screen ---------- */
.item-page{display:flex;flex-direction:column;gap:14px}
.item-page-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.item-page-crumb{font-size:12.5px;color:var(--muted);font-family:var(--mono)}
.item-page-body{display:block}
.drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.drawer-head .t{min-width:0;flex:1}
.drawer-head h2{font-size:19px;font-weight:700;letter-spacing:-.02em;line-height:1.3;overflow-wrap:anywhere}
.drawer-head .sub{font-size:13px;color:var(--muted);margin-top:8px;line-height:1.6;max-width:840px}
/* The detail page renders the shared drawer markup as stacked cards. */
.item-page-body .drawer-head{
  padding:20px 22px;margin-bottom:14px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--e1);
}
.item-page-body .drawer-body{
  padding:20px 22px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--e1);
}
.drawer-foot{display:flex;gap:10px}
/* Slide-over drawer keeps the classic flush panel structure. */
.drawer .drawer-head{padding:20px 22px 16px;border-bottom:1px solid var(--line)}
.drawer .drawer-body{flex:1;overflow:auto;padding:20px 22px;background:transparent;border:none;border-radius:0;box-shadow:none}
.drawer .drawer-foot{padding:14px 22px;border-top:1px solid var(--line);background:var(--surface)}
.drawer-child{
  display:flex;align-items:center;gap:8px;margin-bottom:6px;padding:8px 10px;
  border:1px solid var(--line);border-radius:var(--r-ctl);background:var(--surface-2);cursor:pointer;
}
.drawer-child:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.drawer-child .body{flex:1;min-width:0}
.drawer-child .title{font-size:12.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Children tree */
.ctree{display:flex;flex-direction:column;gap:6px}
.ctree-empty{font-size:12px;color:var(--muted-2)}
.ctree-node{display:flex;flex-direction:column}
.ctree-children{
  display:flex;flex-direction:column;gap:6px;margin:6px 0 0 18px;padding-left:12px;
  border-left:1px solid var(--line);
}
.ctree-row{
  display:flex;align-items:center;gap:9px;padding:8px 10px;cursor:pointer;
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-ctl);
  transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ctree-row:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.ctree-row:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.ctree-row .body{flex:1;min-width:0}
.ctree-row .title{font-size:12.5px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ctree-row .sub{font-size:11px;color:var(--muted);margin-top:2px}

/* Links */
.link-list{display:flex;flex-direction:column;gap:6px;margin-bottom:9px}
.link-row{
  display:flex;align-items:center;gap:8px;padding:7px 10px;font-size:12px;
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-ctl);
}
.link-row.in{background:var(--accent-tint);border-color:var(--accent-soft)}
.link-type{font-size:11px;font-weight:700;color:var(--accent-2);white-space:nowrap}
.link-row.in .link-type{color:var(--accent-3)}
.link-target{flex:1;min-width:0;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.link-add{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.link-add select{flex:1;min-width:150px;width:auto}
.link-del{width:26px;height:26px;flex:none}

/* Attachments */
.att-list{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.att-row{
  display:flex;align-items:center;gap:10px;padding:9px 11px;
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-ctl);
}
.att-ic{width:28px;height:28px;flex:none;display:grid;place-items:center;border-radius:var(--r-sm);background:var(--surface-3);color:var(--muted)}
.att-ic svg{width:14px;height:14px}
.att-meta{flex:1;min-width:0}
.att-name{font-size:12.5px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.att-sub{font-size:11px;color:var(--muted);margin-top:2px}
.att-dl,.att-del{width:28px;height:28px;flex:none}
/* An image attachment shows a small thumbnail (it used to render at full size inside the row). */
.att-thumb{width:28px;height:28px;flex:none;padding:0;overflow:hidden;cursor:zoom-in;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface-3)}
.att-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.att-thumb:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.att-preview-modal{display:grid;place-items:center}
.att-preview-modal img{display:block;max-width:100%;max-height:68vh;object-fit:contain;border-radius:var(--r-sm)}
.att-drop-hint{font-size:12px;color:var(--muted)}
.att-add{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
/* The attachment picker is part of the product, not the browser's default chrome:
   one bordered field whose button wears the same quiet blue as every other action. */
.att-add input[type=file]{
  font-size:12px;color:var(--muted);max-width:100%;min-width:0;
  padding:5px 8px;border:1px solid var(--line);border-radius:var(--r-ctl);
  background:var(--surface);cursor:pointer;
}
.att-add input[type=file]::file-selector-button{
  margin-right:9px;padding:5px 11px;border-radius:var(--r-sm);
  border:1px solid var(--line);background:var(--surface-3);color:var(--text);
  font:inherit;font-weight:650;cursor:pointer;transition:background var(--dur) var(--ease),color var(--dur) var(--ease);
}
.att-add input[type=file]::file-selector-button:hover{background:var(--accent-soft);color:var(--accent-2);border-color:#c7d7f6}
.att-add input[type=file]:hover{border-color:var(--border-strong)}


/* Search keeps a match's ancestors on the board, dimmed: the hierarchy stays
   readable instead of a story appearing with no epic above it. */
.kcard.filter-dim,.epic-row-head.filter-dim{opacity:.46;filter:saturate(.55)}
.kcard.filter-dim:hover,.epic-row-head.filter-dim:hover{opacity:.72}

/* Comments, activity, history */
.comment-list{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
.comment-item{padding:11px 13px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-ctl)}
.comment-head{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.comment-head .avatar{width:22px;height:22px;font-size:10px}
.comment-author{font-size:12.5px;font-weight:650;color:var(--text)}
.comment-time{font-size:11px;color:var(--muted-2);margin-left:auto;font-variant-numeric:tabular-nums}
.comment-body{font-size:13px;color:var(--text-2);line-height:1.55;white-space:pre-wrap;word-break:break-word}
.comment-box{display:flex;flex-direction:column;gap:8px}
.comment-box textarea.input{min-height:68px}
.act-list{display:flex;flex-direction:column;gap:6px}
.hist-list{display:flex;flex-direction:column;gap:6px}
/* One feed row, Jira's shape: a lead tile, the sentence, then the moment. */
.wlog-item{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border-radius:var(--r-ctl);border:1px solid transparent;transition:background var(--dur) var(--ease),border-color var(--dur) var(--ease)}
.wlog-item:hover{background:var(--surface-2);border-color:var(--line)}
.wlog-tile{
  width:26px;height:26px;flex:none;display:grid;place-items:center;border-radius:50%;
  background:var(--accent-tint);border:1px solid var(--accent-soft);color:var(--accent-2);font-size:12px;
}
.wlog-tile svg{width:13px;height:13px}
.wlog-body{flex:1;min-width:0}
.wlog-line{font-size:13px;color:var(--text);line-height:1.5;overflow-wrap:anywhere}
.wlog-line strong{font-weight:650}
.wlog-v{
  display:inline-block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  vertical-align:bottom;font-weight:600;
  background:var(--surface-3);border:1px solid var(--line);border-radius:var(--r-xs);
  padding:0 6px;color:var(--text-2);
}
.wlog-v.new{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-3)}
.wlog-was{color:var(--muted)}
.wlog-time{margin-top:2px;font-size:11.5px;color:var(--muted-2);font-variant-numeric:tabular-nums}
/* Jira's work-log row: the author's mark, "Name logged 2h 30m", the note, the moment — and a
   quiet delete that never disappears (it stays reachable by keyboard and by touch). */
.wlog-face{
  display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:50%;
  background:var(--accent-tint);color:var(--accent-3);border:1px solid var(--accent-soft);
  font-size:10.5px;font-weight:700;letter-spacing:.02em
}
.wlog-spent{font-weight:700;color:var(--accent-3)}
.wlog-note{margin-top:2px;font-size:12.5px;color:var(--text-2);line-height:1.5;overflow-wrap:anywhere}
.wlog-del{flex:none;color:var(--muted-2)}
.wlog-del:hover{color:var(--danger);background:var(--danger-soft);border-color:var(--danger-line)}

/* The "Log work" box, drawn as the small form Jira shows inside the Work log tab. */
.stream-total{
  font-size:11.5px;font-weight:700;color:var(--accent-3);background:var(--accent-tint);
  border:1px solid var(--accent-soft);border-radius:999px;padding:2px 8px
}
.stream-logbtn{margin-left:auto}
.wlog-form{
  display:flex;flex-direction:column;gap:8px;padding:11px;margin-bottom:8px;
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-ctl)
}
.wlog-form-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.wlog-form-label{font-size:12px;font-weight:600;color:var(--muted)}
/* Jira's own headings inside the box: a title, sentence-case field names (the generic
   `.field label` rule would shout them in caps), and a required mark on Time spent. */
.wlog-form-title{font-size:13px;font-weight:700;color:var(--text);margin:0 0 10px}
.wlog-form .wlog-form-label,.wlog-form .wlog-field-label{
  display:block;font-size:12px;font-weight:600;text-transform:none;letter-spacing:0;
  color:var(--muted);margin:0 0 4px;
}
.wlog-form .wlog-form-label{margin:0}
.wlog-req{color:var(--danger);font-weight:700;margin-left:2px}
.wlog-form-row .input{flex:1 1 190px;min-width:150px}
.wlog-echo{font-size:12px;font-weight:600;color:var(--accent-3);font-variant-numeric:tabular-nums}
.wlog-echo.bad{color:var(--danger)}
.wlog-form textarea.input{min-height:54px;resize:vertical}
.wlog-form-foot{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:space-between}
.wlog-form-foot .field-hint{flex:1 1 240px;min-width:0}
.wlog-form-foot code{background:var(--surface-3);border:1px solid var(--line);border-radius:4px;padding:0 4px;font-size:11px}
.wlog-form-actions{display:flex;align-items:center;gap:8px;margin-left:auto}

/* ---------- Work stream: one section, three views (All · Activity · Work logs) ---------- */
.stream{display:flex;flex-direction:column;gap:8px}
.stream-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.stream-title{font-size:11.5px;font-weight:700;color:var(--muted-2);text-transform:uppercase;letter-spacing:.05em}
.stream-tabs{display:inline-flex;align-items:center;gap:4px;padding:3px;background:var(--surface-3);border:1px solid var(--line);border-radius:999px}
.stream-tab{
  display:inline-flex;align-items:center;gap:6px;padding:4px 11px;border:0;border-radius:999px;
  background:transparent;color:var(--text-2);font-family:inherit;font-size:12px;font-weight:600;cursor:pointer;
  transition:background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.stream-tab:hover{background:var(--accent-tint);color:var(--accent-2)}
.stream-tab.active{background:var(--surface);color:var(--accent-2);box-shadow:0 1px 2px var(--rail)}
.stream-count{
  display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:17px;padding:0 5px;
  border-radius:999px;background:var(--surface);color:var(--muted-2);font-size:10.5px;font-weight:700;
  font-variant-numeric:tabular-nums;
}
.stream-tab.active .stream-count{background:var(--accent-tint);color:var(--accent)}
.stream-list{display:flex;flex-direction:column;gap:6px;max-height:420px;overflow:auto}
.stream-list:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--r-sm)}
.stream-empty{padding:2px 0}

/* ---------- 21. Chips & transitions ---------- */
.chip{
  display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:var(--r-sm);
  background:var(--surface);border:1px solid var(--border-strong);color:var(--text);
  font-family:inherit;font-size:12px;font-weight:600;cursor:pointer;
  transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-2)}
.transition-chips{display:flex;flex-wrap:wrap;gap:8px}

/* ---------- 22. Overlays: modal, drawer, toasts ---------- */
.overlay{position:fixed;inset:0;z-index:50;background:rgba(15,27,45,.42);backdrop-filter:blur(1.5px);opacity:0;transition:opacity .2s var(--ease)}
.overlay.show{opacity:1}
.modal{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(520px,92vw);max-height:88vh;z-index:60;
  /* Flex column: fixed heading, scrollable field area, always-visible actions.
     Without this the primary Create button falls below the fold on ~760px-tall
     laptop screens and the user has to scroll the dialog to find it. */
  display:flex;flex-direction:column;overflow:hidden;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-panel);
  box-shadow:var(--e3);padding:22px;
}
.modal h2{font-size:17px;font-weight:700;letter-spacing:-.015em;margin-bottom:4px;flex:none}
.modal .sub{font-size:13px;color:var(--muted);margin-bottom:18px;flex:none}
/* The create form is headed by the chosen type alone ("Epic", "Story", "Bug"…); with no
   sub-line under it, the heading keeps the gap the sub-line used to give the Type field. */
.modal h2.create-type-title{margin-bottom:16px}
/* Read by screen readers, never drawn: the create dialog is announced "Create Epic". */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.modal-body{
  flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
  margin:0 -22px;padding:0 22px;overscroll-behavior:contain;
}
/* "More actions" on a work item: one row per action, a small icon tile, the action's name
   and a one-line hint. Without these rules the rows were bare browser buttons and the
   icons drew at full width. */
.action-list{display:flex;flex-direction:column;gap:8px}
.action-row{
  display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:12px;width:100%;
  padding:10px 12px;border:1px solid var(--line);border-radius:var(--r-ctl);background:var(--surface);
  color:var(--text);font:inherit;text-align:left;cursor:pointer;
  transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.action-row:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.action-row:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.action-row>svg{box-sizing:content-box;width:18px;height:18px;padding:8px;border-radius:8px;background:var(--accent-tint);color:var(--accent-2)}
.action-row>span{display:flex;flex-direction:column;gap:2px;min-width:0}
.action-row strong{font-size:13.5px;font-weight:650;color:var(--text)}
.action-row small{font-size:12px;line-height:1.4;color:var(--muted)}
.modal-foot{
  flex:none;display:flex;justify-content:flex-end;gap:10px;
  margin:16px -22px -22px;padding:14px 22px 18px;
  border-top:1px solid var(--line);background:var(--surface);
  border-radius:0 0 var(--r-panel) var(--r-panel);
}
.drawer{
  position:fixed;top:0;right:0;bottom:0;width:min(440px,92vw);z-index:55;
  background:var(--surface);border-left:1px solid var(--line);
  box-shadow:-18px 0 48px -26px rgba(15,27,45,.38);
  display:flex;flex-direction:column;overflow:auto;
  transform:translateX(100%);transition:transform .24s var(--ease);
}
.drawer.show{transform:translateX(0)}
#modalOverlay{z-index:59}
/* The workflow editor opens over the workflow diagram, so its dialog must sit above
   the diagram's own backdrop (72) and panel (73). */
body.wf-editing #modalOverlay{z-index:79}
body.wf-editing #modal{z-index:80}
.toast-wrap{position:fixed;top:20px;right:20px;display:flex;flex-direction:column;gap:10px;z-index:80}
.toast{
  display:flex;align-items:center;gap:9px;max-width:min(420px,92vw);
  background:var(--surface);border:1px solid var(--line);border-left:3px solid var(--accent);
  border-radius:var(--r-ctl);box-shadow:var(--e3);padding:11px 14px;
  font-size:13px;font-weight:600;color:var(--text);animation:toast-in .16s var(--ease);
}
.toast.ok{border-left-color:var(--ok)}
.toast.warn{border-left-color:var(--warn)}
/* The drag & drop undo rides inside the toast, Jira-style. */
.toast-action{
  margin-left:auto;flex:none;font-family:inherit;font-size:12px;font-weight:700;
  color:var(--accent-2);background:var(--accent-tint);border:1px solid var(--accent-soft);
  border-radius:var(--r-sm);padding:4px 9px;cursor:pointer;
  transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.toast-action:hover{background:var(--accent-soft);border-color:var(--accent)}
.toast-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.toast svg{width:16px;height:16px;flex:none;color:var(--accent)}
.toast.ok svg{color:var(--ok)}
.toast.warn svg{color:var(--warn)}

/* ---------- 23. Notifications ---------- */
.notif-pop{
  position:absolute;top:44px;right:0;width:min(420px,calc(100vw - 24px));z-index:35;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-panel);
  box-shadow:var(--e3);overflow:hidden;animation:pop-in .16s var(--ease);
}
/* The head wraps, and the actions keep their own row when the panel is narrow:
   the actions used to overflow the panel, and the clipped "Mark all read"
   button could not be clicked at all — a dead button reads as a broken app. */
.notif-pop-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:13px 15px;border-bottom:1px solid var(--line)}
.notif-pop-title{display:flex;align-items:center;gap:9px;font-size:13.5px;font-weight:650;color:var(--text);min-width:0;flex:1 1 auto}
.notif-pop-title strong{white-space:nowrap}
.notif-unread{font-size:11px;font-weight:650;color:var(--accent-2);background:var(--accent-tint);border:1px solid var(--accent-soft);padding:1px 8px;border-radius:999px}
.notif-pop-search{position:relative;padding:10px 12px;border-bottom:1px solid var(--line)}
.notif-pop-search .input{padding-left:32px}
.notif-pop-search svg{position:absolute;left:22px;top:50%;transform:translateY(-50%);width:14px;height:14px;color:var(--muted-2)}
.notif-pop-list{display:flex;flex-direction:column;gap:8px;padding:10px 12px;max-height:min(460px,calc(100vh - 150px));overflow-y:auto}
.notif-pop-list .notif-card{box-shadow:none}
/* The honest footer for a shared inbox: who sees these notifications, and that
   sign-in is optional. It states the product decision instead of implying per-person. */
.notif-pop-note{
  padding:9px 14px;border-top:1px solid var(--line);
  font-size:11.5px;line-height:1.45;color:var(--muted-2);background:var(--surface-2);
  border-radius:0 0 var(--r-panel) var(--r-panel);
}
.notif-list{display:flex;flex-direction:column;gap:10px;max-width:880px}
.notif-card{
  display:flex;align-items:flex-start;gap:12px;padding:13px 15px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);
  box-shadow:var(--e1);transition:border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.notif-card:hover{border-color:var(--border-strong)}
.notif-card.unread{background:var(--accent-tint);border-color:var(--accent-soft)}
.notif-ic{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--r-tile);background:var(--surface-3);color:var(--muted);font-size:14px}
.notif-card.unread .notif-ic{background:var(--surface);color:var(--accent)}
.notif-body{flex:1;min-width:0}
.notif-msg{font-size:13px;font-weight:600;color:var(--text);line-height:1.45}
.notif-meta,.notif-dot{font-size:11.5px;color:var(--muted);margin-top:4px}
.notif-read{margin-left:8px;flex:none}
.notif-pop-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}
.notif-pop-actions .btn{flex:none}
.notif-only[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent-soft);color:var(--accent-3)}
/* A notification that points at a work item is a real control — it must look and
   behave like one (cursor, hover, focus ring) exactly like a board card. */
.notif-card.openable{cursor:pointer}
.notif-card.openable:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.notif-card.openable:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.notif-go{flex:none;align-self:center;display:grid;place-items:center;width:22px;height:22px;color:var(--muted-2)}
.notif-go svg{width:15px;height:15px}
.notif-card.openable:hover .notif-go{color:var(--accent)}
.notif-dot.read{font-weight:600}

/* ---------- 24. Calendar ---------- */
.cal-pop{
  position:absolute;top:44px;right:0;width:min(400px,calc(100vw - 24px));z-index:35;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-panel);
  box-shadow:var(--e3);overflow:hidden;animation:pop-in .16s var(--ease);
}
.cal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 15px;border-bottom:1px solid var(--line)}
.cal-title{font-size:13.5px;font-weight:650;color:var(--text);font-variant-numeric:tabular-nums}
.cal-nav{display:flex;gap:6px}
.cal-jump{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 12px 0}
.cal-jump-label{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-2)}
.cal-select{
  height:30px;background:var(--surface);border:1px solid var(--border-strong);color:var(--text);
  border-radius:var(--r-ctl);padding:0 24px 0 9px;font-size:12.5px;font-family:inherit;font-weight:600;
  font-variant-numeric:tabular-nums;cursor:pointer;appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%235a6779' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 8px center;
  transition:border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.cal-select:hover{border-color:#a9b6c6}
.cal-select:focus{outline:none;border-color:var(--line)}
body.kb .cal-select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
/* minmax(0,1fr): a long item name inside a day can never widen its column and push the week
   out of the calendar card. */
.cal-weekdays,.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;padding:0 12px}
.cal-weekdays span{text-align:center;font-size:11.5px;font-weight:650;color:var(--muted)}
.cal-weekdays{padding-top:12px}
.cal-day-head{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-2);text-align:center;padding:4px 0}
.cal-grid{padding-bottom:12px}
.cal-cell{
  position:relative;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;
  border:1px solid transparent;border-radius:var(--r-sm);background:transparent;color:var(--text);
  font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer;font-variant-numeric:tabular-nums;
  transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cal-cell:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.cal-cell.selected,.cal-cell.today{border-color:var(--accent);color:var(--accent-2);background:var(--accent-tint)}
.cal-cell:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
/* How many items are due that day: a small count badge in the cell's corner, so the number
   is readable instead of spilling out of a 5px dot. */
.cal-dot{position:absolute;top:2px;right:2px;min-width:15px;height:15px;padding:0 4px;border-radius:999px;background:var(--accent);color:#fff;font-size:9.5px;font-weight:700;line-height:15px;text-align:center;font-variant-numeric:tabular-nums}
.cal-day{display:flex;align-items:center;justify-content:center}
.cal-empty{border:none;background:transparent;cursor:default}
.cal-day-panel{border-top:1px solid var(--line);padding:12px;max-height:240px;overflow-y:auto}
.cal-day-items{display:flex;flex-direction:column;gap:6px}
.cal-item{
  display:flex;align-items:center;gap:8px;width:100%;text-align:left;cursor:pointer;
  padding:8px 10px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-ctl);
  font-family:inherit;transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cal-item:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.cal-item-title{flex:1;min-width:0;font-size:12.5px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cal-today-bar{display:flex;justify-content:center;padding:0 12px 12px}
.cal-legend{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}

/* ---------- 25. Sign-in screen ---------- */
/* Focused sign-in surface: the workspace chrome is hidden while signed out. */
body.auth-only .sidebar,
body.auth-only .topbar{display:none}
body.auth-only{display:block;min-height:100vh}
body.auth-only .login-wrap{min-height:100vh}
body.auth-only .shell{display:block;height:auto;min-height:100vh;overflow:visible}
body.auth-only .main{height:auto;min-height:100vh;overflow:visible}
body.auth-only .app{max-width:none;padding:0}
.login-wrap{display:grid;place-items:center;min-height:calc(100vh - 190px);padding:24px}
.login-card{
  width:min(420px,100%);background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-panel);box-shadow:var(--e2);padding:30px 28px;text-align:center;
}
.login-mark{
  width:44px;height:44px;margin:0 auto 16px;border-radius:var(--r-tile);display:grid;place-items:center;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;font-weight:700;font-size:18px;
}
.login-title{font-size:19px;font-weight:700;letter-spacing:-.02em;margin-bottom:8px}
.login-sub{font-size:13px;color:var(--muted);line-height:1.6;margin-bottom:20px}
.login-btn{width:100%;justify-content:center;gap:9px;padding:11px 18px;font-size:13.5px}
.login-btn > svg{width:16px;height:16px;flex:none}
.login-error{position:relative;z-index:1;margin-top:14px;font-size:12.5px;line-height:1.55;color:var(--danger);background:var(--danger-soft);border:1px solid var(--danger-line);padding:9px 12px;border-radius:var(--r-ctl);text-align:left;overflow-wrap:anywhere}
.login-foot{margin-top:18px;font-size:11.5px;color:var(--muted-2)}
/* Shown instead of the demo cards when a deployment has them switched off: the reader must
   know the card is complete, not that a control failed to render. */
.login-help{margin:0;font-size:12px;line-height:1.6;color:var(--muted-2)}
.login-help strong{color:var(--text);font-weight:600}
.login-help code{font-family:var(--mono);font-size:11px;background:var(--surface-2);border:1px solid var(--line);
  border-radius:5px;padding:1px 5px;color:var(--text);white-space:nowrap}

/* ---------- 25b. Local sign-in, role hierarchy and the user directory ---------- */
.login-card-wide{width:min(780px,100%);text-align:left;padding:28px}
.login-head{display:flex;gap:14px;align-items:flex-start;margin-bottom:18px}
.login-head .login-mark{margin:0;flex:none}
.login-head .login-sub{margin-bottom:0}
.login-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:22px}
.login-form{display:flex;flex-direction:column;gap:6px}
.login-label{font-size:12px;font-weight:600;color:var(--muted);margin-top:8px}
.login-form .input{width:100%}
.login-form .btn{margin-top:14px}
.login-demo{border-left:1px solid var(--line);padding-left:22px}
.login-demo-head{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-2);margin-bottom:10px}
.login-demo-grid{display:grid;gap:8px}
.login-role{
  display:grid;grid-template-columns:auto minmax(0,1fr);gap:2px 10px;align-items:center;text-align:left;
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-card);padding:9px 12px;cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.login-role:hover{background:var(--accent-soft);border-color:var(--accent-soft);transform:translateY(-1px)}
.login-role:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.login-role strong{font-size:12.5px;color:var(--text)}
.login-role-id{grid-column:2;font-family:var(--mono);font-size:11.5px;color:var(--muted)}
.login-role-blurb{grid-column:1 / -1;font-size:11.5px;color:var(--muted-2);line-height:1.45}
.role-pill{display:inline-flex;align-items:center;gap:6px;padding:2px 9px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.02em;border:1px solid transparent;white-space:nowrap}
.role-admin{background:#eef2ff;border-color:#c7d2fe;color:#3730a3}
.role-manager{background:#eff6ff;border-color:#bfdbfe;color:#1e40af}
.role-analyst{background:#ecfdf5;border-color:#bbf7d0;color:#166534}
.role-intern{background:#f8fafc;border-color:#e2e8f0;color:#475569}
.role-legend{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.role-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);padding:12px;display:flex;flex-direction:column;gap:8px}
.role-card-blurb{font-size:11.5px;color:var(--muted);line-height:1.5}
.users-add{margin-bottom:14px;padding:16px 18px}
.users-scope{
  display:flex;gap:6px;flex-wrap:wrap;align-items:baseline;
  background:var(--accent-tint);border:1px solid var(--accent-soft);border-radius:var(--r-ctl);
  padding:10px 13px;margin-bottom:14px;font-size:12.5px;line-height:1.55;color:var(--text-2);
}
.users-scope strong{color:var(--accent-2);font-weight:700}
.users-self{font-size:10px;font-weight:700;color:var(--muted-2)}
.users-locked{font-size:11px;font-weight:600;color:var(--muted-2);white-space:nowrap}
.users-add .section-sub{margin:2px 0 12px}
.users-form{display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) auto;gap:10px;align-items:end}
.users-form label{display:flex;flex-direction:column;gap:5px;font-size:11.5px;font-weight:600;color:var(--muted);min-width:0}
.users-table{width:100%;border-collapse:collapse;font-size:12.5px}
.users-table th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted-2);padding:8px 10px;border-bottom:1px solid var(--line)}
.users-table td{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
.users-table tr:last-child td{border-bottom:none}
.users-table .users-sub{font-size:11px;color:var(--muted-2);margin-top:2px}
.users-table .input.sm{padding:5px 8px;font-size:12px;width:auto;min-width:110px}
.status-pill{font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px}
.status-pill.ok{background:#ecfdf5;color:#166534}
.status-pill.muted{background:#f1f5f9;color:#475569}
@media(max-width:900px){
  .login-grid{grid-template-columns:1fr}
  .login-demo{border-left:none;padding-left:0;border-top:1px solid var(--line);padding-top:16px}
  .role-legend{grid-template-columns:1fr 1fr}
  .users-form{grid-template-columns:1fr 1fr}
}
@media(max-width:560px){
  .role-legend{grid-template-columns:1fr}
  .users-form{grid-template-columns:1fr}
  .users-table th:nth-child(5),.users-table td:nth-child(5){display:none}
}

/* ---------- 25c. Sign-in page (Stage 65) ----------
   A light, calm two-panel layout: the product story on the left, one clear action
   on the right. The same shell serves SSO (organisation account) and the local
   workspace accounts, so signing in never feels like two different products. */
.auth-page{
  position:relative;min-height:100vh;display:grid;place-items:center;padding:36px 32px;
  background:
    radial-gradient(900px 520px at 8% -10%,rgba(59,130,246,.14),transparent 62%),
    radial-gradient(720px 460px at 96% 108%,rgba(37,99,235,.11),transparent 62%),
    linear-gradient(180deg,#f9fbff 0%,#f4f8ff 55%,#eef4ff 100%);
  overflow:hidden;
}
.auth-page::before{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.55;
  background-image:radial-gradient(rgba(37,99,235,.14) 1px,transparent 1px);
  background-size:22px 22px;
  -webkit-mask-image:radial-gradient(ellipse at 50% 40%,#000 0%,transparent 72%);
  mask-image:radial-gradient(ellipse at 50% 40%,#000 0%,transparent 72%);
}
.auth-shell{
  position:relative;z-index:1;width:min(1160px,100%);
  display:grid;grid-template-columns:minmax(0,1fr) minmax(400px,470px);
  gap:56px;align-items:center;
}
.auth-brand{min-width:0;padding:6px 0}
.auth-brand-top{display:flex;align-items:center;gap:12px;margin-bottom:36px}
.auth-logo{
  width:46px;height:46px;border-radius:13px;display:grid;place-items:center;flex:none;
  background:linear-gradient(135deg,#60a5fa,#2563eb 55%,#1d4ed8);color:#fff;
  box-shadow:0 14px 28px -12px rgba(37,99,235,.6),inset 0 1px 0 rgba(255,255,255,.35);
}
.auth-logo svg{width:23px;height:23px}
.auth-wordmark{font-size:19px;font-weight:750;letter-spacing:-.025em;color:var(--text)}
.auth-headline{
  font-size:clamp(32px,3.2vw,42px);line-height:1.08;letter-spacing:-.038em;font-weight:750;
  color:#0f1f3d;max-width:15ch;margin-bottom:16px;
}
.auth-lede{font-size:14.5px;line-height:1.68;color:var(--muted);max-width:46ch;margin-bottom:30px}
.auth-points{display:grid;gap:15px;margin-bottom:32px}
.auth-points li{display:flex;gap:13px;align-items:flex-start}
.auth-point-icon{
  width:38px;height:38px;border-radius:11px;background:#fff;border:1px solid #e3ebf8;
  display:grid;place-items:center;color:var(--accent-2);flex:none;
  box-shadow:0 2px 6px rgba(15,23,42,.05);
}
.auth-point-icon svg{width:18px;height:18px}
.auth-points strong{display:block;font-size:13.5px;font-weight:700;color:var(--text);line-height:1.35}
.auth-points small{display:block;font-size:12.5px;color:var(--muted);margin-top:2px;line-height:1.45}
.auth-brand-foot{border-top:1px solid #e4ecfa;padding-top:18px;max-width:420px}
.auth-role-row{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:9px}
.auth-brand-foot p{font-size:12px;color:var(--muted-2)}
.auth-panel{min-width:0;display:flex;flex-direction:column;gap:14px}
.auth-panel .login-card{
  width:100%;max-width:none;padding:32px 32px 26px;text-align:left;border-radius:20px;
  border-color:#e2eaf8;
  box-shadow:0 30px 70px -30px rgba(30,64,175,.32),0 3px 10px rgba(15,23,42,.04);
}
.auth-card-head{margin-bottom:22px}
.auth-eyebrow{
  display:inline-flex;align-items:center;gap:6px;padding:4px 10px;margin-bottom:14px;
  border-radius:999px;background:var(--accent-tint);border:1px solid var(--accent-soft);
  color:var(--accent-2);font-size:10.5px;font-weight:750;letter-spacing:.08em;text-transform:uppercase;
}
.auth-eyebrow svg{width:12px;height:12px}
.auth-panel .login-title{font-size:25px;letter-spacing:-.032em;margin-bottom:7px}
.auth-panel .login-sub{margin-bottom:0;font-size:13px;line-height:1.62;max-width:38ch}
.auth-panel .login-form{margin-top:22px}
.auth-panel .login-label{margin-top:11px;font-size:11.5px}
.auth-panel .input{height:43px;background:#fbfdff}
.auth-panel .input:focus{background:#fff}
.auth-panel .login-form .btn{margin-top:18px;height:45px;font-size:14px}
.auth-panel .login-error{margin-top:12px}
.sso-btn{
  display:flex;align-items:center;justify-content:center;gap:11px;width:100%;height:52px;
  margin-top:2px;font-size:14.5px;font-weight:700;letter-spacing:-.01em;
  background:linear-gradient(135deg,#3b82f6,#2563eb 55%,#1d4ed8);
  box-shadow:0 16px 30px -16px rgba(37,99,235,.75),inset 0 1px 0 rgba(255,255,255,.28);
}
.sso-btn:hover{filter:brightness(1.03);transform:translateY(-1px)}
/* An incomplete SSO configuration still has to look like a deliberate state, not a
   broken button: the card explains what is missing and this control stays inert. */
.sso-btn[aria-disabled="true"]{
  background:#eef4ff;color:#5b6b86;border:1px solid #c9dcff;box-shadow:none;
  cursor:not-allowed;filter:none;transform:none;
}
.sso-btn[aria-disabled="true"]:hover{filter:none;transform:none}
.sso-btn[aria-disabled="true"] .sso-mark{opacity:.65}
#ssoConfigError strong{display:block;margin-bottom:3px}
#ssoConfigError span{display:block;font-weight:500;line-height:1.55}
.sso-mark{width:24px;height:24px;border-radius:6px;background:#fff;display:grid;place-items:center;flex:none;padding:3px}
.sso-mark svg{width:18px;height:18px}
.ms-logo{display:block}
.sso-mark svg:not(.ms-logo){color:var(--accent-2)}
.sso-label{line-height:1}
.auth-panel .login-foot{
  display:flex;align-items:center;gap:7px;margin-top:16px;font-size:11.5px;color:var(--muted-2);
  min-height:16px;overflow-wrap:anywhere;
}
.sso-dot{width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.14);flex:none}
.auth-divider{display:flex;align-items:center;gap:12px;margin:20px 0 15px;color:var(--muted-2);font-size:10.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase}
.auth-divider::before,.auth-divider::after{content:"";height:1px;background:var(--line);flex:1}
.auth-assure{display:grid;gap:10px;margin-top:22px;padding:15px 16px;background:#f7faff;border:1px solid #e4ecfa;border-radius:13px}
.auth-assure li{display:flex;gap:9px;align-items:flex-start;font-size:11.8px;line-height:1.55;color:var(--muted)}
.auth-assure svg{width:14px;height:14px;color:var(--accent-2);flex:none;margin-top:2px}
.auth-legal{display:flex;align-items:center;justify-content:center;gap:6px;font-size:10.5px;color:var(--muted-2)}
.auth-legal svg{width:12px;height:12px}
.login-demo-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.login-role{
  display:flex;flex-direction:column;gap:3px;text-align:left;padding:11px 12px;
  background:#fbfdff;border:1px solid var(--line);border-radius:11px;cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.login-role:hover{background:var(--accent-soft);border-color:#bfdbfe;transform:translateY(-1px);box-shadow:0 8px 18px -12px rgba(37,99,235,.45)}
.login-role:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.login-role-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:3px}
.login-role-go{display:grid;place-items:center;color:var(--muted-2)}
.login-role-go svg{width:13px;height:13px}
.login-role strong{font-size:12.5px;color:var(--text);font-weight:700;line-height:1.35}
.login-role-id{font-family:var(--mono);font-size:10.5px;color:var(--muted-2);line-height:1.4}
.login-role-blurb{display:none}
.auth-panel .login-foot{text-align:left}
@media(max-width:1100px){
  .auth-shell{grid-template-columns:minmax(0,1fr) minmax(380px,430px);gap:38px}
  .auth-headline{font-size:34px}
}
@media(max-width:980px){
  .auth-page{padding:26px 18px 34px}
  .auth-shell{grid-template-columns:1fr;gap:22px;width:min(540px,100%)}
  .auth-brand-top{margin-bottom:14px}
  .auth-logo{width:40px;height:40px;border-radius:11px}
  .auth-headline{font-size:27px;max-width:none;margin-bottom:0}
  .auth-lede,.auth-points,.auth-brand-foot{display:none}
  .auth-panel .login-card{padding:26px 24px 22px}
}
@media(max-width:560px){
  .auth-page{padding:18px 12px 26px}
  .auth-brand-top{margin-bottom:10px}
  .auth-headline{font-size:22px}
  .auth-panel .login-card{padding:22px 18px 18px;border-radius:16px}
  .auth-panel .login-title{font-size:21px}
  .login-demo-grid{grid-template-columns:1fr}
  .auth-legal{font-size:10px}
}
/* ---------- 25d. Team hierarchy ---------- */

/* Team hierarchy: four tiers, top-down, with the signed-in tier marked. */
.team-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:-6px 0 16px;font-size:12px;color:var(--muted)}
.team-summary-item strong{color:var(--text);font-weight:700}
.team-summary-sep{color:var(--border-strong)}
.team-tree{display:grid;grid-template-columns:1fr;gap:11px}
.team-tier{
  position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);
  padding:14px 16px 15px;box-shadow:var(--e1);overflow:hidden;
}
.team-tier::before{
  content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 3px 3px 0;
  background:var(--tier,var(--accent));opacity:.62;
}
.team-tier.role-admin{--tier:#6366f1}
.team-tier.role-manager{--tier:#2563eb}
.team-tier.role-analyst{--tier:#1a9a63}
.team-tier.role-intern{--tier:#94a3b8}
.team-tier.is-you{border-color:#c7ddfb;box-shadow:0 0 0 2px rgba(219,234,254,.68),var(--e1)}
.team-tier-head{display:flex;align-items:center;gap:8px;min-width:0}
.team-tier-level{
  font-family:var(--mono);font-size:10px;font-weight:750;color:var(--muted-2);
  padding:2px 5px;border-radius:5px;background:var(--surface-3);
}
.team-tier-count{margin-left:auto;font-size:11.5px;color:var(--muted-2);white-space:nowrap}
.team-tier-crown{color:#a16207;font-size:12px}
.team-tier-blurb{font-size:12px;line-height:1.5;color:var(--muted);margin-top:6px}
.team-people{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:7px;margin-top:10px}
.team-person{display:flex;align-items:center;gap:8px;min-width:0;padding:7px 9px;background:var(--surface-2);border:1px solid var(--line);border-radius:9px}
.team-person.is-you{background:var(--accent-tint);border-color:var(--accent-soft)}
.team-person-avatar{
  width:28px;height:28px;border-radius:8px;flex:none;display:grid;place-items:center;
  background:var(--surface-3);color:var(--text-2);font-size:10.5px;font-weight:750;
}
.team-person.is-you .team-person-avatar{background:#fff;color:var(--accent-2);box-shadow:0 0 0 1px var(--accent-soft)}
.team-person-copy{display:flex;flex-direction:column;min-width:0}
.team-person-copy strong{font-size:12px;font-weight:650;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-person-copy small{font-family:var(--mono);font-size:10px;color:var(--muted-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-empty{font-size:11.5px;color:var(--muted-2);padding:3px 0 1px}
@media(max-width:560px){
  .team-people{grid-template-columns:1fr}
  .team-summary{font-size:11.5px}
}

/* ---------- 26. Motion ---------- */
@keyframes pop-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
@keyframes slide-in{from{transform:translateX(18px);opacity:0}to{transform:none;opacity:1}}
@keyframes toast-in{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){
  *{animation-duration:.001ms !important;animation-iteration-count:1 !important;transition-duration:.001ms !important}
}

/* ---------- 27. Responsive ---------- */
@media(max-width:1100px){
  .hier-head,.hier-row{grid-template-columns:130px minmax(0,1fr) 110px 110px;gap:10px}
  .cell-priority,.cell-assignee{display:none}
}
@media(max-width:900px){
  .shell{flex-direction:column;height:auto}
  .sidebar{
    width:100%;min-width:0;flex-direction:row;align-items:center;gap:12px;flex-wrap:wrap;row-gap:10px;
    padding:12px;border-right:none;border-bottom:1px solid var(--line);
  }
  .brand{order:1}
  .sidebar-foot{order:2;margin:0 0 0 auto;border:none;padding:0}
  .nav-label{display:none}
  .nav{order:3;flex:1 1 100%;min-width:0;flex-direction:row;flex-wrap:wrap;gap:6px;margin-top:0}
  .nav-item{width:auto;padding:8px 12px;font-size:13px}
  .nav-item.active::before{display:none}
  .main{height:auto}
  .app{padding:20px 16px 48px}
  .topbar{padding:0 16px}
  .page-head{flex-direction:column;align-items:flex-start}
  .board-col{max-height:none}
  .board-col-body{overflow:visible}
  .drawer{width:100vw}
  .release{grid-template-columns:1fr}
}
@media(max-width:480px){
  .brand-tag{display:none}
  .nav{gap:4px}
  .nav-item{padding:7px 10px;font-size:12.5px}
  .app{padding:16px 12px 40px}
  .page-title{font-size:21px}
  .stat-grid{grid-template-columns:1fr}
}

/* ---------- 28. Legacy & compatibility classes ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--e1);padding:20px}
.card + .card{margin-top:16px}
.card-title{display:flex;align-items:center;gap:8px;font-size:14.5px;font-weight:700;margin-bottom:14px}
.card .count{font-size:11.5px;font-weight:650;color:var(--muted);margin-left:auto}

.jira-card{border:1px solid var(--line);border-radius:var(--r-card);background:var(--surface);overflow:hidden;box-shadow:var(--e1)}
.jira-head,.jira-row{display:grid;grid-template-columns:26px minmax(0,1fr) 104px 168px 122px 72px;gap:10px;align-items:center;padding:11px 16px}
.jira-head{
  background:var(--surface-2);border-bottom:1px solid var(--line);white-space:nowrap;
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-2);
}
.jira-body{background:var(--surface)}
.jira-row{border-bottom:1px solid var(--line);min-width:0;transition:background var(--dur) var(--ease)}
.jira-row:hover{background:var(--surface-2)}
.jira-row:last-child{border-bottom:none}
.j-main{display:flex;align-items:center;gap:9px;min-width:0;overflow:hidden}
.j-title{flex:1;min-width:0;font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.j-assignee{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text);white-space:nowrap}
.j-assignee .nm{overflow:hidden;text-overflow:ellipsis}
.j-priority,.j-status{white-space:nowrap}
.j-actions{display:flex;justify-content:flex-end}

/* Card type modifiers keep a type-tinted hook without adding colour noise. */
.kcard-project{--kcard-type:var(--t-project)}
.kcard-epic{--kcard-type:var(--t-epic)}
.kcard-story{--kcard-type:var(--t-story)}
.kcard-task{--kcard-type:var(--t-task)}
.kcard-subtask{--kcard-type:var(--t-subtask)}
.kcard::before{content:"";position:absolute;left:0;top:10px;bottom:10px;width:2px;border-radius:0 2px 2px 0;background:var(--kcard-type,transparent);opacity:.55}

/* Calendar helpers */
.cal-next svg{width:15px;height:15px}
.cal-dot.legend{position:static;display:inline-block;vertical-align:middle}

/* Auth / layout state hooks */
body.signed-in .auth-only{display:inline-flex}
.nav-locked .nav-item{cursor:default}
/* Column status hooks (used by board grouping) */
.backlog,.planned,.to_do{--col-tone:var(--border-strong)}
.backlog{--col-tone:var(--muted-2)}
.planned{--col-tone:#7a8798}
.to_do{--col-tone:var(--accent)}

/* Toolbar filter hooks (optional labelling) */
.f-group,.f-type,.f-status{min-width:132px}

/* ---------- 29. Item detail layout: workflow strip + content/properties split ---------- */
.item-page-body .drawer-body{padding:20px 22px}
.detail-flow{margin-bottom:18px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.detail-flow .field:last-child{margin-bottom:0}
.dgrid{display:block}
.dcol{min-width:0}
.dgroup{margin-bottom:18px}
.dgroup:last-child{margin-bottom:0}
.dgroup-title{
  margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--line);
  font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--text);
}
.dgroup .field:last-child{margin-bottom:0}

/* The sections of a work item (Stage 105). They used to fold away like drop-downs; now each
   one is a plain heading over a body that is always shown. The head is a line of text, not a
   button: no chevron, no hover, no pointer, and nothing to click except its one action. */
.droppanel-head{display:flex;align-items:center;gap:8px;width:100%;box-sizing:border-box}
.droppanel-name{
  flex:1 1 auto;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font:inherit;color:inherit;letter-spacing:inherit;
}
.droppanel-action{flex:none;margin-left:2px}
.droppanel-action svg{width:12px;height:12px}
.droppanel-meta{
  flex:none;font-size:11px;font-weight:700;letter-spacing:0;text-transform:none;color:var(--accent-2);
  background:var(--accent-tint);border:1px solid var(--accent-soft);border-radius:999px;padding:0 7px;line-height:17px;
}
.droppanel-body{padding-top:2px}
.item-page-body .dgrid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:0 26px;align-items:start}
.item-page-body .dcol.rail{border-left:1px solid var(--line);padding-left:26px}
@media(max-width:1180px){
  .item-page-body .dgrid{grid-template-columns:minmax(0,1fr)}
  .item-page-body .dcol.rail{margin-top:20px;padding-top:20px;padding-left:0;border-left:none;border-top:1px solid var(--line)}
}

/* ---------- 30. Status menu & workflow overlay (Jira-style workflow access) ----------
   Jira lets you work a transition without leaving the board: the status lozenge
   itself is the control. Clicking it lists the transitions allowed from the
   current status ("Move to ...") with a "View workflow" action at the bottom, and
   that action opens the whole diagram. Every epic / story / task / subtask carries
   the same control on the boards, on the detail screen and inside the quick-view
   popover, so there is one way to move an item wherever you meet it. */

.status-btn{
  cursor:pointer;font-family:inherit;gap:5px;
  transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.status-btn svg{width:11px;height:11px;flex:none;opacity:.5;transition:transform var(--dur) var(--ease), opacity var(--dur) var(--ease)}
.status-btn:hover{background:var(--accent-tint);border-color:var(--accent-soft);color:var(--accent-2)}
.status-btn:hover svg{opacity:1}
.status-btn[aria-expanded="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-3)}
.status-btn[aria-expanded="true"] svg{transform:rotate(90deg);opacity:1}
.status-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.drawer-head-tags{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}

/* Move-to menu — the floating list of transitions for one item */
.wf-status-menu{
  position:fixed;z-index:75;width:min(344px,calc(100vw - 24px));
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);
  box-shadow:var(--e3);overflow:hidden;animation:pop-in .16s var(--ease);
}
.wf-menu-head{display:flex;align-items:center;gap:9px;padding:11px 12px;background:var(--surface-2);border-bottom:1px solid var(--line)}
.wf-menu-head .j-ic{width:26px;height:26px;border-radius:var(--r-sm);flex:none}
.wf-menu-head .j-ic svg{width:12px;height:12px}
.wf-menu-title{min-width:0;display:flex;flex-direction:column;line-height:1.35}
.wf-menu-title strong{font-family:var(--mono);font-size:11px;font-weight:650;color:var(--muted);font-variant-numeric:tabular-nums}
.wf-menu-title span{font-size:12.5px;font-weight:650;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wf-menu-cur{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid var(--line)}
.wf-menu-sect{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-2)}
.wf-menu-cur .wf-menu-sect{flex:1;min-width:0}
.wf-menu-label{padding:10px 12px 6px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-2)}
.wf-menu-list{display:flex;flex-direction:column;gap:2px;padding:0 6px 6px;max-height:min(320px,44vh);overflow:auto}
.wfm-row{
  display:flex;align-items:center;gap:9px;width:100%;min-height:34px;text-align:left;
  padding:7px 9px;border:1px solid transparent;border-radius:var(--r-ctl);
  background:transparent;color:var(--text);font-family:inherit;cursor:pointer;
  transition:background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.wfm-row:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.wfm-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.wfm-dot{width:8px;height:8px;border-radius:2px;background:var(--border-strong);flex:none}
.wfm-dot.done{background:var(--ok)}
.wfm-dot.active{background:var(--accent)}
.wfm-dot.cancel{background:var(--danger)}
.wfm-name{font-size:12.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wfm-path{margin-left:auto;flex:none;font-family:var(--mono);font-size:10.5px;color:var(--muted-2);white-space:nowrap}
.wfm-ic{display:inline-grid;place-items:center;width:16px;height:16px;flex:none;color:var(--muted)}
.wfm-ic svg{width:14px;height:14px}
.wfm-row:hover .wfm-ic{color:var(--accent-2)}
.wfm-row.danger .wfm-name{color:var(--danger)}
.wfm-row.danger .wfm-ic{color:var(--danger)}
.wfm-row.danger:hover{background:var(--danger-soft);border-color:var(--danger-line)}
/* The status dropdown lists the whole workflow: the current status is marked and
   inert, statuses the workflow cannot reach are shown but not actionable (Jira
   behaves the same), and a status reached through other statuses shows the route. */
.wfm-row.is-current{background:var(--accent-tint);border-color:var(--accent-soft);cursor:default}
.wfm-row.is-current:hover{background:var(--accent-tint);border-color:var(--accent-soft)}
.wfm-row.is-current .wfm-name{color:var(--accent-2)}
.wfm-row.is-current .wfm-path{color:var(--accent-2)}
.wfm-row.is-off{cursor:not-allowed}
.wfm-row.is-off:hover{background:transparent;border-color:transparent}
.wfm-row.is-off .wfm-name{color:var(--muted)}
.wfm-row.is-off .wfm-dot{opacity:.55}
.wfm-name{min-width:0}
.wfm-path{overflow:hidden;text-overflow:ellipsis;max-width:60%}
.card-menu{width:min(290px,calc(100vw - 24px))}
.wf-menu-empty{padding:4px 12px 10px;font-size:12px;color:var(--muted);line-height:1.5}
.wf-menu-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border-top:1px solid var(--line);background:var(--surface-2)}

/* View workflow overlay — the whole diagram, Jira's "View workflow" screen */
#wfOverlayBackdrop{z-index:72}
.wf-overlay{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(1320px,94vw);max-height:86vh;z-index:73;
  display:flex;flex-direction:column;overflow:hidden;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-panel);
  box-shadow:var(--e3);animation:pop-in .16s var(--ease);
}
.wf-overlay-head{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line)}
.wf-overlay-head .j-ic{width:34px;height:34px;font-size:16px;flex:none}
.wf-overlay-title{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.wf-overlay-eyebrow{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-2)}
.wf-overlay-eyebrow svg{width:12px;height:12px}
.wf-overlay-title strong{font-size:15.5px;font-weight:700;letter-spacing:-.01em;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wf-overlay-sub{font-family:var(--mono);font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wf-overlay-legend{display:flex;align-items:center;justify-content:flex-end;gap:26px;flex-wrap:wrap;padding:9px 16px;background:var(--surface);border-bottom:1px solid var(--line)}
.wfl-item{display:inline-flex;align-items:center;gap:8px}
.wfl-txt{display:flex;flex-direction:column;line-height:1.2}
.wfl-txt b{font-size:12px;font-weight:650;color:var(--text);letter-spacing:-.005em}
.wfl-txt i{font-size:10.5px;font-style:normal;color:var(--muted-2)}
.wfl-box{width:26px;height:15px;border-radius:4px;border:1px solid #93c5fd;background:var(--accent-tint);flex:none}
.wfl-arrow{width:30px;height:12px;flex:none;color:var(--accent)}
.wfl-diamond{width:11px;height:11px;flex:none;background:#ecfdf5;border:1.6px solid #16a34a;border-radius:2px;transform:rotate(45deg);margin:0 2px}
.wf-overlay-body{flex:1;min-height:0;overflow:auto;padding:20px 18px;background:var(--surface-2);border-bottom:1px solid var(--line)}
.wf-overlay-body .wf-diagram{padding:0}
.wf-overlay-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:11px 16px}
.wf-overlay-hint{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.wf-overlay-hint svg{width:13px;height:13px;flex:none;color:var(--accent)}

/* Stage 43 — the workflow view carries two readings of one workflow: the pictographical
   diagram and the same workflow written out as text in Jira's Details-panel language. The
   switch is a segmented control in the view's own head, so the surface stays one surface. */
.wf-switch{display:inline-flex;align-items:center;gap:2px;padding:2px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-card);flex:none}
.wf-sw-btn{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:600;padding:5px 11px;border-radius:var(--r-ctl);cursor:pointer;transition:background var(--dur) var(--ease),color var(--dur) var(--ease)}
.wf-sw-btn svg{width:13px;height:13px}
.wf-sw-btn:hover{color:var(--accent-3);background:var(--accent-tint)}
.wf-sw-btn.active{background:var(--surface);color:var(--accent-2);box-shadow:var(--e1)}
.wf-sw-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.wf-overlay-note{color:var(--muted-2)}

.wf-text{display:flex;flex-direction:column;gap:14px}
.wf-text .jd-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 28px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);padding:16px 18px}
.wf-text-block{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);overflow:hidden}
.wf-text-head{display:flex;align-items:center;gap:8px;padding:9px 14px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.wf-text-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-2)}
.wf-text-count{margin-left:auto;font-size:11px;font-weight:700;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:1px 7px}
.wft-steps,.wft-trans-list{display:flex;flex-direction:column}
.wft-step{display:flex;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid var(--line)}
.wft-step:last-child{border-bottom:0}
.wft-step.current{background:var(--accent-tint)}
.wft-step-n{width:20px;text-align:right;font-family:var(--mono);font-size:11px;color:var(--muted-2);flex:none}
.wft-step-name{font-size:13px;font-weight:600;color:var(--text)}
.wft-step.current .wft-step-name{color:var(--accent-3)}
.wft-step-cat{margin-left:auto;font-size:11px;color:var(--muted-2)}
.wft-step-now{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--accent-2);background:var(--accent-soft);border-radius:999px;padding:1px 7px}
.wft-trans{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:9px 14px;border:0;border-bottom:1px solid var(--line);background:transparent;font:inherit;color:inherit}
.wft-trans:last-child{border-bottom:0}
.wft-route{display:inline-flex;align-items:center;gap:7px;flex:none}
.wft-status{font-size:12px;font-weight:600;color:var(--text)}
.wft-arrow{display:inline-flex;color:var(--muted-2)}
.wft-arrow svg{width:13px;height:13px}
.wft-name{font-size:12px;color:var(--muted);margin-left:auto}
.wft-guard{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;color:#166534;flex:none}
.wft-diamond{width:9px;height:9px;background:#ecfdf5;border:1.5px solid #16a34a;border-radius:2px;transform:rotate(45deg);flex:none}
.wft-trans.live{cursor:pointer;transition:background var(--dur) var(--ease)}
.wft-trans.live:hover{background:var(--accent-tint)}
.wft-trans.live:hover .wft-name{color:var(--accent-2)}
.wft-trans.live:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.wft-trans[aria-disabled="true"]{opacity:.72}
.wf-text-note{display:block;padding:9px 14px;font-size:11.5px;color:var(--muted-2);background:var(--surface-2);border-top:1px solid var(--line)}

/* The Details panel sits in the narrow right rail, where Jira's own panel is a single column
   of label-over-value rows: every value gets the full width, so a long assignee name is never
   clipped and two labels never sit shoulder to shoulder. */
.dcol.rail .jd-grid{grid-template-columns:minmax(0,1fr)}
.dcol.rail .jd-field.wide{grid-column:auto}

/* Workflow bar on the detail screen: one compact row with a "Workflow" dropdown
   instead of rendering the chart inside the page. */
.wf-bar{display:flex;align-items:center;gap:11px;flex-wrap:wrap;background:var(--accent-tint);
  border:1px solid var(--accent-soft);border-radius:var(--r-card);padding:10px 12px}
.wf-bar-ic{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex:none;
  border-radius:var(--r-sm);background:var(--surface);border:1px solid var(--accent-soft);color:var(--accent-2)}
.wf-bar-ic svg{width:16px;height:16px}
.wf-bar-text{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
.wf-bar-label{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-2)}
.wf-bar-name{font-size:13px;font-weight:650;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wf-bar-btn{flex:none;gap:6px}
.wf-bar-btn svg{width:12px;height:12px;transform:rotate(90deg)}
.wf-bar-btn[aria-expanded="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-2)}

@media(max-width:720px){
  .wf-overlay{width:calc(100vw - 16px);max-height:92vh}
  .wf-overlay-head{align-items:flex-start}
  .wf-overlay-foot{flex-direction:column;align-items:stretch}
}

/* ---------- 33. Details panel — Jira's issue panel (Stage 10a) ----------
   The manager's reference is Jira's right-hand panel: the issue key and summary on a line
   of their own, then a two-column grid of small grey labels over their values, each value
   led by the icon Jira uses for that field — a status square, an avatar, a priority flag.
   The values are still this app's own controls; they are only dressed as Jira's inline
   text (no border until you hover or focus them), so the look is Jira's and the behaviour
   — including the save path the audits drive — is unchanged. */
.jira-det .dgroup-title{margin-bottom:10px}
.jd-key{display:flex;align-items:center;gap:8px;min-width:0;margin-bottom:14px}
.jd-key-id{
  flex:none;font-family:var(--mono);font-size:11.5px;font-weight:700;letter-spacing:.02em;
  color:var(--accent-2);background:var(--accent-tint);border:1px solid var(--accent-soft);
  border-radius:var(--r-xs);padding:2px 7px;font-variant-numeric:tabular-nums;
}
.jd-key-title{
  min-width:0;font-size:13px;font-weight:600;color:var(--text-2);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.jd-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.jd-field{min-width:0}
.jd-field.wide{grid-column:1 / -1}
.jd-label{display:block;font-size:12px;font-weight:500;line-height:16px;color:#6b778c;margin-bottom:4px}
.jd-value{display:flex;align-items:center;gap:8px;min-width:0;border-radius:var(--r-xs)}

/* The value: a real control that reads like Jira's text until you touch it. */
.jd-ctl{
  flex:1 1 auto;min-width:0;width:100%;height:28px;padding:0 6px;font-size:14px;font-family:inherit;
  color:var(--text);background:transparent;border:1px solid transparent;border-radius:var(--r-xs);
  appearance:none;-webkit-appearance:none;
  transition:background var(--dur) var(--ease),border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease);
}
.jd-ctl:hover{background:var(--surface-3);border-color:var(--line)}
/* Clicking a value must not paint a loud blue box: the accent ring belongs to keyboard
   readers. Chrome matches :focus-visible the moment an input or select is clicked, so the app
   keeps its own flag instead (body.kb, see app.js) and scopes the ring to it. */
.jd-ctl:focus{outline:none;background:var(--surface);border-color:var(--line)}
body.kb .jd-ctl:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
input.jd-ctl{font-weight:400;text-overflow:ellipsis}
input.jd-ctl::placeholder{color:var(--muted-2);font-weight:400}
select.jd-ctl{
  cursor:pointer;font-weight:400;width:auto;max-width:100%;flex:0 1 auto;padding-right:20px;
  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='%237a8798' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 4px center;
}
select.jd-ctl:hover{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='%232563eb' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}

/* The lead icon of each value — Jira's status square, avatar and priority flag. */
.jd-sq{width:11px;height:11px;flex:none;border-radius:3px;background:#94a3b8}
.jd-sq.active{background:#3b82f6}
.jd-sq.done{background:#22c55e}
.jd-sq.muted{background:#94a3b8}
.jd-sq.cancel{background:#cbd5e1}
.jd-sq.none{background:transparent;border:1px dashed var(--border-strong)}
.jd-avatar{
  width:22px;height:22px;flex:none;display:inline-grid;place-items:center;border-radius:50%;
  font-size:10px;font-weight:700;letter-spacing:.02em;color:#fff;
  background:linear-gradient(180deg,#60a5fa,#2563eb);
}
.jd-avatar.empty{background:var(--surface);border:1px dashed var(--border-strong);color:var(--muted-2)}
.jd-avatar.empty svg{width:12px;height:12px}
.jd-flag{display:inline-grid;place-items:center;flex:none;width:14px;height:14px}
.jd-flag svg{width:14px;height:14px}
.jd-ic{display:inline-grid;place-items:center;flex:none;width:14px;height:14px;color:var(--muted-2)}
/* A detail the app has no control for (Reporter, Type, Fix versions, the dates) still sits
   on Jira's grid as plain text, so the panel reads complete instead of half-empty. */
.jd-ro{font-size:14px;font-weight:400;line-height:20px;color:var(--text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Jira prints an unset detail as plain grey text — the word None. Nothing boxes it: the
   empty-state card is scoped to a div (see `.empty` above), so these spans stay text. */
.jd-ro.empty{color:#6b778c;font-weight:400}
/* The empty avatar keeps Jira's dashed circle of the same 22px size. */
.jd-avatar.empty{background:var(--surface);border:1px dashed var(--border-strong);border-radius:50%;color:var(--muted-2)}
.jd-type svg{width:14px;height:14px}
.jd-ic svg{width:14px;height:14px}
@media(max-width:520px){
  .jd-grid{grid-template-columns:minmax(0,1fr)}
  .jd-field.wide{grid-column:auto}
}


/* ---------- 58. Audit fixes: small layout truths ---------- */
/* Back and Previous controls draw their own left-pointing icons (ICONS.back and
   ICONS.chevronLeft), so no CSS rotation is needed or wanted here. */
/* The details jump is only useful when the rail has stacked below the main column. */
.item-jump{display:none}
@media(max-width:1180px){
  .item-jump{display:inline-flex}
  /* Keep Save reachable on a phone: the issue page can be very long. */
  .item-page-body .drawer-foot{
    position:sticky;bottom:0;z-index:6;
    margin:10px 0 -20px;padding:10px 2px;
    background:var(--surface);border-top:1px solid var(--line);
    box-shadow:0 -8px 18px -18px rgba(15,27,45,.35);
  }
}
/* A card is a column; its children must be allowed to shrink instead of pushing
   the actions button outside a narrow board column. */
.kcard{min-width:0;overflow:hidden}
/* Stage 99: a column is a fixed-height flex column that scrolls. Without this a busy column
   (five or more cards) squeezed every card to a sliver and cut off its status, assignee
   and due date, instead of scrolling. */
.board-col-body>.kcard,.board-col-body>*{flex-shrink:0}
.kcard-meta,.kcard-top{min-width:0}
.epic-kids .kcard-meta{min-width:0;overflow:hidden}
.epic-kids .kcard-title{min-width:0}

/* =====================================================================
   Stage 72 — Jira-parity gaps
   Issue types & keys · five priorities · ranked backlog · people pickers
   inline edit · comment actions · work-log editing · version lifecycle
   workflow editor · search/JQL · personal notifications · projects · calendar
   ===================================================================== */

/* ---------- 72a. Type and priority marks ---------- */
.b-bug{background:#fef3f2;border-color:#f7cdc8;color:var(--danger)}
.j-ic-bug{color:var(--danger)}
.p-highest{color:var(--danger)}
.p-lowest{color:var(--muted-2)}
.priority.p-highest svg,.priority.p-lowest svg{width:13px;height:13px}

/* ---------- 72b. Top bar: global search ----------
   Stage 103: the project picker left the top bar; the account menu's Project section
   shows the project and switches between projects. */
.top-search{
  display:flex;align-items:center;gap:6px;height:32px;padding:0 10px;margin-right:4px;
  border:1px solid var(--line);border-radius:999px;background:var(--surface-2);
  transition:border-color .12s,background .12s,box-shadow .12s;
}
.top-search:focus-within{border-color:var(--line);background:var(--surface);box-shadow:none}
body.kb .top-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.top-search .nav-icon{width:14px;height:14px;color:var(--muted)}
.top-search input{
  width:170px;border:0;background:transparent;outline:none;font:inherit;font-size:12.5px;color:var(--text);
}
@media(max-width:760px){ .top-search input{width:110px} }

/* ---------- 72c. Details: dates, hints, version multi-select ---------- */
.jd-hint{display:block;margin-top:2px;font-size:10.5px;color:var(--muted-2)}
.jd-ctl[type="date"]{font-size:12px}
.version-multi{min-height:66px;padding:4px}
.version-multi option{padding:3px 6px;border-radius:4px}
.version-multi option:checked{background:var(--accent-soft);color:var(--accent-3);font-weight:650}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:640px){ .grid2{grid-template-columns:1fr} }

/* ---------- 72d. Inline edit on the item header ---------- */
.inline-edit{cursor:text;border-radius:var(--r-sm);transition:background .12s}
.inline-edit:hover{background:var(--accent-tint)}
.inline-edit:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.inline-input{
  width:100%;font:inherit;color:var(--text);background:var(--surface);
  border:1px solid var(--accent);border-radius:var(--r-sm);padding:7px 9px;
  box-shadow:0 0 0 3px var(--accent-soft);
}
textarea.inline-input{min-height:72px;resize:vertical}
.drawer-head h2.inline-input{font-size:19px;font-weight:750}
.inline-actions{display:flex;gap:6px;margin-top:6px}

/* ---------- 72e. Comments: actions, reactions, mentions ---------- */
.comment-edited{font-size:10.5px;color:var(--muted-2);font-style:italic;margin-left:2px}
.comment-actions{margin-left:auto;display:flex;gap:2px;opacity:.55;transition:opacity .12s}
.comment-item:hover .comment-actions,.comment-actions:focus-within{opacity:1}
.comment-actions .icon-btn{width:24px;height:24px}
.comment-body .mention{color:var(--accent-2);background:var(--accent-tint);border-radius:4px;padding:0 3px;font-weight:650}
.comment-foot{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-top:6px}
.react-chip{
  display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 8px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface);color:var(--text-2);font-size:12px;cursor:pointer;
}
.react-chip:hover{border-color:var(--accent);background:var(--accent-tint)}
.react-chip.mine{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-3);font-weight:700}
.react-n{font-size:11px;font-variant-numeric:tabular-nums}
.react-pick{position:relative}
.react-pick > summary{list-style:none;cursor:pointer}
.react-pick > summary::-webkit-details-marker{display:none}
.react-add{
  display:inline-grid;place-items:center;width:24px;height:24px;border-radius:999px;
  border:1px dashed var(--border-strong);color:var(--muted);font-size:13px;line-height:1;
}
.react-add:hover{border-color:var(--accent);color:var(--accent)}
.react-row{
  position:absolute;z-index:8;bottom:30px;left:0;display:flex;gap:2px;padding:5px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-md);
  box-shadow:var(--shadow-md,0 12px 28px -14px rgba(15,27,45,.35));
}
.react-btn{width:28px;height:28px;border:0;background:transparent;border-radius:6px;font-size:15px;cursor:pointer}
.react-btn:hover{background:var(--accent-tint)}
.comment-edit{margin-top:8px}
.comment-edit textarea{min-height:64px;margin-bottom:6px}
.comment-edit-actions{display:flex;gap:6px;justify-content:flex-end}

/* ---------- 72f. Work logs: edit box ---------- */
.wlog-editbox{
  grid-column:1 / -1;margin-top:6px;padding:9px;border:1px solid var(--line);
  border-radius:var(--r-md);background:var(--surface-2);
}
.wlog-editbox .input{margin-bottom:6px}
.wlog-adjust{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-2);margin:2px 0 6px}
.wlog-edit{opacity:.55}
.wlog-item:hover .wlog-edit,.wlog-edit:focus-visible{opacity:1}

/* ---------- 72g. Versions lifecycle ---------- */
.r-notes{
  margin:6px 0;padding:6px 8px;border-left:3px solid var(--accent-soft);
  background:var(--accent-tint);border-radius:0 6px 6px 0;
  font-size:11.5px;color:var(--text-2);white-space:pre-wrap;max-height:84px;overflow:auto;
}
.r-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px;padding-top:8px;border-top:1px solid var(--line)}
.r-actions .btn{font-size:11.5px;padding:3px 8px}

/* ---------- 72h. Workflow editor ---------- */
.wf-editor{max-height:62vh;overflow:auto}
.wf-status-table{width:100%;border-collapse:collapse;margin-bottom:10px;font-size:12px}
.wf-status-table th{text-align:left;font-size:11px;color:var(--muted);font-weight:650;padding:4px 6px;border-bottom:1px solid var(--line)}
.wf-status-table td{padding:4px 6px;border-bottom:1px solid var(--line);vertical-align:middle}
.wf-status-table code{font-family:var(--mono);font-size:11px;color:var(--muted)}
.wf-status-table .input{height:28px;font-size:12px;padding:0 6px}
.wf-add-status{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0;padding:8px;border:1px dashed var(--border-strong);border-radius:var(--r-md)}
.wf-add-title{font-size:11.5px;font-weight:700;color:var(--muted);width:100%}
.wf-add-status .input{height:28px;font-size:12px;flex:1 1 90px;min-width:80px}
.wf-matrix-wrap{overflow:auto;border:1px solid var(--line);border-radius:var(--r-md);padding:6px}
.wf-matrix-title{font-size:11.5px;font-weight:700;color:var(--muted);margin-bottom:4px}
.wf-matrix{border-collapse:collapse;font-size:10.5px}
.wf-matrix th{padding:3px 5px;color:var(--muted);font-weight:650;white-space:nowrap;text-align:center}
.wf-matrix tbody th{text-align:right}
.wf-matrix td{padding:2px;text-align:center;border:1px solid var(--line)}
.wf-matrix-box{width:14px;height:14px;accent-color:var(--accent);cursor:pointer}

/* ---------- 72i. Personal inbox ---------- */
.notif-scope{display:inline-flex;border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden}
.notif-scope-btn{
  border:0;background:var(--surface);color:var(--muted);font:inherit;font-size:11px;font-weight:650;
  padding:3px 8px;cursor:pointer;
}
.notif-scope-btn + .notif-scope-btn{border-left:1px solid var(--line)}
.notif-scope-btn.active{background:var(--accent-soft);color:var(--accent-3)}
.notif-for{color:var(--accent-2);font-weight:700}

/* ---------- 72j. Blocked banner ---------- */
.blocked-note{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px;padding:8px 11px;
  border:1px solid var(--danger-line);border-left:4px solid var(--danger);
  border-radius:var(--r-md);background:var(--danger-soft);color:var(--danger);
  font-size:12px;font-weight:600;
}
.blocked-note svg{width:14px;height:14px;flex:none}

/* ---------- 72k. Swimlanes and WIP ---------- */
.board-lanes{display:flex;flex-direction:column;gap:16px}
.swimlane{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface-2);padding:8px}
.swimlane-head{display:flex;align-items:center;gap:8px;padding:2px 6px 8px}
.swimlane-name{font-size:12px;font-weight:750;color:var(--text);letter-spacing:.01em}
.board-lane{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.board-lane .board-col{background:var(--surface)}
.count-badge.over-wip{background:var(--danger-soft);border-color:var(--danger-line);color:var(--danger)}
.board-col.over-wip{border-color:var(--danger-line)}
.board-col.over-wip .board-col-head{background:var(--danger-soft);border-radius:var(--r-md) var(--r-md) 0 0}
.wip-input{height:28px;font-size:12px}

/* ---------- 72l. Search results ---------- */
.board-search{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px}
.search-card{cursor:pointer}
.search-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.kcard-proj{font-size:11px;color:var(--muted-2);margin-right:auto}

/* ---------- 72m. Full calendar ---------- */
.cal-page{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(260px,1fr);gap:14px;align-items:start}
@media(max-width:1000px){ .cal-page{grid-template-columns:1fr} }
.cal-page-main{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface);padding:12px}
.cal-page-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.cal-grid-page{gap:5px}
/* A day on the full page is a bordered box: the date top-left, the count badge top-right and
   the items underneath. It does not take the small calendar's square, centred cell. */
.cal-cell-page{
  aspect-ratio:auto;min-width:0;min-height:96px;display:flex;flex-direction:column;align-items:stretch;
  justify-content:flex-start;gap:3px;padding:6px 7px;text-align:left;vertical-align:top;
  border:1px solid var(--line);background:var(--surface);
}
.cal-cell-page .cal-day{justify-content:flex-start;padding-right:22px;font-size:11.5px;font-weight:700;color:var(--text-2)}
.cal-cell-page .cal-dot{top:6px;right:6px}
.cal-cell-page.other-month{background:var(--surface-2)}
.cal-cell-page.other-month .cal-day{color:var(--muted-2);font-weight:600}
.cal-page .cal-weekdays span{text-align:left;padding-left:8px}
.cal-cell-page.today{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.cal-cell-page.selected{background:var(--accent-tint);border-color:var(--accent)}
.cal-cell-items{display:flex;flex-direction:column;gap:2px;min-width:0;overflow:hidden}
.cal-cell-item{
  font-size:10px;line-height:1.25;color:var(--text-2);background:var(--surface-3);
  border-radius:4px;padding:1px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.cal-cell-item.more{background:transparent;color:var(--muted-2);font-weight:650}
.cal-agenda{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface);padding:12px;max-height:640px;overflow:auto}
.cal-agenda-title{font-size:13px;margin:0 0 8px;display:flex;align-items:center;gap:6px}
.cal-agenda-row{
  display:grid;grid-template-columns:78px 16px minmax(0,1fr) auto;align-items:center;gap:6px;
  width:100%;padding:6px 4px;border:0;border-top:1px solid var(--line);background:transparent;
  cursor:pointer;text-align:left;font:inherit;
}
.cal-agenda-row:hover{background:var(--accent-tint)}
.cal-agenda-date{font-size:10.5px;color:var(--muted);white-space:nowrap}
.cal-agenda-title{font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:700px){
  .cal-cell-page{min-height:70px} .cal-cell-items{display:none}
  /* A phone-width day is ~45px wide: the count sits in the bottom corner, clear of the date. */
  .cal-cell-page .cal-day{padding-right:0}
  .cal-cell-page .cal-dot{top:auto;bottom:5px;right:5px}
}

/* ---------- 78. Issue navigator, reports and project tools ----------
   Jira's power surfaces added without changing the four-item navigation. They all
   keep the same light surface ramp, blue accent, and readable tables. */
.standalone-bar{margin-bottom:14px}
.field-label{display:block;font-size:11.5px;font-weight:700;color:var(--text-2);letter-spacing:.02em;margin:0 0 5px}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.checkbox-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px 12px}
.btn.xs{padding:3px 8px;font-size:11.5px;border-radius:6px;box-shadow:none;gap:4px}
.btn.xs > svg{width:13px;height:13px}

.tabs{display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid var(--line);margin:0 0 16px;padding-bottom:0;scrollbar-width:thin}
.tab{border:0;background:transparent;color:var(--muted);font:inherit;font-size:12.5px;font-weight:650;padding:9px 12px;border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap}
.tab:hover{color:var(--accent-2);background:var(--accent-tint)}
.tab.active{color:var(--accent-2);border-bottom-color:var(--accent)}
.tab:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}

/* Stage 104: the navigator is the search row, then the list at full width (the side panel
   of quick filters, saved filters and the JQL cheat-sheet was removed). */
.navigator{display:flex;flex-direction:column;gap:12px}
.nav-search-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.nav-search-bar .search{flex:1 1 320px;max-width:620px;min-width:0}
.nav-search-bar .btn{height:38px}
.clone-children{display:flex;align-items:flex-start;gap:8px;font-size:13.5px;color:var(--text);margin-bottom:8px;cursor:pointer}
.clone-children input{margin-top:2px}

.navigator-main{min-width:0;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface);overflow:hidden}
.table-scroll{overflow-x:auto;max-width:100%}
.issues-table{width:100%;border-collapse:collapse;font-size:12.5px;min-width:1040px}
.issues-table th{text-align:left;font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-2);font-weight:750;background:var(--surface-2);border-bottom:1px solid var(--line);padding:8px 10px;white-space:nowrap;position:sticky;top:0;z-index:1}
.issues-table td{border-bottom:1px solid var(--line);padding:8px 10px;vertical-align:middle}
.issues-table tbody tr:hover{background:var(--accent-tint)}
.issues-table tbody tr.selected{background:var(--accent-soft)}
.issues-table .col-check{width:34px}
.issues-table .status-chip{white-space:nowrap}
.issues-table .num{text-align:right;font-variant-numeric:tabular-nums}
.issue-row{cursor:pointer}
.issue-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;background:var(--accent-tint)}
.summary-cell{min-width:220px;max-width:420px}
.issue-summary{display:block;color:var(--text);font-weight:600;line-height:1.35}
.issue-desc{display:block;font-size:11px;color:var(--muted);line-height:1.35;margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.issues-table .j-ic{display:inline-flex;width:17px;height:17px;align-items:center;justify-content:center}
.issues-table .j-ic svg{width:14px;height:14px}
.bulk-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 10px;background:var(--accent-tint);border-bottom:1px solid var(--accent-soft)}
.bulk-bar .input{height:30px;font-size:12px;max-width:170px}
.bulk-count{font-size:12px;font-weight:750;color:var(--accent-2);margin-right:4px}
/* Story points sit beside the sprint pill on a card and wear the same quiet pill. */
.points-pill{display:inline-block;vertical-align:middle;font-size:10.5px;font-weight:650;font-variant-numeric:tabular-nums;background:var(--surface-3);border:1px solid var(--line);border-radius:999px;padding:1px 7px;color:var(--text-2);white-space:nowrap}
/* The Admin-defined fields under Details get their own small heading. */
.jd-custom{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.jd-custom-title{margin-bottom:6px;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-2)}
.sprint-pill{display:inline-block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;font-size:10.5px;font-weight:650;background:var(--surface-3);border:1px solid var(--line);border-radius:999px;padding:1px 7px;color:var(--text-2)}
/* The card's sprint marker (⚡ Sprint 12): its icon had no size, so it drew 80px wide and hid the sprint name. */
.sprint-pill svg{width:11px;height:11px;vertical-align:-1px;margin-right:1px;flex:none}

.chart-wrap{border:1px solid var(--line);border-radius:var(--r-card);background:linear-gradient(180deg,#fff, #fbfdff);padding:10px 10px 4px}
.chart-svg{display:block;width:100%;height:auto}
.chart-grid{stroke:#e8eef7;stroke-width:1}
.chart-base{stroke:#cbd5e1;stroke-width:1.2}
.chart-axis{font-size:10px;fill:#7a8798;font-family:var(--font)}
.chart-line{stroke-linejoin:round;stroke-linecap:round}
.chart-bar{opacity:.92}
.chart-legend{display:flex;gap:14px;flex-wrap:wrap;padding:2px 8px 8px;font-size:11px;color:var(--muted)}
.chart-legend span{display:inline-flex;align-items:center;gap:5px}
.chart-legend i{width:9px;height:9px;border-radius:2px;display:inline-block}
.report-card{display:flex;flex-direction:column;gap:12px}
.report-summary{display:flex;gap:8px;flex-wrap:wrap}
.stat-pill{font-size:11.5px;color:var(--muted);background:var(--surface-2);border:1px solid var(--line);border-radius:999px;padding:3px 9px}
.stat-pill strong{color:var(--text)}
.report-controls{display:flex;align-items:center;gap:8px;margin:-4px 0 12px;flex-wrap:wrap}
.report-controls .input{max-width:260px;height:32px}
.report-table{min-width:520px}
.gadget-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px}
.gadget{padding:12px}
.gadget-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.gadget-title{font-size:13px;margin:0}
.dashboard-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.dashboard-head .section-title{margin:0;margin-right:auto}

.tool-grid{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:14px;align-items:start}
.tool-form{display:flex;flex-direction:column;gap:2px}
.tool-form .field{margin-bottom:10px}
.tool-form .btn{align-self:flex-start;margin-top:4px}
.scheme-grid{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr)) auto;gap:12px;align-items:end}
.scheme-col{border:1px solid var(--line);border-radius:var(--r-card);padding:8px 10px;background:var(--surface-2)}
.scheme-grid .btn{align-self:end}
.inline-input{height:34px;padding:6px 8px;font-size:12px;min-width:90px}
.rule-list{display:flex;flex-direction:column}
.rule-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-top:1px solid var(--line)}
.rule-row:first-child{border-top:0}
.rule-row > div:first-child{min-width:0}
.rule-row strong{display:block;font-size:12.5px}
.token-reveal{margin-top:12px;border:1px solid var(--ok-line);background:var(--ok-soft);border-radius:var(--r-card);padding:9px}
.token-value{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:5px}
.token-value code{font-family:var(--mono);font-size:11px;background:#fff;border:1px solid var(--ok-line);padding:4px 7px;border-radius:5px;overflow-wrap:anywhere;max-width:100%}

@media(max-width:1000px){
  .nav-search-bar .search{flex:1 1 100%;max-width:none}
  .tool-grid{grid-template-columns:1fr}
  .scheme-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
  .field-row{grid-template-columns:1fr}
  .gadget-grid{grid-template-columns:1fr}
  .scheme-grid{grid-template-columns:1fr}
  .bulk-bar .input{max-width:none;flex:1 1 130px}
}

/* Per-edge guards and post-functions in the workflow editor */
.wf-rules{margin-top:16px;border-top:1px solid var(--line);padding-top:12px}
.wf-rules-table{width:100%;border-collapse:collapse;font-size:11.5px;min-width:760px}
.wf-rules-table th{text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted-2);padding:5px 7px;border-bottom:1px solid var(--line);white-space:nowrap}
.wf-rules-table td{padding:6px 7px;border-bottom:1px solid var(--line);vertical-align:middle}
.wf-rules-table td:first-child{white-space:nowrap}
.wf-rules-table .inline-input{height:30px;padding:4px 6px;font-size:11.5px;max-width:130px}
.wf-rules-table .jd-check{font-size:11px;white-space:nowrap;margin-right:8px}

/* ---------- 78g. Rich comments: Markdown toolbar, tables and images ---------- */
.md-toolbar{display:flex;flex-wrap:wrap;gap:3px;align-items:center;margin:0 0 6px}
.md-btn{
  display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:26px;padding:0 7px;
  border:1px solid var(--line);background:var(--surface);border-radius:6px;color:var(--text-2);
  font:inherit;font-size:11.5px;font-weight:650;cursor:pointer;line-height:1;
}
.md-btn:hover{border-color:var(--accent);background:var(--accent-tint);color:var(--accent-2)}
.md-btn:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.md-input{min-height:86px;resize:vertical;font-family:inherit}
.comment-md-preview{
  min-height:86px;padding:9px 10px;border:1px solid var(--line);border-radius:var(--r-md);
  background:var(--surface-2);font-size:13px;color:var(--text-2);line-height:1.55;
}
.comment-body{white-space:normal;overflow-wrap:anywhere}
.comment-body > *:first-child{margin-top:0}
.comment-body > *:last-child{margin-bottom:0}
.comment-body p{margin:0 0 6px}
.comment-body h1,.comment-body h2,.comment-body h3,.comment-body h4{margin:10px 0 5px;color:var(--text);line-height:1.3}
.comment-body h1{font-size:17px}.comment-body h2{font-size:15px}.comment-body h3{font-size:13.5px}.comment-body h4{font-size:12.5px}
.comment-body ul,.comment-body ol{margin:4px 0 7px;padding-left:20px}
.comment-body li{margin:1px 0}
.comment-body blockquote{margin:5px 0;padding:2px 0 2px 10px;border-left:3px solid var(--accent-soft);color:var(--muted)}
.comment-body pre{margin:6px 0;padding:8px 10px;background:var(--surface-2);border:1px solid var(--line);border-radius:6px;overflow-x:auto;font-family:var(--mono);font-size:11.5px;white-space:pre}
.comment-body code{font-family:var(--mono);font-size:11.5px;background:var(--surface-2);border:1px solid var(--line);border-radius:4px;padding:1px 4px}
.comment-body pre code{border:0;background:transparent;padding:0}
.comment-body .md-table-wrap{max-width:100%;overflow-x:auto;margin:7px 0}
.comment-body table{border-collapse:collapse;font-size:12px;min-width:240px}
.comment-body th,.comment-body td{border:1px solid var(--line);padding:4px 8px;text-align:left;vertical-align:top}
.comment-body th{background:var(--surface-2);font-weight:700;color:var(--text)}
.comment-body .md-img{display:block;max-width:100%;height:auto;margin:6px 0;border:1px solid var(--line);border-radius:8px}

/* ---------- 78h. Calendar timeline ---------- */
.cal-mode-tabs{display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--line);border-radius:999px;background:var(--surface-2)}
.cal-mode-tabs .tab{border-bottom:0;border-radius:999px;padding:5px 12px;font-size:11.5px}
.cal-mode-tabs .tab.active{background:var(--surface);border-bottom:0;box-shadow:0 1px 2px rgba(15,27,45,.12)}
.tl-panel{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--surface);padding:12px;min-width:0}
.tl-sub{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.tl-sub strong{font-size:13px;color:var(--text);margin-right:6px}
.tl-scroll{overflow-x:auto;overflow-y:hidden;max-width:100%;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface)}
.tl-grid{display:grid;grid-template-columns:220px calc(var(--tl-col) * var(--tl-weeks));min-width:max-content;font-size:11.5px}
.tl-head{display:contents}
.tl-label{
  display:flex;align-items:center;gap:5px;min-width:0;height:42px;padding:0 9px;
  border-bottom:1px solid var(--line);background:var(--surface);position:sticky;left:0;z-index:2;
}
.tl-label-head{font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted-2);font-weight:700;height:34px}
.tl-key{font-family:var(--mono);font-size:10.5px;color:var(--muted);flex:none}
.tl-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}
.tl-weeks{display:grid;grid-template-columns:repeat(var(--tl-weeks),var(--tl-col));height:34px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.tl-weeks span{display:flex;align-items:center;justify-content:center;border-left:1px solid var(--line);font-size:10px;color:var(--muted);white-space:nowrap}
.tl-weeks span:first-child{border-left:0}
.tl-weeks span.today{color:var(--accent-2);background:var(--accent-tint);font-weight:750}
.tl-row{display:contents}
.tl-track{
  position:relative;height:42px;border-bottom:1px solid var(--line);
  background:repeating-linear-gradient(to right,transparent 0 calc(var(--tl-col) - 1px),var(--line) calc(var(--tl-col) - 1px) var(--tl-col));
}
.tl-track:hover{background-color:var(--surface-2)}
.tl-bar{
  position:absolute;top:7px;height:28px;display:flex;align-items:center;padding:0 8px;
  border:1px solid var(--accent-3);border-radius:6px;background:linear-gradient(180deg,#3b82f6,#2563eb);
  color:#fff;font:inherit;font-size:11px;font-weight:650;cursor:grab;overflow:hidden;
  touch-action:pan-y;box-shadow:0 1px 2px rgba(15,27,45,.18);z-index:1;
}
.tl-bar span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
.tl-bar:hover{filter:brightness(1.06)}
.tl-bar:focus-visible{outline:3px solid var(--accent-soft);outline-offset:2px}
.tl-bar.dragging{cursor:grabbing;z-index:5;opacity:.9;box-shadow:0 8px 20px -8px rgba(15,27,45,.5)}
.tl-bar.inherited{background:linear-gradient(180deg,#60a5fa,#3b82f6);border-style:dashed}
.tl-bar.readonly{cursor:pointer;opacity:.88}
.tl-bar.readonly:hover{filter:none}
@media(max-width:700px){
  .tl-grid{grid-template-columns:160px calc(var(--tl-col) * var(--tl-weeks))}
  .tl-label{padding:0 6px}
  .tl-name{font-size:11px}
}

/* ---------- 29. Phone chrome (Stage 80) ----------
   At 390 px the sidebar used to wrap its four text labels into a squeezed row and
   let the search/project controls clip their own labels. The nav is now a real
   four-column launcher (icon above a short two-line label) and the top bar puts the
   full-width project switcher on its own row, with a full-width search beside the
   calendar, notifications and account controls. Nothing is hidden from the feature
   set — every destination and every control is still on screen. */
@media(max-width:640px){
  .sidebar{padding:10px 12px;gap:8px;flex-wrap:nowrap}
  .brand{order:1;flex:1 1 auto;min-width:0;padding:0 2px}
  .tour-start{order:1;flex:none;width:34px;min-height:34px;padding:4px;justify-content:center;gap:0}
  .tour-start>span:not(.tour-start-icon){display:none}
  .tour-start-icon{width:23px;height:23px}
  .brand-mark{width:32px;height:32px;border-radius:9px;font-size:14px}
  .brand-name{font-size:14px}
  .brand-tag{display:none}
  /* The logo, the tour button, the connection dot and the four-item menu share one row: there
     is no room left for the word “Workgeniee”, which the tour button used to sit on top of. */
  .brand-text{display:none}
  .sidebar-foot{order:2;margin:0 0 0 auto;border:none;padding:0}
  .conn{font-size:0;padding:0;gap:0}
  .conn-dot{margin:0;width:8px;height:8px}
  .nav{order:3;flex:1 1 100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-top:0}
  .nav-item{
    flex-direction:column;align-items:center;justify-content:center;gap:3px;
    padding:6px 2px;min-height:48px;font-size:10.5px;line-height:1.15;text-align:center;white-space:normal;
  }
  .nav-item.active::before{display:none}
  .nav-icon{width:16px;height:16px}
  .nav-icon svg{width:16px;height:16px}
  .topbar{height:auto;padding:8px 12px;gap:8px;flex-wrap:wrap}
  .topbar-left{order:1;flex:1 1 100%;min-width:0}
  .topbar-actions{order:2;flex:1 1 100%;gap:6px;min-width:0}
  .top-search{flex:1 1 auto;min-width:0;margin-right:0}
  .top-search input{width:100%;min-width:0}
  .user-chip{padding:0 4px}
  .user-chip-text{display:none}
}

/* The workflow overlay on a phone: the header wraps instead of pushing its own
   buttons off-screen, and a visible hint explains that the chart scrolls sideways. */
.wf-swipe-hint{display:none}
@media(max-width:640px){
  .wf-overlay-head{flex-wrap:wrap;gap:8px;padding:10px 12px}
  .wf-overlay-title{order:2;flex:1 1 100%}
  .wf-overlay-title strong{white-space:normal;overflow:visible}
  .wf-overlay-title .wf-overlay-sub{white-space:normal}
  #wfOverlayClose{order:3;margin-left:auto}
  .wf-overlay-head .kcard-status{order:3}
  .wf-switch{order:4;flex:1 1 100%;justify-content:flex-start;overflow-x:auto;max-width:100%}
  .wf-overlay-legend{justify-content:flex-start;gap:12px;padding:8px 12px;font-size:11px}
  .wf-swipe-hint{
    display:block;padding:8px 12px;background:var(--accent-tint);border-bottom:1px solid var(--accent-soft);
    color:var(--accent-3);font-size:11.5px;font-weight:600;
  }
  .wf-swipe-hint svg{width:13px;height:13px;vertical-align:-2px;margin-right:4px}
  .wf-overlay-body{padding:12px 10px}
}
