/* Punt Esportiu — app de jugador, reserva y panel interno */

/* ---------- Shell ---------- */

.app-body {
  background: var(--ink);
  min-height: 100vh;
}
.app-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  background: rgba(7, 22, 18, 0.9);
  border-right: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  z-index: 20;
}
.sidebar__brand {
  padding: 4px 8px 24px;
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar__label {
  padding: 18px 10px 8px;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 800;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.side-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}
.side-link:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.045);
}
.side-link.is-active {
  color: var(--ink);
  background: var(--mint);
  border-color: var(--mint);
}
.side-link.is-active svg {
  opacity: 1;
}
.side-link__badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.62rem;
  font-weight: 800;
}
.side-link.is-active .side-link__badge {
  background: rgba(5, 13, 11, 0.18);
  color: var(--ink);
}
.sidebar__foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
}
.side-user__meta {
  min-width: 0;
}
.side-user__name {
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-user__role {
  font-size: 0.64rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sidebar__close {
  display: none;
}
.app-main {
  min-width: 0;
  padding: 0 clamp(18px, 3vw, 40px) 60px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding-block: 14px;
  background: rgba(5, 13, 11, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.topbar__title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1;
}
.topbar__sub {
  margin-top: 5px;
  font-size: 0.74rem;
  color: var(--muted);
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.menu-btn {
  display: none;
}
.view {
  display: none;
  animation: view-in 0.4s var(--ease);
}
.view.is-active {
  display: block;
}
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- Dashboard cards ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kpi {
  padding: 18px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.kpi__label {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 800;
}
.kpi__value {
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi__value small {
  font-family: var(--text);
  font-size: 0.66rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
  margin-left: 4px;
}
.kpi__foot {
  font-size: 0.7rem;
  color: var(--muted);
}
.kpi--mint {
  background: linear-gradient(140deg, rgba(43, 229, 167, 0.18), rgba(43, 229, 167, 0.04));
  border-color: rgba(43, 229, 167, 0.3);
}
.kpi--ball .kpi__value {
  color: var(--ball);
}
.dash-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 16px;
  margin-top: 16px;
}
.dash-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-card {
  padding: 20px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.panel-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.panel-card__head h2,
.panel-card__head h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.panel-card__head .small {
  color: var(--muted);
}
.level-big {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 8px 0 2px;
}
.level-big strong {
  font-family: var(--display);
  font-size: 4.4rem;
  font-weight: 780;
  letter-spacing: -0.06em;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}
.level-big span {
  color: var(--mint);
  font-weight: 800;
  font-size: 0.88rem;
  padding-bottom: 7px;
}
.level-track {
  height: 5px;
  border-radius: 99px;
  background: rgba(238, 243, 234, 0.1);
  overflow: hidden;
  margin: 16px 0 9px;
}
.level-track i {
  display: block;
  height: 100%;
  width: var(--pct, 40%);
  background: linear-gradient(90deg, var(--mint), var(--ball));
}
.level-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 0.62rem;
  font-weight: 700;
}
.next-booking {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  background: var(--mint-soft);
  border: 1px solid rgba(43, 229, 167, 0.24);
}
.next-booking__date {
  flex-shrink: 0;
  width: 56px;
  text-align: center;
  border-right: 1px solid rgba(43, 229, 167, 0.25);
  padding-right: 14px;
}
.next-booking__date strong {
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.04em;
}
.next-booking__date span {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--mint);
  letter-spacing: 0.08em;
  font-weight: 800;
}
.next-booking__meta {
  flex: 1;
  min-width: 0;
}
.next-booking__meta strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
}
.next-booking__meta span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 3px;
}
.empty {
  padding: 28px 18px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}
.empty strong {
  display: block;
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

/* ---------- Lists / tables ---------- */

.list {
  display: flex;
  flex-direction: column;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row__main {
  flex: 1;
  min-width: 0;
}
.list-row__main strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-row__main span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 2px;
}
.list-row__side {
  text-align: right;
  flex-shrink: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.badge--ok {
  color: var(--mint);
  border-color: rgba(43, 229, 167, 0.3);
  background: var(--mint-soft);
}
.badge--warn {
  color: var(--warn);
  border-color: rgba(255, 180, 84, 0.3);
  background: rgba(255, 180, 84, 0.08);
}
.badge--bad {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.08);
}
.badge--ball {
  color: var(--ball);
  border-color: rgba(216, 255, 95, 0.3);
  background: rgba(216, 255, 95, 0.08);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 640px;
}
table.data th {
  text-align: left;
  padding: 11px 12px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
}
table.data td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tr:last-child td {
  border-bottom: 0;
}
table.data tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}
table.data .cell-strong {
  font-weight: 800;
}
.table-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.icon-btn:hover {
  color: var(--paper);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Agenda / timeline ---------- */

.agenda-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
}
.seg button.is-active {
  background: var(--paper);
  color: var(--ink);
}
.timeline {
  position: relative;
  padding-left: 66px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline__hour {
  position: relative;
  padding: 16px 0;
  border-bottom: 1px solid rgba(238, 243, 234, 0.06);
  min-height: 54px;
}
.timeline__hour > span {
  position: absolute;
  left: -66px;
  top: 16px;
  width: 44px;
  text-align: right;
  font-size: 0.68rem;
  color: var(--muted-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.timeline__hour::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 23px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
}
.timeline-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  margin-top: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--mint);
  font-size: 0.74rem;
}
.timeline-event--match {
  border-left-color: var(--ball);
}
.timeline-event--class {
  border-left-color: var(--warn);
}
.timeline-event--blocked {
  border-left-color: var(--danger);
}
.timeline-event strong {
  font-weight: 800;
}
.timeline-event span {
  color: var(--muted);
}

/* ---------- Reservar ---------- */

.booking-page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}
.booking-hero {
  padding: clamp(28px, 4vw, 48px) 0 24px;
}
.booking-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  font-weight: 760;
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.booking-hero p {
  color: var(--muted);
  margin-top: 12px;
  max-width: 56ch;
}
.booking-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.booking-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
}
.club-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.club-tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  transition: all 0.2s;
}
.club-tab:hover {
  border-color: var(--line-strong);
  color: var(--paper);
}
.club-tab.is-active {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.date-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.date-chip {
  flex: 0 0 66px;
  min-height: 64px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  text-align: center;
  transition: all 0.2s;
}
.date-chip strong {
  display: block;
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--paper);
}
.date-chip span {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 5px;
}
.date-chip.is-active {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--ink);
}
.date-chip.is-active strong {
  color: var(--ink);
}
.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
  margin-top: 22px;
}
.booking-board {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}
.booking-board__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.booking-board__head h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 650;
}
.booking-scroll {
  overflow-x: auto;
  padding: 14px;
}
.bgrid {
  display: grid;
  grid-template-columns: 86px repeat(var(--cols, 10), minmax(62px, 1fr));
  gap: 5px;
  min-width: 720px;
}
.bgrid__corner,
.bgrid__head {
  padding: 6px 2px;
  text-align: center;
  font-size: 0.62rem;
  color: var(--muted-2);
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.bgrid__corner {
  text-align: left;
  padding-left: 8px;
}
.bgrid__court {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--paper-2);
  white-space: nowrap;
}
.bgrid__court i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  opacity: 0.6;
}
.bcell {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid rgba(238, 243, 234, 0.09);
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.6rem;
  color: var(--muted-2);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  padding: 4px;
}
.bcell small {
  font-size: 0.56rem;
  opacity: 0.8;
}
.bcell--free {
  background: rgba(43, 229, 167, 0.09);
  border-color: rgba(43, 229, 167, 0.22);
  color: var(--mint);
  cursor: pointer;
  font-weight: 800;
}
.bcell--free:hover {
  background: rgba(43, 229, 167, 0.2);
  border-color: var(--mint);
  transform: translateY(-1px);
}
.bcell--mine {
  background: rgba(216, 255, 95, 0.13);
  border-color: rgba(216, 255, 95, 0.3);
  color: var(--ball);
  cursor: pointer;
  font-weight: 800;
}
.bcell--busy {
  background: rgba(255, 255, 255, 0.055);
  color: rgba(238, 243, 234, 0.35);
}
.bcell--match {
  background: rgba(216, 255, 95, 0.09);
  border-color: rgba(216, 255, 95, 0.22);
  color: var(--ball);
  cursor: pointer;
  font-weight: 700;
}
.bcell--match:hover {
  background: rgba(216, 255, 95, 0.16);
}
.bcell--past {
  opacity: 0.35;
  cursor: not-allowed;
}
.bcell--blocked {
  background: rgba(255, 107, 107, 0.07);
  border-color: rgba(255, 107, 107, 0.2);
  color: var(--danger);
  cursor: not-allowed;
}
.booking-side {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.summary {
  padding: 20px;
  border-radius: var(--r);
  background: rgba(10, 31, 26, 0.7);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.summary h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 650;
  margin-bottom: 14px;
}
.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}
.summary__row strong {
  color: var(--paper);
  font-weight: 700;
  text-align: right;
}
.summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0;
}
.summary__total span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}
.summary__total strong {
  font-family: var(--display);
  font-size: 1.9rem;
  letter-spacing: -0.04em;
  color: var(--ball);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}
