:root {
  --cell-width: 60px;
  --day-row-height: 32px;
  --issue-row-height: 58px;
  --day-gap: 4px;
  --lane-gap: 10px;

  --bg-page: #edf1f7;
  --bg-gradient: radial-gradient(circle at top, #f7f9ff 0%, #eef2fb 45%, #e3e8f7 100%);
  --bg-surface: rgba(255, 255, 255, 0.92);
  --bg-elevated: #ffffff;
  --bg-muted: #f4f6fb;
  --text-primary: #0f172a;
  --text-secondary: #516079;
  --border-color: rgba(15, 23, 42, 0.08);
  --header-surface: rgba(255, 255, 255, 0.9);
  --header-border: rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 25px 70px rgba(15, 23, 42, 0.13);
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --ghost-border: rgba(15, 23, 42, 0.15);
  --ghost-bg-hover: rgba(37, 99, 235, 0.08);
  --status-bg: rgba(255, 255, 255, 0.95);
  --status-accent: rgba(37, 99, 235, 0.12);
  --weekend-bg: rgba(99, 102, 241, 0.12);
  --tooltip-bg: rgba(7, 11, 21, 0.95);
  --tooltip-text: #f8fafc;
  --issue-foreground: #081120;
  --issue-border: rgba(15, 23, 42, 0.08);
  --scrollbar-thumb: rgba(15, 23, 42, 0.2);
  --scrollbar-track: rgba(15, 23, 42, 0.05);
  --blocked-stripe-a: rgba(239, 68, 68, 0.14);
  --blocked-stripe-b: rgba(239, 68, 68, 0.32);
  --blocked-border: rgba(239, 68, 68, 0.7);
  --blocked-base-bg: rgba(239, 68, 68, 0.08);
  --today-highlight-border: rgba(255, 180, 0, 0.9);
  --today-highlight-bg: rgba(255, 214, 102, 0.25);
  --today-highlight-overlay: rgba(255, 214, 102, 0.18);
  --rough-stripe-a: rgba(15, 23, 42, 0.08);
  --rough-stripe-b: rgba(15, 23, 42, 0.16);
  --type-update-bg: #dbeafe;
  --type-update-border: #60a5fa;
  --type-update-fg: #1e3a8a;
  --type-upgrade-bg: #ede9fe;
  --type-upgrade-border: #c084fc;
  --type-upgrade-fg: #5b21b6;
  --type-newintegration-bg: #dcfce7;
  --type-newintegration-border: #4ade80;
  --type-newintegration-fg: #166534;
  --type-bug-bg: #fee2e2;
  --type-bug-border: #f87171;
  --type-bug-fg: #991b1b;
  --timeoff-base-bg: rgba(13, 148, 136, 0.08);
  --timeoff-stripe-a: rgba(13, 148, 136, 0.08);
  --timeoff-stripe-b: rgba(13, 148, 136, 0.26);
  --timeoff-border: rgba(13, 148, 136, 0.85);
  --timeoff-text: #0f172a;
}

:root[data-theme='dark'] {
  --bg-page: #070b16;
  --bg-gradient: radial-gradient(circle at top, #111931 0%, #0a101f 40%, #05070e 100%);
  --bg-surface: rgba(15, 20, 33, 0.92);
  --bg-elevated: #121a30;
  --bg-muted: #151e34;
  --text-primary: #f6f8ff;
  --text-secondary: #94a3c9;
  --border-color: rgba(255, 255, 255, 0.08);
  --header-surface: rgba(12, 18, 33, 0.9);
  --header-border: rgba(255, 255, 255, 0.05);
  --shadow-soft: 0 25px 70px rgba(0, 0, 0, 0.6);
  --primary: #93a4ff;
  --primary-hover: #b0bfff;
  --ghost-border: rgba(255, 255, 255, 0.2);
  --ghost-bg-hover: rgba(147, 164, 255, 0.18);
  --status-bg: rgba(13, 20, 38, 0.92);
  --status-accent: rgba(147, 164, 255, 0.15);
  --weekend-bg: rgba(147, 164, 255, 0.18);
  --tooltip-bg: rgba(3, 6, 13, 0.95);
  --tooltip-text: #f8fafc;
  --issue-foreground: #f8fafc;
  --issue-border: rgba(255, 255, 255, 0.08);
  --scrollbar-thumb: rgba(148, 163, 184, 0.45);
  --scrollbar-track: rgba(255, 255, 255, 0.06);
  --blocked-stripe-a: rgba(248, 113, 113, 0.18);
  --blocked-stripe-b: rgba(239, 68, 68, 0.45);
  --blocked-border: rgba(248, 113, 113, 0.9);
  --blocked-base-bg: rgba(127, 29, 29, 0.6);
  --today-highlight-border: rgba(255, 214, 102, 0.85);
  --today-highlight-bg: rgba(255, 214, 102, 0.2);
  --today-highlight-overlay: rgba(255, 214, 102, 0.22);
  --rough-stripe-a: rgba(255, 255, 255, 0.18);
  --rough-stripe-b: rgba(255, 255, 255, 0.05);
  --type-update-bg: #1e3a8a;
  --type-update-border: #60a5fa;
  --type-update-fg: #e0edff;
  --type-upgrade-bg: #3a1d63;
  --type-upgrade-border: #c084fc;
  --type-upgrade-fg: #f3e8ff;
  --type-newintegration-bg: #0f3d2c;
  --type-newintegration-border: #4ade80;
  --type-newintegration-fg: #d1fae5;
  --type-bug-bg: #4c1d1d;
  --type-bug-border: #f87171;
  --type-bug-fg: #fee2e2;
  --timeoff-base-bg: rgba(8, 145, 178, 0.18);
  --timeoff-stripe-a: rgba(20, 184, 166, 0.12);
  --timeoff-stripe-b: rgba(8, 145, 178, 0.32);
  --timeoff-border: rgba(94, 234, 212, 0.85);
  --timeoff-text: #e0f2f1;
}

* {
  box-sizing: border-box;
  scrollbar-width: none;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-page);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  transition: background-color 0.35s ease, color 0.35s ease;
  -ms-overflow-style: none;
}

body.is-locked .page,
body.is-locked .issue-tooltip {
  filter: blur(14px) saturate(80%);
  pointer-events: none;
  user-select: none;
}

body.theme-transition {
  transition: background-color 0.35s ease, color 0.35s ease;
}

a,
a:visited {
  color: inherit;
}

.page {
  padding: 28px clamp(20px, 5vw, 48px);
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  position: relative;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 30px;
  border: 1px solid var(--header-border);
  border-radius: 30px;
  background-color: var(--header-surface);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-soft);
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pending-changes {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-soft);
  z-index: 1200;
}

