/* ============================================================
   WeatherEye Timeline — Rosling-style Bubble Chart
   Phase 4 Sprint · Azia Light Theme — white/aqua palette
   ============================================================ */

/* When timeline is active, hide infrastructure elements */
body.tl-active #expanded-title,
body.tl-active #detail-panel,
body.tl-active #bg-layer { display: none !important; }

/* ---- Timeline View Container ---- */
#timeline-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #F9FAFB;
  color: #475569;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
}

/* Noise overlay — disabled for light theme */
#timeline-view::before {
  content: none;
}


/* ---- Header ---- */
.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 28px;
  min-height: 90px;
  z-index: 250;
  flex-shrink: 0;
  border-bottom: 2px solid #0693E3;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tl-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tl-header-radar {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
}

.tl-header-radar canvas {
  display: block;
  width: 76px;
  height: 76px;
}

.tl-logo-mark {
  display: none;
}

@keyframes tl-radar-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.tl-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #172351;
}

.tl-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(71, 85, 105, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 4px;
}

.tl-data-source {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  background: rgba(34, 197, 94, 0.15);
  color: rgba(34, 197, 94, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.tl-data-source[title*="local"] {
  background: rgba(148, 163, 184, 0.1);
  color: rgba(148, 163, 184, 0.7);
  border-color: rgba(148, 163, 184, 0.2);
}

.tl-header-right {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 3px;
}

.tl-view-btn {
  padding: 12px 21px;
  border: none;
  background: transparent;
  color: rgba(71, 85, 105, 0.8);
  font-family: inherit;
  font-size: 1.04rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tl-view-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  filter: brightness(0.85);
}

.tl-view-active {
  color: #0693E3;
  background: rgba(6, 147, 227, 0.1);
  border-bottom: 3px solid currentColor;
}

/* ---- Nav Groups (Chrome tab-group pattern) ---- */
.nav-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: border-color 0.25s ease;
  position: relative;
  margin: 0 1px;
}

.nav-group-pill {
  padding: 6px 16px;
  border: 1px solid;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.nav-group-pill:hover {
  filter: brightness(0.9);
}

.nav-group-pill-active {
  font-weight: 700;
  box-shadow: 0 0 0 1px currentColor inset;
}

.nav-group-children {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 2px;
}

.nav-group-children .tl-view-btn {
  font-size: 0.78rem;
  padding: 5px 12px;
}

.epw-signout-btn {
  margin-left: 8px;
  color: #94a3b8;
  border-left: 1px solid rgba(0,0,0,0.08);
  padding-left: 16px;
}
.epw-signout-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

/* ---- Month Tab Bar ---- */
.tl-month-bar {
  display: flex;
  gap: 2px;
  padding: 8px 28px;
  flex-shrink: 0;
  z-index: 5;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tl-month-bar::-webkit-scrollbar { display: none; }

.tl-month-bar-label {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(71, 85, 105, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  padding-right: 12px;
  flex-shrink: 0;
}

.tl-month-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 18px;
  border: none;
  background: rgba(0, 0, 0, 0.02);
  color: rgba(71, 85, 105, 0.6);
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-month-tab:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
}

.tl-month-current {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.tl-month-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.tl-month-year {
  font-size: 0.6rem;
  opacity: 0.5;
  font-weight: 400;
}


/* ---- Dashboard Row (Radar + Summaries) ---- */
.tl-dashboard-row {
  display: flex;
  flex: 1;
  overflow: hidden;
  z-index: 2;
}

.tl-radar-col {
  width: 45%;
  min-width: 340px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.tl-radar-range {
  font-size: 0.65rem;
  color: rgba(71, 85, 105, 0.5);
  margin-left: 8px;
}
.tl-radar-count {
  font-size: 0.6rem;
  color: rgba(71, 85, 105, 0.4);
  margin-left: auto;
  padding-right: 8px;
}

.tl-summaries-col {
  flex: 1;
  display: flex;
  gap: 0;
  overflow: hidden;
}

/* Summary Cards */
.tl-summary-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}
.tl-summary-card:last-child { border-right: none; }

.tl-sum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.95);
  flex-shrink: 0;
}

.tl-sum-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #172351;
}

.tl-sum-count {
  font-size: 0.65rem;
  color: rgba(71, 85, 105, 0.5);
  font-weight: 500;
}

.tl-sum-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.08) transparent;
}

.tl-sum-loading, .tl-sum-empty {
  padding: 20px 14px;
  color: rgba(71, 85, 105, 0.4);
  font-size: 0.78rem;
  text-align: center;
}

