/* ============================================================
   MY DAY 2.0 — "Mountain Lodge" glass dashboard
   Scoped design system. EVERY selector is prefixed .md2 so it
   cannot collide with the existing app styles.
   Fonts: assumes the app already loads its font stack — this
   file only sets weights / sizes / letter-spacing.
   ============================================================ */

/* ---------- 1. Scope & tokens ---------- */
.md2 {
  /* brand */
  --md2-navy: #1B3D5A;
  --md2-navy-deep: #16334c;
  --md2-green: #7BC142;
  --md2-green-deep: #5fa130;
  --md2-gold: #C7A24C;
  --md2-ink: #0f172a;

  /* status */
  --md2-amber: #E0A43B;
  --md2-slate: #64748b;
  --md2-red-soft: #d98b6a;

  /* glass recipe */
  --md2-glass-bg: rgba(255, 255, 255, .62);
  --md2-glass-border: rgba(255, 255, 255, .55);
  --md2-glass-shadow: 0 20px 50px -22px rgba(15, 40, 70, .5);
  --md2-glass-shadow-hover: 0 30px 60px -24px rgba(15, 40, 70, .58);
  --md2-blur: blur(18px) saturate(1.2);

  /* text on glass */
  --md2-text: var(--md2-ink);
  --md2-text-soft: rgba(15, 23, 42, .62);
  --md2-text-faint: rgba(15, 23, 42, .45);
  --md2-hairline: rgba(15, 40, 70, .10);

  /* text over the raw photo */
  --md2-on-photo: #ffffff;
  --md2-on-photo-soft: rgba(255, 255, 255, .82);
  --md2-photo-text-shadow: 0 1px 2px rgba(8, 20, 35, .55), 0 8px 30px rgba(8, 20, 35, .35);

  /* geometry */
  --md2-radius: 22px;
  --md2-radius-sm: 14px;
  --md2-gap: 18px;
  --md2-shell-max: 1240px;

  /* background image (override inline or per-theme) */
  --md2-bg-image: url('/assets/bg/mountain-lake.jpg');

  position: relative;
  min-height: 100vh;
  color: var(--md2-text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 2. Background photo + legibility scrim ----------
   Contained to the content area: sits to the RIGHT of the fixed
   sidebar (left:var(--sw)) and BELOW the sticky top bar, never over
   the app chrome. Fixed → the glass scrolls over a still photo. */
.md2 .md2-bg {
  position: fixed;
  top: 0; left: var(--sw); right: 0; bottom: 0;
  z-index: 0;
  background-image: var(--md2-bg-image);
  background-size: cover;
  background-position: center;
  pointer-events: none;
  /* NB: no transform:scale here — scaling bleeds the photo left over the
     sidebar's edge (it clips the active nav item). Edges stay flush at --sw. */
}
/* Scrim: darkens top (greeting legibility) and bottom (CTA/footer),
   plus a soft center vignette so glass cards read over ANY photo. */
.md2 .md2-scrim {
  position: fixed;
  top: 0; left: var(--sw); right: 0; bottom: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(10, 25, 45, .42) 0%,
      rgba(10, 25, 45, .16) 26%,
      rgba(10, 25, 45, .18) 62%,
      rgba(10, 25, 45, .50) 100%),
    radial-gradient(120% 90% at 50% 8%,
      rgba(10, 25, 45, .12) 0%,
      rgba(10, 25, 45, 0) 55%);
}

/* ---------- 3. Shell ---------- */
.md2 .md2-shell {
  position: relative;
  z-index: 1;
  max-width: var(--md2-shell-max);
  margin: 0 auto;
  padding: 26px 22px 48px;
  display: flex;
  flex-direction: column;
  gap: var(--md2-gap);
}

/* ---------- 4. Top greeting strip (sits on the photo) ---------- */
.md2 .md2-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 4px 2px;
  color: var(--md2-on-photo);
  text-shadow: var(--md2-photo-text-shadow);
}
.md2 .md2-greet-title {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.08;
}
.md2 .md2-greet-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--md2-on-photo-soft);
}
.md2 .md2-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: none;
}
.md2 .md2-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.md2 .md2-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--md2-on-photo-soft);
}
.md2 .md2-online-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--md2-green);
  box-shadow: 0 0 0 4px rgba(123, 193, 66, .28);
}
.md2 .md2-iconbtn {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.md2 .md2-iconbtn:hover { background: rgba(255,255,255,.32); transform: translateY(-2px); }

/* ---------- 5. Glass card chrome ---------- */
.md2 .md2-card {
  position: relative;
  background: var(--md2-glass-bg);
  backdrop-filter: var(--md2-blur);
  -webkit-backdrop-filter: var(--md2-blur);
  border: 1px solid var(--md2-glass-border);
  border-radius: var(--md2-radius);
  box-shadow: var(--md2-glass-shadow);
  padding: 22px;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s ease;
}
.md2 .md2-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--md2-glass-shadow-hover);
}
/* top sheen — the "wet glass" highlight */
.md2 .md2-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0));
  pointer-events: none;
}
.md2 .md2-card > * { position: relative; }

