:root {
  color-scheme: light;
  --ink: #11151a;
  --muted: #6e7781;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-2: #f7f8fa;
  --edge: #d9dde2;
  --steel: #2c333b;
  --black: #07090c;
  --green: #3fc778;
  --yellow: #d7b84a;
  --red: #d96363;
  --calendar-line: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(120deg, rgba(215, 221, 227, 0.18), transparent 24%, transparent 70%, rgba(215, 221, 227, 0.16)),
    #ffffff;
  color: var(--ink);
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100vw - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 48px;
}

.skyline {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.42;
  pointer-events: none;
}

.skyline::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.balloon {
  position: absolute;
  width: 82px;
  height: 82px;
  border: 2px solid rgba(255, 74, 74, 0.82);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.72), transparent 16%),
    radial-gradient(circle at 50% 54%, #ff2b2b 0%, #b60505 56%, #5c0507 100%);
  box-shadow:
    0 0 24px rgba(255, 28, 28, 0.72),
    0 0 54px rgba(255, 28, 28, 0.36),
    inset -10px -14px 20px rgba(36, 0, 0, 0.45);
  animation: float 22s linear infinite;
}

.balloon i {
  position: absolute;
  left: 50%;
  bottom: -24px;
  width: 20px;
  height: 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(65, 20, 20, 0.65);
  background: #301010;
  box-shadow: 0 -10px 0 -8px rgba(255, 72, 72, 0.8);
}

.b1 { left: 6%; top: 76%; animation-duration: 27s; }
.b2 { left: 34%; top: 82%; width: 58px; height: 58px; animation-duration: 24s; animation-delay: -9s; }
.b3 { left: 72%; top: 90%; width: 96px; height: 96px; animation-duration: 31s; animation-delay: -14s; }
.b4 { left: 88%; top: 68%; width: 52px; height: 52px; animation-duration: 28s; animation-delay: -6s; }

@keyframes float {
  from { transform: translate3d(0, 18vh, 0); }
  to { transform: translate3d(0, -120vh, 0); }
}

.login-frame {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
}

.login-panel,
.panel {
  background: var(--panel);
  border: 1px solid var(--edge);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  border-radius: 0;
}

.login-panel {
  width: min(560px, 100%);
  padding: 36px;
}