/* Summary Item Row (Next Steps / WIP style) */
.tl-sum-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  gap: 8px;
}
.tl-sum-item:last-child { border-bottom: none; }

.tl-sum-item-left {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.tl-sum-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(0,0,0,0.08);
}

.tl-sum-item-info {
  min-width: 0;
  flex: 1;
}

.tl-sum-item-worker {
  font-size: 0.78rem;
  font-weight: 700;
  color: #172351;
  line-height: 1.2;
}

.tl-sum-item-role {
  font-size: 0.6rem;
  color: rgba(71, 85, 105, 0.5);
  margin-bottom: 2px;
}

.tl-sum-item-text {
  font-size: 0.72rem;
  color: rgba(71, 85, 105, 0.75);
  line-height: 1.35;
}

/* Deadline badges */
.tl-sum-badge {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(0,0,0,0.04);
  color: #64748b;
  align-self: flex-start;
  margin-top: 2px;
}
.tl-sum-badge-overdue { background: rgba(239, 68, 68, 0.12); color: #dc2626; font-weight: 700; }
.tl-sum-badge-urgent { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.tl-sum-badge-soon { background: rgba(59, 130, 246, 0.08); color: #2563eb; }
.tl-sum-badge-none { background: rgba(0,0,0,0.03); color: #94a3b8; }

/* Intel rows */
.tl-sum-intel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  gap: 8px;
}
.tl-sum-intel-query {
  font-size: 0.72rem;
  color: rgba(71, 85, 105, 0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.tl-sum-intel-metric {
  font-size: 0.65rem;
  font-weight: 600;
  color: #0693E3;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Canvas (main bubble area) ---- */
.tl-canvas-wrap {
  flex: 1;
  overflow-x: hidden;
  overflow-y: hidden;
  position: relative;
  z-index: 2;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tl-canvas-wrap::-webkit-scrollbar { display: none; }

.tl-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.tl-month-columns {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
}

.tl-month-col {
  flex: 1;
  position: relative;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.tl-month-col:last-child { border-right: none; }

/* Graded shading: past months slightly shaded */
.tl-month-col-past {
  background: rgba(0, 0, 0, 0.04) !important;
}

.tl-month-col-header {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(71, 85, 105, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.tl-month-divider {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.06) 30%, rgba(0, 0, 0, 0.06) 70%, transparent 100%);
}


/* ---- Today Line ---- */
.tl-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 147, 227, 0.8) 15%, rgba(6, 147, 227, 0.8) 85%, transparent 100%);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 8px rgba(6, 147, 227, 0.4), 0 0 2px rgba(6, 147, 227, 0.6);
}


/* ---- Bubbles ---- */
.tl-bubbles {
  position: absolute;
  inset: 30px 0 0 0;
}

.tl-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 3;
  transition: filter 0.3s ease;
}

.tl-bubble:hover {
  z-index: 10;
  filter: brightness(1.2);
}

.tl-bubble:hover .tl-bubble-inner {
  transform: scale(1.08);
}

.tl-bubble-hidden {
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
}

.tl-bubble-selected .tl-bubble-inner {
  transform: scale(1.12);
}

.tl-bubble-selected .tl-bubble-ring {
  opacity: 0.8;
  transform: scale(1.25);
}

@keyframes tl-float {
  0%, 100% { transform: translate(-50%, -50%); }
}

.tl-bubble-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  background: radial-gradient(
    circle at 35% 35%,
    rgba(255, 255, 255, 0.18) 0%,
    var(--bubble-color) 40%,
    color-mix(in srgb, var(--bubble-color) 80%, black) 100%
  );
  box-shadow:
    0 0 20px var(--bubble-glow),
    0 0 60px color-mix(in srgb, var(--bubble-glow) 40%, transparent),
    inset 0 -4px 12px rgba(0, 0, 0, 0.3),
    inset 0 2px 8px rgba(255, 255, 255, 0.15);
}

/* Glass reflection highlight */
.tl-bubble-inner::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 18%;
  width: 35%;
  height: 25%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.tl-bubble-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--bubble-color);
  opacity: 0.25;
  transition: all 0.3s ease;
  pointer-events: none;
}

.tl-bubble-name {
  color: #fff;
  font-weight: 600;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  z-index: 1;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-bubble-worker {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  line-height: 1;
  margin-top: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.tl-bubble-days {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 8px;
  z-index: 2;
  backdrop-filter: blur(4px);
}

/* Pulsing for imminent deadlines */
.tl-bubble-pulse .tl-bubble-inner {
  animation: tl-pulse 1.5s ease-in-out infinite;
}

@keyframes tl-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--bubble-glow), 0 0 60px color-mix(in srgb, var(--bubble-glow) 40%, transparent), inset 0 -4px 12px rgba(0, 0, 0, 0.3), inset 0 2px 8px rgba(255, 255, 255, 0.15); }
  50% { box-shadow: 0 0 35px var(--bubble-glow), 0 0 90px color-mix(in srgb, var(--bubble-glow) 60%, transparent), inset 0 -4px 12px rgba(0, 0, 0, 0.3), inset 0 2px 8px rgba(255, 255, 255, 0.15); }
}

