/* GenieCloud team admin: raceGENIE's dark theme (apex.css tokens), compact. */
:root {
  --bg: #141719;
  --panel: #1d2225;
  --raised: #272e32;
  --line: #424b50;
  --text: #f3f1e9;
  --muted: #b0b9bd;
  --lime: #d8ff3e;
  --blue: #76c9f2;
  --amber: #f4bc66;
  --red: #ff9292;
  --ink: #141719;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    13px/1.4 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
button,
input,
select {
  font: inherit;
  color: inherit;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 7px;
  min-height: 26px;
}
button {
  cursor: pointer;
}
button.primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  font-weight: 600;
}
button.link {
  background: none;
  border: none;
  color: var(--red);
  padding: 0 4px;
  min-height: 0;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 15px;
  letter-spacing: 0.02em;
}
.brand b {
  color: var(--lime);
}
.brand span {
  color: var(--muted);
  font-size: 12px;
  margin-left: 8px;
}
.team-pick {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
#user-button {
  margin-left: auto;
}
.team-pick:not([hidden]) + #user-button {
  margin-left: 0;
}
main {
  padding: 10px 14px 30px;
  max-width: 1180px;
}
.muted {
  color: var(--muted);
}
h1 {
  font-size: 17px;
  margin: 2px 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 6px;
}
.tag {
  font-size: 11px;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--lime);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 10px;
}
section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  min-width: 0;
}
section.wide {
  grid-column: 1 / -1;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 3px 6px 3px 0;
  border-bottom: 1px solid var(--raised);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}
td.num,
th.num {
  text-align: right;
}
form.row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
form.row input {
  flex: 1 1 110px;
  min-width: 0;
}
.ents {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.ents div b {
  display: block;
  font-size: 15px;
}
.ents div span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.ents .full b {
  color: var(--amber);
}
.settings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#toast {
  position: fixed;
  bottom: 12px;
  right: 12px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lime);
  padding: 6px 10px;
  border-radius: 5px;
  max-width: 420px;
}
#toast.error {
  border-left-color: var(--red);
}
.audit td {
  font-size: 12px;
}
.signin {
  display: flex;
  justify-content: center;
  padding-top: 30px;
}
.views {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.views button[aria-pressed='true'] {
  border-color: var(--lime);
  color: var(--lime);
}
.warn {
  list-style: none;
  margin: 0 0 8px;
  padding: 6px 10px;
  background: var(--panel);
  border: 1px solid var(--amber);
  border-radius: 6px;
  color: var(--amber);
}
.warn-text {
  color: var(--amber);
  font-size: 12px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px 10px;
  align-items: end;
}
.fields label,
.fields .chk {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
}
.fields label.chk,
.chk {
  flex-direction: row;
  align-items: center;
  gap: 5px;
}
.fields input {
  width: 100%;
}
.fields input[type='checkbox'],
.chk input {
  width: auto;
  min-height: 0;
}
form.share {
  border-top: 1px solid var(--raised);
  padding: 6px 0;
}
form.share h3 {
  font-size: 13px;
  margin: 0 0 4px;
}
.chks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 6px;
}
ul.plain {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
}
#claim-fresh code {
  word-break: break-all;
}
#profiles td {
  vertical-align: top;
}
/* GC-2: the subscription banner (payment failed, lapsed, ended) and the Billing section. */
.billing-banner {
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  background: var(--panel);
}
.billing-banner.warning {
  border-left-color: var(--amber);
}
.billing-banner.error {
  border-left-color: var(--red);
}
#billing .ents {
  margin-bottom: 8px;
}
#billing label input {
  margin-left: 4px;
}

/* GC-6: the team's videos */
button.link.danger {
  color: #b42318;
}
#video-player video {
  display: block;
  width: 100%;
  max-height: 60vh;
  margin-top: 8px;
  background: #000;
}