.brand-mark {
  width: 72px;
  height: 12px;
  margin-bottom: 28px;
  background: linear-gradient(90deg, #11151a, #6b7280, #11151a);
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.95;
  font-weight: 750;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: 1.3rem;
  text-transform: uppercase;
}

h3 {
  margin: 24px 0 10px;
  color: var(--steel);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.eyebrow,
small,
.muted {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.topbar,
.rail,
.section-head,
.top-actions,
.action-row,
.state-row,
.split,
.inline-form {
  display: flex;
  gap: 12px;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  margin-bottom: 12px;
  color: #f8fafc;
  background: linear-gradient(90deg, #050608, #252c35 46%, #0b0e13);
  border: 1px solid #0b0e13;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.rail {
  position: sticky;
  top: 0;
  z-index: 5;
  flex-wrap: wrap;
  padding: 10px 0 18px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(18px);
}

button,
input,
select,
textarea {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #c7cdd4;
  border-radius: 0;
}

button,
input,
select {
  min-height: 42px;
}

button {
  padding: 0 16px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

.primary {
  background: linear-gradient(180deg, #2c333b, #050608);
  color: #ffffff;
  border-color: #050608;
}

.ghost,
.rail button {
  background: #ffffff;
  color: #11151a;
}

.danger {
  color: #ffffff;
  background: #7f1d1d;
  border-color: var(--red);
}

.rail button.active {
  color: #ffffff;
  background: #11151a;
  border-color: #11151a;
}

.shift-chip.selected {
  background: #ffffff;
  outline: 2px solid #11151a;
  outline-offset: -2px;
}

.workspace {
  display: grid;
  gap: 16px;
}

.app-status {
  min-height: 22px;
  margin: 0 0 8px;
  color: #4a535d;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.app-status:empty {
  display: none;
}

.availability-fields {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 16px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.panel {
  padding: 20px;
}

.section-head {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.calendar-panel {
  padding: 0;
  overflow-x: auto;
}

.calendar-panel .section-head {
  padding: 20px 20px 4px;
}

.calendar-switches {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px 18px;
}

.segmented {
  display: inline-flex;
  border: 1px solid #c7cdd4;
}

.segmented button {
  border: 0;
  border-right: 1px solid #c7cdd4;
  background: #ffffff;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  color: #ffffff;
  background: #11151a;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 980px;
  border-top: 1px solid var(--calendar-line);
  border-left: 1px solid var(--calendar-line);
  background: #ffffff;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 980px;
  min-height: 520px;
  border-top: 1px solid var(--calendar-line);
  border-left: 1px solid var(--calendar-line);
}

.weekday {
  min-height: 38px;
  display: grid;
  place-items: center;
  color: #374151;
  background: #f3f4f6;
  border-right: 1px solid var(--calendar-line);
  border-bottom: 1px solid var(--calendar-line);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.day-cell {
  position: relative;
  min-height: 132px;
  padding: 8px;
  background: #ffffff;
  border-right: 1px solid var(--calendar-line);
  border-bottom: 1px solid var(--calendar-line);
  outline: none;
}

.day-cell:hover,
.day-cell:focus-visible,
.selected-day {
  background: #f7f9fc;
  box-shadow: inset 0 0 0 2px #11151a;
}

.muted-day {
  background: #fafafa;
}

.muted-day .day-number {
  color: #a4acb5;
}

.today .day-number {
  color: #ffffff;
  background: #1a73e8;
}

.day-number {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #1f2937;
  font-weight: 850;
}

.day-shifts {
  display: grid;
  gap: 4px;
}

.shift-chip,
.table-row,
.queue-item {
  display: grid;
  width: 100%;
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--edge);
}

.shift-chip {
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: center;
  min-height: 74px;
  padding: 6px;
  color: #11151a;
  background: #ffffff;
  font-size: 0.72rem;
  text-transform: none;
}

.shift-chip.am {
  border-color: #183b73;
  box-shadow: inset 4px 0 0 #183b73;
}

.shift-chip.pm {
  border-color: #d04a1d;
  box-shadow: inset 4px 0 0 #d04a1d;
}

.shift-chip.standby {
  background: #fff4bf;
  border-color: #d7a900;
  box-shadow: inset 5px 0 0 #d7a900;
}

.shift-chip.cancelled {
  color: #651414;
  background: #ffdada;
  border-color: #b42323;
  box-shadow: inset 5px 0 0 #b42323;
}

.ops-mode-label {
  width: fit-content;
  padding: 2px 5px;
  color: #11151a;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid currentColor;
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mode-control {
  margin: 20px 0;
  padding: 14px 0;
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}

.mode-control .eyebrow {
  margin-bottom: 10px;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mode-button {
  min-height: 44px;
  padding: 8px;
  background: #fff;
  color: #222;
  font-size: 0.75rem;
}

.mode-button.good.active {
  color: #fff;
  background: #222a31;
}

.mode-button.standby.active {
  background: #f5cc26;
  border-color: #a98400;
}

.mode-button.cancelled.active {
  color: #fff;
  background: #ad2020;
  border-color: #7c1010;
}

.employee-notice {
  display: grid;
  gap: 4px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--edge);
  font-size: 0.88rem;
}

.employee-notice.standby {
  background: #fff4bf;
  border-color: #d7a900;
}

.employee-notice.cancelled {
  color: #651414;
  background: #ffdada;
  border-color: #b42323;
}

.notice-heading {
  margin-top: 28px;
}

.chip-head {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 4px;
  align-items: center;
  padding: 4px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #11151a;
  font-weight: 750;
}

.chip-title,
.shift-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bid-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bid-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  max-width: 100%;
  padding: 2px 6px 2px 2px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #11151a;
  background: #f9fafb;
  font-size: 0.66rem;
}

.bid-pill b {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #6b7280;
}

.bid-pill.green b { background: #15803d; }
.bid-pill.yellow b { color: #11151a; background: #facc15; }
.bid-pill.red b { background: #b91c1c; }

.shift-chip strong,
.shift-chip b {
  font-size: 0.68rem;
}

.date,
.tag {
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-row b,
.tag {
  padding: 5px 8px;
  border: 1px solid var(--edge);
  background: #f3f4f6;
}

.weather-tile {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 10px;
  color: #0f172a;
  background: linear-gradient(180deg, #eef6ff, #ffffff);
  border: 1px solid #bfd7f4;
}

.weather-tile b {
  font-size: 0.85rem;
}

.last-updated {
  color: #7b8490;
  font-size: 0.62rem;
  font-weight: 400;
  text-transform: none;
}

.hover-preview {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 38px;
  z-index: 6;
  display: none;
  padding: 10px;
  color: #ffffff;
  background: #11151a;
  border: 1px solid #000000;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.24);
  font-size: 0.78rem;
  line-height: 1.5;
}

.day-cell:hover .hover-preview {
  display: block;
  animation: delayedReveal 0.5s ease both;
}

@keyframes delayedReveal {
  0%, 99% { opacity: 0; }
  100% { opacity: 1; }
}

.stack {
  display: grid;
  gap: 14px;
}

.split {
  align-items: end;
}

.split > * {
  flex: 1;
}

.credential-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.signup-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--edge);
}

.signup-block summary {
  cursor: pointer;
  color: var(--steel);
  font-weight: 850;
  text-transform: uppercase;
}

.signup-block form {
  margin-top: 14px;
}

.detail-list,
.metric-list {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
}

.detail-list div,
.metric-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--edge);
}

dt {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
}

.state-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.state-row.compact {
  gap: 6px;
}

.state {
  min-height: 74px;
  place-content: center;
  padding: 12px;
  border: 1px solid var(--edge);
  background: #ffffff;
}

.state.green {
  color: #14532d;
}

.state.yellow {
  color: #713f12;
}

.state.red {
  color: #7f1d1d;
}

.state input {
  position: absolute;
  opacity: 0;
}

.state span {
  text-align: center;
}

.state.green:has(input:checked) { border-color: var(--green); box-shadow: inset 0 -4px var(--green); }
.state.yellow:has(input:checked) { border-color: var(--yellow); box-shadow: inset 0 -4px var(--yellow); }
.state.red:has(input:checked) { border-color: var(--red); box-shadow: inset 0 -4px var(--red); }

.queue-item {
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-bottom: 8px;
  gap: 8px;
  padding: 14px;
}

.queue-item small,
.table-row small {
  display: block;
  margin-top: 4px;
}

.table {
  display: grid;
  gap: 8px;
}

.table-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 14px;
}

.link-row {
  text-transform: none;
}

.inline-form {
  margin-bottom: 16px;
}

.inline-form input {
  min-width: 0;
}

.check {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--edge);
}

.check input {
  width: 18px;
  min-height: 18px;
}

.warning {
  padding: 12px;
  border-left: 4px solid var(--yellow);
  background: rgba(215, 184, 74, 0.1);
}

.selected-day-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--edge);
}

.mini-availability {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--edge);
  background: #ffffff;
}

.mini-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  font-size: 0.78rem;
}

.mini-heading.am {
  border-left: 5px solid #183b73;
}

.mini-heading.pm {
  border-left: 5px solid #d04a1d;
}

.mini-availability h4 {
  margin: 10px 0;
  text-transform: uppercase;
}

.approval-block {
  margin-top: 24px;
}

.template-row,
.weekday-select,
.assignment-grid,
.assignment-strip {
  display: grid;
  gap: 10px;
}

.template-row,
.weekday-select {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}

.edit-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--edge);
}

.assignment-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.assignment-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d7dbe0;
  background: linear-gradient(180deg, #ffffff, #f7f8fa);
  box-shadow: inset 0 4px 0 #11151a;
}

.assignment-card.open {
  box-shadow: inset 0 4px 0 #1a73e8;
}

.assignment-card.reserved {
  box-shadow: inset 0 4px 0 #d7b84a;
}

.assignment-card.active {
  box-shadow: inset 0 4px 0 #3fc778;
}

.assignment-price {
  width: fit-content;
  padding: 8px 12px;
  color: #ffffff;
  background: #11151a;
  border: 1px solid #050608;
  font-size: 1.35rem;
  font-weight: 900;
}

.assignment-card h3 {
  margin: 0 0 6px;
  color: #11151a;
  font-size: 1.05rem;
}

.compact-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.compact-list div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
}

.assignment-strip {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 16px;
}

.assignment-strip div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f3f4f6;
  border: 1px solid var(--edge);
}

.assignment-strip strong {
  font-size: 1.2rem;
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100vw - 18px, 720px);
    padding-top: 10px;
  }

  .topbar,
  .grid-2,
  .section-head,
  .split,
  .inline-form,
  .template-row,
  .weekday-select,
  .calendar-switches {
    display: grid;
    grid-template-columns: 1fr;
  }

  .segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .month-grid {
    grid-template-columns: repeat(7, minmax(44px, 1fr));
    overflow-x: auto;
  }

  .day-cell {
    min-height: 104px;
    padding: 5px;
  }

  .shift-chip {
    grid-template-columns: 1fr;
    min-height: 26px;
    padding: 3px 4px;
  }

  .shift-chip b {
    display: none;
  }

  .state-row {
    grid-template-columns: 1fr;
  }

  .table-row,
  .queue-item,
  .detail-list div,
  .metric-list div {
    grid-template-columns: 1fr;
  }

  .login-panel,
  .panel {
    padding: 16px;
  }
}
