/* Facilities Requests, drawn inside the Staff Hub. Everything is prefixed
   fx- so it can't collide with hub styles. Uses the shared tokens. */

.fx-root { --fx-emergency: #D9480F; --fx-week: var(--orange); --fx-whenever: #A1A1A6; }

/* ---------- demo bar ---------- */
.fx-demo {
  margin-top: var(--space-3); padding: 12px 16px; border-radius: var(--r-lg);
  background: repeating-linear-gradient(135deg, #FFF8EF, #FFF8EF 12px, #FFF3E3 12px, #FFF3E3 24px);
  border: 1px dashed color-mix(in srgb, var(--orange) 55%, white);
}
.fx-demo-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--slate); }
.fx-demo-tag { background: var(--orange); color: #fff; font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.fx-demo-note { flex: 1 1 260px; }
.fx-reset { font-size: .85rem; }
.fx-viewers { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.fx-viewers-k { font-size: .8rem; font-weight: 600; color: var(--faint); margin-right: 4px; }
.fx-viewer {
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; border: 0;
  padding: 7px 14px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.fx-viewer:hover { background: #FFF1E4; }
.fx-viewer.is-on { background: var(--jungle); color: #fff; }

/* ---------- head and tabs ---------- */
.fx-head { margin-bottom: var(--space-3); }
.fx-new { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 6px; }
.fx-new svg { width: 18px; height: 18px; }
.fx-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: var(--space-4); overflow-x: auto; }
.fx-tabs a {
  padding: 10px 14px; text-decoration: none; color: var(--slate); font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.fx-tabs a:hover { color: var(--ink); }
.fx-tabs a.is-on { color: var(--ink); border-bottom-color: var(--orange); }
.fx-count { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 4px; border-radius: 999px; background: rgba(0,0,0,.07); font-size: .75rem; text-align: center; }
.fx-count.is-hot { background: var(--orange); color: #fff; }

.fx-back { display: inline-flex; align-items: center; gap: 2px; margin-top: var(--space-4); font-weight: 600; text-decoration: none; font-size: .95rem; }
.fx-back svg { width: 18px; height: 18px; }
.fx-h2 { font-size: 1.05rem; margin: var(--space-5) 0 var(--space-2); }

/* ---------- pills ---------- */
.fx-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.fx-st-new      { background: var(--teal-wash);   color: var(--teal-d); }
.fx-st-progress { background: var(--orange-wash); color: var(--orange-d); }
.fx-st-done     { background: var(--lime-wash);   color: var(--lime-d); }
.fx-ap-pending  { background: #FFE8D6; color: #9A4A0A; }
.fx-ap-ok       { background: var(--lime-wash); color: var(--lime-d); }
.fx-ap-no       { background: #EEEEF1; color: var(--faint); }
.fx-internal    { background: #EDE9FE; color: #5B3FB8; }
.fx-pri-pill.fx-pri-emergency { background: #FDE4D8; color: #A3360A; }
.fx-pri-pill.fx-pri-week      { background: #F2F2F5; color: var(--slate); }
.fx-pri-pill.fx-pri-whenever  { background: #F2F2F5; color: var(--faint); }

.fx-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; background: var(--fx-week); }
.fx-dot.fx-pri-emergency { background: var(--fx-emergency); box-shadow: 0 0 0 4px rgba(217,72,15,.15); }
.fx-dot.fx-pri-whenever { background: var(--fx-whenever); }

.fx-id { font-variant-numeric: tabular-nums; color: var(--faint); font-weight: 600; font-size: .85rem; }

/* ---------- rows ---------- */
.fx-list { display: grid; gap: 8px; }
.fx-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.fx-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-up); color: var(--ink); }
.fx-row[hidden] { display: none; }
.fx-type { width: 34px; height: 34px; border-radius: 10px; background: #F2F2F5; color: var(--slate); display: grid; place-items: center; flex: none; }
.fx-type svg { width: 18px; height: 18px; }
.fx-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fx-row-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fx-row-top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-row-sub { font-size: .85rem; color: var(--faint); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-has-photo { color: var(--faint); align-self: center; }
.fx-has-photo svg { width: 15px; height: 15px; display: block; }
.fx-row-side { display: flex; align-items: center; gap: 8px; flex: none; }
.fx-assignee { font-size: .8rem; font-weight: 600; color: var(--slate); }
.fx-assignee.is-none { color: var(--orange-d); }

.fx-empty { display: grid; gap: var(--space-3); justify-items: center; }
.fx-empty-btn { color: #fff; }

/* ---------- queue ---------- */
.fx-tiles { margin: 0 0 var(--space-4); }
.fx-queue { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-4); align-items: start; }
.fx-filters { display: grid; gap: 10px; margin-bottom: 6px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-chips .chip.is-on { background: var(--jungle); color: #fff; }
.fx-filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fx-select, .fx-input, .fx-q {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px;
}
.fx-select:focus, .fx-input:focus, .fx-q:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(6,147,178,.15); }
.fx-q { flex: 1 1 220px; }
.fx-count-line { font-size: .85rem; color: var(--faint); margin: 6px 0 10px; }
.fx-none { margin-top: 8px; }

.fx-campus { position: sticky; top: calc(var(--nav-h) + 16px); }
.fx-bar {
  display: grid; grid-template-columns: 110px 1fr 24px; align-items: center; gap: 10px; width: 100%;
  font: inherit; font-size: .88rem; background: none; border: 0; padding: 7px 6px; border-radius: 10px; cursor: pointer; text-align: left; color: var(--ink);
}
.fx-bar:hover { background: #F5F5F7; }
.fx-bar.is-on { background: var(--orange-wash); }
.fx-bar-track { height: 8px; border-radius: 99px; background: #EEEEF1; overflow: hidden; }
.fx-bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--orange); min-width: 0; }
.fx-bar-n { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- approvals ---------- */
.fx-apcard { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: var(--space-3); border-left: 4px solid var(--orange); }
.fx-apcard-top { display: flex; justify-content: space-between; gap: var(--space-3); align-items: flex-start; }
.fx-aptitle { font-weight: 700; font-size: 1.08rem; text-decoration: none; color: var(--ink); }
.fx-aptitle:hover { text-decoration: underline; }
.fx-amount { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; margin: 0; }
.fx-apnote { color: var(--slate); margin: 10px 0; }
.fx-apacts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fx-apacts .fx-input { flex: 1 1 220px; }

/* ---------- form ---------- */
.fx-form { max-width: 720px; display: grid; gap: var(--space-4); padding-bottom: var(--space-5); }
.fx-field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.fx-field legend, .fx-label { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 4px; }
.fx-hint { font-size: .82rem; color: var(--faint); }
.fx-err { color: #B42318; font-size: .85rem; font-weight: 600; margin: 0; }
.fx-err[hidden] { display: none; }
.fx-two { display: grid; grid-template-columns: 1fr 200px; gap: var(--space-3); }

.fx-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fx-pick input, .fx-chip-radio input, .fx-pri-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fx-pick-in {
  display: grid; gap: 4px; height: 100%; padding: 16px 18px; border-radius: 16px; cursor: pointer;
  background: var(--card); border: 2px solid transparent; box-shadow: var(--shadow);
}
.fx-pick-in span:last-child { font-size: .85rem; color: var(--slate); }
.fx-pick-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--orange-wash); color: var(--orange-d); display: grid; place-items: center; margin-bottom: 4px; }
.fx-pick-ic svg { width: 20px; height: 20px; }
.fx-pick input:checked + .fx-pick-in { border-color: var(--orange); }
.fx-pick input:focus-visible + .fx-pick-in, .fx-chip-radio input:focus-visible + span, .fx-pri-opt input:focus-visible + span { outline: 3px solid rgba(6,147,178,.4); outline-offset: 2px; }

.fx-chip-radio span {
  display: inline-block; padding: 8px 15px; border-radius: 999px; cursor: pointer; font-size: .9rem; font-weight: 500;
  background: rgba(0,0,0,.05);
}
.fx-chip-radio span:hover { background: rgba(0,0,0,.09); }
.fx-chip-radio input:checked + span { background: var(--jungle); color: #fff; }

.fx-pris { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fx-pri-opt > span { display: grid; gap: 4px; height: 100%; padding: 12px 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); border: 2px solid transparent; cursor: pointer; }
.fx-pri-opt b { display: flex; align-items: center; gap: 8px; }
.fx-pri-opt > span > span { font-size: .82rem; color: var(--slate); }
.fx-pri-opt input:checked + span { border-color: var(--ink); }
.fx-pri-opt.fx-pri-emergency input:checked + span { border-color: var(--fx-emergency); background: #FFF6F1; }

.fx-warn { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: .92rem; }
.fx-warn[hidden] { display: none; }
.fx-warn svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.fx-warn-emergency { background: #FDE4D8; color: #8A2C07; }
.fx-warn-codes { background: #EDE9FE; color: #4A2F9E; }
.fx-keys { display: grid; gap: var(--space-3); }
.fx-keys[hidden] { display: none; }

.fx-photos { display: flex; gap: 10px; flex-wrap: wrap; }
.fx-photos:empty { display: none; }
.fx-thumb { position: relative; margin: 0; width: 104px; height: 104px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.fx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fx-thumb button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.fx-thumb button svg { width: 14px; height: 14px; }
.fx-addphoto {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content; cursor: pointer;
  padding: 12px 18px; border-radius: 14px; border: 2px dashed var(--line-2); color: var(--slate); font-weight: 600;
}
.fx-addphoto:hover { border-color: var(--teal); color: var(--teal-d); }
.fx-addphoto[hidden] { display: none; }
.fx-addphoto svg { width: 20px; height: 20px; }
.fx-submit { display: flex; gap: 10px; }

/* ---------- detail ---------- */
.fx-detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-4); align-items: start; margin-top: var(--space-3); padding-bottom: var(--space-5); }
.fx-detail.is-solo { grid-template-columns: minmax(0, 760px); }
.fx-dmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-dtype { display: inline-flex; align-items: center; gap: 5px; font-size: .85rem; color: var(--slate); font-weight: 500; }
.fx-dtype svg { width: 16px; height: 16px; }
.fx-dtitle { font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -.03em; line-height: 1.1; margin: 12px 0 var(--space-3); }
.fx-banner { padding: 11px 16px; border-radius: 12px; font-weight: 600; margin: 0 0 var(--space-3); }
.fx-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 24px; margin: 0 0 var(--space-3); padding: 18px 20px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.fx-facts dt { font-size: .78rem; font-weight: 600; color: var(--faint); }
.fx-facts dd { margin: 2px 0 0; font-weight: 500; }
.fx-details { font-size: 1.05rem; line-height: 1.55; color: var(--ink); margin: 0 0 var(--space-3); max-width: 62ch; white-space: pre-wrap; }
.fx-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-3); }
.fx-gal { padding: 0; border: 0; width: 150px; height: 112px; border-radius: 14px; overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow); }
.fx-gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fx-zoom { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.82); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.fx-zoom img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.fx-zoom button { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }
.fx-zoom button svg { width: 20px; height: 20px; }

.fx-updates { margin-top: var(--space-2); }
.fx-post { display: grid; gap: 8px; margin-bottom: var(--space-3); }
.fx-post textarea { resize: vertical; }
.fx-post-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fx-check { display: inline-flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--slate); }
.fx-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fx-tl { display: flex; gap: 12px; }
.fx-tl p { margin: 0; }
.fx-tl time { font-size: .78rem; color: var(--faint); }
.fx-tl-text { color: var(--slate); white-space: pre-wrap; }
.fx-tl-av { width: 32px; height: 32px; border-radius: 50%; background: var(--teal-wash); color: var(--teal-d); font-weight: 700; display: grid; place-items: center; flex: none; font-size: .85rem; }
.fx-tl.is-internal .fx-tl-av { background: #EDE9FE; color: #5B3FB8; }
.fx-tl-teams p { font-size: .85rem; color: var(--faint); }
.fx-tl-teams b { color: var(--slate); font-weight: 600; }
.fx-tl-ic { width: 32px; height: 32px; border-radius: 9px; background: #5B5FC7; color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; font-size: .9rem; transform: scale(.8); }

.fx-detail-side { position: sticky; top: calc(var(--nav-h) + 16px); }
.fx-side-panel { display: grid; gap: 12px; }
.fx-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: #EEEEF1; border-radius: 12px; padding: 3px; gap: 3px; }
.fx-seg-btn { font: inherit; font-size: .8rem; font-weight: 600; border: 0; background: none; padding: 8px 2px; white-space: nowrap; border-radius: 9px; cursor: pointer; color: var(--slate); }
.fx-seg-btn.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.fx-vendor[hidden] { display: none; }
.fx-approve-box { border-top: 1px solid var(--line); padding-top: 12px; }
.fx-approve-box summary { cursor: pointer; font-weight: 600; color: var(--teal-d); }
.fx-approve-box[open] { display: grid; gap: 10px; }
.fx-approve-box[open] summary { margin-bottom: 4px; }
.fx-side-acts { display: flex; gap: 8px; }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .fx-queue, .fx-detail { grid-template-columns: minmax(0, 1fr); }
  .fx-campus, .fx-detail-side { position: static; }
}
@media (max-width: 620px) {
  .fx-new { margin-left: 0; }
  .fx-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fx-tiles .tile { padding: 14px 16px; }
  .fx-tiles .tile-v { font-size: 1.6rem; }
  .fx-row { flex-wrap: wrap; gap: 10px 12px; padding: 14px; }
  .fx-row-main { flex-basis: calc(100% - 70px); }
  .fx-row-side { width: 100%; padding-left: 70px; flex-wrap: wrap; }
  .fx-picks, .fx-pris, .fx-two { grid-template-columns: 1fr; }
  .fx-apcard-top { flex-direction: column; }
  .fx-bar { grid-template-columns: 100px 1fr 24px; }
}