/* GC-8 driver view (My driving): a single column that reads on a phone, and What drivers see on the team page. */
.dv {
  max-width: 720px;
}
.dv-team,
.dv-session,
.dv-debriefs,
.dv-videos,
.dv-timetable,
.dv-plans {
  margin-bottom: 10px;
}
/* MG-3: plans; a wide plan scrolls in its own box, never the page */
.dv-plan {
  border-top: 1px solid var(--line);
  padding-top: 4px;
  overflow-x: auto;
}
.dv .dv-plan-name {
  font-size: 13px;
  color: var(--text);
}
.dv h4 {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 2px;
}
.dv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.dv-meet {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  min-height: 44px;
}
.dv-figures {
  margin: 2px 0 6px;
}
.dv-table {
  margin: 4px 0;
}
.dv-table tr.dv-me td {
  color: var(--lime);
  font-weight: 600;
}
.dv-table tr.dv-other td {
  color: var(--muted, inherit);
  opacity: 0.75;
}
.dv-table tr.dv-best td {
  color: var(--lime);
  font-weight: 600;
}
.dv-table tr.dv-unclean td {
  color: var(--muted);
}
.dv details summary {
  cursor: pointer;
  color: var(--blue);
  padding: 4px 0;
}
.dv h3 {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 2px;
}
.dv-text {
  white-space: pre-wrap;
  margin: 2px 0 6px;
  overflow-wrap: anywhere;
}
.dv-debrief {
  border-top: 1px solid var(--line);
  padding-top: 4px;
}
.dv-video {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.dv-player {
  flex: 1 1 100%;
}
.dv-player video {
  width: 100%;
  max-height: 60vh;
  background: #000;
  border-radius: 5px;
}
.dv-check {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.dv-check input {
  min-height: 0;
}
/* GC-9: "Is this you?", the driver's copy and sharing a lap */
.dv-ask {
  color: var(--amber);
}
.dv-tags {
  margin: 4px 0 6px;
}
.dv-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.dv-tag-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dv-tag button[aria-pressed='true'] {
  border-color: var(--lime);
  color: var(--lime);
}
.dv-share {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}
.dv-share select {
  max-width: 100%;
}

@media (max-width: 640px) {
  .bar {
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .brand span {
    display: none;
  }
  .views {
    order: 3;
    flex: 1 1 100%;
    display: flex;
  }
  .views button {
    flex: 1 1 0;
    min-height: 36px;
  }
  main {
    padding: 10px 12px 30px;
  }
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  section {
    overflow-x: auto;
  }
  #toast {
    left: 12px;
    right: 12px;
    max-width: none;
  }
  .dv button {
    min-height: 36px;
  }
}
/* MG-1: the link from GenieCloud to myRaceGENIE */
.views a.to-my {
  color: var(--lime);
  font-size: 12px;
  margin-left: 6px;
  align-self: center;
}
/* MG-5: notifications (myRaceGENIE list and settings; the team page's announcements). Compact; long words wrap. */
.nt section {
  margin-bottom: 10px;
}
.nt-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.nt-list {
  list-style: none;
  margin: 4px 0;
  padding: 0;
}
.nt-item {
  border-top: 1px solid var(--line);
  padding: 5px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.nt-unread {
  border-left: 3px solid var(--lime);
  padding-left: 6px;
}
.nt-head,
.nt-foot {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.nt-body {
  margin: 2px 0;
  white-space: pre-wrap;
}
.nt-check {
  display: block;
  margin: 3px 0;
  font-size: 12px;
}
.nt-check input {
  min-height: 0;
}
.nt-form {
  display: grid;
  gap: 6px;
  max-width: 640px;
  margin-bottom: 8px;
}
.nt-form label {
  display: grid;
  gap: 2px;
  font-size: 12px;
}
.nt-form label.nt-check {
  display: block;
}
.nt-form textarea,
.nt-form input[name='title'],
.nt-form select {
  max-width: 100%;
}
.nt-form fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
}
.nt-sent td {
  overflow-wrap: anywhere;
  vertical-align: top;
}
.nt-receipts {
  margin: 2px 0;
  padding-left: 16px;
  font-size: 12px;
}

/* FX-C: the phase badge (Live, Planning, Past, by the Mac's rule) and the printable plan, on the team site and in
   myRaceGENIE. */
.gc-phase {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--c-line, #444);
  border-radius: 9px;
  padding: 0 6px;
  line-height: 16px;
  vertical-align: middle;
  white-space: nowrap;
  color: var(--c-muted, #888);
}
.gc-phase[data-phase='live'] {
  background: var(--c-lime, #c6f432);
  border-color: var(--c-lime, #c6f432);
  color: var(--c-on-lime, #111);
}
.gc-phase[data-phase='planning'] {
  color: var(--c-text, inherit);
}
.dv-pub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 6px 0;
  font-size: 13px;
}
.dv-pub[data-tone='warn'] b {
  color: var(--c-amber, #f5a623);
}
.dv-pub[data-tone='ok'] b {
  color: var(--c-lime, #c6f432);
}
.dv-print-head {
  display: none;
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .gc-side,
  .gc-top,
  .bar,
  #my-top,
  .my-foot,
  .gc-skip,
  .mr-skip,
  #toast,
  button,
  form,
  .tp-subnav,
  .tp-steps,
  .dv-videos,
  .dv-debriefs,
  .dv-session {
    display: none !important;
  }
  .dv-print-head {
    display: block;
  }
  .gc-phase,
  .tp-badge {
    border-color: #000 !important;
    background: none !important;
    color: #000 !important;
  }
  table {
    page-break-inside: auto;
  }
  tr {
    page-break-inside: avoid;
  }
}
