/* FacilityJobs signup command center — WhatsApp-style inbox. */
.cc-page [hidden] { display: none !important; }
.cc-page .wrap { width: min(1360px, calc(100% - 1.5rem)); }
.cc-main { padding-bottom: 1.2rem; }
.cc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.cc-app {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(200px, 250px);
  grid-template-areas: "list chat detail";
  height: calc(100vh - 168px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #efe6d6;
  box-shadow: var(--shadow);
}

.cc-listcol,
.cc-chat,
.cc-detail {
  min-height: 0;
  min-width: 0;
}
.cc-listcol {
  grid-area: list;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-right: 1px solid var(--line);
}
.cc-chat {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 10%, rgba(44, 106, 74, 0.05), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(217, 130, 43, 0.06), transparent 24%),
    #efe6d6;
}
.cc-detail {
  grid-area: detail;
  background: #f7f3ea;
  border-left: 1px solid var(--line);
  padding: 1rem 0.9rem;
  overflow: auto;
}
.cc-detail h2,
.cc-listhead h2 {
  font-size: 0.95rem;
  margin: 0;
}

.cc-listhead { padding: 0.8rem 0.8rem 0.4rem; display: grid; gap: 0.45rem; }
.cc-listhead__row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.cc-count { color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.cc-search input,
.cc-sort select,
.cc-compose textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.5rem 0.7rem;
}
.cc-views { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.cc-views button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}
.cc-views button.is-active { background: var(--ink); color: white; border-color: var(--ink); }
.cc-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0;
  padding: 0.55rem 0.8rem 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.cc-group__count {
  font-variant-numeric: tabular-nums;
  background: #efe4d0;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  letter-spacing: 0;
}
.cc-row__phone {
  display: block;
  margin-top: 0.12rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cc-filters button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}
