/* frontend-source/style.css */
:root {
  color-scheme: dark;
  --bg:#0b1510;
  --surface:#17231b;
  --surface2:#1f2d22;
  --line:#354532;
  --text:#f0f2e9;
  --muted:#a3b2a5;
  --gold:#d4bc89;
  --mint:#b5d6bd;
  --amber:#e5b45d;
  --danger:#ed997e;
  --tg-safe-top:0px;
  --tg-safe-bottom:8px;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
  min-width: 300px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
  opacity: .47;
}
button,
input,
select,
textarea {
  touch-action: manipulation;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -.04em;
  font-weight: 550;
}
h2 {
  font-size: 19px;
  font-weight: 520;
  letter-spacing: -.02em;
  line-height: 1.3;
}
h3 {
  font-size: 21px;
  font-weight: 520;
  line-height: 1.3;
  letter-spacing: -.02em;
}
p {
  margin: 7px 0;
}
small,
.tiny {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.gold {
  color: var(--gold);
}
.amber {
  color: var(--amber);
}
.danger {
  color: var(--danger);
}
.mint {
  color: var(--mint);
}
.app-shell {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100dvh;
  background:
    radial-gradient(
      ellipse at 100% 10%,
      #20332330,
      transparent 50%),
    var(--bg);
  padding-top: var(--tg-safe-top);
}
.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
  min-height: 78px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: none;
  text-decoration: none;
  color: var(--gold);
  padding: 0;
}
.wordmark > span {
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
  position: relative;
  width: 43px;
  display: block;
  height: 46px;
  text-align: left;
}
.wordmark sub {
  font-size: 31px;
  position: absolute;
  left: 18px;
  bottom: 0;
}
.wordmark b {
  letter-spacing: .3em;
  font-size: 11px;
  font-weight: 450;
}
.header-person {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  min-width: 27px;
  border-radius: 50%;
  background: linear-gradient(#384d3c, #26342a);
  border: 1px solid #596852;
  color: var(--gold);
  font-size: 12px;
}
.location-select {
  border: 1px solid var(--line);
  border-radius: 24px;
  font-size: 13px;
  background: transparent;
  padding: 9px 7px;
  min-height: 40px;
  width: 59px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 36px;
  height: 38px;
  flex-shrink: 0;
  border: none;
  background: none;
  padding: 4px;
  color: var(--muted);
}
.icon-button i {
  position: absolute;
  top: 4px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}
.role-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: space-between;
  margin: 4px 20px 0;
  width: calc(100% - 40px);
  min-height: 38px;
  border: 1px solid #5b644244;
  background: #252d2030;
  color: var(--gold);
  border-radius: 10px;
  font-size: 12px;
  padding: 9px 12px;
}
.role-switch span {
  flex: 1;
  text-align: left;
}
.role-switch.testing {
  border-color: #9c793d;
  background: #59411c25;
}
.test-banner {
  margin: 9px 20px 0;
  padding: 11px 13px;
  border-left: 3px solid var(--amber);
  background: #56401c22;
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: #dfc799;
}
.test-banner span {
  font-size: 11px;
  color: #bdad8c;
}
.test-banner button {
  border: 0;
  background: none;
  padding: 3px 0;
  color: var(--mint);
  font-size: 12px;
  text-align: left;
  text-decoration: underline;
  width: max-content;
}
.hero {
  min-height: 112px;
  display: flex;
  align-items: center;
  padding: 22px 22px 20px;
  position: relative;
  isolation: isolate;
}
.hero:before {
  position: absolute;
  content: "";
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      var(--bg) 7%,
      #0b1510d9 44%,
      #0b15104a 100%),
    linear-gradient(
      0deg,
      var(--bg),
      transparent 75%),
    url("./access-auth-UTFMTXCD.webp") center right/cover no-repeat;
  opacity: .75;
}
.hero .eyebrow {
  display: block;
  margin-bottom: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 9px;
  color: var(--gold);
  font-weight: 500;
}
.hero h1 {
  max-width: 100%;
  text-wrap: balance;
}
main {
  padding: 0 20px calc(105px + var(--tg-safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.shift-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #1d2c2080;
  font-size: 11px;
  color: #bbcebb;
}
.shift-strip span {
  flex: 1;
}
.shift-strip strong {
  font-size: 11px;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.shift-strip button {
  font-size: 11px;
  color: var(--mint);
  border: 0;
  background: none;
  padding: 5px 0 5px 5px;
  min-height: 25px;
}
.section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 1px 0 0;
}
.section-head h2 {
  font-size: 16px;
  letter-spacing: -.02em;
}
.section-head small {
  font-size: 10px;
  flex-shrink: 0;
}
.card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background:
    linear-gradient(
      130deg,
      #1c2a20,
      #142017);
  box-shadow: inset 0 1px 0 #c7e0bd03;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.focus-card {
  background:
    linear-gradient(
      135deg,
      #26341f,
      #17251b);
  border-color: #566548;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.card-head h3 {
  flex: 1;
  min-width: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1.4;
  padding: 4px 7px;
  border-radius: 20px;
  color: #b9cbbb;
  background: #273a2980;
  border: 1px solid #54775866;
}
.badge:before {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge.accepted,
.badge.fulfilled,
.badge.delivered,
.badge.ready,
.badge.approved {
  color: var(--mint);
}
.badge.needs_check,
.badge.needs_approval,
.badge.claimed,
.badge.open,
.badge.submitted,
.badge.waiting,
.badge.paused,
.badge.partial {
  background: #5f492126;
  color: #ddba74;
  border-color: #866a3044;
}
.badge.occupied {
  color: #baaae6;
  border-color: #8872b955;
}
.badge.filling,
.badge.washing,
.badge.drying {
  color: #a7d1d8;
  border-color: #54828a55;
}
.badge.rejected,
.badge.cancelled {
  color: var(--danger);
  border-color: #b36a5144;
}
.card > p.muted {
  font-size: 12px;
  margin: 0;
}
.timer-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin: 9px 0 4px;
  min-width: 0;
}
.timer-line > div {
  min-width: 0;
}
.timer-line small {
  font-size: 10px;
}
.timer {
  display: block;
  font-size: clamp(35px, 11vw, 47px);
  line-height: 1.08;
  font-weight: 420;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.timer-line > small {
  text-align: right;
  max-width: 102px;
}
.task-timing {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 11px;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(
      110deg,
      #c1d9c2,
      #a9ccb5);
  color: #163324;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  transition: filter .14s;
}
.btn:hover:not(:disabled) {
  filter: brightness(1.04);
}
.btn.secondary {
  min-height: 42px;
  background: #0d1b1322;
  border-color: #4a5e43;
  color: #cad7c9;
  font-size: 12px;
  font-weight: 400;
}
.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.inline-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid #354a35;
  border-radius: 13px;
  background: #20312644;
  font-size: 12px;
  line-height: 1.5;
  color: #c4d2c3;
}
.inline-note svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.inline-note span {
  flex: 1;
}
.inline-note small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}
.inline-note.amber {
  color: #ddbc77;
  border-color: #62532355;
  background: #5b472016;
}
.inline-note.full {
  width: 100%;
  text-align: left;
}
.footnote {
  font-size: 10px;
  margin: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(85px, 1fr));
  gap: 9px;
}
.metric {
  display: grid;
  grid-template-rows: minmax(27px, auto) auto;
  align-items: end;
  min-height: 83px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(
      120deg,
      #1b281c,
      #121d15);
  gap: 9px;
  min-width: 0;
}
.metric > span {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.4;
  align-self: start;
}
.metric > strong {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 450;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.card .metrics {
  margin-top: 2px;
}
.list-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(
      120deg,
      #1a2a1f,
      #121d16);
  padding: 1px 12px;
}
.row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  background: none;
  border: 0;
  border-bottom: 1px solid #2c402a55;
  padding: 12px 0;
  text-align: left;
  color: var(--text);
  min-width: 0;
}
.row:last-child {
  border-bottom: 0;
}
.row:disabled {
  opacity: 1;
}
.row-icon {
  width: 30px;
  height: 31px;
  min-width: 30px;
  border-radius: 10px;
  background: #c6e2b30a;
  display: grid;
  place-items: center;
  color: #adc3ac;
}
.row-icon svg {
  width: 18px;
  height: 18px;
}
.row-text {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}
.row-text b {
  font-size: 13px;
  font-weight: 480;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.row-text small {
  font-size: 10px;
  line-height: 1.4;
}
.row-right {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: right;
  max-width: 108px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.two-col > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.two-col b {
  font-size: 15px;
  font-weight: 450;
}
.two-col small {
  font-size: 11px;
}
.item-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #3c53342c;
  padding: 8px 0;
  gap: 12px;
  font-size: 13px;
}
.item-line > span {
  min-width: 0;
  flex: 1;
  color: #c7d2c5;
  overflow-wrap: anywhere;
}
.item-line small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.item-line b {
  font-size: 13px;
  font-weight: 450;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.countdown {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 13px;
}
.price {
  font-size: 35px;
  line-height: 1.2;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  margin: 8px 0;
}
.subactions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 14px;
  padding-top: 1px;
}
.subactions button,
.link-button {
  border: 0;
  background: none;
  font-size: 11px;
  color: var(--mint);
  text-align: left;
  min-height: 32px;
  padding: 6px 0;
}
.link-button.danger {
  color: var(--danger);
}
.test-action {
  border: 1px dashed #897045;
  color: var(--gold);
  background: #6852241a;
  font-size: 11px;
  border-radius: 9px;
  padding: 9px;
  text-align: left;
  min-height: 36px;
}
.blockers {
  padding-top: 4px;
}
.blockers p {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 11px;
  color: var(--gold);
  margin: 6px 0;
}
.blockers svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.bottom-nav {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #3a4a34;
  background: #0a150ff2;
  backdrop-filter: blur(16px);
  padding: 11px 9px calc(11px + env(safe-area-inset-bottom, 0px) + var(--tg-safe-bottom));
  min-height: 70px;
}
.bottom-nav button {
  background: none;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  color: #8fa491;
  min-height: 41px;
  min-width: 0;
}
.bottom-nav button span {
  font-size: 10px;
  white-space: nowrap;
}
.bottom-nav button.active {
  color: var(--mint);
}
.empty {
  border: 1px dashed #40533566;
  border-radius: 20px;
  text-align: center;
  padding: 25px 18px;
  color: var(--muted);
}
.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #52664966;
  border-radius: 50%;
  color: #bdd6b4;
  margin-bottom: 12px;
}
.empty h3 {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 10px;
}
.empty p {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
.search,
input:not([type=checkbox]):not([type=file]),
select,
textarea {
  width: 100%;
  background: #101e15;
  border: 1px solid #415239;
  border-radius: 11px;
  color: var(--text);
  font-size: 16px;
  min-height: 45px;
  padding: 11px 12px;
  outline-offset: 2px;
}
.location-select {
  width: 59px;
  font-size: 12px;
  border-radius: 25px;
  padding: 8px 5px;
  min-height: 38px;
}
input[type=datetime-local] {
  max-width: 100%;
  min-width: 0;
  font-size: 14px;
}
.segmented {
  display: flex;
  gap: 6px;
}
.segmented button {
  border: 1px solid #415439;
  background: transparent;
  border-radius: 20px;
  color: var(--muted);
  font-size: 12px;
  padding: 7px 15px;
}
.segmented button.selected {
  color: var(--text);
  background: #26392a;
}
.error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #945b4088;
  border-radius: 12px;
  background: #652d2529;
  color: #f0b29b;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.error svg {
  flex-shrink: 0;
}
.error span {
  flex: 1;
}
.error button {
  padding: 0;
  background: none;
  border: 0;
  font-size: 20px;
}
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(90px + var(--tg-safe-bottom));
  z-index: 90;
  max-width: calc(100% - 32px);
  width: max-content;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #cae0c6;
  color: #183822;
  box-shadow: 0 5px 40px #0005;
  padding: 13px 17px;
  border-radius: 12px;
  font-size: 12px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #030b09b8;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: calc(var(--tg-safe-top) + 12px) 0 0;
}
.modal {
  position: relative;
  max-height: calc(100dvh - var(--tg-safe-top) - 16px);
  width: 100%;
  max-width: 610px;
  overflow: auto;
  background: #152218;
  border: 1px solid #4e6446;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 7px 20px calc(25px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 60px #0006;
  overscroll-behavior: contain;
}
.modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 10px;
  background: #5b7055;
  margin: 1px auto 11px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.modal-head h2 {
  font-size: 22px;
}
.modal form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-bottom: 14px;
}
.modal form > .btn:last-child {
  margin-top: 8px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field > span {
  font-size: 12px;
  color: #b1c2af;
}
.field textarea {
  min-height: 78px;
  resize: vertical;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid #3d513733;
  border-radius: 11px;
  padding: 12px;
  background: #0e1a1122;
}
.checkbox input {
  accent-color: var(--mint);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin: 1px 0 0;
}
.form-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 10px;
  border: 1px solid #3f513266;
  border-radius: 13px;
  padding: 12px;
}
.form-line .field:last-child:nth-child(3) {
  grid-column: 1/-1;
}
.role-options {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}
.role-options button {
  border: 1px solid transparent;
  border-bottom-color: #3d503444;
  border-radius: 11px;
  min-height: 61px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  padding: 12px;
  color: var(--text);
  text-align: left;
}
.role-options button > span {
  flex: 1;
  font-size: 14px;
}
.role-options small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.role-options button.selected {
  border-color: #789061;
  background: #afc99b12;
}
.photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.photos > img,
.photo-placeholder {
  height: 80px;
  width: 95px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #58724b55;
  flex-shrink: 0;
}
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 9px;
  color: var(--muted);
  border-style: dashed;
  background:
    linear-gradient(
      130deg,
      #344a2a55,
      #18331b66);
}
.file-btn {
  position: relative;
  cursor: pointer;
}
.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.unread {
  border-color: #6e8052;
}
.profile-face {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #3d5037;
  color: var(--gold);
  font-size: 23px;
  font-family: Georgia;
}
.version {
  text-align: center;
  margin-top: 10px;
}
.login {
  min-height: 100dvh;
  max-width: 440px;
  margin: auto;
  padding: 80px 25px;
  justify-content: center;
  gap: 22px;
}
.login > p {
  color: var(--muted);
}
.login .wordmark {
  margin-bottom: 25px;
}
.login h1 {
  font-size: 31px;
}
@media (min-width:650px) {
  .app-shell {
    border-left: 1px solid #283d2866;
    border-right: 1px solid #283d2866;
    box-shadow: 0 0 120px #0004;
  }
  body {
    background:
      radial-gradient(
        ellipse at top,
        #1f3625,
        #09110c 70%);
  }
  .hero {
    min-height: 140px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .modal-backdrop {
    align-items: center;
    padding: 25px;
  }
  .modal {
    border: 1px solid #4e6446;
    border-radius: 23px;
    max-height: 90dvh;
    padding-bottom: 22px;
  }
  .timer {
    font-size: 47px;
  }
}
@media (max-width:355px) {
  .app-header {
    padding-left: 15px;
    padding-right: 15px;
    gap: 6px;
  }
  .wordmark {
    gap: 10px;
  }
  .wordmark b {
    font-size: 9px;
  }
  .header-person {
    font-size: 11px;
  }
  .header-person .avatar {
    display: none;
  }
  main {
    padding-left: 15px;
    padding-right: 15px;
  }
  .hero {
    padding-left: 17px;
    padding-right: 17px;
  }
  .hero h1 {
    font-size: 29px;
  }
  .card {
    padding: 15px;
  }
  .metric {
    padding: 10px;
  }
  .role-switch {
    margin-left: 15px;
    width: calc(100% - 30px);
  }
  .test-banner {
    margin-left: 15px;
    margin-right: 15px;
  }
  .modal {
    padding-left: 16px;
    padding-right: 16px;
  }
}
.toast {
  pointer-events: none;
}
.has-statistics .hero {
  min-height: 90px;
  padding-top: 20px;
  padding-bottom: 18px;
}
.has-statistics .hero h1 {
  font-size: 30px;
}
.management-stats {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.management-preview {
  margin: 14px 0;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.stat-tile {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(
      135deg,
      #213326,
      #142019);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-tile > span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.stat-tile strong {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stat-tile small {
  font-size: 12px;
  line-height: 1.4;
}
.stat-tile.good strong {
  color: var(--mint);
}
.stat-tile.warn {
  border-color: #856441;
}
.stat-tile.warn strong {
  color: var(--amber);
}
.stat-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.stat-periods button {
  border: 1px solid var(--line);
  background: #111d15;
  color: var(--muted);
  padding: 9px 12px;
  min-height: 42px;
  border-radius: 22px;
  font-size: 12px;
}
.stat-periods button.selected {
  border-color: #a6bd94;
  background: #2d4030;
  color: var(--text);
}
.stat-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.stat-filters label {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 5px;
  min-width: 0;
}
.stat-filters select,
.stat-filters input {
  min-width: 0;
  max-width: 100%;
  font-size: 14px;
}
.stat-note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin: 10px 0 0;
}
.stat-alert {
  font-size: 12px;
  color: var(--amber);
  margin: 9px 0;
}
.stat-shortcut {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: #1d2e21;
  border-radius: 12px;
  padding: 13px;
  margin-top: 10px;
  font-size: 13px;
  text-align: left;
  min-height: 46px;
  width: 100%;
}
.stat-shortcut span {
  color: var(--gold);
}
.stat-lines {
  margin: 12px 0 0;
}
.stat-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #35453270;
  font-size: 13px;
}
.stat-lines dt {
  color: var(--muted);
  min-width: 0;
}
.stat-lines dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.stat-progress {
  position: relative;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #112017;
  overflow: hidden;
  margin-top: 10px;
}
.stat-progress i {
  display: block;
  height: 100%;
  background: #3e674a;
}
.stat-progress span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--text);
}
.stat-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}
.stat-table th {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.stat-table th,
.stat-table td {
  padding: 10px 5px;
  text-align: center;
  border-bottom: 1px solid #35453270;
  font-variant-numeric: tabular-nums;
}
.stat-table th:first-child,
.stat-table td:first-child {
  width: 42%;
  text-align: left;
  padding-left: 12px;
}
.stat-table button {
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: 12px;
  text-align: left;
  min-height: 38px;
  color: var(--text);
}
.stat-table tr:last-child td {
  border-bottom: 0;
}
.stat-people {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.stat-person {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #17251b;
  border: 0;
  border-bottom: 1px solid #35453270;
  padding: 14px 12px;
  min-height: 72px;
  width: 100%;
  text-align: left;
}
.stat-person > span:first-child {
  flex: 1;
  min-width: 0;
}
.stat-person b {
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.stat-person strong {
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stat-person small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.stat-person > span:nth-child(2) {
  text-align: right;
}
.stat-person-chevron {
  font-size: 20px;
  color: var(--gold);
}
.stat-person-detail {
  padding: 0 14px 12px;
  background: #101d15;
  border-bottom: 1px solid var(--line);
}
.stat-history {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.stat-history summary {
  font-size: 14px;
  cursor: pointer;
  min-height: 30px;
}
.stat-history-row {
  padding: 13px 0;
  border-top: 1px solid #35453270;
  display: grid;
  gap: 5px;
}
.stat-history-row b {
  font-size: 13px;
  font-weight: 500;
}
.stat-history-row small,
.stat-history-row span {
  font-size: 12px;
  color: var(--muted);
}
.stat-error {
  padding: 15px;
  border: 1px solid #8d574d;
  border-radius: 14px;
  color: var(--danger);
  font-size: 13px;
}
.stat-error button,
.stat-retry {
  min-height: 42px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text);
  margin-top: 9px;
  font-size: 13px;
}
.stat-empty {
  padding: 25px 0;
  color: var(--muted);
  font-size: 14px;
}
@media (max-width:355px) {
  .stat-tile {
    padding: 12px;
  }
  .stat-tile strong {
    font-size: 27px;
  }
  .stat-table th:first-child,
  .stat-table td:first-child {
    width: 38%;
    padding-left: 8px;
  }
  .stat-table th,
  .stat-table td {
    padding-left: 3px;
    padding-right: 3px;
  }
  .stat-person {
    padding: 12px 9px;
    gap: 7px;
  }
  .stat-person small {
    font-size: 12px;
  }
  .stat-person strong {
    font-size: 16px;
  }
  .stat-lines > div {
    font-size: 12px;
  }
  .has-statistics .hero h1 {
    font-size: 28px;
  }
}
.has-room-board .hero {
  min-height: 84px;
  padding-top: 16px;
  padding-bottom: 15px;
}
.has-room-board .hero h1 {
  font-size: 28px;
}
.room-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.board-heading h2 {
  font-size: 20px;
}
.board-heading > span {
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
}
.room-board > p {
  margin: 0;
}
.board-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.board-filters > button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--line);
  background: #0c1a11;
  border-radius: 20px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 12px;
}
.board-filters > button.selected {
  background: #2c4030;
  color: var(--text);
  border-color: #76956d;
}
.board-filters > button > span {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  opacity: .85;
}
.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.house-tile {
  position: relative;
  min-width: 0;
  min-height: 125px;
  border: 1px solid #5b6448;
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      #253326,
      #142019);
  padding: 13px 10px 12px;
  display: grid;
  grid-template-rows: 33px minmax(32px, auto) minmax(30px, auto);
  gap: 5px;
  text-align: left;
  color: var(--text);
}
.house-tile > strong {
  font-size: 29px;
  font-weight: 550;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.house-tile > .tile-status {
  font-size: 11px;
  line-height: 1.35;
  align-self: center;
  overflow-wrap: anywhere;
}
.house-tile > small {
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
  align-self: end;
}
.house-tile > svg {
  position: absolute;
  top: 15px;
  right: 8px;
  color: var(--muted);
}
.house-tile.occupied {
  border-color: #6d6089;
  background:
    linear-gradient(
      135deg,
      #2a2833,
      #181f1e);
}
.house-tile.occupied > strong {
  color: #c7b7ee;
}
.house-tile.accepted {
  border-color: #508967;
  background:
    linear-gradient(
      135deg,
      #213d2a,
      #14281d);
}
.house-tile.accepted > strong {
  color: #aad9b6;
}
.house-tile.danger {
  border-color: #9c5d49;
  background:
    linear-gradient(
      135deg,
      #36291f,
      #211b17);
}
.house-tile.danger > strong {
  color: var(--danger);
}
.house-tile.unknown {
  border-color: #586259;
}
.house-tile.unknown > strong {
  color: #bdc6b9;
}
.house-tile.in_progress {
  border-color: #4b7c75;
}
.house-tile.in_progress > strong {
  color: #a9d5ca;
}
.board-shortcut {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid #8e9366;
  border-radius: 17px;
  background:
    linear-gradient(
      120deg,
      #2a3c29,
      #17291e);
  text-align: left;
}
.board-shortcut > span:nth-child(2) {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.board-shortcut b {
  font-size: 16px;
  font-weight: 550;
}
.board-shortcut small {
  font-size: 11px;
}
.board-shortcut > svg {
  color: var(--gold);
  flex-shrink: 0;
}
.room-detail .card-head {
  align-items: center;
}
.room-detail h3 {
  font-size: 27px;
}
.room-detail .badge {
  font-size: 11px;
  max-width: 58%;
  white-space: normal;
}
.room-detail .card-head .badge {
  justify-content: center;
}
.room-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #334530;
}
.room-facts > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.room-facts b {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}
.room-facts small {
  font-size: 11px;
}
.room-main-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 7px 0;
}
.room-main-actions > .btn {
  min-height: 52px;
  font-size: 16px;
}
.room-main-actions p {
  margin: 0;
  font-size: 12px;
}
.room-preparation h4 {
  font-size: 15px;
  font-weight: 500;
  margin: 8px 0;
}
.room-preparation > .row {
  min-height: 63px;
}
.room-detail .blockers {
  padding: 7px 0;
}
.room-extra-actions {
  display: grid;
  gap: 9px;
  margin-top: 5px;
}
.room-extra-actions > .link-button {
  padding: 12px 0;
}
.modal > .room-detail {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.room-detail .room-preparation .badge {
  font-size: 10px;
  max-width: none;
}
.board-test-note {
  border-left: 2px solid var(--gold);
  padding-left: 11px;
}
@media (max-width:355px) {
  .board-grid {
    gap: 7px;
  }
  .house-tile {
    padding: 11px 8px;
    min-height: 121px;
  }
  .house-tile > strong {
    font-size: 25px;
  }
  .house-tile > .tile-status {
    font-size: 10px;
  }
  .room-detail .badge {
    font-size: 10px;
  }
  .board-filters > button {
    padding: 7px 9px;
  }
}
.house-tile.open,
.house-tile.in_progress,
.house-tile.submitted {
  border-color: #b96365;
  background:
    linear-gradient(
      135deg,
      #49272a,
      #281c1e);
}
.house-tile.open > strong,
.house-tile.in_progress > strong,
.house-tile.submitted > strong {
  color: #f3a5a7;
}
.house-tile.open > .tile-status,
.house-tile.in_progress > .tile-status,
.house-tile.submitted > .tile-status {
  color: #f6d8d6;
}
.stat-extra {
  margin-top: 9px;
}
.room-service-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.room-service-section h4 {
  font-size: 13px;
  margin: 0;
}
.tub-service .card-head {
  flex-wrap: wrap;
}
.tub-service .card-head h3 {
  min-width: 125px;
}
.room-block-panel {
  border: 1px solid #80673f;
  border-radius: 14px;
  padding: 14px;
  margin: 6px 0 14px;
  background: #6b4d1817;
  display: grid;
  gap: 8px;
  min-width: 0;
}
.room-block-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
}
.room-block-heading h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.room-block-panel p {
  margin: 0;
  overflow-wrap: anywhere;
}
.room-block-reason {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}
.room-block-repair {
  display: grid;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid #80673f45;
}
.room-block-panel .btn {
  min-height: 48px;
  width: 100%;
}
.room-block-panel .btn > span {
  white-space: normal;
  overflow-wrap: anywhere;
}
.room-block-panel .btn:disabled {
  opacity: .58;
}
.repair-review-note {
  border-left: 2px solid var(--amber);
  padding-left: 10px;
  margin: 9px 0;
}

/* frontend-source/owner-actions.css */
.metric-link,
.stat-tile-link {
  text-align: left;
  appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.metric-link i,
.stat-tile-link i {
  font-style: normal;
  opacity: .7;
  float: right;
}
.metric-link:active,
.stat-tile-link:active {
  filter: brightness(1.15);
}
.room-history-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface2);
  margin: 8px 0;
  text-align: left;
}
.room-history-link span {
  flex: 1;
}
.block-query-widget {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  margin-top: 8px;
}
.block-request-dialog textarea {
  min-height: 105px;
  resize: vertical;
}
.manager-answer {
  border-left: 3px solid var(--mint);
  padding: 8px 12px;
  margin: 12px 0;
  background: #b5d6bd09;
}
.evidence-thumb {
  position: relative;
  width: 90px;
  height: 90px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: var(--surface2);
  flex-shrink: 0;
}
.photos .evidence-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
  border-radius: 0;
}
.evidence-thumb span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0009;
  font-size: 10px;
  color: #fff;
  padding: 2px;
}
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  background: #060a08;
  color: var(--text);
  padding-top: max(var(--tg-safe-top), env(safe-area-inset-top));
  padding-bottom: max(var(--tg-safe-bottom), env(safe-area-inset-bottom));
  outline: 0;
}
.photo-viewer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  min-height: 65px;
}
.photo-viewer header div {
  min-width: 0;
}
.photo-viewer header b,
.photo-viewer header small {
  display: block;
  overflow-wrap: anywhere;
}
.photo-viewer button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
}
.photo-viewer header > button {
  font-size: 21px;
  flex-shrink: 0;
}
.photo-scene {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
}
.photo-scene img {
  flex-shrink: 0;
  transform-origin: center center;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.photo-viewer footer {
  padding: 12px 12px 6px;
  text-align: center;
}
.photo-tools {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 8px;
}
.photo-tools button {
  padding: 8px;
  min-width: 42px;
}
.photo-message {
  padding: 20px;
  text-align: center;
}
.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.history-filters button {
  background: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 10px;
  font-size: 12px;
  min-height: 36px;
}
.history-filters button[aria-pressed=true] {
  background: var(--mint);
  color: #193224;
}
.history-record {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 10px 0;
  padding: 12px;
  overflow: hidden;
}
.history-record-head {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 4px 0;
  background: none;
  text-align: left;
}
.history-record-head > span:first-child {
  min-width: 0;
  flex: 1;
}
.history-record-head b,
.history-record-head small {
  display: block;
  overflow-wrap: anywhere;
}
.history-record-head small {
  margin-top: 4px;
}
.history-record-detail {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
  overflow-wrap: anywhere;
}
.history-facts {
  margin: 8px 0;
}
.history-facts > div {
  display: grid;
  grid-template-columns: minmax(95px, 1fr) minmax(0, 1.4fr);
  gap: 12px;
  margin: 6px 0;
  font-size: 12px;
}
.history-facts dt {
  color: var(--muted);
}
.history-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.history-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
}
.history-pagination .btn {
  width: auto;
  font-size: 12px;
  padding: 8px 12px;
  min-height: 40px;
}
.history-pagination > span {
  font-size: 12px;
  color: var(--muted);
}
.history-timeline {
  margin: 12px 0;
  font-size: 13px;
}
.history-timeline > div {
  border-left: 2px solid var(--line);
  padding: 8px 10px;
  margin-left: 3px;
}
.history-timeline b,
.history-timeline small {
  display: block;
}
.history-timeline summary {
  cursor: pointer;
  padding: 8px 0;
}
.house-history .photos {
  flex-wrap: wrap;
}
.history-record details > summary {
  cursor: pointer;
}
.stat-tile-link:hover,
.metric-link:hover {
  border-color: var(--mint);
}
.photo-cell {
  margin: 0;
  width: 100px;
  flex-shrink: 0;
}
.photo-cell figcaption {
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 4px;
}

/* frontend-source/shifts-stock.css */
.shift-strip {
  flex-wrap: wrap;
  gap: 8px;
}
.shift-strip > span {
  flex: 1;
  min-width: 135px;
}
.shift-strip small {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 4px;
  color: var(--muted);
}
.shift-strip.shift-warning {
  border-color: var(--gold);
  align-items: flex-start;
}
.shift-warning > span {
  color: var(--gold);
}
.shift-strip button {
  min-height: 38px;
}
.shift-roster {
  display: grid;
  gap: 10px;
}
.shift-review-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--panel,#142417);
  border-radius: 15px;
  padding: 15px;
  color: var(--text);
  text-align: left;
  min-width: 0;
  width: 100%;
}
.shift-review-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.shift-review-row span {
  font-size: 12px;
  color: var(--mint);
}
.shift-control {
  display: grid;
  gap: 12px;
}
.shift-control form,
.sheet-source-dialog form {
  display: grid;
  gap: 14px;
}
.shift-control .inline-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.shift-control input[type=datetime-local] {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.sheet-stock {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.source-status {
  gap: 9px;
}
.source-count {
  margin: 0;
  overflow-wrap: anywhere;
}
.stock-item .card-head {
  align-items: flex-start;
  flex-wrap: wrap;
}
.stock-item h3 {
  min-width: 0;
  overflow-wrap: anywhere;
  flex: 1;
  line-height: 1.3;
}
.stock-item .metric span {
  line-height: 1.5;
  min-height: 33px;
  display: block;
}
.stock-item .metric strong {
  font-size: clamp(25px, 8vw, 39px);
}
.stock-item .subactions {
  flex-wrap: wrap;
  gap: 14px;
}
.stock-item .subactions button {
  white-space: normal;
  text-align: left;
  min-height: 38px;
}
.sheet-source-dialog {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.sheet-source-dialog .history-record {
  padding: 14px;
  overflow-wrap: anywhere;
}
.sheet-source-dialog summary {
  cursor: pointer;
  line-height: 1.5;
}
.sheet-source-dialog summary small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.source-reference-row {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.source-reference-row p {
  overflow-wrap: anywhere;
  font-size: 12px;
}
.source-resolution {
  border: 1px solid var(--gold);
  position: relative;
}
.history-facts dd {
  overflow-wrap: anywhere;
}
.shift-roster .section-head {
  flex-wrap: wrap;
}
.sheet-source-dialog select {
  width: 100%;
  min-width: 0;
}
@media (max-width:360px) {
  .shift-review-row {
    padding: 12px;
  }
  .sheet-stock .card {
    padding: 16px;
  }
  .stock-item .metric {
    padding: 12px;
  }
  .shift-control .btn {
    padding: 12px;
    white-space: normal;
  }
  .sheet-source-dialog .btn {
    white-space: normal;
  }
}

/* frontend-source/stock-forecast.css */
.forecast-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.forecast-summary span {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  overflow-wrap: anywhere;
}
.forecast-summary b {
  display: block;
  font-size: 22px;
  margin-top: 8px;
}
.forecast-lines {
  margin: 12px 0;
}
.forecast-lines > div {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.forecast-lines dt {
  font-size: 13px;
  flex: 1;
  color: var(--muted);
}
.forecast-lines dd {
  font-size: 14px;
  margin: 0;
  flex: 1;
  text-align: right;
  overflow-wrap: anywhere;
}
.forecast-lines small {
  display: block;
  font-size: 11px;
  opacity: .75;
  margin-top: 5px;
}
.forecast-item {
  margin: 14px 0 !important;
}
.forecast-item .card-head {
  display: block;
}
.forecast-item .metrics strong {
  font-size: 30px;
}
.forecast-item .metrics small {
  font-size: 11px;
  display: block;
  line-height: 1.4;
}
.forecast-actions {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}
.forecast-rate {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}
.forecast-risk {
  border-color: #c79767 !important;
}
.forecast-item details {
  padding: 10px 0;
}
.forecast-item summary {
  cursor: pointer;
}
.forecast-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.forecast-fields .field {
  min-width: 0;
}
.stock-policy input,
.stock-policy select,
.forecast-usage select {
  max-width: 100%;
  min-width: 0;
}
.stock-forecast,
.stock-policy,
.forecast-usage {
  overflow-wrap: anywhere;
}
@media (max-width:400px) {
  .forecast-fields {
    grid-template-columns: 1fr;
  }
  .forecast-item .metrics strong {
    font-size: 26px;
  }
}