/* dark variant (CTA strip) */
.md2 .md2-card--dark {
  background: linear-gradient(120deg, rgba(22, 51, 76, .88), rgba(27, 61, 90, .80));
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
}
.md2 .md2-card--dark::before { background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)); }

/* ---------- 6. Hero grid ---------- */
.md2 .md2-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 318px;
  gap: var(--md2-gap);
  align-items: start;   /* each card sizes to its own content — no dead space under the short identity card */
}
/* Left hero column: profile card on top, "jobs on the water" fills the rest so
   there's no dead space under the profile. */
.md2 .md2-col-left { display: flex; flex-direction: column; gap: var(--md2-gap); min-width: 0; }
.md2 .md2-col-left .md2-identity { flex: 0 0 auto; }
.md2 .md2-fleet { flex: 1 1 auto; display: flex; flex-direction: column; gap: 9px; padding: 15px 15px 15px; cursor: pointer; overflow: hidden; min-height: 210px; }
.md2 .md2-fleet-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--md2-text-soft); }
.md2 .md2-fleet-open { color: var(--md2-green-deep); font-weight: 800; }
.md2 .md2-fleet-stage { position: relative; flex: 1 1 auto; border-radius: 14px; overflow: hidden; min-height: 170px; background: rgba(15,40,70,.06); border: 1px solid rgba(15,40,70,.08); }
.md2 .md2-fleet-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.md2 .md2-fleet:hover .md2-fleet-open { text-decoration: underline; }
/* "Who you're carrying" — ropes-free client list */
.md2 .md2-clients { justify-content: flex-start; }
.md2 .md2-cli-list { display: flex; flex-direction: column; gap: 6px; }
.md2 .md2-cli-row { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 11px; background: rgba(15,40,70,.045); border: 1px solid rgba(15,40,70,.06); transition: background .12s; }
.md2 .md2-cli-row:hover { background: rgba(15,40,70,.09); }
.md2 .md2-cli-mono { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 11.5px; letter-spacing: .02em; }
.md2 .md2-cli-name { flex: 1 1 auto; font-weight: 700; font-size: 13px; color: var(--md2-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md2 .md2-cli-live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--md2-green-deep, #2f9e44); box-shadow: 0 0 0 3px rgba(47,158,68,.18); }
.md2 .md2-cli-behind { flex: none; font-size: 11px; font-weight: 800; color: #b42318; background: rgba(217,45,32,.12); padding: 1px 6px; border-radius: 999px; }
.md2 .md2-cli-n { flex: none; min-width: 20px; text-align: center; font-weight: 800; font-size: 12.5px; color: var(--md2-text-soft); background: rgba(15,40,70,.07); border-radius: 8px; padding: 2px 6px; }
.md2 .md2-cli-more { font-size: 11.5px; font-weight: 700; color: var(--md2-text-soft); padding: 4px 8px 0; }
.md2 .md2-cli-empty { font-size: 12.5px; color: var(--md2-text-soft); padding: 14px 6px; text-align: center; }
.md2 .md2-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* ---------- 7. Identity card (hero left) ---------- */
.md2 .md2-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding-top: 30px;
}
.md2 .md2-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
  background: linear-gradient(140deg, var(--md2-navy) 20%, var(--md2-green-deep) 115%);
  border: 3px solid rgba(255, 255, 255, .85);
  box-shadow: 0 12px 28px -12px rgba(15, 40, 70, .55);
  overflow: hidden;
}
.md2 .md2-avatar img { width: 100%; height: 100%; object-fit: cover; }
.md2 .md2-id-name {
  margin: 10px 0 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--md2-navy-deep);
}
.md2 .md2-id-role {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--md2-text-soft);
}
.md2 .md2-xp {
  width: 100%;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--md2-text-faint);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.md2 .md2-xp-head { display: flex; justify-content: space-between; }