.pending-changes.hidden {
  display: none;
}

.pending-changes__label {
  font-weight: 600;
  font-size: 0.95rem;
}

.pending-changes__count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pending-changes__actions {
  display: flex;
  gap: 8px;
}

.pending-changes__review {
  padding: 6px 14px;
  border-radius: 999px;
}

.pending-changes__save {
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pending-changes__save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pending-changes__save:not(:disabled):hover {
  background: var(--primary-hover);
}

.pending-changes__cancel {
  border-radius: 999px;
  padding: 6px 16px;
}

.issue-block--pending {
  outline: 2px dashed var(--primary);
  outline-offset: 2px;
}

.pending-review-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1300;
}

.pending-review-modal.hidden {
  display: none;
}

.pending-review-modal__dialog {
  width: min(520px, 92vw);
  max-height: 80vh;
  background: var(--bg-elevated);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pending-review-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pending-review-modal__header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.pending-review-modal__close {
  border: none;
  background: none;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
}

.pending-review-modal__body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pending-review-item {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--bg-muted);
}

.pending-review-item__key {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 1rem;
}

.pending-review-item__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.pending-review-item__label {
  font-weight: 600;
  color: var(--text-secondary);
}

.pending-review-item__value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.pending-review-item__from {
  color: var(--text-secondary);
}