/* Overdue: darker, desaturated */
.tl-bubble-overdue .tl-bubble-inner {
  filter: saturate(0.6) brightness(0.8);
}


/* ---- Horizontal Scroller Bar ---- */
.tl-scroller-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 28px;
  flex-shrink: 0;
  z-index: 5;
}

.tl-scroll-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: rgba(71, 85, 105, 0.7);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tl-scroll-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
  border-color: rgba(0, 0, 0, 0.15);
}

.tl-scroll-track {
  flex: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.tl-scroll-thumb {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(6, 147, 227, 0.4);
  border-radius: 3px;
  transition: left 0.1s ease;
  min-width: 40px;
}


/* ---- Worker Filter Pills ---- */
.tl-workers-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 28px 16px;
  flex-shrink: 0;
  z-index: 5;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.95);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tl-workers-bar::-webkit-scrollbar { display: none; }

.tl-workers-label {
  font-size: 0.7rem;
  color: rgba(71, 85, 105, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-worker-pills {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.tl-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(71, 85, 105, 0.6);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-pill:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
  border-color: rgba(0, 0, 0, 0.12);
}

.tl-pill-active {
  background: rgba(6, 147, 227, 0.1);
  color: #0693E3;
  border-color: rgba(6, 147, 227, 0.3);
}

.tl-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ---- Detail Panel ---- */
.tl-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background: #FFFFFF;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  z-index: 100;
  overflow-y: auto;
  padding: 24px;
  transform: translateX(100%);
  opacity: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.tl-detail-open {
  transform: translateX(0);
  opacity: 1;
}

.tl-detail-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: rgba(71, 85, 105, 0.7);
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tl-detail-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #475569;
}

.tl-detail-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.tl-detail-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #172351;
  margin-bottom: 16px;
  line-height: 1.2;
}

.tl-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.tl-detail-worker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #475569;
}

.tl-detail-role {
  color: rgba(71, 85, 105, 0.6);
  font-size: 0.8rem;
}

.tl-detail-deadline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(71, 85, 105, 0.8);
}

.tl-detail-days {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0693E3;
  padding: 4px 10px;
  background: rgba(6, 147, 227, 0.1);
  border-radius: 6px;
  display: inline-block;
}

.tl-detail-today {
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.15) !important;
}

.tl-detail-overdue {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

.tl-detail-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(71, 85, 105, 0.8);
  margin-bottom: 24px;
}


/* ---- Controls (Urgency / Importance dropdowns) ---- */
.tl-detail-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.tl-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tl-control-group label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tl-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: #475569;
  font-family: inherit;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.tl-select:focus {
  outline: none;
  border-color: rgba(6, 147, 227, 0.4);
  box-shadow: 0 0 0 2px rgba(6, 147, 227, 0.15);
}

.tl-select option {
  background: #FFFFFF;
  color: #475569;
}

.tl-urgency-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tl-auto-escalated {
  font-size: 0.7rem;
  color: #f59e0b;
  font-style: italic;
}


/* ---- Milestones ---- */
.tl-detail-milestones {
  margin-bottom: 20px;
}

.tl-detail-milestones h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.tl-milestone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-milestone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(71, 85, 105, 0.8);
}

.tl-milestone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(6, 147, 227, 0.4);
  border: 1.5px solid rgba(6, 147, 227, 0.6);
  flex-shrink: 0;
}


/* ---- Mission Quote Banner (inside header, between title and nav) ---- */
.tl-quote-banner {
  flex: 1;
  text-align: center;
  padding: 0 20px;
  min-width: 0;
}

.tl-quote-text {
  margin: 0;
  font-style: italic;
  color: #64748b;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
}


