/* La meva fitxa: the welcome (two halves), the card and the tour (own-card.js) */
html.own-card-on body {
  overflow: hidden;
}
.own-card-gate {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: minmax(280px, 2fr) 3fr;
  background: var(--bg, #f4f5f2);
}
.oc-welcome {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  background: #17212a;
  color: #eef2ef;
}
.oc-banner {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}
.oc-banner-empty {
  background: linear-gradient(135deg, #2a3a45, #1b5e45);
}
.oc-welcome-text {
  padding: 32px 36px 40px;
}
.oc-welcome h1 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.2;
  color: #fff;
}
.oc-synopsis {
  margin: 0 0 22px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #d5ddd8;
}
.oc-permission {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
  line-height: 1.55;
  color: #d5ddd8;
}
.oc-permission b {
  color: #6eea8e;
}
.oc-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel, #fff);
}
.own-card-gate .oc-card-head {
  padding: 28px 40px 8px;
}
.oc-card-head h2 {
  margin: 0 0 6px;
  font-size: 21px;
}
.oc-note {
  margin: 0;
  color: #6c7880;
  font-size: 13.5px;
}
.own-card-gate .oc-card-body {
  flex: 1;
  overflow: auto;
  padding: 8px 40px 24px;
}
.oc-card-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 40px;
  border-top: 1px solid #e3e7e4;
}
/* in tabs, as the «Fitxa de personal» of Equip (Daniel, 2026-11-23) */
.oc-tabs {
  margin: 14px 0 16px;
}
.oc-panel {
  min-height: 300px;
}
.oc-readonly .oc-note {
  margin-bottom: 12px;
}
/* why the data is asked for and who sees it, in view (an exception to the texts only on hover: Daniel, 2026-11-23) */
.oc-why {
  margin: 6px 0 0;
  font-size: 14px;
}
.oc-shared {
  margin: 12px 0 0;
}
.oc-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: #50606b;
}
/* (inside a dialog every input is 100% wide: the box went to the middle, far from its text; proves amb agents, ronda 8) */
.oc-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin: 3px 0 0;
}
.my-data-list {
  margin: 6px 0 0;
  padding-left: 18px;
}
.my-data-list li {
  margin: 2px 0;
}
html.dark .oc-consent {
  color: #b9c4cc;
}
.oc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.oc-wide {
  grid-column: 1 / -1;
}
.oc-field input,
.oc-field select,
.oc-field textarea {
  width: 100%;
}
.oc-grid .identity-kind,
.oc-grid .identity-country {
  margin: 0 0 8px;
}
.oc-req {
  color: #b4472c;
}
.oc-read {
  margin: 6px 0 0;
  color: #50606b;
}
.oc-choice {
  display: flex;
  gap: 18px;
  padding-top: 8px;
}
.oc-choice label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.oc-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
}
.oc-dl dt {
  font-size: 12px;
  color: #6c7880;
}
.oc-dl dd {
  margin: 2px 0 0;
}
.oc-readonly {
  padding: 14px 16px;
  border-radius: 10px;
  background: #f4f6f4;
}
dialog.own-card-dialog {
  width: min(760px, 96vw);
  max-width: 760px;
}
html.dark .oc-note,
html.dark .oc-dl dt {
  color: #9aa6ae;
}
html.dark .oc-readonly {
  background: #1f2a33;
}
/* the dark theme: the card as the other blocks (it stayed white under the theme's light text: the title, the tab that is
   open and the labels could hardly be read; proves amb agents, ronda 9, a2-15) */