.pending-review-item__arrow {
  color: var(--text-secondary);
  font-weight: 700;
}

.pending-review-item__to {
  color: var(--primary);
}

.header-main {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(240px, 400px);
  gap: 20px 32px;
  align-items: start;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.header-subtitle {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 480px;
}

.utility-actions {
  grid-column: 2 / 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.session-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-meta__label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

button {
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

.ghost-btn {
  width: max-content;
  background: transparent;
  border: 1px solid var(--ghost-border);
  color: var(--text-secondary);
  box-shadow: none;
}

.ghost-btn:not(:disabled):hover {
  background: var(--ghost-bg-hover);
  color: var(--text-primary);
}

.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.filter-panel {
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 12px 16px;
  background: var(--bg-surface);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-column: 1 / -1;
}

.filter-panel__header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-panel__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 18px;
  align-items: stretch;
}

.filter-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.zoom-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zoom-control__inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

#zoom-slider {
  accent-color: var(--primary);
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  background: var(--primary);
  color: #fff;
}

.icon-btn.ghost-btn {
  border-radius: 12px;
  width: auto;
  height: auto;
  padding: 10px 18px;
}

.icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.icon-sun {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4' fill='white'/%3E%3Cpath d='M12 2v3M12 19v3M4.222 4.222l2.122 2.122M17.657 17.657l2.121 2.121M2 12h3M19 12h3M4.222 19.778l2.122-2.122M17.657 6.343l2.121-2.121' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.icon-moon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M21 14.5A8.5 8.5 0 0 1 9.5 3 7 7 0 1 0 21 14.5Z'/%3E%3C/svg%3E");
}

.icon-refresh {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M21 6V2l-1.35 1.35A11 11 0 1 0 23 12h-2a9 9 0 1 1-3.9-7.43l-1.32 1.32 1.42 1.42L21 6Z'/%3E%3C/svg%3E");
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 15, 0.55);
  backdrop-filter: blur(16px);
  z-index: 9999;
}

.auth-card {
  width: min(90vw, 420px);
  background: var(--bg-elevated);
  border-radius: 28px;
  padding: 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 900px) {
  .header-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .utility-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.guide-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.88);
  z-index: 10000;
  backdrop-filter: blur(16px);
  padding: 24px;
}

.guide-modal.hidden {
  display: none;
}

.guide-content {
  width: min(1040px, 95vw);
  max-height: 90vh;
  border-radius: 32px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  padding: 48px;
  overflow-y: auto;
  position: relative;
  color: var(--text-primary);
}

.guide-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 2rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  cursor: pointer;
}