/* ---- ADR-047: Home Info Strip ---- */
.tl-info-strip {
  display: flex;
  gap: 12px;
  padding: 0 28px 12px;
  flex-wrap: wrap;
}

.tl-info-card {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tl-info-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.tl-info-value {
  font-size: 0.82rem;
  color: rgba(71, 85, 105, 0.8);
  line-height: 1.4;
}

.tl-info-main {
  color: #172351;
  font-weight: 500;
}

.tl-info-rain {
  color: rgba(6, 147, 227, 0.8);
  font-size: 0.75rem;
}

.tl-info-weather {
  border-left: 3px solid rgba(245, 158, 11, 0.4);
  flex: 0 0 auto;
  min-width: 0;
  padding: 8px 10px;
}
.tl-info-bank {
  border-left: 3px solid rgba(34, 197, 94, 0.4);
  flex: 0 0 auto;
  min-width: 0;
}
.tl-info-calendar {
  border-left: 3px solid rgba(6, 147, 227, 0.4);
  flex: 0 1 auto;
  min-width: 0;
  max-width: fit-content;
}
.tl-info-kpis {
  border-left: 3px solid rgba(168, 85, 247, 0.4);
  flex: 0 0 auto;
}

/* ---- Live Connections Bar (inside KPIs card) ---- */
.tl-connections-bar {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 6px;
  margin-top: 6px;
}

.tl-connections-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.tl-connections-header .tl-info-label {
  margin-bottom: 0;
}

.tl-connections-live {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.15);
  color: rgba(34, 197, 94, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.tl-connections-live-err {
  background: rgba(239, 68, 68, 0.15);
  color: rgba(239, 68, 68, 0.9);
  border-color: rgba(239, 68, 68, 0.25);
}

.tl-connections-date {
  font-size: 0.5rem;
  color: rgba(71, 85, 105, 0.4);
  margin-left: auto;
}

.tl-connections-grid {
  display: flex;
  gap: 12px;
}

.tl-conn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tl-conn-label {
  font-size: 0.55rem;
  color: rgba(71, 85, 105, 0.5);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.tl-conn-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.tl-conn-ok {
  background: #22c55e;
  box-shadow: 0 0 8px 2px rgba(34, 197, 94, 0.6);
}

.tl-conn-err {
  background: #ef4444;
  box-shadow: 0 0 8px 2px rgba(239, 68, 68, 0.6);
}

/* ---- Home Body: Chat Sidebar + Main Content ---- */
.tl-home-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tl-home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ---- Siobhan Chat Sidebar (full height left column) ---- */
.tl-chat-sidebar {
  position: relative;
  width: 280px;
  min-width: 200px;
  max-width: 600px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #0B1929;
  border-right: 1px solid #1E3A5F;
  border-left: 3px solid #38BDF8;
  overflow: hidden;
}

.tl-chat-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #1E3A5F;
  flex-shrink: 0;
  position: relative;
  background: #0F2238;
}

.tl-chat-sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #EF4444;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tl-chat-sidebar .tl-chat-avatar {
  width: 36px;
  height: 36px;
  border-color: #38BDF8;
}

.tl-chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.tl-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(244, 114, 182, 0.4);
  flex-shrink: 0;
}

.tl-chat-pending-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #EF4444;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0 4px;
}

.tl-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 8px;
  scrollbar-width: thin;
  scrollbar-color: #1E3A5F #0B1929;
}