.md2 .md2-xp-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(15, 40, 70, .12);
  overflow: hidden;
}
.md2 .md2-xp-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--md2-gold), #dfc07a);
}
.md2 .md2-identity .md2-btn { margin-top: auto; width: 100%; }

/* ---------- 8. Focus card (hero center) ---------- */
.md2 .md2-focus {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 26px 18px;
}
.md2 .md2-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--md2-green-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.md2 .md2-kicker i { font-size: 10px; }
.md2 .md2-timer {
  margin: 10px 0 4px;
  font-size: clamp(52px, 6.5vw, 76px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--md2-navy-deep);
  font-variant-numeric: tabular-nums;
}
.md2 .md2-timer-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--md2-text-soft);
}
.md2 .md2-progress {
  width: min(360px, 100%);
  height: 5px;
  margin: 16px 0 18px;
  border-radius: 999px;
  background: rgba(15, 40, 70, .12);
  overflow: hidden;
}
.md2 .md2-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--md2-navy), var(--md2-green));
}

/* buttons */
.md2 .md2-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.md2 .md2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.md2 .md2-btn:hover { transform: translateY(-2px); }
.md2 .md2-btn--primary {
  color: #fff;
  background: linear-gradient(120deg, var(--md2-green) 0%, var(--md2-green-deep) 110%);
  box-shadow: 0 12px 24px -10px rgba(95, 161, 48, .65);
}
.md2 .md2-btn--navy {
  color: #fff;
  background: linear-gradient(120deg, var(--md2-navy) 0%, var(--md2-navy-deep) 110%);
  box-shadow: 0 12px 24px -10px rgba(22, 51, 76, .6);
}
.md2 .md2-btn--ghost {
  color: var(--md2-navy-deep);
  background: rgba(255, 255, 255, .55);
  border-color: rgba(15, 40, 70, .18);
}
.md2 .md2-btn--ghost:hover { background: rgba(255, 255, 255, .8); }
.md2 .md2-btn--danger {
  color: #9a3d22;
  background: rgba(217, 139, 106, .18);
  border-color: rgba(217, 139, 106, .45);
}

