/* screens_ceo.css — Direction A (Focus)
   CEO-flow screen styles (company overview, people, lunch subscriptions,
   invite, company confirmation). Owned by Slice U2.
   Add screen-specific selectors here; shared components live in components.css. */

/* ---------- shared page head (overview + people) ---------- */
.ceo-pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ceo-pagehead h1.page {
  margin: 0;
}

.ceo-pagehead h1.page small {
  display: block;
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 6px;
}

/* ---------- quarterly check-in banner ---------- */
.ceo-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fbf3e9;
  border: 1px solid #ecd9c2;
  border-radius: 14px;
  padding: 14px 18px;
  margin: 26px 0 30px;
  font-size: 14px;
}

.ceo-banner .b-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--clay-soft);
  display: grid;
  place-items: center;
  flex: none;
}

.ceo-banner b {
  font-weight: 700;
}

.ceo-banner .muted {
  color: var(--muted);
}

.ceo-banner .banner-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.ceo-banner .banner-actions a.link {
  color: var(--clay);
  font-weight: 700;
}

.ceo-banner .banner-actions form {
  margin: 0;
}

.ceo-banner .banner-actions .dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

/* ---------- inline help affordance (tooltip helper) ---------- */
.tooltip {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border: 1px solid #d8c4a8;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}

.tooltip:hover,
.tooltip:focus-visible {
  border-color: var(--clay);
  color: var(--clay);
  outline: none;
}

/* ---------- cost cards ---------- */
.costs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 14px;
}

.cost {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.cost .label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.cost .num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 8px 0 2px;
}

.cost .num small {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
}

.cost .sub {
  font-size: 12.5px;
  color: var(--muted);
}

.costnote {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 2px 38px;
}

/* ---------- two-column overview body ---------- */
.grid2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 26px;
}

.list {
  display: grid;
  gap: 10px;
}

.person {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.person .av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e6e3d6;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #5a5b48;
  flex: none;
}

.person .nm {
  font-size: 15px;
  font-weight: 700;
}

.person .nm small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
}

.person .pill {
  margin-left: auto;
}

/* ---------- lunch-subscription card (overview) ---------- */
.subcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.subrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.subrow:last-of-type {
  border-bottom: none;
}

.subrow .nm {
  font-weight: 600;
}

.subrow .sub-toggle {
  margin-left: auto;
  display: inline-flex;
}

.subrow.off .nm {
  color: var(--muted);
}

.subnote {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
  display: flex;
  gap: 7px;
}

.subnote b {
  color: var(--ink);
  font-weight: 600;
}

.subcard .empty {
  font-size: 13.5px;
  color: var(--muted);
  margin: 4px 0 0;
}

/* ---------- add-a-person modal ---------- */
.ceo-modal {
  background: var(--paper);
  border-radius: 24px;
  width: 440px;
  max-width: 100%;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .5);
  transform: translateY(14px) scale(.99);
  transition: .26s;
  padding: 28px;
}

.scrim.open .ceo-modal {
  transform: none;
}

.ceo-modal h2 {
  font-size: 23px;
  letter-spacing: -.02em;
  margin: 0 0 4px;
}

.ceo-modal .lede {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 18px;
}

.ceo-modal .actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.ceo-modal .actions .btn {
  flex: 1;
  text-align: center;
}

/* ---------- form fields (modal + invite + confirm + lunch) ---------- */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 7px;
}

.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px var(--clay-soft);
}

.field .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-errors {
  background: var(--clay-soft);
  border: 1px solid #f1c4ab;
  color: var(--clay-deep);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13.5px;
}

.form-errors p {
  margin: 0;
  font-weight: 600;
}

/* ---------- people table (people screen) ---------- */
.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.chip {
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: .14s;
}

.chip:hover {
  border-color: #c9c7ba;
}

.chip.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.ptable {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.phead, .prow {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1fr 1.4fr;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.phead {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.prow {
  border-bottom: 1px solid var(--line);
}

.prow:last-child {
  border-bottom: none;
}

.prow .who {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prow .who .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e6e3d6;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12.5px;
  color: #5a5b48;
  flex: none;
}

.prow .who strong {
  font-size: 14.5px;
  display: block;
}

.prow .who span {
  font-size: 12px;
  color: var(--muted);
}

.role-cell {
  font-size: 13.5px;
  color: var(--muted);
}

.lunch-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.dot-on {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.dot-off {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cfccbe;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.row-actions form {
  margin: 0;
}

.row-actions .btn {
  padding: 7px 12px;
  font-size: 12.5px;
}

/* ---------- lunch subscriptions index ---------- */
.sub-total {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- generic CEO form card (invite, confirm, enrol, cancel) ---------- */
.formcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  max-width: 520px;
}

.formcard .lede {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.formcard .actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

@media (max-width: 760px) {
  .costs {
    grid-template-columns: 1fr;
  }

  .grid2 {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .ceo-pagehead {
    flex-direction: column;
    align-items: stretch;
  }

  .ceo-pagehead .btn {
    width: 100%;
  }

  .phead {
    display: none;
  }

  .prow {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "who pill"
      "meta meta"
      "actions actions";
    row-gap: 8px;
    padding: 14px 16px;
  }

  .prow .who {
    grid-area: who;
  }

  .prow .pill, .prow .lunch-cell {
    grid-area: pill;
    justify-self: end;
  }

  .role-cell {
    grid-area: meta;
    font-size: 12.5px;
  }

  .row-actions {
    grid-area: actions;
    justify-content: flex-start;
  }
}
