/* Ibeazy Schedule: the messenger's look (its tokens, Inter, Lucide), so the schedule feels part of the app it opens in. */
:root {
  --bg: #f4f6f5;
  --panel: #ffffff;
  --text: #111815;
  --muted: #56605b;
  --faint: #66706b;
  --line: #e2e7e4;
  --accent: #1e7a52;
  --accent-text: #ffffff;
  --soft: #e4f1ea;
  --soft-text: #155e3d;
  --hover: #edf0ee;
  --warn-bg: #fdf3e1;
  --warn-text: #7a4b00;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --shadow: 0 16px 40px rgba(16, 24, 20, 0.16), 0 2px 6px rgba(16, 24, 20, 0.06);
  --scrim: rgba(16, 24, 20, 0.32);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f1211;
    --panel: #161a18;
    --text: #e9edeb;
    --muted: #a6afaa;
    --faint: #949e99;
    --line: #2a312e;
    --accent: #3fb07f;
    --accent-text: #04130c;
    --soft: #183a2b;
    --soft-text: #8adbb3;
    --hover: #202724;
    --warn-bg: #3a2e16;
    --warn-text: #f2cf8b;
    --danger: #f59a92;
    --danger-bg: #3a1e1c;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
    --scrim: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f1211;
  --panel: #161a18;
  --text: #e9edeb;
  --muted: #a6afaa;
  --faint: #949e99;
  --line: #2a312e;
  --accent: #3fb07f;
  --accent-text: #04130c;
  --soft: #183a2b;
  --soft-text: #8adbb3;
  --hover: #202724;
  --warn-bg: #3a2e16;
  --warn-text: #f2cf8b;
  --danger: #f59a92;
  --danger-bg: #3a1e1c;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
  --scrim: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  font: 14px/1.5 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
#app {
  height: 100%;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
}
h1 {
  font-size: 22px;
  font-weight: 700;
}
h2 {
  font-size: 18px;
  font-weight: 700;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
p {
  margin: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* DESIGN.md's one button: 36 high, radius 10; primary, plain (secondary), ghost, danger. */
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
button:hover:not(:disabled),
.button:hover {
  background: var(--hover);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
button.primary:hover:not(:disabled) {
  background: var(--accent);
  filter: brightness(1.06);
}
button.ghost {
  border-color: transparent;
  background: none;
}
button.danger {
  color: var(--danger);
}
button.link {
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--soft-text);
  font-weight: 500;
}
button.link:hover:not(:disabled) {
  background: none;
  text-decoration: underline;
}
.icon-button {
  width: 36px;
  padding: 0;
  border-color: transparent;
  background: none;
  color: var(--muted);
}
.icon-button:hover:not(:disabled) {
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
textarea {
  min-height: 96px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
label.field > :is(input, select, textarea),
label.field .with-tools input {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}
label.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
label.check input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}
.with-tools {
  display: flex;
  gap: 4px;
}
.with-tools input {
  flex: 1;
  min-width: 0;
}
.mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* The locked screens: one card in the middle. */
.gate {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 24px 16px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--soft);
  color: var(--soft-text);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.actions.start {
  justify-content: flex-start;
}
.actions.between {
  justify-content: space-between;
  align-items: center;
}
/* A code to read out or copy: big, spaced. */
.generated {
  padding: 14px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: center;
}

/* A window over the schedule. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--scrim);
}
.dialog {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(460px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 20px 24px 24px;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.dialog-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dialog-head h2 {
  flex: 1;
}
[hidden] {
  display: none !important;
}
/* Bottom left, as the messenger's. */
#toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--panel);
  box-shadow: var(--shadow);
}


/* The page: a bar with the business and its tabs, the tab's own content below, filling the frame. */
.sc {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.sc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sc-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--soft-text);
}
.sc-business {
  font-size: 13px;
}
.sc-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.sc-tab {
  border-color: transparent;
  background: none;
  color: var(--muted);
}
.sc-tab.on {
  background: var(--soft);
  color: var(--soft-text);
  font-weight: 600;
}
.sc-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 32px;
}
.pad {
  padding: 16px 0;
}
.grow {
  flex: 1;
}
.warn {
  color: var(--warn-text);
}
.small-button {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
}
.two,
.three {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.three {
  grid-template-columns: 2fr 1fr 1fr;
}
.dialog.wide {
  width: min(640px, 100%);
}
.face {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
  color: var(--soft-text);
  font-size: 12px;
  font-weight: 600;
}

/* The week: the staff down the side, the seven days across. */
.week-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.week-bar h2 {
  margin-left: 8px;
}
.week-bar .icon {
  vertical-align: -2px;
}
.banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-weight: 500;
}
.grid {
  min-width: 860px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.grid-head,
.grid-row {
  display: grid;
  grid-template-columns: 200px repeat(7, minmax(0, 1fr));
}
.grid-row {
  border-top: 1px solid var(--line);
}
.who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
}
.who .name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 12px;
}
.day-head strong {
  font-size: 18px;
  color: var(--text);
}
.day-head.today strong {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
}
.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
  padding: 6px;
  border-left: 1px solid var(--line);
}
.cell.today {
  background: color-mix(in srgb, var(--soft) 45%, transparent);
}
.cell.off {
  background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--warn-bg) 80%, transparent) 6px 12px);
}
.shift {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  height: auto;
  padding: 4px 8px;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--soft);
  color: var(--soft-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}