/* ---------- 9. Compact task / job rows ---------- */
.md2 .md2-rows {
  width: 100%;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
}
.md2 .md2-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 6px;
  border-top: 1px solid var(--md2-hairline);
  border-radius: 10px;
  transition: background .15s ease;
}
.md2 .md2-row:hover { background: rgba(255, 255, 255, .45); }
.md2 .md2-row-dot {
  flex-shrink: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--md2-slate);
}
.md2 .md2-row-dot--green { background: var(--md2-green); box-shadow: 0 0 0 3px rgba(123,193,66,.22); }
.md2 .md2-row-dot--amber { background: var(--md2-amber); box-shadow: 0 0 0 3px rgba(224,164,59,.22); }
.md2 .md2-row-dot--grey  { background: rgba(100,116,139,.55); }
.md2 .md2-check {
  flex-shrink: 0;
  width: 17px; height: 17px;
  border-radius: 6px;
  border: 1.5px solid rgba(15, 40, 70, .3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}
.md2 .md2-check--done { background: var(--md2-green); border-color: var(--md2-green); }
.md2 .md2-row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.md2 .md2-row-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--md2-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.md2 .md2-row-title--done { text-decoration: line-through; color: var(--md2-text-faint); }
.md2 .md2-row-meta {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--md2-text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 10. Status pills ---------- */
.md2 .md2-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3.5px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.md2 .md2-pill--green { color: #3c7317; background: rgba(123,193,66,.18); border-color: rgba(123,193,66,.4); }
.md2 .md2-pill--amber { color: #8a5c10; background: rgba(224,164,59,.18); border-color: rgba(224,164,59,.42); }
.md2 .md2-pill--grey  { color: #475569; background: rgba(100,116,139,.14); border-color: rgba(100,116,139,.3); }
.md2 .md2-pill--slate { color: #334155; background: rgba(51,65,85,.12);  border-color: rgba(51,65,85,.28); }
.md2 .md2-pill--red   { color: #93401f; background: rgba(217,139,106,.2); border-color: rgba(217,139,106,.45); }
.md2 .md2-pill--gold  { color: #7c5f1e; background: rgba(199,162,76,.18); border-color: rgba(199,162,76,.45); }

/* ---------- 11. Section headers ---------- */
.md2 .md2-sec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.md2 .md2-sec-title {
  margin: 0;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--md2-text-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.md2 .md2-sec-title i { color: var(--md2-green-deep); font-size: 11px; }
/* section header sitting ON the photo (e.g. metrics rail) */
.md2 .md2-sec--photo .md2-sec-title { color: var(--md2-on-photo-soft); text-shadow: var(--md2-photo-text-shadow); }
.md2 .md2-sec--photo .md2-sec-title i { color: var(--md2-green); }
.md2 .md2-sec-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--md2-navy);
  text-decoration: none;
  white-space: nowrap;
}
.md2 .md2-sec-link:hover { color: var(--md2-green-deep); }

/* ---------- 12. Metric tiles & infographics ---------- */
.md2 .md2-tile {
  padding: 14px 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.md2 .md2-tile-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.md2 .md2-tile-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--md2-text-faint);
}
.md2 .md2-tile-value {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--md2-navy-deep);
  font-variant-numeric: tabular-nums;
}
.md2 .md2-tile-sub { font-size: 11px; font-weight: 600; color: var(--md2-text-faint); }
.md2 .md2-tile svg { flex-shrink: 0; display: block; }
/* stacked variant: title row on top, full-width graphic under it */
.md2 .md2-tile--stack { flex-direction: column; align-items: stretch; gap: 10px; }
.md2 .md2-tile--stack svg { width: 100%; height: auto; }
.md2 .md2-tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }

/* svg text helpers */
.md2 .md2-svg-num  { font-size: 15px; font-weight: 800; fill: var(--md2-navy-deep); letter-spacing: -.02em; }
.md2 .md2-svg-sub  { font-size: 7px; font-weight: 700; fill: rgba(15,23,42,.5); letter-spacing: .06em; }
.md2 .md2-svg-axis { font-size: 8px; font-weight: 700; fill: rgba(15,23,42,.42); }

/* legends (donut) */
.md2 .md2-legend { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.md2 .md2-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--md2-text-soft);
}
.md2 .md2-legend-item b { margin-left: auto; color: var(--md2-ink); font-weight: 800; }
.md2 .md2-legend-swatch { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }

/* tasks progress (tile 4) */
.md2 .md2-deadline-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(199, 162, 76, .16);
  border: 1px solid rgba(199, 162, 76, .4);
  font-size: 11.5px;
  font-weight: 700;
  color: #7c5f1e;
  max-width: 100%;
}
.md2 .md2-deadline-chip i { font-size: 11px; }
.md2 .md2-deadline-chip .md2-deadline-what {
  font-weight: 600;
  color: var(--md2-text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 13. Timeline card ---------- */
.md2 .md2-timeline-band {
  position: relative;
  height: 58px;
  border-radius: var(--md2-radius-sm);
  background: rgba(15, 40, 70, .07);
  overflow: hidden;
}
.md2 .md2-timeline-seg {
  position: absolute;
  top: 12px;
  bottom: 12px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}
.md2 .md2-timeline-seg--green { background: linear-gradient(120deg, var(--md2-green), var(--md2-green-deep)); }
.md2 .md2-timeline-seg--amber { background: linear-gradient(120deg, #ecb95e, var(--md2-amber)); }
.md2 .md2-timeline-seg--navy  { background: linear-gradient(120deg, var(--md2-navy), var(--md2-navy-deep)); }
.md2 .md2-timeline-now {
  position: absolute;
  top: 4px; bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--md2-gold);
  box-shadow: 0 0 0 3px rgba(199, 162, 76, .25);
}
.md2 .md2-timeline-hours {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--md2-text-faint);
}

/* ---------- 14. Duo row: tasks chips + events ---------- */
.md2 .md2-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--md2-gap);
}
.md2 .md2-taskchips { display: flex; flex-wrap: wrap; gap: 9px; }
.md2 .md2-taskchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(15, 40, 70, .14);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--md2-navy-deep);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.md2 .md2-taskchip:hover { transform: translateY(-2px); background: rgba(255,255,255,.85); }
.md2 .md2-taskchip--done { text-decoration: line-through; color: var(--md2-text-faint); }
.md2 .md2-taskchip i { font-size: 11px; color: var(--md2-green-deep); }

.md2 .md2-event {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 6px;
  border-top: 1px solid var(--md2-hairline);
}
.md2 .md2-event:first-of-type { border-top: 0; }
.md2 .md2-event-time {
  flex-shrink: 0;
  width: 58px;
  text-align: center;
  padding: 7px 0;
  border-radius: 12px;
  background: rgba(27, 61, 90, .1);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--md2-navy-deep);
  font-variant-numeric: tabular-nums;
}
.md2 .md2-event-main { min-width: 0; flex: 1; }
.md2 .md2-event-title { font-size: 13.5px; font-weight: 700; color: var(--md2-ink); }
.md2 .md2-event-meta  { font-size: 11.5px; font-weight: 600; color: var(--md2-text-faint); }

