/* Employee schedule site — mobile-first, public, read-only. */
:root {
  --bg: #f6f7f9; --card: #ffffff; --border: #e3e6ec;
  --text: #10151d; --muted: #5a6473; --accent: #1d4ed8;
  --colw: 640px;                    /* page column; widens in full-week mode */
}
body.grid-mode { --colw: 1200px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 Inter, sans-serif; }
.hd {
  background: #10151d; color: #fff;
  /* Align header content with the centered 640px page column so the
     language buttons sit by the content, not stranded at the far right
     of a wide desktop window. */
  padding: 12px max(16px, calc((100% - var(--colw)) / 2));
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.hd-brand { display: flex; align-items: center; text-decoration: none; }
.hd-brand img { height: 36px; width: auto; border-radius: 6px; display: block; }
.hd-sub { color: #9aa4b2; font-size: 12.5px; }
.lang { margin-left: auto; display: flex; gap: 6px; }
.lang-btn {
  background: #1c2430; color: #cfd6df; border: 1px solid #2c3644; border-radius: 8px;
  padding: 4px 9px; font: 600 12px Inter, sans-serif; cursor: pointer;
}
.lang-btn.active { background: #2c3d55; border-color: #4d648a; color: #fff; }
.wrap { max-width: var(--colw); margin: 0 auto; padding: 16px 12px 48px; transition: max-width 0.15s; }
h1 { font-size: 20px; margin: 8px 0 14px; }
.loading { color: var(--muted); padding: 20px 0; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 14px; text-decoration: none; color: inherit;
  box-shadow: 0 1px 3px rgba(16,21,29,0.05);
}
.tile b { display: block; font-size: 16px; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 12px; }
.tile-emoji {
  display: block; font-style: normal; font-size: 26px; margin-bottom: 8px;
  font-weight: 800; line-height: 1; /* letter "emojis" (Y, HH) read as marks */
}
.tile.soon { opacity: 0.55; filter: saturate(0.5); }
.tile.soon span { font-style: italic; }

/* Store view */
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.st-head h1 { margin: 8px 0; }
#week-select {
  font: 14px Inter, sans-serif; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card); max-width: 100%;
}
.banner { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 12px; }
.chip {
  font-size: 11px; font-weight: 600; border-radius: 5px; padding: 2px 7px;
  color: #111; background: #e5e7eb;
}
.chip.big { background: #dc2626; color: #fff; font-weight: 700; }
.chip.ev { background: #e7f7ec; color: #15803d; border: 1px solid #a7d9b5; }
.tagP { background: #f9a8d4; } .tagB { background: #93c5fd; } .tagW { background: #e5e7eb; }
.tagY { background: #fde047; } .tagG { background: #86efac; } .tagS { background: #fca5a5; }

#find {
  width: 100%; padding: 11px 14px; font: 15px Inter, sans-serif;
  border-radius: 12px; border: 1px solid var(--border); margin-bottom: 14px;
  background: var(--card);
}

.day {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  margin-bottom: 10px; overflow: hidden;
}
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day-h {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; border-bottom: 1px solid var(--border); background: #fafbfc;
  font-weight: 700; font-size: 14px;
}
.day-h .today-tag { color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.day-h .chips { display: flex; gap: 4px; flex-wrap: wrap; font-weight: 400; }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 12px; border-bottom: 1px solid #f0f2f5; font-size: 14px;
}
.row:last-child { border-bottom: none; }
.row .who { font-weight: 500; }
.row .role { color: var(--muted); font-size: 11px; margin-left: 6px; }
.shift {
  font: 500 13px "JetBrains Mono", monospace; padding: 2px 8px; border-radius: 6px;
  white-space: nowrap;
}
.shift.close { background: #e3edfd; color: #1d4ed8; }
.shift.day-s { background: #e6f6ec; color: #15803d; }
.shift.off { background: #eceef1; color: #8b95a4; }
.shift.pto { background: #fdf1dc; color: #92400e; }
.shift.loan { background: #f1e8fd; color: #6d28d9; }
.shift.other { background: #fde7f1; color: #be185d; }
.empty { color: var(--muted); padding: 10px 12px; font-size: 13px; }

/* View mode toggle */
.mode { display: flex; gap: 8px; margin: 2px 0 12px; }
.mode-btn {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 14px; font: 600 13px Inter, sans-serif; color: var(--muted); cursor: pointer;
}
.mode-btn.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.mode-btn.export { margin-left: auto; color: var(--text); }

/* Tighter grid on phones — shows more of the week before scrolling.
   Name column truncates with an ellipsis (~6 chars); full name in the
   native tooltip / press-and-hold. */
@media (max-width: 480px) {
  .wg { min-width: 520px; font-size: 10px; }
  .wg th, .wg td { padding: 3px 2px; }
  .wg .wg-name {
    min-width: 0; max-width: 58px; width: 58px; font-size: 10.5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding-left: 4px; padding-right: 2px;
  }
  .wg-cell { font-size: 9.5px; }
  .wg thead th { font-size: 10px; }
}

/* Classic full-week grid */
.wg-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.wg { border-collapse: collapse; min-width: 700px; width: 100%; font-size: 12px; }
.wg th, .wg td { border: 1px solid #eef0f4; padding: 4px 4px; text-align: center; }
.wg thead th { font: 700 11.5px Inter, sans-serif; background: #fafbfc; }
.wg thead th span { display: block; font-weight: 400; color: var(--muted); font-size: 10px; }
.wg thead th.today { background: #e8f0fe; color: var(--accent); }
.wg .wg-name {
  text-align: left; font-weight: 500; min-width: 110px; position: sticky; left: 0;
  background: var(--card); font-size: 12.5px;
}
.wg .wg-section td {
  text-align: left; font: 700 10.5px Inter, sans-serif; letter-spacing: 0.05em;
  background: #f1f3f7; color: var(--muted); padding: 4px 8px;
}
.wg-cell { font: 500 11px "JetBrains Mono", monospace; white-space: nowrap; }
.wg-cell.today { box-shadow: inset 0 0 0 1px #bcd3f7; }
.wg-cell.close { background: #e3edfd; color: #1d4ed8; }
.wg-cell.day-s { background: #e6f6ec; color: #15803d; }
.wg-cell.off { background: #eceef1; color: #9aa1ac; }
.wg-cell.pto { background: #fdf1dc; color: #92400e; }
.wg-cell.loan { background: #f1e8fd; color: #6d28d9; }
.wg-cell.other { background: #fde7f1; color: #be185d; }

/* Sunset (until close) icon */
svg.sunset { color: #f97316; vertical-align: -2px; }

.foot { color: var(--muted); font-size: 12px; margin-top: 18px; }
.foot .legend { display: block; margin-top: 6px; }

/* "My week" mode (name filter active) */
.mine .day-h { background: #eef4ff; }