button.shift:hover:not(:disabled) {
  background: var(--soft);
  filter: brightness(0.97);
}
.shift strong {
  font-weight: 600;
}
.off-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 12px;
  font-weight: 600;
}
.add-shift {
  align-self: flex-start;
  width: 26px;
  height: 26px;
  padding: 0;
  border-style: dashed;
  color: var(--muted);
  opacity: 0;
}
.cell:hover .add-shift,
.add-shift:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .add-shift {
    opacity: 1;
  }
}
/* The team's places side by side, each with its time now. */
.zones {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}
.zone {
  flex: 1 0 150px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.zone.mine {
  border-color: var(--accent);
}
.zone-time {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.zone-name {
  font-size: 13px;
  font-weight: 600;
}
.cake-chip {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fde8f1;
  color: #9d1d5a;
  font-size: 12px;
  font-weight: 600;
}
.birthday-cell .two {
  grid-template-columns: 1.4fr 1fr;
  gap: 4px;
  min-width: 190px;
}
.birthday-cell select {
  min-height: 34px;
  padding: 4px 6px;
}

/* Handoff reports: each person's day, and what they leave the next person. */
.note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.handoff {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.handoff-who {
  display: flex;
  align-items: center;
  gap: 8px;
}
.for-next {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--soft-text);
}
.left-for-me {
  margin-bottom: 12px;
}
.shift {
  cursor: pointer;
}

/* My clock, above the week: green while clocked in. */
.clock-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-weight: 500;
}
.clock-bar.in {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--soft-text);
}
.swaps {
  margin-bottom: 12px;
}
button.entry {
  width: 100%;
  height: auto;
  border-width: 1px 0 0;
  border-radius: 0;
  background: none;
  font-weight: 400;
  text-align: left;
}

/* The phone's days, one under the other (hidden on a computer). */
.days {
  display: none;
}
.day {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.day.today h3 {
  color: var(--soft-text);
}
.day-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.day-line .name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

/* Time off, rotations, settings: panels in columns. */
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  align-items: start;
}
.column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.balance .big {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.balance .big strong {
  font-size: 44px;
  line-height: 1;
  color: var(--soft-text);
}
.meter {
  height: 8px;
  border-radius: 999px;
  background: var(--hover);
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.request {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.request > div:first-child {
  flex: 1;
}
.status {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--hover);
  color: var(--muted);
}
.status.approved {
  background: var(--soft);
  color: var(--soft-text);
}
.status.pending {
  background: var(--warn-bg);
  color: var(--warn-text);
}
.status.declined {
  background: var(--danger-bg);
  color: var(--danger);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th,
.table td {
  padding: 8px 6px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.table th {
  color: var(--muted);
  font-weight: 600;
}
.table input {
  min-height: 34px;
  padding: 4px 8px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head p {
  max-width: 640px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.slots {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.slot > .ghost {
  align-self: flex-start;
}
.weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.weekday {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.weekday input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}
.people {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.turn {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
}

/* A phone: the days one under the other, everything in one column. */
@media (max-width: 760px) {
  .sc-top {
    padding: 10px 12px;
    gap: 8px;
  }
  .sc-tab span {
    display: none;
  }
  .sc-tab.on span {
    display: inline;
  }
  .sc-body {
    padding: 12px;
  }
  .grid {
    display: none;
  }
  .days {
    display: block;
  }
  .week-bar h2 {
    width: 100%;
    margin: 4px 0 0;
    order: 5;
  }
  .two,
  .three {
    grid-template-columns: 1fr;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  #toast {
    left: 12px;
    right: 12px;
  }
}