/* ---------- 15. CTA strip ---------- */
.md2 .md2-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 26px;
}
.md2 .md2-cta-title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.md2 .md2-cta-sub   { margin: 3px 0 0; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.72); }

/* ---------- 16. Responsive ---------- */
@media (max-width: 1150px) {
  .md2 .md2-hero { grid-template-columns: 270px minmax(0, 1fr) 290px; }
}
@media (max-width: 900px) {
  .md2 .md2-hero,
  .md2 .md2-duo { grid-template-columns: 1fr; }
  .md2 .md2-topbar { flex-direction: column; align-items: flex-start; }
  .md2 .md2-topbar-actions { align-self: flex-end; margin-top: -34px; }
  .md2 .md2-identity { padding-top: 22px; }
  .md2 .md2-timer { font-size: clamp(46px, 13vw, 64px); }
  .md2 .md2-cta { flex-direction: column; align-items: flex-start; }
  .md2 .md2-cta .md2-btn { width: 100%; }
}
@media (max-width: 480px) {
  .md2 .md2-shell { padding: 18px 12px 36px; }
  .md2 .md2-card { padding: 18px; }
  .md2 .md2-row .md2-pill { display: none; } /* rows stay compact on tiny screens */
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .md2 .md2-card, .md2 .md2-btn, .md2 .md2-iconbtn, .md2 .md2-taskchip { transition: none; }
  .md2 .md2-card:hover { transform: none; }
}

/* ---------- 17. App integration ---------- */
/* On mobile the sidebar goes off-canvas and .main spans full width — so the
   photo must reach the left edge too. */
@media (max-width: 760px) {
  .md2 .md2-bg, .md2 .md2-scrim { left: 0; }
}
/* My Day fills the content pane edge-to-edge (kill the default 28px padding). */
.content:has(.md2) { padding: 0 !important; }
.md2 { min-height: calc(100vh - 60px); }
/* Keep the fixed sidebar above the fixed photo layer on desktop so the two
   always meet at a crisp edge (the bg sits at z-index:0 inside the content).
   Scoped to desktop only — the mobile off-canvas sidebar keeps its z-index:70. */
@media (min-width: 761px) { .side { z-index: 30; } }

/* World-clock strip — glass chips that read on the photo (sits in the topbar).
   NB: country FLAG emoji don't render on Windows (they show as "ZA"/"CA"), so we
   use a small styled country-code badge instead. */