.tl-chat-messages::-webkit-scrollbar { width: 4px; }
.tl-chat-messages::-webkit-scrollbar-track { background: #0B1929; }
.tl-chat-messages::-webkit-scrollbar-thumb { background: #1E3A5F; border-radius: 2px; }

.tl-chat-bubble {
  max-width: 85%;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.tl-chat-bubble-eoin {
  align-self: flex-end;
  background: #132D4A;
  border: 1px solid #1E3A5F;
  color: #38BDF8;
}

.tl-chat-bubble-siobhan {
  align-self: flex-start;
  background: #0F2238;
  border: 1px solid #1E3A5F;
  color: #4ADE80;
}

/* Reaction display */
.tl-chat-reaction {
  font-size: 0.9rem;
  flex-shrink: 0;
  cursor: default;
}

/* Reaction picker (appears on right-click of Siobhan's messages) */
.tl-chat-reaction-picker {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  display: flex;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 16px;
  background: #132D4A;
  border: 1px solid #1E3A5F;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 100;
  animation: tl-react-pop 0.15s ease-out;
}

@keyframes tl-react-pop {
  from { opacity: 0; transform: scale(0.85) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.tl-chat-react-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  padding: 2px 5px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}

.tl-chat-react-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  transform: scale(1.25);
}

.tl-chat-pending-msg {
  border-style: dashed;
}

.tl-chat-text {
  flex: 1;
  word-break: break-word;
  white-space: pre-wrap;
}

.tl-chat-time {
  font-size: 0.55rem;
  color: #64748B;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ADR-093: Classification option buttons in chat */
.tl-chat-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  width: 100%;
}

.tl-chat-option-btn {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #1E3A5F;
  border-radius: 6px;
  background: #132D4A;
  color: #38BDF8;
  font-size: 0.68rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.tl-chat-option-btn:hover:not(:disabled) {
  background: #1E3A5F;
  border-color: #38BDF8;
}

.tl-chat-option-btn:disabled {
  cursor: default;
}

.tl-chat-option-new {
  border-style: dashed;
  color: #64748B;
  background: #0F2238;
}

.tl-chat-option-new:hover:not(:disabled) {
  background: #1E3A5F;
  border-color: #64748B;
}

.tl-chat-bubble-confirmed {
  border-left: 3px solid #4ADE80;
}

.tl-chat-input-row {
  display: flex;
  gap: 4px;
  padding: 8px;
  flex-shrink: 0;
  border-top: 1px solid #1E3A5F;
  background: #0F2238;
}

.tl-chat-input-row input {
  flex: 1;
  background: #081421;
  border: 1px solid #1E3A5F;
  border-radius: 6px;
  padding: 5px 10px;
  color: #4ADE80;
  font-size: 0.75rem;
  font-family: 'Consolas', 'Courier New', monospace;
  outline: none;
}

.tl-chat-input-row input:focus {
  border-color: #38BDF8;
}

.tl-chat-input-row input::placeholder {
  color: #64748B;
}

.tl-chat-input-row button {
  background: #132D4A;
  border: 1px solid #1E3A5F;
  border-radius: 6px;
  color: #38BDF8;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.tl-chat-input-row button:hover {
  background: #1E3A5F;
}

/* ---- Thinking Bubble Animation ---- */
.tl-thinking-bubble {
  padding: 10px 16px !important;
}
.tl-thinking-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}
.tl-thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(244, 114, 182, 0.7);
  animation: tl-thinking-bounce 1.4s ease-in-out infinite;
}
.tl-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.tl-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes tl-thinking-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.tl-kpi-item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin-right: 14px;
}
.tl-kpi-label {
  font-size: 0.65rem;
  color: rgba(71, 85, 105, 0.45);
  letter-spacing: 0.04em;
}
.tl-kpi-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(168, 85, 247, 0.9);
}

/* ---- Weather Forecast Scroller ---- */
.tl-weather-row {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.tl-weather-section {
  flex: 0 0 auto;
}

.tl-weather-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tl-weather-arrow {
  background: none;
  border: none;
  color: rgba(71, 85, 105, 0.5);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 3px;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}
.tl-weather-arrow:hover { color: #475569; }
.tl-weather-arrow-hidden { opacity: 0; pointer-events: none; }

.tl-weather-window {
  display: flex;
  gap: 0;
  overflow: hidden;
  width: 186px; /* 3 × 62px cells */
  flex-shrink: 0;
  scroll-behavior: smooth;
}

#tl-weather-daily {
  width: 204px; /* 3 × 68px cells */
}

.tl-weather-loading {
  font-size: 0.72rem;
  color: rgba(71, 85, 105, 0.5);
  padding: 6px 0;
  white-space: nowrap;
}

/* Vertical separator between hourly and daily */
.tl-weather-sep-v {
  width: 1px;
  margin: 0 8px;
  background: linear-gradient(180deg, transparent 0%, rgba(245, 158, 11, 0.35) 20%, rgba(245, 158, 11, 0.35) 80%, transparent 100%);
  flex-shrink: 0;
}

.tl-weather-hour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 62px;
  width: 62px;
  padding: 4px 6px;
  border-right: 1px solid rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}
.tl-weather-hour:last-child { border-right: none; }

.tl-wh-time {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.6);
  letter-spacing: 0.03em;
}
.tl-wh-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.tl-wh-temp {
  font-size: 0.85rem;
  font-weight: 700;
  color: #172351;
}
.tl-wh-rain {
  font-size: 0.6rem;
  color: rgba(6, 147, 227, 0.8);
  font-weight: 500;
}
.tl-wh-wind {
  font-size: 0.58rem;
  color: rgba(71, 85, 105, 0.5);
}

