/* Practice Logbook. Full-screen takeover: the site nav is hidden while this is open. */
.ptl-pdash {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none; flex-direction: column;
  background: #07080a;
  color: #e8ece8;
  font-family: Inter, system-ui, sans-serif;
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
.ptl-pdash.open { display: flex; }

/* One branded header replaces Lobby / Practice / Live. Close puts the site nav back. */
html.ptl-logbook-open .psh-head,
html.ptl-logbook-open .psh-bottom,
html.ptl-logbook-open .pshell,
html.ptl-logbook-open #ptl-appshell {
  display: none !important;
}

.ptl-pdash__hero {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 16px;
  min-height: 56px;
  padding: 8px 16px;
  border-bottom: 1px solid #242a33;
  background: #0d1117;
}
.ptl-pdash__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ptl-pdash__logos { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ptl-pdash__logos img { display: block; object-fit: contain; }
.ptl-pdash__logos .ptl-lockup { height: 36px; width: auto; }
.ptl-pdash__titles { min-width: 0; }
.ptl-pdash__title {
  font-family: Saira, Inter, sans-serif; font-weight: 700; font-size: 20px;
  letter-spacing: 0; color: #f4f6fa; line-height: 1.05;
}
.ptl-pdash__sub {
  font-size: 11px; color: #7a8794; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ptl-pdash__close {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; min-width: 72px; padding: 0 14px; border-radius: 6px;
  border: 1px solid #fff; background: #243044; color: #fff;
  -webkit-text-fill-color: #fff;
  cursor: pointer; flex: 0 0 auto;
  font: 700 13px/1 Inter, system-ui, sans-serif;
  color-scheme: dark;
}
.ptl-pdash__close:hover { background: #314058; }

.ptl-pdash__body {
  flex: 1 1 auto; min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px 14px 28px;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 1400px; width: 100%; margin: 0 auto;
  scrollbar-gutter: stable;
}

.ptl-pdash__guest {
  margin: 48px auto; max-width: 460px; text-align: center;
  padding: 28px 24px; border-radius: 10px;
  border: 1px solid #242a33;
  background: #101217;
}
.ptl-pdash__guest h2 {
  margin: 0 0 8px; font-family: Saira, Inter, sans-serif;
  font-size: 18px; font-weight: 700; letter-spacing: 0; color: #f4f6fa;
}
.ptl-pdash__guest p { margin: 0 0 16px; color: #8a939c; font-size: 13px; line-height: 1.45; }
.ptl-pdash__guest a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 6px; background: #E3263B; color: #fff;
  font-weight: 800; font-size: 13px; text-decoration: none;
}

.ptl-pdash__cards {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
  flex: 0 0 auto;
}
@media (max-width: 900px) { .ptl-pdash__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ptl-pdash__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ptl-pdash__card {
  position: relative;
  background: #101217;
  border: 1px solid #242a33;
  border-radius: 6px;
  padding: 6px 10px 6px 12px;
  min-width: 0;
}
.ptl-pdash__card::before {
  content: "";
  position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px;
  border-radius: 2px;
  background: #3a424e;
}
.ptl-pdash__card .k {
  font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #6a7380;
}
.ptl-pdash__card .v {
  margin-top: 1px; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 20px; font-weight: 700; color: #f4f6fa; line-height: 1.12;
  letter-spacing: -0.03em;
}
.ptl-pdash__card .h {
  margin-top: 1px; font-size: 10px; font-weight: 600; color: #6a7380; line-height: 1.2;
}
.ptl-pdash__card.tone-green::before { background: #f4f6fa; }
.ptl-pdash__card.tone-green .v { color: #f4f6fa; }
.ptl-pdash__card.tone-amber::before { background: #ffb01e; }
.ptl-pdash__card.tone-amber .v { color: #ffb01e; }
.ptl-pdash__card.tone-late::before { background: #ff8a6a; }
.ptl-pdash__card.tone-late .v { color: #ff8a6a; }
.ptl-pdash__card.tone-red::before { background: #ff4436; }
.ptl-pdash__card.tone-red .v { color: #ff4436; }

.ptl-pdash__filters {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 7px 8px; border-radius: 6px;
  background: #0c0e12; border: 1px solid #242a33;
  flex: 0 0 auto;
  position: sticky; top: 0; z-index: 2;
}
.ptl-pdash__filters button, .ptl-pdash__filters input {
  height: 28px; border-radius: 4px; border: 1px solid #2a313b;
  background: #12161c; color: #cfd6df; font-size: 11px; padding: 0 9px; font-weight: 650;
  cursor: pointer;
}
.ptl-pdash__filters button.on {
  border-color: rgba(227,38,59,.55); color: #f4f6fa; background: rgba(227,38,59,.1);
}
.ptl-pdash__filters input[type="number"] { width: 68px; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.ptl-pdash__filters .muted { color: #6a7380; font-size: 11px; padding: 0 2px; }
.ptl-pdash__filters .grp {
  display: inline-flex; gap: 4px; align-items: center;
  padding-right: 8px; margin-right: 2px;
  border-right: 1px solid #242a33;
}
.ptl-pdash__filters .grp:last-of-type { border-right: none; }
.ptl-pdash__filters button.ptl-pdash__clear {
  margin-left: auto;
  border-color: rgba(255,68,54,.45);
  color: #ffb0a8;
  background: transparent;
}
.ptl-pdash__filters button.ptl-pdash__clear:hover {
  border-color: #ff4436; color: #fff; background: rgba(255,68,54,.12);
}
.ptl-pdash__confirm {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 12px; border-radius: 6px;
  border: 1px solid rgba(255,68,54,.45);
  background: rgba(255,68,54,.08);
  color: #f3d4d1; font-size: 13px; line-height: 1.35;
}
.ptl-pdash__confirm span { flex: 1 1 220px; }
.ptl-pdash__confirm button {
  height: 30px; padding: 0 12px; border-radius: 5px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.16); background: #161616; color: #e8ece8;
  font-size: 12px; font-weight: 750;
}
.ptl-pdash__confirm button.yes { background: #ff4436; border-color: #ff4436; color: #fff; }
.ptl-pdash__confirm button:disabled { opacity: .55; cursor: default; }
.ptl-pdash__confirm .err { flex: 1 0 100%; color: #ff8a82; font-size: 12px; }

.ptl-pdash__charts {
  display: grid; grid-template-columns: 1.45fr 1fr; gap: 8px;
  flex: 0 0 auto;
}
@media (max-width: 860px) { .ptl-pdash__charts { grid-template-columns: 1fr; } }
.ptl-pdash__chart {
  background: #101217;
  border: 1px solid #242a33;
  border-radius: 6px;
  padding: 8px 10px 6px;
  min-width: 0;
}
.ptl-pdash__chart h3 {
  margin: 0 0 2px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-size: 12px; font-weight: 650; letter-spacing: 0;
  color: #d5dbe3;
}
.ptl-pdash__chart h3 span {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; font-weight: 600; color: #7a8794;
  letter-spacing: 0; white-space: nowrap;
}
.ptl-pdash__chart canvas { width: 100%; height: 156px; display: block; }

.ptl-pdash__table-wrap {
  background: #0c0e12; border: 1px solid #242a33; border-radius: 6px;
  overflow: visible;
  flex: 0 0 auto;
  margin-bottom: 24px;
}
.ptl-pdash__empty {
  padding: 36px 16px; text-align: center; color: #7a8794; font-size: 13px;
}

.ptl-pdash__day { border-bottom: 1px solid rgba(255,255,255,.06); }
.ptl-pdash__day:last-child { border-bottom: none; }
.ptl-pdash__day-h {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 14px;
  background: #12161c;
  border-bottom: 1px solid #242a33;
  font-size: 12px; font-weight: 700; color: #e8ece8;
  position: sticky; top: var(--pdash-stick, 46px); z-index: 1;
}
.ptl-pdash__day-h span {
  color: #7a8794; font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px;
  white-space: nowrap;
}
.ptl-pdash table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ptl-pdash th {
  text-align: left; padding: 7px 14px; color: #6a7380; font-size: 9px;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  border-bottom: 1px solid #242a33; background: #0b0d10;
  white-space: nowrap;
}
.ptl-pdash td {
  padding: 7px 14px; border-bottom: 1px solid rgba(255,255,255,.04);
  font-family: 'JetBrains Mono', ui-monospace, monospace; color: #e8ece8;
  white-space: nowrap; vertical-align: middle;
}
.ptl-pdash tbody tr:hover td { background: rgba(255,255,255,.03); }
.ptl-pdash .foul { color: #ff4436; font-weight: 700; }
.ptl-pdash .muted { color: #8a939c; font-weight: 600; }
.ptl-pdash .rt-green { color: #f4f6fa; font-weight: 700; }
.ptl-pdash .rt-amber { color: #ffb01e; font-weight: 700; }
.ptl-pdash .rt-late { color: #ff8a6a; font-weight: 650; }
.ptl-pdash .bulb-pill {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  border: 1px solid rgba(255,255,255,.12); color: #cfd6df;
}
.ptl-pdash .bulb-pill.top { border-color: rgba(255,176,30,.45); color: #ffb01e; }
.ptl-pdash .bulb-pill.bot { border-color: rgba(74,147,245,.5); color: #4a93f5; }
.ptl-pdash .bulb-pill.pro { border-color: rgba(227,38,59,.4); color: #e3263b; }
.ptl-pdash__hide-btn {
  height: 22px; padding: 0 8px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,.12); background: #151515;
  color: #8a938f; font-size: 10px; font-weight: 700; cursor: pointer;
}
.ptl-pdash__hide-btn:hover { border-color: #ef4444; color: #ef4444; }
@media (max-width: 720px) {
  .ptl-pdash__logos .ptl-lockup { height: 32px; }
  .ptl-pdash__title { font-size: 16px; }
  .ptl-pdash__sub { display: none; }
  .ptl-pdash__hero { gap: 10px; padding: 8px 12px; }
}
@media (max-width: 640px) {
  .ptl-pdash th, .ptl-pdash td { padding: 7px 8px; }
  .ptl-pdash__day-h { padding: 8px 10px; font-size: 11px; }
}

html.ptl-logbook-open { overflow: hidden; }