.md2 .md2-tz { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.md2 .md2-tzchip {
  min-width: 0; box-sizing: border-box; /* grid gives every chip an identical width → an even, tidy row, and a wrapped chip lines up under the others instead of stretching */
  display: flex; align-items: center; gap: 9px;
  padding: 6px 12px 6px 6px; border-radius: 12px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; text-shadow: none;
}
/* NB: the inner classes are deliberately tz-prefixed (tzcc/tzlbl/tztm/tzdy).
   Generic names like .tm/.cc collide with admin.html globals (.tm is the chat
   bubble → padding:9px 13px, max-width:72%; .cc is the Command-Center namespace)
   which was inflating every chip to ~85px and pulling in stray styling. */
.md2 .md2-tzchip.mine { background: rgba(123,193,66,.24); border-color: rgba(123,193,66,.6); }
.md2 .md2-tzchip .tzcc {
  flex: none; font-size: 11px; font-weight: 800; letter-spacing: .5px;
  padding: 5px 7px; border-radius: 8px; line-height: 1;
  background: rgba(255,255,255,.18); color: #fff;
}
.md2 .md2-tzchip.mine .tzcc { background: rgba(123,193,66,.55); }
.md2 .md2-tzc-main { min-width: 0; line-height: 1.18; }   /* min-width:0 lets the label ellipsis instead of stretching the chip */
.md2 .md2-tzchip .tzlbl {
  font-size: 8.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  color: rgba(255,255,255,.72);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.md2 .md2-tzchip .tztm {
  font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 700; color: #fff;
  padding: 0; margin: 0; max-width: none; background: none; border-radius: 0; line-height: 1.15;
}
.md2 .md2-tzchip .tzdy { font-size: 10px; font-weight: 600; color: rgba(255,255,255,.6); }

/* Background picker modal (reuses the app's .modal shell) */
.bgpick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 6px; }
@media (min-width: 560px) { .bgpick-grid { grid-template-columns: repeat(3, 1fr); } }
.bgpick { position: relative; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: #e6ecf2; transition: transform .15s, border-color .15s; }
.bgpick:hover { transform: translateY(-2px); }
.bgpick.sel { border-color: #7BC142; box-shadow: 0 0 0 3px rgba(123,193,66,.28); }
.bgpick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bgpick .lbl { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 8px 5px; color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; text-shadow: 0 1px 3px rgba(0,0,0,.6);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55)); }
.bgpick.auto { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px;
  background: linear-gradient(135deg, #1B3D5A, #5fa130); color: #fff; font-weight: 800; }
.bgpick.auto i { font-size: 22px; }
.bgpick .tick { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: #7BC142; color: #fff; display: none; align-items: center; justify-content: center; font-size: 11px; }
.bgpick.sel .tick { display: flex; }

/* ============================================================
   "Your day" timeline lane (Fable rebuild) — scoped .md2.
   A clock-based scheduling lane with stacked rows, a live running
   block, a gold now-line, gridlines and an empty state. Drag/drop
   is wired via the existing tl-track handlers.
   ============================================================ */
.md2 .yd-band { position: relative; padding-top: 26px; }
.md2 .yd-axis { position: absolute; left: 0; right: 0; top: 0; height: 22px; }
.md2 .yd-axis span { position: absolute; top: 2px; font-size: 11px; font-weight: 600; color: rgba(15,23,42,.5); font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; transform: translateX(-50%); }
.md2 .yd-axis span.is-first { transform: none; }
.md2 .yd-axis span.is-last { transform: translateX(-100%); }
.md2 .yd-lane { position: relative; min-height: 106px; border-radius: 14px; background: rgba(255,255,255,.4); border: 1px solid rgba(255,255,255,.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 0 0 1px rgba(27,61,90,.04); transition: min-height .22s ease, box-shadow .2s, background .2s, border-color .2s; }
.md2 .yd-lane.tl-drop-on { background: rgba(123,193,66,.14); box-shadow: inset 0 0 0 2px rgba(123,193,66,.6); border-color: rgba(123,193,66,.6); }
.md2 .yd-grid { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; pointer-events: none; }
.md2 .yd-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(27,61,90,.13); }
.md2 .yd-past { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 14px 0 0 14px; background: linear-gradient(to right, rgba(15,23,42,.06), rgba(15,23,42,.02)); pointer-events: none; }
.md2 .yd-blocks { position: absolute; inset: 0; }
.md2 .yd-now { position: absolute; top: -24px; bottom: -4px; width: 2px; margin-left: -1px; background: #C7A24C; z-index: 4; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.55), 0 0 14px rgba(199,162,76,.75); }
.md2 .yd-now::after { content: ""; position: absolute; bottom: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: #C7A24C; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.md2 .yd-now__pill { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: #C7A24C; color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: .03em; white-space: nowrap; box-shadow: 0 4px 10px -4px rgba(199,162,76,.9); font-variant-numeric: tabular-nums; }
.md2 .yd-block { position: absolute; height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 10px 0 9px; border-radius: 10px; color: #fff; cursor: grab; user-select: none; z-index: 2;
  box-shadow: 0 6px 16px -10px rgba(15,23,42,.55), inset 0 1px 0 rgba(255,255,255,.28); transition: transform .15s, box-shadow .15s, filter .15s; }
.md2 .yd-block:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -12px rgba(15,23,42,.6), inset 0 1px 0 rgba(255,255,255,.3); z-index: 3; }
.md2 .yd-block.is-fixed { cursor: pointer; }
.md2 .yd-block__icon { flex: none; width: 14px; text-align: center; font-size: 12px; line-height: 1; opacity: .95; }
.md2 .yd-block__body { min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.md2 .yd-block__title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }
.md2 .yd-block__time { font-size: 10.5px; font-weight: 500; opacity: .82; white-space: nowrap; font-variant-numeric: tabular-nums; margin-top: 1px; }
.md2 .yd-block.is-narrow { padding: 0 7px; gap: 5px; }
.md2 .yd-block.is-narrow .yd-block__time { display: none; }
.md2 .yd-block.is-narrow:not(.yd-block--running):not(.yd-block--meeting) .yd-block__icon { display: none; }
.md2 .yd-block.is-tiny { padding: 0; justify-content: center; }
.md2 .yd-block.is-tiny .yd-block__body { display: none; }
.md2 .yd-live { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #fff; margin: 0 5px 1px 0; vertical-align: middle; animation: ydBlink 1.4s ease-in-out infinite; }
.md2 .yd-block--progress { background: linear-gradient(135deg,#F9C86A,#E8912A); color: #2b1a02; }
.md2 .yd-block--progress .yd-block__time { opacity: .72; }
.md2 .yd-block--queued { background: linear-gradient(135deg,#6D8BAA,#4B6784); }
.md2 .yd-block--paused { background: linear-gradient(135deg,#DCC88F,#C7A24C); color: #2f2404; }
.md2 .yd-block--paused .yd-block__time { opacity: .72; }
.md2 .yd-block--done { background: linear-gradient(135deg,#c3ccd4,#9aa7b2); opacity: .58; }
.md2 .yd-block--done .yd-block__title { text-decoration: line-through; }
.md2 .yd-block--meeting { background: linear-gradient(135deg,#24507A,#16334c); }
.md2 .yd-block--running { background: linear-gradient(135deg,#8BD457,#5fa130); z-index: 3; border-radius: 10px 5px 5px 10px; animation: ydPulse 2.2s ease-in-out infinite; }
.md2 .yd-block--running::after { content: ""; position: absolute; right: -1px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: #fff; opacity: .95; box-shadow: 0 0 8px rgba(255,255,255,.9); }
.md2 .yd-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 16px; pointer-events: none; }
.md2 .yd-empty svg { width: 30px; height: 30px; color: rgba(27,61,90,.5); margin-bottom: 4px; }
.md2 .yd-empty b { font-size: 13.5px; font-weight: 600; color: rgba(15,23,42,.78); }
.md2 .yd-empty span { font-size: 12px; color: rgba(15,23,42,.55); }
.md2 .yd-untimed { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.md2 .yd-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(27,61,90,.6); white-space: nowrap; }
.md2 .yd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.md2 .yd-chip { appearance: none; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600; color: #1B3D5A;
  background: rgba(255,255,255,.72); border: 1px solid rgba(27,61,90,.16); cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.md2 .yd-chip:hover { background: #fff; border-color: rgba(27,61,90,.4); transform: translateY(-1px); }
.md2 .yd-chip em { font-style: normal; font-weight: 500; color: rgba(15,23,42,.5); font-size: 11px; }
.md2 .yd-chip--paused { background: rgba(217,148,24,.12); border-color: rgba(217,148,24,.45); color: #8a6100; }
.md2 .yd-chip--paused:hover { background: rgba(217,148,24,.2); border-color: rgba(217,148,24,.7); }
.md2 .yd-chip--paused em { color: rgba(138,97,0,.7); }
@keyframes ydPulse { 0%,100% { box-shadow: 0 0 0 3px rgba(123,193,66,.38), 0 10px 22px -10px rgba(95,161,48,.85); } 50% { box-shadow: 0 0 0 7px rgba(123,193,66,.14), 0 10px 22px -10px rgba(95,161,48,.85); } }
@keyframes ydBlink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