.guide-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.guide-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-section__title {
  font-size: clamp(1.6rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.guide-section__subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.guide-highlight {
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.guide-formula {
  margin: 0;
  padding: 12px 16px;
  background: rgba(37, 99, 235, 0.09);
  border-left: 3px solid var(--primary);
  font-family: 'Fira Code', 'Roboto Mono', 'SFMono-Regular', monospace;
  font-size: 0.9rem;
  border-radius: 12px;
}

.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-list li {
  position: relative;
  padding-left: 28px;
}

.guide-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.guide-emphasis {
  font-weight: 700;
  color: var(--primary);
}

.auth-card h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.auth-card p {
  margin: 0;
  color: var(--text-secondary);
}

.auth-card button {
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.user-badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ghost-bg-hover);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.squad-filter,
.account-filter {
  position: relative;
  z-index: 200;
}

.squad-filter-menu,
.account-filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  min-width: 220px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
  padding: 8px;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.squad-filter-option,
.account-filter-option {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  margin: 6px 0px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.squad-filter-option:hover,
.account-filter-option:hover {
  background-color: var(--ghost-bg-hover);
  color: var(--text-primary);
}

.squad-filter-option.is-active,
.account-filter-option.is-active {
  background-color: var(--status-accent);
  color: var(--text-primary);
}

.status {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--status-bg);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.timeoff-block {
  position: relative;
  align-self: stretch;
  justify-self: stretch;
  min-height: 100%;
  height: 100%;
  margin-bottom: 0;
  border-radius: 18px;
  border: 2px dotted var(--timeoff-border);
  background-color: var(--timeoff-base-bg);
  background-image: repeating-linear-gradient(
    135deg,
    var(--timeoff-stripe-a),
    var(--timeoff-stripe-a) 8px,
    var(--timeoff-stripe-b) 8px,
    var(--timeoff-stripe-b) 16px
  );
  color: var(--timeoff-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  cursor: default;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  pointer-events: auto;
  z-index: 3;
  text-align: center;
}

.timeoff-block::selection {
  background: transparent;
}

.timeoff-block--vacation,
.timeoff-block--sick,
.timeoff-block--other {
  border-color: var(--timeoff-border);
}

.gantt {
  margin-top: 22px;
  width: 100%;
  max-height: calc(100vh - 220px);
  min-height: 360px;
  overflow: auto;
  position: relative;
  padding-bottom: 20px;
  --gantt-scroll-x: 0px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.hidden {
  display: none;
}

.gantt-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.gantt-row {
  display: grid;
  grid-template-columns: 240px 1fr;
}

.gantt-row.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.08);
}

.gantt-row:not(.header) {
  border-bottom: 1px solid var(--border-color);
}

.squad-header {
  width: auto;
  max-width: max-content;
  margin-top: 26px;
  margin-bottom: 8px;
  padding: 16px 20px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
  position: sticky;
  left: 0;
  z-index: 8;
  transform: none;
}

.squad-header__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}

.squad-header--first {
  margin-top: 18px;
}

.squad-header__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.squad-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.squad-header__meta span {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.squad-header__meta strong {
  color: var(--text-primary);
  font-weight: 700;
}

.squad-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.squad-header__stat {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.squad-header__stat strong {
  color: var(--text-primary);
}

.squad-backlog-btn.is-active {
  background: var(--ghost-bg-hover);
}

.squad-backlog {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.squad-backlog.hidden {
  display: none;
}

.squad-backlog__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.squad-backlog__item {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--bg-surface);
  text-decoration: none;
  color: var(--text-primary);
}

.squad-backlog__item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.squad-backlog__item-summary {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.assignee-cell {
  padding: 18px 20px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-weight: 600;
  color: var(--text-primary);
  position: sticky;
  left: 0;
  background: var(--bg-elevated);
  z-index: 5;
  box-shadow: inset -1px 0 var(--border-color);
}

.assignee-name {
  font-size: 1rem;
  font-weight: 700;
}

.assignee-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.gantt-row.header .assignee-cell {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-color);
}

.days-grid {
  position: relative;
  min-height: var(--issue-row-height);
  align-self: stretch;
}

.days-grid.drop-target-active {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.25);
  border-radius: 18px;
}

.days-grid--header {
  min-height: var(--day-row-height);
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg-elevated);
}

.day-layer,
.issue-layer {
  display: grid;
  column-gap: var(--day-gap);
  row-gap: var(--lane-gap);
  padding: 10px;
}

.day-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.days-grid--header .day-layer {
  position: relative;
  pointer-events: auto;
  row-gap: 0;
}

.issue-layer {
  position: relative;
  z-index: 1;
  height: 100%;
}

.day-cell {
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--day-row-height);
  height: 100%;
}

.day-cell.weekend {
  background: var(--weekend-bg);
  color: var(--text-primary);
}

.day-cell.is-today {
  border-color: var(--today-highlight-border);
  background: var(--today-highlight-bg);
  color: var(--text-primary);
}

.today-marker {
  pointer-events: none;
  border-left: 2px solid var(--today-highlight-border);
  border-right: 2px solid var(--today-highlight-border);
  background: var(--today-highlight-overlay);
  border-radius: 18px;
  opacity: 0.45;
  z-index: 3;
  mix-blend-mode: screen;
}


.issue-block {
  padding: 10px 12px;
  border-radius: 14px;
  background-color: var(--issue-color, #d1f5ff);
  color: var(--issue-foreground);
  font-size: 0.82rem;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  cursor: grab;
  overflow: hidden;
  border: 1px solid var(--issue-border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  user-select: none;
}

.issue-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 60%);
  pointer-events: none;
}

.issue-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.25);
  filter: brightness(0.96);
}