.cc-filters button.is-active { background: var(--green); color: white; border-color: var(--green); }
.cc-sort { display: flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.cc-sort select { width: auto; padding: 0.3rem 0.45rem; }

.cc-list { overflow: auto; flex: 1; }
.cc-row {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f0e6d4;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.7rem 0.8rem;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.6rem;
  cursor: pointer;
}
.cc-row:hover { background: #fbf7ef; }
.cc-row.is-selected { background: #e7f2ea; }
.cc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
}
.cc-row__top,
.cc-chead__who { display: flex; justify-content: space-between; gap: 0.4rem; align-items: flex-start; }
.cc-row__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-row__sub,
.cc-row__preview { display: block; color: var(--muted); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-row__preview { margin-top: 0.1rem; }
.cc-bar { display: block; height: 4px; border-radius: 99px; background: #efe4d0; margin-top: 0.35rem; overflow: hidden; }
.cc-bar span { display: block; height: 100%; background: var(--green); }

.cc-timer {
  flex: none;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
}
.cc-timer--open { background: #e4f0e6; color: #1e4d36; }
.cc-timer--soon { background: var(--marigold-soft); color: #8a4b0f; }
.cc-timer--critical { background: #fbeae6; color: #a1301e; }
.cc-timer--closed { background: #eeeae2; color: #6d6458; }

.cc-empty {
  margin: auto;
  max-width: 360px;
  text-align: center;
  color: var(--ink-soft);
  padding: 1.5rem;
}
.cc-empty h2 { margin-bottom: 0.4rem; }
.cc-thread { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cc-chead {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  background: var(--green-dark);
  color: white;
}
.cc-chead h2 { font-size: 1rem; margin: 0; color: white; }
.cc-chead p { margin: 0; color: rgba(255, 253, 248, 0.82); font-size: 0.78rem; }
.cc-chead__who { align-items: center; min-width: 0; flex: 1; }
.cc-chead__who h2,
.cc-chead__who p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-chead .cc-avatar { background: #f4efe4; color: var(--green-dark); }
.cc-chead__window { text-align: right; }
.cc-windowlabel {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 253, 248, 0.75);
}
.cc-chead .cc-timer { font-size: 0.95rem; padding: 0.28rem 0.6rem; }
.cc-back {
  display: none;
  border: 0;
  background: transparent;
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0.2rem 0.1rem;
}

.cc-log {
  flex: 1;
  overflow: auto;
  padding: 0.9rem 0.8rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cc-day {
  align-self: center;
  background: rgba(255, 253, 248, 0.8);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin: 0.3rem 0;
}
.cc-bubble {
  max-width: min(78%, 460px);
  border-radius: 12px;
  padding: 0.4rem 0.6rem 0.3rem;
  box-shadow: 0 1px 0 rgba(28, 42, 34, 0.04);
}
.cc-bubble--in { align-self: flex-start; background: white; border-top-left-radius: 4px; }
.cc-bubble--bot { align-self: flex-end; background: #e7f6e4; border-top-right-radius: 4px; }
.cc-bubble--admin { align-self: flex-end; background: #d8f3cf; border-top-right-radius: 4px; }
.cc-who { display: block; font-size: 0.68rem; font-weight: 800; color: var(--green-dark); margin-bottom: 0.1rem; }
.cc-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.92rem; }
.cc-en {
  margin-top: 0.28rem !important;
  padding-top: 0.28rem;
  border-top: 1px solid rgba(28, 42, 34, 0.1);
  color: #3d4a57;
  font-size: 0.82rem !important;
}
.cc-en::before {
  content: 'English';
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6d6458;
  margin-bottom: 0.08rem;
}
.cc-time { display: block; text-align: right; color: var(--muted); font-size: 0.68rem; margin-top: 0.15rem; }
.cc-photo {
  width: 168px;
  height: 112px;
  border-radius: 10px;
  background: #efe6d6;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  overflow: hidden;
}
.cc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-photo--id { background: #f3ece0; color: #6d6458; }

.cc-compose { padding: 0.55rem 0.7rem 0.7rem; background: #f7f3ea; border-top: 1px solid var(--line); }
.cc-compose__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.45rem; align-items: end; }
.cc-compose textarea { resize: none; min-height: 46px; background: white; }
.cc-compose textarea:disabled { background: #f3efe6; color: var(--muted); }
.cc-send {
  border: 0;
  background: var(--green);
  color: white;
  font: inherit;
  font-weight: 800;
  border-radius: 12px;
  padding: 0.7rem 0.95rem;
  cursor: pointer;
}
.cc-send:disabled { background: #c9c1b2; cursor: not-allowed; }
.cc-closed {
  margin: 0 0 0.45rem;
  background: var(--marigold-soft);
  color: #6a4a12;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font-size: 0.84rem;
}
.cc-hint { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.75rem; min-height: 1em; }
.cc-hint.is-err { color: #a1301e; }

.cc-detail dl { margin: 0.7rem 0; display: grid; gap: 0.45rem; }
.cc-detail dt { color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.cc-detail dd { margin: 0; font-weight: 700; }
.cc-meter { height: 8px; border-radius: 99px; background: #efe4d0; overflow: hidden; margin-bottom: 0.8rem; }
.cc-meter span { display: block; height: 100%; background: var(--green); width: 0; }
.cc-legend { color: var(--muted); font-size: 0.8rem; margin: 0; }
.cc-none { padding: 1rem; color: var(--muted); font-size: 0.88rem; }

@media (max-width: 900px) {
  .cc-app {
    grid-template-columns: 1fr;
    grid-template-areas: "list";
    height: calc(100vh - 150px);
  }
  .cc-app.is-chat {
    grid-template-areas:
      "chat"
      "detail";
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .cc-app.is-chat .cc-listcol,
  .cc-app:not(.is-chat) .cc-chat,
  .cc-app:not(.is-chat) .cc-detail { display: none; }
  .cc-back { display: inline-flex; }
  .cc-detail { border-left: 0; border-top: 1px solid var(--line); max-height: 180px; }
  .cc-chead .cc-timer { font-size: 0.78rem; }
}