.legend i.free {
  background: rgba(43, 229, 167, 0.6);
}
.legend i.mine {
  background: var(--ball);
}
.legend i.match {
  background: rgba(216, 255, 95, 0.45);
}
.legend i.blocked {
  background: rgba(255, 107, 107, 0.5);
}
.open-toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  margin-top: 12px;
}
.open-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--mint);
  margin-top: 2px;
}
.open-toggle strong {
  display: block;
  font-size: 0.8rem;
}
.open-toggle span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
  margin-top: 2px;
}
.level-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.level-range.is-hidden {
  display: none;
}
.booking-mobile-note {
  display: none;
}

/* ---------- Auth ---------- */

.auth-page {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.auth-visual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  min-height: 100svh;
  background: var(--ink-2);
}
.auth-visual .auth-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(0.7) brightness(0.8);
}
.auth-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(5, 13, 11, 0.35), rgba(5, 13, 11, 0.92) 72%),
    linear-gradient(0deg, var(--ink), transparent 55%);
}
.auth-visual .brand,
.auth-visual__quote {
  position: relative;
  z-index: 2;
}
.auth-visual__quote {
  max-width: 520px;
  margin-top: auto;
}
.auth-visual__quote blockquote {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 720;
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 20px;
}
.auth-visual__quote blockquote em {
  font-style: normal;
  color: var(--mint);
}
.auth-visual__quote p {
  color: var(--muted);
  font-size: 0.84rem;
  max-width: 38ch;
}
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--ink-2);
  overflow-y: auto;
}
.auth-card {
  width: min(460px, 100%);
}
.auth-card__head {
  margin-bottom: 26px;
}
.auth-card__head h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 740;
  letter-spacing: -0.04em;
  line-height: 1;
}
.auth-card__head p {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 8px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
.auth-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 800;
}
.auth-tabs button.is-active {
  background: var(--paper);
  color: var(--ink);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-form .btn {
  margin-top: 6px;
}
.auth-alt {
  margin-top: 18px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.auth-alt a {
  color: var(--mint);
  font-weight: 700;
}
.demo-box {
  margin-top: 20px;
  padding: 14px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.7;
}
.demo-box code {
  color: var(--mint);
  font-family: var(--text);
  font-weight: 700;
}
.level-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.level-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.level-picker label {
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}
.level-picker input:checked + label {
  background: var(--mint);
  color: var(--ink);
  border-color: var(--mint);
}
.auth-note {
  font-size: 0.68rem;
  color: var(--muted-2);
  line-height: 1.6;
}

/* ---------- Panel ---------- */

.panel-shell {
  grid-template-columns: 230px minmax(0, 1fr);
}
.panel-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.panel-search {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 360px;
}
.panel-search .input {
  min-height: 40px;
  padding-left: 38px;
  font-size: 0.8rem;
}
.panel-search svg {
  position: absolute;
  left: 12px;
  top: 11px;
  color: var(--muted-2);
}
.panel-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.5fr;
  gap: 16px;
  align-items: start;
}
.chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 150px;
  padding-top: 10px;
}
.chart__bar {
  flex: 1;
  min-width: 4px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(0deg, rgba(43, 229, 167, 0.45), rgba(43, 229, 167, 0.8));
  position: relative;
}
.chart__bar:hover::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--paper);
  font-size: 0.6rem;
  white-space: nowrap;
  z-index: 3;
}
.chart-labels {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 0.54rem;
}
.chart-labels span {
  flex: 1;
  text-align: center;
}
.donut-breakdown {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.donut-row {
  display: grid;
  grid-template-columns: 46px 1fr 34px;
  gap: 8px;
  align-items: center;
  font-size: 0.7rem;
}
.donut-row__track {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.donut-row__track i {
  display: block;
  height: 100%;
  background: var(--mint);
  border-radius: inherit;
}
.donut-row span:last-child {
  text-align: right;
  color: var(--muted);
}
.panel-tag {
  font-size: 0.58rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(43, 229, 167, 0.12);
  color: var(--mint);
  font-weight: 800;
}
.panel-tag--warn {
  background: rgba(255, 180, 84, 0.12);
  color: var(--warn);
}
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.audit-row {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
}
.audit-row time {
  color: var(--muted-2);
  font-size: 0.66rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.audit-row strong {
  font-weight: 800;
}
.audit-row span {
  color: var(--muted);
}
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.message-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.message-card.is-unread {
  border-color: rgba(43, 229, 167, 0.3);
  background: var(--mint-soft);
}
.message-card__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.message-card__head strong {
  font-size: 0.8rem;
}
.message-card__head time {
  color: var(--muted-2);
  font-size: 0.66rem;
}
.message-card p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Responsive app ---------- */

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 270px;
    transform: translateX(-105%);
    transition: transform 0.35s var(--ease);
    box-shadow: var(--shadow);
  }
  .sidebar.is-open {
    transform: none;
  }
  .sidebar__close {
    display: inline-grid;
    place-items: center;
    position: absolute;
    top: 16px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--paper);
  }
  .menu-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--paper);
  }
  .dash-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .booking-layout {
    grid-template-columns: 1fr;
  }
  .booking-side {
    position: relative;
    top: 0;
  }
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    min-height: 340px;
    padding: 28px;
  }
  .auth-visual__quote blockquote {
    font-size: 2.2rem;
  }
  .auth-form-side {
    padding: 32px 20px 60px;
  }
}