.issue-block.is-hovered {
  outline: 2px solid var(--primary);
  outline-offset: 0;
}

.issue-block.is-dragging {
  cursor: grabbing;
  z-index: 6;
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.3);
}

.issue-block.is-resizing {
  cursor: ew-resize;
  z-index: 6;
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.3);
}

.issue-block.is-saving {
  cursor: progress;
  pointer-events: none;
}

.issue-block.is-saving::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  animation: pulseOverlay 1s ease-in-out infinite;
}

.issue-block[data-request-type='update'] {
  background-color: var(--type-update-bg);
  border-color: var(--type-update-border);
  color: var(--type-update-fg);
}

.issue-block[data-request-type='upgrade'] {
  background-color: var(--type-upgrade-bg);
  border-color: var(--type-upgrade-border);
  color: var(--type-upgrade-fg);
}

.issue-block[data-request-type='new-integration'] {
  background-color: var(--type-newintegration-bg);
  border-color: var(--type-newintegration-border);
  color: var(--type-newintegration-fg);
}

.issue-block[data-request-type='bug'] {
  background-color: var(--type-bug-bg);
  border-color: var(--type-bug-border);
  color: var(--type-bug-fg);
}

.issue-block[data-request-type] .issue-summary,
.issue-block[data-request-type] .issue-key {
  color: inherit;
}

.issue-block--blocked {
  background-color: var(--blocked-base-bg);
  background-image: repeating-linear-gradient(
    135deg,
    var(--blocked-stripe-a),
    var(--blocked-stripe-a) 6px,
    var(--blocked-stripe-b) 6px,
    var(--blocked-stripe-b) 12px
  );
  border: 1px dashed var(--blocked-border);
  cursor: default;
}

.issue-block--blocked.is-clickable {
  cursor: pointer;
}

.issue-block--blocked::before {
  display: none;
}

.issue-block--blocked .issue-summary {
  color: var(--text-secondary);
}

.issue-block--readonly {
  cursor: default;
}

.issue-block--readonly .issue-handle {
  display: none;
}

.issue-block--half {
  width: 50%;
  max-width: 50%;
  justify-self: start;
  margin: 0;
}

.issue-block--half.issue-block--half-end {
  justify-self: end;
}

.issue-block--rough {
  background-color: var(--bg-muted);
  border: 1px dashed var(--issue-border);
  cursor: default;
}

.issue-block--rough::before {
  opacity: 0;
}

.issue-block--rough::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    var(--rough-stripe-a),
    var(--rough-stripe-a) 8px,
    var(--rough-stripe-b) 8px,
    var(--rough-stripe-b) 16px
  );
  pointer-events: none;
}

.assignment-preview {
  grid-row: 1 / -1;
  margin-top: 2px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px dashed rgba(37, 99, 235, 0.6);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.75rem;
  pointer-events: none;
}

.issue-handle {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: ew-resize;
}

.issue-handle--start {
  left: 4px;
}

.issue-handle--end {
  right: 4px;
}

.issue-block:hover .issue-handle,
.issue-block.is-resizing .issue-handle {
  opacity: 1;
}


.issue-key {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--issue-foreground);
  text-decoration: none;
}

