/* ============================================================
   DESKTOP CONSOLE — COACH
   ≥1024px replaces the mobile shell for coaches with a real
   desktop product: a dark operations console for the training
   floor. Chakra Petch display type, hairline-divided density,
   lime reserved for signal. Scoped to body.role-coach (set by
   auth.js setAppRole) so clients and admins keep the mobile
   shell on every viewport.

   Mobile-first defaults for elements this feature owns live
   outside the media query.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&display=swap') (min-width: 1024px);

/* ---------- mobile defaults for owned elements ---------- */

.coach-side-brand { display: none; }
.coach-side-label { display: none; }
#coachNav .nav-item.desktop-only { display: none; }

/* Inbox title (was inline styles before the split pane) */
.inbox-title-wrap { padding: 8px 16px 12px; }
.inbox-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}

/* Inbox list is edge-to-edge (was an inline style before the split pane) */
#coachConversationsView .view-content { padding: 0; }

/* Empty pane is display:none inline; router only ever shows it on desktop */
.conv-empty-pane {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--text-tertiary);
}

/* ---------- workout manager cards (coach-only, both breakpoints) ---------- */

.wm-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  margin-bottom: 8px;
  overflow: hidden;
}
.wm-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
}
.wm-card-info { flex: 1; min-width: 0; }
.wm-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wm-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-secondary);
}
.wm-chip {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  white-space: nowrap;
}
.wm-chip-client {
  background: var(--lime-subtle);
  border: 1px solid var(--lime-border);
  color: var(--lime);
}
.wm-card-actions { display: flex; gap: 4px; flex-shrink: 0; }
.wm-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.wm-icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
}
.wm-icon-btn.wm-icon-danger:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}
.wm-chevron {
  flex-shrink: 0;
  color: var(--text-tertiary);
  transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}