.tl-weather-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 68px;
  width: 68px;
  padding: 4px 8px;
  border-right: 1px solid rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}
.tl-weather-day:last-child { border-right: none; }

.tl-wd-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.6);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.tl-wd-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.tl-wd-temps {
  font-size: 0.75rem;
  font-weight: 600;
  color: #172351;
  white-space: nowrap;
}

#tl-bank-value {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tl-bank-item {
  display: flex;
  gap: 6px;
  font-size: 0.78rem;
  line-height: 1.3;
}

.tl-bank-name {
  color: rgba(71, 85, 105, 0.5);
  font-weight: 500;
  min-width: 28px;
}

.tl-bank-bal {
  font-weight: 600;
}

.tl-bank-pos {
  color: #0693E3;
}

.tl-bank-neg {
  color: #f87171;
}

.tl-bank-timestamp {
  font-size: 0.6rem;
  color: rgba(71, 85, 105, 0.45);
  margin-top: -2px;
  margin-bottom: 2px;
}

.tl-cal-event {
  display: block;
  font-size: 0.78rem;
  color: rgba(71, 85, 105, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-cal-done {
  text-decoration: line-through;
  text-decoration-color: rgba(148, 163, 184, 0.5);
  opacity: 0.5;
}

.tl-cal-more {
  font-size: 0.7rem;
  color: rgba(6, 147, 227, 0.6);
}

.tl-headsup-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(251, 191, 36, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
  margin-bottom: 2px;
}

.tl-headsup-value {
  border-top: 1px solid rgba(251, 191, 36, 0.15);
  padding-top: 3px;
}

.tl-headsup-event {
  color: rgba(251, 191, 36, 0.7);
}

/* ---- Chat Sidebar Resize Handle ---- */
.tl-chat-resize-handle {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  background: transparent;
  transition: background 0.15s;
}

.tl-chat-resize-handle:hover,
.tl-chat-resize-handle.dragging {
  background: #38BDF8;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .tl-home-body { flex-direction: column; }
  .tl-chat-sidebar { width: 100%; max-height: 200px; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.06); }
  .tl-header { padding: 10px 16px; }
  .tl-month-bar { padding: 6px 16px; }
  .tl-scroller-bar { padding: 6px 16px; }
  .tl-workers-bar { padding: 8px 16px 12px; }
  .tl-info-strip { padding: 0 16px 10px; gap: 8px; }
  .tl-info-card { min-width: 120px; padding: 8px 10px; }

  .tl-detail-panel { width: 100%; }

  .tl-dashboard-row { flex-direction: column; }
  .tl-radar-col { width: 100%; max-width: none; min-width: 0; max-height: 250px; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.06); }
  .tl-summaries-col { flex-direction: column; }
  .tl-summary-card { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.06); max-height: 200px; }

  .tl-canvas { width: 100%; }

  .tl-subtitle { display: none; }

  .tl-connections-grid { gap: 8px; flex-wrap: wrap; }
  .tl-conn-dot { width: 16px; height: 16px; }
  .tl-conn-label { font-size: 0.48rem; }
}

/* ---- Morning Report Card (ADR-095) ---- */
.tl-info-morning {
  min-width: 200px;
}
.tl-morning-btn {
  padding: 5px 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  color: #334155;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}
.tl-morning-btn:hover { background: #f1f5f9; }
.tl-morning-date { font-size: 11px; color: #64748b; margin-bottom: 6px; }
.tl-morning-stat { font-size: 13px; color: #1e293b; margin-bottom: 4px; }
.tl-morning-num { font-weight: 700; color: #0693E3; font-size: 18px; }
.tl-morning-today { display: flex; gap: 12px; font-size: 11px; color: #64748b; margin-bottom: 6px; }
.tl-morning-overdue { font-size: 11px; color: #dc2626; margin-top: 6px; }
.tl-morning-overdue-item { padding-left: 8px; font-size: 10.5px; color: #991b1b; }
.tl-morning-workers { font-size: 11px; color: #475569; margin-top: 6px; }
.tl-morning-worker-row { padding-left: 8px; font-size: 10.5px; }
.tl-morning-ts { font-size: 9px; color: #94a3b8; margin-top: 6px; }
.tl-morning-loading, .tl-morning-error { font-size: 12px; color: #94a3b8; padding: 8px 0; }
.tl-morning-error { color: #ef4444; }
