/* ─── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ─── Global busy state ─────────────────────────────────────────────────────── */
body.app-busy,
body.app-busy * { cursor: wait !important; }

body.app-busy::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--bs-primary, #0d6efd) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: busy-bar 1.2s linear infinite;
  z-index: 99999;
}
@keyframes busy-bar {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
html, body {
  height: 100%; margin: 0; padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f0f2f5; overflow: hidden;
}

/* ─── Views ────────────────────────────────────────────────────────────────── */
.view { height: 100vh; display: flex; flex-direction: column; }

/* ════════════════════════════════════════════════════════════════════════════
   PROJECTS VIEW
   ════════════════════════════════════════════════════════════════════════════ */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; background: #1a1a2e; color: white; flex-shrink: 0;
}
.header-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 800; color: #4cc9f0; letter-spacing: -0.5px;
}
.header-brand i { font-size: 20px; }

.projects-scroll { padding: 32px; overflow-y: auto; flex: 1; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.proj-card {
  background: white; border-radius: 14px; padding: 20px 22px;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.proj-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.12); }

.proj-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px;
}
.proj-card-head h5 { font-weight: 700; color: #1a1a2e; margin: 0; font-size: 16px; }
.proj-card-desc { color: #777; font-size: 13.5px; margin: 0; line-height: 1.45;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.proj-card-actions { display: flex; gap: 4px; }

/* project card — stats footer */
.proj-card-footer {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid #f0f0f0;
  display: flex; flex-direction: column; gap: 7px;
}

/* KPI row: mesi·u | gg·u | costo */
.proj-kpi-row {
  display: flex; gap: 0; border: 1px solid #e9ecef;
  border-radius: 8px; overflow: hidden;
}
.proj-kpi {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; padding: 5px 4px;
  border-right: 1px solid #e9ecef;
}
.proj-kpi:last-child { border-right: none; }
.proj-kpi-value {
  font-size: 15px; font-weight: 800; color: #1a1a2e; line-height: 1.1;
}
.proj-kpi-label {
  font-size: 9.5px; font-weight: 600; color: #aaa;
  text-transform: uppercase; letter-spacing: .3px; margin-top: 1px;
}
.proj-kpi--cost .proj-kpi-value { font-size: 13px; color: #2d6a4f; }

/* date range + summary row */
.proj-dates-row {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: #999;
}

/* ════════════════════════════════════════════════════════════════════════════
   GANTT VIEW — top bar
   ════════════════════════════════════════════════════════════════════════════ */
.gantt-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; background: #1a1a2e; color: white;
  height: 52px; flex-shrink: 0;
}
.topbar-left  { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.project-title { font-size: 17px; font-weight: 700; color: #cdd6f4; }

.zoom-controls { display: flex; gap: 3px; }
.zoom-btn {
  padding: 4px 11px; border: 1px solid rgba(255,255,255,.25);
  background: transparent; color: rgba(255,255,255,.8);
  border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 500;
  transition: background .15s;
}
.zoom-btn:hover  { background: rgba(255,255,255,.1); }
.zoom-btn.active { background: #4361ee; border-color: #4361ee; color: white; }

/* ════════════════════════════════════════════════════════════════════════════
   GANTT VIEW — main layout
   ════════════════════════════════════════════════════════════════════════════ */
.gantt-layout { display: flex; flex: 1; overflow: hidden; }

/* ─── App sidebar ─────────────────────────────────────────────────────────── */
.app-sidebar {
  width: 272px; flex-shrink: 0;
  background: #1e1e2e; color: #cdd6f4;
  display: flex; flex-direction: column;
  overflow: hidden; border-right: 1px solid #313145;
  position: relative;
}
.sidebar-section {
  display: flex; flex-direction: column; overflow: hidden;
  border-bottom: 1px solid #313145;
}
.sidebar-section:not(.grow) { max-height: 28vh; }
.sidebar-section.grow { flex: 1; border-bottom: none; }

.sidebar-sec-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; background: #181825; flex-shrink: 0;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: #89b4fa;
  cursor: pointer; user-select: none;
}
/* chevron via CSS pseudo-element — pure Unicode, no font dependency */
.sidebar-sec-hdr > span::after {
  content: ' ▾';
  font-size: 11px;
  color: rgba(137,180,250,0.8);
  display: inline-block;
  transition: transform .18s;
  font-style: normal; font-weight: normal; font-family: inherit;
}
.sidebar-section.collapsed .sidebar-sec-hdr > span::after {
  transform: rotate(-90deg);
}

/* collapsed state */
.sidebar-section.collapsed .side-list { display: none; }
.sidebar-section.collapsed:not(.grow) { max-height: none; }
.sidebar-section.grow.collapsed { flex: 0 0 auto; }

.side-list { overflow-y: auto; flex: 1; padding: 3px 0; }

.side-empty {
  padding: 12px 14px; font-size: 12px; color: #555; font-style: italic;
}

/* sidebar items */
.side-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; transition: background .1s;
}
.side-item:hover { background: rgba(137,180,250,.05); }

.side-item-info { flex: 1; min-width: 0; }
.side-item-name {
  display: block; font-size: 13px; font-weight: 500; color: #cdd6f4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-item-sub { display: block; font-size: 11px; color: #6c7086; margin-top: 1px; }

.side-item-act {
  display: flex; gap: 3px; opacity: 0; transition: opacity .15s; flex-shrink: 0;
}
.side-item:hover .side-item-act { opacity: 1; }

/* resource dot */
.dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}

/* activity colorbar */
.act-colorbar {
  width: 3px; height: 38px; border-radius: 2px; flex-shrink: 0;
}

/* activity effort row */
.act-effort-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 4px;
}

/* ─── Gantt chart area ────────────────────────────────────────────────────── */
.gantt-area { flex: 1; overflow: hidden; background: white; }

/* ─── Gantt root layout ───────────────────────────────────────────────────── */
.gw-root { display: flex; height: 100%; overflow: hidden; }

/* Left column */
.gw-left {
  width: 270px; flex-shrink: 0;
  display: flex; flex-direction: column;
  border-right: 2px solid #e9ecef; background: #fafbfc; z-index: 10;
  position: relative;
}
.gw-left-header {
  height: 60px; flex-shrink: 0;
  display: flex; align-items: center; padding: 0 10px;
  border-bottom: 2px solid #e9ecef; background: #f1f3f5;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: #6c757d; gap: 8px;
}
.gwlh-name   { flex: 1; }
.gwlh-effort { width: 72px; text-align: right; padding-right: 6px; }

.gw-left-body { flex: 1; overflow: hidden; position: relative; }
.gw-left-inner { position: relative; will-change: transform; }

.gwl-row {
  position: absolute; left: 0; right: 0;
  display: flex; align-items: center;
  border-bottom: 1px solid #f0f0f0;
}
.gwl-colorbar { width: 3px; height: 36px; border-radius: 2px; flex-shrink: 0; margin: 0 8px; }
.gwl-info     { flex: 1; min-width: 0; padding: 4px 4px 4px 0; }
.gwl-name {
  font-size: 13px; font-weight: 600; color: #212529;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gwl-meta { display: flex; gap: 5px; margin-top: 2px; flex-wrap: wrap; }
.gwl-avs  { display: flex; gap: 2px; margin-top: 3px; }

/* Right scrollable */
.gw-right { flex: 1; overflow: auto; position: relative; }

/* Timeline header — sticky top */
.gw-tl-header {
  position: sticky; top: 0; z-index: 5;
  background: #f8f9fa; border-bottom: 2px solid #e9ecef;
}
.gw-months, .gw-days { display: flex; position: relative; }
.gw-months { height: 28px; background: #f1f3f5; border-bottom: 1px solid #dee2e6; }
.gw-days   { height: 32px; background: white; }

.gw-month {
  position: absolute; height: 100%; overflow: hidden;
  display: flex; align-items: center; padding: 0 7px;
  font-size: 11px; font-weight: 800; color: #4361ee;
  border-right: 1px solid #dee2e6; white-space: nowrap;
}
.gw-day {
  position: absolute; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #888; border-right: 1px solid #f0f0f0;
}
.gw-day { cursor: default; }
.gw-day.we { background: #fff8f0; color: #c0392b; }
.gw-day.td { background: #e8f4fd; color: #1565c0; font-weight: 800; }

/* Weekend day made working (double-clicked) */
.gw-day.custom-work {
  background: white !important;
  color: #555 !important;
  outline: 1px dashed rgba(6,214,160,.6);
  outline-offset: -1px;
}

/* Weekday made non-working */
.gw-day.custom-off {
  background: #fff8f0 !important;
  color: #c0392b !important;
  outline: 1px dashed rgba(239,71,111,.5);
  outline-offset: -1px;
}

/* Timeline body */
.gw-tl-body { position: relative; }

.gw-bg, .gw-rows, .gw-bars {
  position: absolute; top: 0; left: 0;
}
.gw-bg   { z-index: 0; }
.gw-rows { z-index: 1; pointer-events: none; }
.gw-bars { z-index: 2; }

.gw-wecol { position: absolute; background: rgba(255,152,0,.06); top: 0; }
.gw-rowline { position: absolute; left: 0; height: 1px; background: #f0f0f0; }

/* ─── Task bars ───────────────────────────────────────────────────────────── */
.gw-bar {
  position: absolute; border-radius: 7px;
  cursor: grab; user-select: none;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,.15);
  transition: box-shadow .15s, filter .15s;
}
.gw-bar:hover { box-shadow: 0 4px 14px rgba(0,0,0,.22); filter: brightness(1.06); z-index: 5; }
.gw-bar.dragging {
  cursor: grabbing; opacity: .85; z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.gw-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; padding: 0 8px; gap: 4px;
  background: linear-gradient(to bottom, rgba(255,255,255,.12), rgba(0,0,0,.08));
}
.gw-bar-name {
  font-size: 11.5px; font-weight: 700; color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.gw-bar-chips { display: flex; gap: 2px; flex-shrink: 0; }
.bar-chip {
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255,255,255,.5);
  flex-shrink: 0;
}

/* ─── Resize handles ─────────────────────────────────────────────────────── */
.gw-bar-rh {
  position: absolute; top: 0; height: 100%;
  width: 9px; z-index: 3; cursor: ew-resize;
  background: rgba(255,255,255,0);
  transition: background .15s;
  flex-shrink: 0;
}
.gw-bar-rh-l { left: 0;  border-radius: 7px 0 0 7px; }
.gw-bar-rh-r { right: 0; border-radius: 0 7px 7px 0; }

/* grip lines — two vertical ticks */
.gw-bar-rh::before,
.gw-bar-rh::after {
  content: '';
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 1.5px; height: 55%; border-radius: 1px;
  background: rgba(255,255,255,0); transition: background .15s;
}
.gw-bar-rh::before { left: 2.5px; }
.gw-bar-rh::after  { left: 5px;   }
.gw-bar-rh-r::before { left: auto; right: 5px;   }
.gw-bar-rh-r::after  { left: auto; right: 2.5px; }

.gw-bar:hover .gw-bar-rh          { background: rgba(255,255,255,.22); }
.gw-bar:hover .gw-bar-rh::before,
.gw-bar:hover .gw-bar-rh::after   { background: rgba(255,255,255,.7); }

.gw-bar.resizing {
  cursor: ew-resize; z-index: 100; opacity: .88;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

/* Floating tooltip shown during resize */
.gw-resize-tip {
  position: fixed;
  background: rgba(15,15,35,.85);
  color: #fff; padding: 5px 11px;
  border-radius: 7px; font-size: 12px; font-weight: 700;
  pointer-events: none; z-index: 9999; display: none;
  box-shadow: 0 3px 10px rgba(0,0,0,.3);
  white-space: nowrap; letter-spacing: .2px;
}

/* Ghost bar shown while drag-creating a new activity */
.gw-create-ghost {
  position: absolute;
  top: 0;
  background: rgba(67,97,238,.12);
  border: 2px dashed rgba(67,97,238,.5);
  border-radius: 5px;
  pointer-events: none;
  z-index: 50;
}

/* Today line */
.gw-today {
  position: absolute; width: 2px; background: #f72585;
  top: 0; z-index: 4; pointer-events: none; display: none;
}
.gw-today::before {
  content: ''; position: absolute; top: -4px; left: -4px;
  width: 10px; height: 10px; background: #f72585; border-radius: 50%;
}

/* ════════════════════════════════════════════════════════════════════════════
   SHARED BADGES & AVATARS
   ════════════════════════════════════════════════════════════════════════════ */
.badge-effort {
  font-size: 11px; background: #fff3cd; color: #856404;
  padding: 1px 7px; border-radius: 5px; font-weight: 700; white-space: nowrap;
}
.badge-cost {
  font-size: 11px; background: #d1e7dd; color: #0a3622;
  padding: 1px 7px; border-radius: 5px; font-weight: 700; white-space: nowrap;
}
.badge-hours { font-size: 11px; color: #888; white-space: nowrap; }

/* avatars */
.av {
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 10px; font-weight: 800; color: white;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.av-sm {
  width: 17px; height: 17px; border-radius: 50%;
  font-size: 9px; font-weight: 800; color: white;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.av-xs {
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 11px; font-weight: 800; color: white;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.av-more { background: #9e9e9e !important; }
.avs-row { display: flex; gap: 2px; }

/* ════════════════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════════════════ */
.icon-btn {
  width: 30px; height: 30px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; border: none; background: transparent;
  color: #6c757d; cursor: pointer; font-size: 13px;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: #f0f0f0; color: #212529; }
.icon-btn.red:hover { background: #fee2e2; color: #dc3545; }

.ibtn {
  width: 22px; height: 22px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; border: none; background: transparent;
  color: #6c7086; cursor: pointer; font-size: 11px;
  transition: background .1s, color .1s;
}
.ibtn:hover     { background: rgba(255,255,255,.12); color: #cdd6f4; }
.ibtn.red:hover { background: rgba(243,139,168,.2);  color: #f38ba8; }

/* ─── Panel drag-resize handles ───────────────────────────────────────────── */
.gw-left-resize,
.sidebar-resize {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 5px; cursor: col-resize; z-index: 20;
  background: transparent; transition: background .15s;
}
.gw-left-resize:hover  { background: rgba(67,97,238,.3); }
.gw-left-resize.resizing { background: rgba(67,97,238,.5); }
.sidebar-resize:hover  { background: rgba(137,180,250,.25); }

/* resource checkboxes in activity modal */
.res-cb-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px; border-radius: 6px;
  transition: background .1s; font-size: 14px; margin: 0;
}
.res-cb-item:hover { background: #f8f9fa; }
.res-cb-item input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.res-cb-label {
  display: flex; align-items: center; gap: 6px;
  flex: 1; cursor: pointer; margin: 0;
}
.res-pct {
  width: 52px; margin-left: auto; padding: 2px 4px;
  font-size: 12px; text-align: right;
  border: 1px solid #dee2e6; border-radius: 4px;
}
.res-pct:disabled { background: #f8f9fa; color: #adb5bd; border-color: #e9ecef; cursor: not-allowed; }
.res-pct-label { font-size: 12px; color: #6c757d; }

/* ════════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ════════════════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 64px 20px; color: #aaa;
  grid-column: 1 / -1;
}

/* ════════════════════════════════════════════════════════════════════════════
   TOAST
   ════════════════════════════════════════════════════════════════════════════ */
#toastWrap {
  position: fixed; bottom: 22px; right: 22px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}

/* ════════════════════════════════════════════════════════════════════════════
   MODALS
   ════════════════════════════════════════════════════════════════════════════ */
.modal-content { border-radius: 14px; border: none; box-shadow: 0 20px 60px rgba(0,0,0,.15); }
.modal-header  { border-bottom: 1px solid #f0f0f0; padding: 18px 24px 14px; }
.modal-body    { padding: 18px 24px; }
.modal-footer  { border-top: 1px solid #f0f0f0; padding: 14px 24px; }
.modal-title   { font-weight: 700; }

/* scrollable resource list inside activity modal */
#fActResources {
  max-height: 180px; overflow-y: auto;
  border: 1px solid #dee2e6; border-radius: 8px; padding: 6px 10px;
}

/* ════════════════════════════════════════════════════════════════════════════
   SCROLLBAR styling (webkit)
   ════════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.3); }

/* sidebar scrollbar (dark) */
.side-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.side-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }

/* ════════════════════════════════════════════════════════════════════════════
   GROUPS — left panel
   ════════════════════════════════════════════════════════════════════════════ */
.gwl-group-row {
  background: rgba(255,255,255,.04);
  padding: 0 8px;
  cursor: pointer;
  gap: 6px;
}
.gwl-group-row:hover { background: rgba(255,255,255,.07); }
.gwl-group-icon { font-size: 12px; flex-shrink: 0; margin: 0 4px; }
.gwl-group-name { font-weight: 700; }

/* collapse toggle button */
.gwl-collapse-btn {
  width: 20px; height: 20px; padding: 0; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer;
  border-radius: 4px; margin: 0 2px;
  color: inherit; transition: background .12s;
}
.gwl-collapse-btn:hover { background: rgba(0,0,0,.08); }

/* activity row indented inside a group */
.gwl-grouped { background: rgba(255,255,255,.015); }

/* nested sub-group row */
.gwl-sub-group { background: rgba(255,255,255,.03); }

/* draggable activity rows in left panel */
.gwl-row.gwl-draggable { cursor: grab; }
.gwl-row.gwl-draggable:active { cursor: grabbing; }

/* drop-target highlight during vertical drag */
.gwl-row.drop-target {
  background: rgba(67,97,238,.12) !important;
  outline: 1px dashed rgba(67,97,238,.5);
  outline-offset: -1px;
}

/* ════════════════════════════════════════════════════════════════════════════
   GROUPS — timeline span (draggable band)
   ════════════════════════════════════════════════════════════════════════════ */
.gw-group-span {
  position: absolute;
  border-radius: 6px;
  cursor: grab;
  z-index: 3;
  opacity: 0.82;
  overflow: hidden;
  transition: opacity .15s, box-shadow .15s;
}
.gw-group-span::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.2), rgba(0,0,0,.1));
  pointer-events: none; z-index: 0;
}
.gw-group-span:hover { opacity: 1; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.gw-group-span.dragging { opacity: 0.45; cursor: grabbing; }

/* inner layout of the group span bar */
.gw-group-span-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; padding: 0 8px; gap: 6px; pointer-events: none;
}
.gw-group-span-name {
  font-size: 11px; font-weight: 700; color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.gw-group-span-stats {
  font-size: 10px; font-weight: 600; color: rgba(255,255,255,.9);
  white-space: nowrap; flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.gw-group-span--collapsed {
  opacity: 0.55;
  outline: 2px dashed rgba(255,255,255,.4);
  outline-offset: -2px;
}

/* ════════════════════════════════════════════════════════════════════════════
   MILESTONES — left panel
   ════════════════════════════════════════════════════════════════════════════ */
.gwl-ms-row { padding: 0 8px; gap: 8px; }

/* small rotated-square icon in the left panel */
.gwl-ms-icon {
  width: 12px; height: 12px;
  transform: rotate(45deg);
  border-radius: 2px;
  flex-shrink: 0;
  margin: 0 5px;
}
.gwl-ms-date { font-size: 11px; color: #888; margin-top: 1px; }

/* Milestones header row (single row replacing individual milestone rows) */
.gwl-ms-header-row {
  display: flex; align-items: center; gap: 10px; padding: 0 10px;
  background: rgba(247,37,133,.04);
  border-bottom: 1px solid rgba(247,37,133,.15);
  cursor: default;
}
.gwl-ms-hdr-icon { font-size: 13px; flex-shrink: 0; }

/* Full-height vertical line for each milestone in the timeline */
.gw-ms-vline {
  position: absolute; top: 0; width: 0;
  border-left-style: dashed; border-left-width: 2px;
  opacity: 0.45; pointer-events: none; z-index: 1;
}

/* Left panel group row: drop target highlight for drag-to-nest */
.left-drop-target {
  outline: 2px dashed #4361ee !important;
  outline-offset: -2px;
  background: rgba(67,97,238,.08) !important;
}

/* ════════════════════════════════════════════════════════════════════════════
   MILESTONES — timeline diamond
   ════════════════════════════════════════════════════════════════════════════ */
.gw-ms-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  z-index: 4;
  overflow: visible;
  transition: filter .15s;
}
.gw-ms-wrapper:hover { filter: brightness(1.15); }
.gw-ms-wrapper.dragging { cursor: grabbing; opacity: .7; }

.gw-ms-diamond {
  width: 16px; height: 16px;
  transform: rotate(45deg);
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  margin-bottom: 4px;
}
.gw-ms-label {
  font-size: 9px; font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(255,255,255,.8);
}

/* ════════════════════════════════════════════════════════════════════════════
   MILESTONE diamond — sidebar
   ════════════════════════════════════════════════════════════════════════════ */
.ms-diamond-sm {
  width: 10px; height: 10px;
  transform: rotate(45deg);
  border-radius: 1px;
  flex-shrink: 0;
  margin: 0 3px;
}

/* ════════════════════════════════════════════════════════════════════════════
   ACTIVITY sidebar — group badge
   ════════════════════════════════════════════════════════════════════════════ */
.grp-badge {
  font-size: 10px; font-weight: 700;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ════════════════════════════════════════════════════════════════════════════ */
.login-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 4px 32px rgba(67,97,238,.15);
  text-align: center;
  min-width: 320px;
}
.login-logo     { font-size: 2rem; font-weight: 700; color: #4361ee; margin-bottom: 8px; }
.login-subtitle { color: #666; margin-bottom: 32px; font-size: .95rem; }
.login-error    { color: #c0392b; margin-top: 16px; font-size: .9rem; }

/* User badge in project view header */
.user-badge {
  display: flex; align-items: center;
  font-size: .85rem; color: rgba(255,255,255,.85);
}

/* Projects page footer */
.projects-footer {
  margin-top: 32px; padding: 16px 0;
  border-top: 1px solid #e5e7eb;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #aaa;
}
.projects-footer .build-id {
  font-family: monospace; font-size: 11px; color: #bbb;
}

/* Share modal user rows */
.share-user-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 4px; border-bottom: 1px solid #f0f0f0; font-size: 13.5px;
}
.share-user-row:last-child { border-bottom: none; }
.share-user-name { flex: 1; }

/* ─── Public link / cost hiding ─────────────────────────────────────────────── */
body.hide-costs .badge-cost,
body.hide-costs .proj-kpi--cost,
body.hide-costs .res-cost-label { display: none !important; }

/* ─── Dependencies ───────────────────────────────────────────────────────────── */
.dep-section {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}
.dep-item {
  padding: 2px 0;
}
.dep-type-badge {
  font-size: 0.68em;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  color: #fff;
}
.dep-badge-after  { background: #e63946; }
.dep-badge-before { background: #4361ee; }
.dep-add-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.dep-type-sel {
  max-width: 130px;
  min-width: 110px;
}