.wm-card.open .wm-chevron { transform: rotate(180deg); }
.wm-card-body {
  display: none;
  padding: 0 16px 14px;
}
.wm-card.open .wm-card-body { display: block; }
.wm-ex-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  color: var(--text-primary);
}
.wm-ex-row:last-child { border-bottom: none; }
.wm-ex-detail {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.wm-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.wm-tag-row select {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
}

/* ---------- client cards (coach-only, both breakpoints) ---------- */

.client-stat-row {
  display: flex;
  margin-top: 2px;
}
.client-stat { flex: 1; min-width: 0; }
.client-stat-val {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.client-stat-lbl {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.client-attn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.client-attn-text {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-attn-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.client-attn-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}
/* One quiet signal for attention: warm hairline, nothing shouting inside */
.client-card.attention { border-color: rgba(234, 179, 8, 0.28); }

/* Clients page header — stacked on mobile, one row on desktop */
.coach-dash-head { margin-bottom: var(--space-md); }
.coach-dash-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-sm);
}

/* ============================================================
   THE CONSOLE
   ============================================================ */
@media (min-width: 1024px) {
  body.role-coach {
    --coach-sidebar-w: 232px;
    --coach-inbox-w: 340px;
    --console-font: 'Chakra Petch', var(--font-display);
    --console-bg: #09090b;
    --console-panel: #101012;
    --console-card: #131316;
    --console-hairline: rgba(255, 255, 255, 0.07);
    --console-hairline-strong: rgba(255, 255, 255, 0.13);
    background: var(--console-bg);
  }

  body.role-coach ::selection { background: var(--lime); color: #000; }

  /* Atmosphere: faint lime bloom + grain instead of flat black */
  body.role-coach::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(900px 600px at -5% -10%, rgba(204, 255, 0, 0.05), transparent 60%),
      radial-gradient(1200px 800px at 105% 110%, rgba(235, 235, 245, 0.03), transparent 55%);
  }
  body.role-coach::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  /* Thin console scrollbars */
  body.role-coach ::-webkit-scrollbar { width: 10px; height: 10px; }
  body.role-coach ::-webkit-scrollbar-track { background: transparent; }
  body.role-coach ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    border: 3px solid transparent;
    background-clip: content-box;
  }
  body.role-coach ::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.22); }

  /* ================= SIDEBAR ================= */
  body.role-coach #coachNav {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: var(--coach-sidebar-w);
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 22px 14px 18px;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--console-hairline);
    box-shadow: none;
    background: rgba(13, 13, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  body.role-coach .coach-side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 8px 14px;
    flex-shrink: 0;
  }
  body.role-coach .coach-side-brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    box-shadow: 0 0 0 1px var(--console-hairline);
  }
  body.role-coach .coach-side-brand span {
    font-family: var(--console-font);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
  }

  body.role-coach .coach-side-label {
    display: block;
    font-family: var(--console-font);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-tertiary);
    padding: 10px 10px 8px;
    border-top: 1px solid var(--console-hairline);
  }

  body.role-coach #coachNav .nav-item,
  body.role-coach #coachNav .nav-item.desktop-only {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 12px;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #98989e;
    border-radius: 10px;
    position: relative;
    transition: color 0.15s, background 0.15s;
  }
  body.role-coach #coachNav .nav-item:active { transform: none; }
  body.role-coach #coachNav .nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
  }
  body.role-coach #coachNav .nav-item.active {
    color: var(--lime);
    background: rgba(204, 255, 0, 0.07);
  }
  body.role-coach #coachNav .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 2px;
    border-radius: 1px;
    background: var(--lime);
  }
  body.role-coach #coachNav .nav-item svg {
    width: 18px;
    height: 18px;
  }
  body.role-coach #coachNav .nav-item.active svg { transform: none; }
  body.role-coach #coachNav .nav-dot { display: none; }
  body.role-coach #coachNav .coach-nav-msg-badge {
    position: absolute;
    top: 50%;
    right: 12px;
    left: auto;
    transform: translateY(-50%);
    background: var(--lime);
    color: #000;
    font-weight: 700;
  }
  /* Profile docks to the bottom of the sidebar */
  body.role-coach #coachNav .nav-item[data-view="coachProfileView"] { margin-top: auto; }

  /* ================= APP SHELL ================= */
  /* No global top bar — the sidebar carries location, panes carry headers */
  body.role-coach .top-bar { display: none; }
  body.role-coach .view {
    top: 0;
    left: var(--coach-sidebar-w);
    padding-bottom: 40px;
    z-index: 1;
  }
  body.role-coach .view.chat-view { padding-bottom: 0; }
  body.role-coach .view-content {
    max-width: 1160px;
    padding: 36px 40px 56px;
  }

  body.role-coach #appContainer::after { display: none; }
  body.role-coach .toast { left: calc(var(--coach-sidebar-w) + 16px); }

  /* Console type for pane headers across coach views */
  body.role-coach .view-content > .greeting-section h2,
  body.role-coach .view-content > .section-header h2,
  body.role-coach .view-content > .section-header h3 {
    font-family: var(--console-font);
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* ================= INBOX: SPLIT PANE ================= */
  body.role-coach #coachConversationsView {
    right: auto;
    width: var(--coach-inbox-w);
    border-right: 1px solid var(--console-hairline);
    padding-bottom: 0;
    background: var(--console-panel);
  }
  body.role-coach #coachConversationsView .view-content { max-width: none; }

  body.role-coach .inbox-title-wrap {
    padding: 22px 20px 14px;
    border-bottom: 1px solid var(--console-hairline);
  }
  body.role-coach .inbox-title {
    font-family: var(--console-font);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
  }
  body.role-coach .inbox-title::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lime);
    margin-left: 8px;
    vertical-align: 2px;
  }

  body.role-coach .dm-thread-item {
    gap: 12px;
    padding: 13px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    position: relative;
  }
  body.role-coach .dm-thread-item:hover { background: rgba(255, 255, 255, 0.035); }
  body.role-coach .dm-thread-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--lime);
  }
  body.role-coach .dm-thread-avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }
  body.role-coach .dm-thread-name { font-size: 13.5px; }
  body.role-coach .dm-thread-preview { font-size: 12.5px; }
  body.role-coach .dm-thread-time {
    font-family: var(--console-font);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  body.role-coach .dm-unread-badge {
    background: var(--lime);
    color: #000;
    font-weight: 700;
  }

  /* Conversation pane */
  body.role-coach #coachConversationView {
    left: calc(var(--coach-sidebar-w) + var(--coach-inbox-w));
    background: transparent;
  }
  body.role-coach #coachConversationView .chat-header-back { display: none; }
  body.role-coach #coachConversationView .chat-header {
    padding: 0 24px;
    height: 64px;
    background: rgba(13, 13, 15, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--console-hairline);
  }
  body.role-coach #coachConversationView .chat-header-name { font-size: 14.5px; }
  body.role-coach #coachConversationView .chat-header-sub {
    font-family: var(--console-font);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  body.role-coach .chat-messages {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 24px 24px 12px;
    gap: 2px;
  }
  body.role-coach .chat-bubble {
    max-width: 58%;
    font-size: 14px;
    padding: 8px 13px;
  }
  body.role-coach .day-sep {
    font-family: var(--console-font);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    background: none;
    border: 1px solid var(--console-hairline);
  }

  /* Composer: floating console input bar */
  body.role-coach #coachConversationView .chat-composer {
    max-width: 780px;
    width: calc(100% - 48px);
    margin: 6px auto 20px;
    padding: 8px 10px;
    background: var(--console-card);
    border: 1px solid var(--console-hairline-strong);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
  body.role-coach #coachConversationView .chat-input { background: transparent; font-size: 14px; }

  /* Empty pane */
  body.role-coach .conv-empty-pane {
    position: fixed;
    top: 0;
    bottom: 0;
    left: calc(var(--coach-sidebar-w) + var(--coach-inbox-w));
    right: 0;
    z-index: 1;
  }
  body.role-coach .conv-empty-pane svg {
    width: 40px;
    height: 40px;
    padding: 26px;
    border: 1px dashed var(--console-hairline-strong);
    border-radius: 50%;
    color: var(--text-tertiary);
  }
  body.role-coach .conv-empty-pane p {
    font-family: var(--console-font);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
  }

  /* ================= CLIENTS ================= */
  body.role-coach .coach-dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: var(--space-lg);
  }
  body.role-coach .coach-dash-actions { flex-direction: row; margin-top: 0; }
  body.role-coach .coach-dash-actions .btn-outline {
    background: var(--console-card);
    border: 1px solid var(--console-hairline-strong);
    border-radius: 10px;
    transition: border-color 0.15s, color 0.15s;
  }
  body.role-coach .coach-dash-actions .btn-outline:hover {
    border-color: var(--lime-border);
    color: var(--lime);
  }

  body.role-coach .client-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
  }
  body.role-coach .client-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    background: var(--console-card);
    border: 1px solid var(--console-hairline);
    border-radius: 16px;
    padding: 18px;
    transition: transform 0.18s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.18s, box-shadow 0.18s;
  }
  body.role-coach .client-card:hover {
    transform: translateY(-2px);
    border-color: var(--console-hairline-strong);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  }
  body.role-coach .client-card.attention:hover { border-color: rgba(234, 179, 8, 0.45); }
  body.role-coach .client-card h4 { font-size: 15px; }
  body.role-coach .client-meta-row { font-size: 12px; }
  /* Status: a dot and a whisper, not a pill */
  body.role-coach .client-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--console-font);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
  }
  body.role-coach .client-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
  }
  body.role-coach .client-status.needs_attention { color: var(--warning); }
  body.role-coach .client-status.needs_attention::before { background: var(--warning); }
  body.role-coach .client-stat-row { margin-top: 6px; }
  body.role-coach .client-stat-val {
    font-family: var(--console-font);
    font-size: 20px;
  }
  /* Pin the attention footer so cards in a row align */
  body.role-coach .client-attn { margin-top: auto; }

  /* ================= CLIENT DETAIL ================= */
  body.role-coach #clientDetailView { padding-top: 0; }
  body.role-coach #clientDetailView .view-content {
    max-width: 1160px;
    margin: 0 auto;
  }
  body.role-coach .cd-stat-val { font-family: var(--console-font); }
  body.role-coach #clientProgramsList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 14px;
    align-items: start;
  }

  /* ================= WORKOUTS (client-detail tab) ================= */
  body.role-coach #clientWorkoutsList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
    align-items: start;
  }
  body.role-coach .wm-card {
    margin-bottom: 0;
    background: var(--console-card);
    border: 1px solid var(--console-hairline);
    border-radius: 16px;
    transition: border-color 0.15s;
  }
  body.role-coach .wm-card:hover { border-color: var(--console-hairline-strong); }
  body.role-coach .wm-card-head { padding: 15px 18px; }
  /* Actions stay quiet until the card is hovered */
  body.role-coach .wm-card-actions { opacity: 0; transition: opacity 0.15s; }
  body.role-coach .wm-card:hover .wm-card-actions,
  body.role-coach .wm-card-actions:focus-within { opacity: 1; }

  /* ================= EXERCISES ================= */
  /* Media-card grid: thumbnail on top, actions revealed on hover */
  body.role-coach .exercise-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    align-items: start;
  }
  body.role-coach .exercise-list-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: var(--console-card);
    border: 1px solid var(--console-hairline);
    border-radius: 14px;
    transition: transform 0.18s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.18s;
  }
  body.role-coach .exercise-list-item:hover {
    transform: translateY(-2px);
    border-color: var(--lime-border);
  }
  body.role-coach .exercise-list-item .ex-thumb {
    width: 100%;
    height: 124px;
    border-radius: 0;
    border: none;
  }
  body.role-coach .exercise-list-item .ex-thumb-placeholder {
    background:
      radial-gradient(220px 90px at 50% 110%, rgba(204, 255, 0, 0.06), transparent),
      var(--bg-secondary);
  }
  body.role-coach .exercise-list-item .ex-info { padding: 12px 14px 13px; }
  body.role-coach .exercise-list-item .ex-info h4 { font-size: 14px; }
  body.role-coach .exercise-list-item .ex-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
  }
  body.role-coach .exercise-list-item:hover .ex-actions,
  body.role-coach .exercise-list-item .ex-actions:focus-within { opacity: 1; }
  body.role-coach .exercise-list-item .ex-actions .btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--console-hairline-strong);
    color: var(--text-secondary);
  }
  body.role-coach .exercise-list-item .ex-actions .btn-icon:hover { color: var(--text-primary); }
  body.role-coach .exercise-list-item .ex-actions .btn-icon.ex-del:hover { color: var(--danger); }
  body.role-coach .filter-row { max-width: 560px; }

  /* ================= PROFILE ================= */
  body.role-coach #coachProfileView .view-content { max-width: 720px; }
  body.role-coach #coachProfileView .glass {
    background: var(--console-card);
    border: 1px solid var(--console-hairline);
    border-radius: 16px;
  }

  /* ================= MODALS ================= */
  body.role-coach .modal-content {
    background: var(--console-panel);
    border: 1px solid var(--console-hairline-strong);
    border-radius: 16px;
  }
  /* Program builder gets room for the 7-day week grid */
  body.role-coach .program-builder-content { max-width: 900px; }
}