@media (max-width: 700px) {
  .app-main {
    padding-inline: 16px;
  }
  .topbar {
    min-height: 66px;
    margin-bottom: 18px;
  }
  .topbar__actions .btn span {
    display: none;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .kpi {
    padding: 14px;
    min-height: 100px;
  }
  .kpi__value {
    font-size: 1.6rem;
  }
  .panel-card {
    padding: 16px;
  }
  .booking-top {
    align-items: flex-start;
  }
  .booking-controls {
    align-items: flex-start;
  }
  .booking-side {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(7, 22, 18, 0.96);
    border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transform: translateY(110%);
    transition: transform 0.35s var(--ease);
  }
  .booking-side.is-open {
    transform: none;
  }
  .booking-mobile-note {
    display: flex;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 30;
  }
  .booking-side .summary {
    padding: 14px;
  }
  .booking-side .summary h3,
  .booking-side .summary__row,
  .booking-side .legend {
    display: none;
  }
  .booking-side .summary__total {
    margin: 0 0 8px;
  }
  .booking-side .summary__total strong {
    font-size: 1.5rem;
  }
  .booking-layout {
    padding-bottom: 76px;
  }
  .booking-board__head h2 {
    font-size: 1rem;
  }
  #board-date {
    font-size: 0.58rem;
  }
  .next-booking {
    flex-wrap: wrap;
  }
  .next-booking__meta {
    flex: 1 1 calc(100% - 76px);
  }
  .next-booking__meta strong {
    font-size: 0.82rem;
    overflow-wrap: anywhere;
  }
  .next-booking .btn {
    width: 100%;
  }
  .bgrid {
    min-width: 660px;
  }
  .auth-visual {
    min-height: 260px;
  }
  .auth-visual__quote blockquote {
    font-size: 1.8rem;
  }
}