html.dark .own-card-gate {
  background: #0f172a;
}
html.dark .oc-card {
  background: #1e293b;
}
html.dark .oc-card.oc-in-dialog {
  background: transparent;
}
html.dark .oc-card-foot {
  border-color: #2f3b45;
}
@media (max-width: 860px) {
  .own-card-gate {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .oc-welcome {
    overflow: visible;
  }
  .oc-card {
    min-height: auto;
  }
  .own-card-gate .oc-card-body {
    overflow: visible;
  }
  .own-card-gate .oc-card-head,
  .own-card-gate .oc-card-body,
  .oc-card-foot {
    padding-left: 20px;
    padding-right: 20px;
  }
  .oc-grid,
  .oc-dl {
    grid-template-columns: 1fr;
  }
}
/* the tour: a ring around what is shown, the rest darker, and the note beside it */
.own-tour {
  position: fixed;
  inset: 0;
  z-index: 950;
}
.own-tour-ring {
  position: fixed;
  border-radius: 10px;
  box-shadow:
    0 0 0 3px #6eea8e,
    0 0 0 9999px rgba(10, 18, 24, 0.55);
  transition:
    left 0.2s,
    top 0.2s,
    width 0.2s,
    height 0.2s;
  pointer-events: none;
}
.own-tour-note {
  position: fixed;
  padding: 16px 18px 14px;
  border-radius: 12px;
  background: #fff;
  color: #17212a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.own-tour-step {
  margin: 0 0 4px;
  font-size: 12px;
  color: #6c7880;
}
.own-tour-note h2 {
  margin: 0 0 6px;
  font-size: 17px;
}
.own-tour-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
}
.own-tour-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
/* Equip → «Dades» (sections/team.js): the cards' data as a sheet */
.team-sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
/* with room (Daniel, 2026-11-23: «no cal que tot estigui atapeït»): what does not fit scrolls sideways, the name stays */
.team-sheet th,
.team-sheet td {
  padding: 8px 12px;
  border-bottom: 1px solid #e6eae7;
  border-right: 1px solid #eef1ef;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.team-sheet td.team-sheet-wide {
  min-width: 180px;
  max-width: 260px;
  white-space: normal;
}
.team-sheet th:first-child,
.team-sheet td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 1px 0 0 #e6eae7;
}
.team-sheet th:first-child {
  z-index: 2;
  background: #f4f6f4;
}
/* «Falta» and, under it, a small «Demanar-la» */
.team-sheet [data-team-ask-ss] {
  display: block;
  min-height: 0;
  margin-top: 4px;
  padding: 2px 8px;
  font-size: 12px;
}
.team-sheet th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f6f4;
  font-size: 12px;
  font-weight: 600;
  color: #50606b;
}
.team-sheet .muted {
  color: #9aa5ab;
}
.team-sheet-missing {
  color: #b4472c;
}
.team-sheet-name {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #c8d0cc;
  cursor: pointer;
}
.team-sheet-note {
  min-width: 220px;
}
.team-sheet-reads {
  margin-top: 18px;
}
.team-sheet-note textarea {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  font: inherit;
  resize: vertical;
}
.team-sheet-panel .table-wrap {
  max-height: 70vh;
  overflow: auto;
  overscroll-behavior-x: contain;
}
/* the bar always in view, also where the system hides it until scrolling (Daniel, 2026-11-23: «com els dies del Pla de
   rodatge») */
.team-sheet-panel .table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
.team-sheet-panel .table-wrap::-webkit-scrollbar-track {
  background: #eef1ef;
}
.team-sheet-panel .table-wrap::-webkit-scrollbar-thumb {
  border: 3px solid #eef1ef;
  border-radius: 8px;
  background: #b5c0ba;
}
.team-sheet-panel .table-wrap::-webkit-scrollbar-thumb:hover {
  background: #8d9a93;
}
@supports not selector(::-webkit-scrollbar) {
  .team-sheet-panel .table-wrap {
    scrollbar-color: #b5c0ba #eef1ef;
  }
}
html.dark .team-sheet-panel .table-wrap::-webkit-scrollbar-track {
  background: #1e293b;
}
html.dark .team-sheet-panel .table-wrap::-webkit-scrollbar-thumb {
  border-color: #1e293b;
  background: #475569;
}
html.dark .team-sheet th {
  background: #1f2a33;
  color: #b9c4cc;
}
html.dark .team-sheet th,
html.dark .team-sheet td {
  border-color: #2f3b45;
}
html.dark .team-sheet td:first-child {
  background: #1e293b;
  box-shadow: 1px 0 0 #2f3b45;
}

/* the fields of a person's own data in Equip, only read (forms/person.js, personOwnDataNiu; ronda 9 de proves, a2-8) */
#dialog-body input.is-read-only,
#dialog-body textarea.is-read-only {
  background: #eceff1;
  color: #4b5560;
  cursor: default;
}
html.dark #dialog-body input.is-read-only,
html.dark #dialog-body textarea.is-read-only {
  background: #2d3545;
  color: #c5d0da;
}