.issue-key:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.issue-key span {
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.issue-summary {
  font-weight: 500;
  color: var(--issue-foreground);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

@keyframes pulseOverlay {
  0% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.45;
  }
  100% {
    opacity: 0.2;
  }
}

.issue-tooltip {
  position: absolute;
  z-index: 1000;
  min-width: 240px;
  max-width: 320px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.special-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(3rem, 15vw, 10rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, 0.95);
  z-index: 3000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.special-overlay.is-visible {
  opacity: 0.3;
}

.tooltip-load {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tooltip-load__title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.tooltip-load__item {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tooltip-load__item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.tooltip-load__item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}

.tooltip-load__priority {
  font-size: 0.8rem;
  opacity: 0.8;
}

.tooltip-load__summary {
  font-size: 0.78rem;
  opacity: 0.85;
}

.tooltip-load__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
}

.tooltip-load__meta span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.blocked-tasks-btn,
.rough-tasks-btn {
  margin-top: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 0.75rem;
}

.blocked-tasks-btn.is-active,
.rough-tasks-btn.is-active {
  background: var(--ghost-bg-hover);
}

.blocked-task-list {
  margin-top: 8px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  background: var(--bg-muted);
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blocked-task-list.hidden {
  display: none;
}

.blocked-task-list__header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.blocked-task-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
  font-size: 0.78rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.blocked-task-item:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

.rough-task-list {
  margin-top: 8px;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  width: 100%;
  background: var(--bg-muted);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.rough-task-list.hidden {
  display: none;
}

.rough-task-list__header {
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.rough-task-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-elevated);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-size: 0.76rem;
}

.rough-task-item__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.rough-task-item__key {
  font-weight: 600;
}

.rough-task-item__priority {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.rough-task-item__summary {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.rough-task-item__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.blocked-task-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.blocked-task-item__key {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.blocked-task-item__type {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.blocked-task-item__type--update {
  background: var(--type-update-bg);
  border-color: var(--type-update-border);
  color: var(--type-update-fg);
}

.blocked-task-item__type--upgrade {
  background: var(--type-upgrade-bg);
  border-color: var(--type-upgrade-border);
  color: var(--type-upgrade-fg);
}

.blocked-task-item__type--new-integration {
  background: var(--type-newintegration-bg);
  border-color: var(--type-newintegration-border);
  color: var(--type-newintegration-fg);
}

.blocked-task-item__type--bug {
  background: var(--type-bug-bg);
  border-color: var(--type-bug-border);
  color: var(--type-bug-fg);
}

.blocked-task-item__summary {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.blocked-task-item__meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.blocked-task-item__stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
}

.blocked-task-item__stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.blocked-task-item__stat-value {
  color: var(--text-primary);
  font-weight: 700;
}

.tooltip-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.tooltip-row:last-child {
  margin-bottom: 0;
}

.tooltip-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.tooltip-value {
  font-weight: 600;
  word-break: break-word;
}

.tooltip-priority {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 181, 71, 0.25);
  color: rgb(255, 202, 102);
  border: 1px solid rgba(255, 202, 102, 0.6);
}

.gantt::-webkit-scrollbar {
  height: 12px;
  width: 12px;
}

.gantt::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
}

.gantt::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

@media (max-width: 900px) {
  .gantt-row {
    grid-template-columns: 180px 1fr;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.backlog-panel {
  margin-top: 32px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 32px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
  box-sizing: border-box;
}

.backlog-panel__content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
}

.backlog-panel h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.backlog-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  width: 100%;
}

.backlog-card {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  cursor: grab;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.backlog-card:active {
  cursor: grabbing;
}

.backlog-card.is-dragging {
  opacity: 0.75;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
}

.backlog-card.is-saving {
  opacity: 0.5;
  pointer-events: none;
}

.backlog-card__key {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.backlog-card__summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.backlog-card__meta {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
}

.backlog-ghost {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  pointer-events: none;
  opacity: 0.85;
  transform: translate(-9999px, -9999px);
  z-index: 1200;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.35);
}
.utility-actions {
  grid-column: 2 / 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.utility-actions .ghost-btn {
  padding: 10px 18px;
}