/* Modal stacking (all breakpoints): workout-builder modal sits above the
   program builder; the exercise picker sits above both. */
#workoutBuilderModal { z-index: 300; }
#exercisePickerModal { z-index: 400; }

/* Repeat-weekly toggle in the program builder's workout picker */
.picker-repeat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.picker-repeat-row input { accent-color: var(--lime); }
.picker-repeat-row:has(input:checked) { color: var(--lime); }

/* ---------- active-program band on the client calendar ---------- */
/* iCal-style span: labelled "Starts · name" / "Ends · name" markers on the
   program's first and last day, with a thin continuity rail across the days
   in between. Cells clip overflow, so everything lives inside each cell
   (the 3px grid gap reads as a stitched band). */
.cal-day { position: relative; }
.cal-day.in-program::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(204, 255, 0, 0.55);
}
/* marker days draw the band element instead of the rail */
.cal-day.program-start::before,
.cal-day.program-end::before { content: none; }
.cal-program-band {
  flex-shrink: 0;
  align-self: stretch;
  margin: -4px -3px 0; /* bleed over .cal-day's 4px 3px padding */
  padding: 3px 5px;
  background: rgba(204, 255, 0, 0.12);
  border-top: 2px solid rgba(204, 255, 0, 0.55);
  color: var(--lime);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.cal-program-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: var(--space-sm);
  background: var(--lime-subtle);
  border: 1px solid var(--lime-border);
  border-radius: 10px;
  font-size: 12.5px;
}
.cal-program-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}
.cal-program-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-program-range {
  margin-left: auto;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
