@font-face {
  font-family: Montserrat;
  src: url('/assets/montserrat.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

[hidden] {
  display: none !important;
}

:root {
  /* ORYX SportsTrack core */
  --gunmetal: #1F262A;
  --gunmetal-soft: #252D31;
  --gunmetal-raised: #2A3033;

  --champagne: #B8874F;
  --soft-ivory: #FFFFF0;
  --light-gunmetal: #5B676D;

  /* Semantic */
  --positive: #6FAF8A;
  --positive-bg: #26352F;

  --attention: #D4A35F;
  --attention-bg: #3A3225;

  --destructive: #D47777;
  --destructive-bg: #39292B;

  /* Structure */
  --border-soft: rgba(255, 255, 240, 0.09);
  --border-champagne: rgba(184, 135, 79, 0.58);

  --card-radius: 16px;
  --button-radius: 12px;
  --utility-radius: 10px;

  --page-width: 480px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--gunmetal);
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--gunmetal);
  color: var(--soft-ivory);

  font-family:
    Montserrat,
    "Segoe UI",
    Arial,
    sans-serif;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   APP SHELL
   ========================================================= */

.app-shell {
  width: 100%;
  max-width: var(--page-width);
  min-height: 100svh;
  margin: 0 auto;

  background: var(--gunmetal);

  position: relative;
  overflow-x: hidden;
}


/* =========================================================
   HEADER
   ========================================================= */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 78px;
  padding:
    max(18px, env(safe-area-inset-top))
    20px
    14px;

  border-bottom: 1px solid var(--border-soft);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;

  min-width: 0;
}

.brand-logo {
  width: 136px;
  height: auto;

  display: block;
  flex: 0 0 auto;
}

.portal-identity {
  min-width: 0;

  padding-left: 12px;

  border-left: 1px solid var(--border-champagne);
}

.brand-title {
  color: var(--soft-ivory);

  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.10em;

  white-space: nowrap;
}

.brand-tagline {
  margin-top: 3px;

  color: var(--champagne);

  font-size: 11px;
  font-weight: 500;
}

.header-action {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  flex: 0 0 auto;

  border: 1px solid var(--light-gunmetal);
  border-radius: 10px;

  background: var(--gunmetal-raised);
  color: var(--soft-ivory);

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;

  transition:
    border-color 140ms ease,
    color 140ms ease,
    background 140ms ease;
}

.header-action:hover {
  border-color: var(--champagne);
  color: var(--champagne);
}


/* =========================================================
   PAGE
   ========================================================= */

.page {
  padding:
    24px
    18px
    calc(36px + env(safe-area-inset-bottom));
}

/* =========================================================
   LOGIN
   ========================================================= */

.login-screen {
  min-height: 100svh;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding:
    max(28px, env(safe-area-inset-top))
    22px
    max(28px, env(safe-area-inset-bottom));

  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(255, 255, 240, 0.05) 0%,
      rgba(255, 255, 240, 0.025) 18%,
      rgba(255, 255, 240, 0.01) 30%,
      transparent 48%
    ),
    linear-gradient(
      180deg,
      #1B2328 0%,
      #182126 38%,
      #141C20 68%,
      #10171B 100%
    );
}

.login-screen[hidden] {
  display: none;
}

.app-header[hidden],
.page[hidden] {
  display: none;
}

.login-brand {
  margin-bottom: 30px;

  text-align: center;
}

.login-logo {
  width: 170px;
  height: auto;

  display: block;

  margin: 0 auto 22px;
}

.login-portal-name {
  color: var(--soft-ivory);

  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.login-portal-name span {
  color: var(--champagne);
}

.login-tagline {
  margin-top: 5px;

  color: var(--light-gunmetal);

  font-size: 11px;
  font-weight: 500;
}

.login-form {
  width: 100%;
  max-width: 380px;

  display: grid;
  gap: 14px;

  margin: 0 auto;
}

.login-field {
  display: grid;
  gap: 7px;
}

.login-field label {
  color: var(--champagne);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-field input {
  width: 100%;
  min-height: 50px;

  padding: 12px 14px;

  border: 1px solid rgba(184, 135, 79, 0.42);
  border-radius: 10px;

  background: #11181B;
  color: var(--soft-ivory);

  font-size: 15px;

  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.login-field input:focus {
  outline: none;

  border-color: var(--champagne);
  background: #141C20;
}

.login-button {
  min-height: 50px;

  margin-top: 6px;

  border: 1px solid var(--positive);
  border-radius: var(--button-radius);

  background: var(--positive-bg);
  color: var(--soft-ivory);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  cursor: pointer;
}

.login-message {
  min-height: 18px;

  margin: 0;

  color: var(--attention);

  text-align: center;

  font-size: 11px;
}

/* =========================================================
   WELCOME
   ========================================================= */
.portal-heading {
  margin-bottom: 20px;
  padding-bottom: 14px;

  border-bottom: 1px solid var(--border-soft);
}

.portal-title {
  color: var(--soft-ivory);

  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.portal-tagline {
  margin-top: 4px;

  color: var(--champagne);

  font-size: 11px;
  font-weight: 500;
}
.welcome {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;

  color: var(--champagne);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.welcome h1 {
  margin: 0;

  color: var(--soft-ivory);

  font-size: clamp(28px, 8vw, 34px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.welcome-copy {
  margin: 7px 0 0;

  color: #C5C9C6;

  font-size: 14px;
  line-height: 1.45;
}


/* =========================================================
   NEXT UP / ATTENTION CARD
   ========================================================= */

.attention-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  margin-bottom: 26px;
  padding: 14px 16px;

  border: 1px solid var(--border-champagne);
  border-radius: var(--card-radius);

  background: var(--gunmetal-soft);
}

.attention-card > div {
  display: flex;
  flex-direction: column;
  gap: 4px;

  min-width: 0;
}

.attention-label {
  color: var(--champagne);

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.attention-card strong {
  color: var(--soft-ivory);

  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
}

.attention-card div > span:last-child {
  color: #AEB5B1;

  font-size: 11px;
}


/* =========================================================
   GENERAL SECTION HEADINGS
   ========================================================= */

.services-section,
.players-section {
  margin-top: 26px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 12px;
  padding-bottom: 8px;

  border-bottom: 1px solid var(--border-soft);
}

.section-heading h2 {
  margin: 0;

  color: var(--soft-ivory);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.text-action {
  min-height: 36px;

  padding: 7px 10px;

  border: 0;
  border-radius: var(--utility-radius);

  background: transparent;
  color: var(--champagne);

  font-size: 11px;
  font-weight: 600;

  cursor: pointer;
}


/* =========================================================
   SERVICE CARDS
   ========================================================= */

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.service-card {
  width: 100%;
  min-height: 96px;

  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;

  gap: 5px 11px;

  padding: 14px;

  text-align: left;

  border: 1px solid var(--border-champagne);
  border-radius: var(--card-radius);

  background: var(--gunmetal-soft);
  color: var(--soft-ivory);

  cursor: pointer;

  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 100ms ease;
}

.service-card:hover {
  border-color: var(--champagne);
}

a.service-card {
  text-decoration: none;
}

.organisation-services + .organisation-services {
  margin-top: 22px;
}

.organisation-name {
  margin: 0 0 10px;
  color: var(--soft-ivory);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0 18px 24px;
}

.access-link {
  display: block;
  text-align: center;
}

.welcome h1, .detail-card strong, .login-message {
  overflow-wrap: anywhere;
}

.service-card:active {
  transform: scale(0.992);
}

.service-icon {
  grid-row: 1 / span 2;

  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border-champagne);
  border-radius: 11px;

  color: var(--champagne);
  background: var(--gunmetal);

  font-size: 13px;
  font-weight: 700;
}

.service-monogram {
  width: 24px;
  height: 24px;

  display: block;

  object-fit: contain;
}

.service-copy {
  min-width: 0;
}

.service-copy strong {
  display: block;

  color: var(--soft-ivory);

  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
}

.service-copy span {
  display: block;

  margin-top: 4px;

  color: #ABB2AE;

  font-size: 10px;
  line-height: 1.4;
}

.service-status {
  align-self: end;

  color: var(--champagne);

  font-size: 10px;
  font-weight: 600;
}

.service-status.positive {
  color: var(--positive);
}

.service-status.attention {
  color: var(--attention);
}


/* =========================================================
   PLAYERS
   ========================================================= */

.player-list {
  display: grid;
  gap: 8px;
}

.player-row {
  width: 100%;
  min-height: 68px;

  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;

  gap: 11px;

  padding: 10px 12px;

  text-align: left;

  border: 1px solid var(--border-champagne);
  border-radius: 12px;

  background: var(--gunmetal-soft);
  color: var(--soft-ivory);

  cursor: pointer;

  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.player-row:hover {
  border-color: var(--light-gunmetal);
}

.player-avatar {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border-champagne);
  border-radius: 50%;

  background: var(--gunmetal);
  color: var(--champagne);

  font-size: 12px;
  font-weight: 700;
}

.player-details {
  min-width: 0;
}

.player-details strong {
  display: block;

  color: var(--soft-ivory);

  font-size: 13px;
  font-weight: 600;
}

.player-details span {
  display: block;

  margin-top: 3px;

  color: #AAB1AD;

  font-size: 10px;
}

.chevron {
  color: var(--light-gunmetal);

  font-size: 22px;
  line-height: 1;
}


/* =========================================================
   DETAIL SCREEN
   ========================================================= */

.screen-overlay {
  position: absolute;
  inset: 0;

  z-index: 50;

  min-height: 100%;

  background: var(--gunmetal);
}

.screen-overlay[hidden] {
  display: none;
}

.detail-screen {
  min-height: 100svh;
}

.screen-overlay {
  scrollbar-width: thin;
  scrollbar-color: var(--light-gunmetal) transparent;
}

.screen-overlay::-webkit-scrollbar {
  width: 6px;
}

.screen-overlay::-webkit-scrollbar-track {
  background: transparent;
}

.screen-overlay::-webkit-scrollbar-thumb {
  background: var(--light-gunmetal);
  border-radius: 999px;
}

.screen-overlay::-webkit-scrollbar-thumb:hover {
  background: var(--champagne);
}

.detail-header {
  min-height: 72px;

  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;

  padding:
    max(14px, env(safe-area-inset-top))
    14px
    10px;

  border-bottom: 1px solid var(--border-soft);
}

.detail-header h2 {
  margin: 0;

  text-align: center;

  color: var(--soft-ivory);

  font-size: 15px;
  font-weight: 600;
}

.detail-monogram {
  width: 28px;
  height: 28px;

  justify-self: end;

  display: block;

  object-fit: contain;
}

.back-button {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid var(--light-gunmetal);
  border-radius: var(--button-radius);

  background: var(--gunmetal-raised);
  color: var(--soft-ivory);

  font-size: 20px;

  cursor: pointer;

  transition:
    border-color 140ms ease,
    color 140ms ease;
}

.back-button:hover {
  border-color: var(--champagne);
  color: var(--champagne);
}

.detail-content {
  padding:
    22px
    18px
    calc(32px + env(safe-area-inset-bottom));
}

.detail-card {
  display: flex;
  flex-direction: column;
  gap: 5px;

  margin-bottom: 10px;
  padding: 16px;

  border: 1px solid var(--light-gunmetal);
  border-radius: var(--card-radius);

  background: var(--gunmetal-soft);
}

.detail-card:last-child {
  margin-bottom: 0;
}
.detail-card-button {
  width: 100%;

  text-align: left;

  color: var(--soft-ivory);

  cursor: pointer;

  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 100ms ease;
}

.detail-card-button:hover {
  border-color: var(--champagne);
}

.detail-card-button:active {
  transform: scale(0.995);
}
.detail-card strong {
  color: var(--soft-ivory);

  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.detail-card span:last-child {
  color: #AEB5B1;

  font-size: 11px;
  line-height: 1.45;
}

.detail-label {
  color: var(--champagne);

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

/* =========================================================
   FOCUS / ACCESSIBILITY
   ========================================================= */

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--champagne);
  outline-offset: 3px;
}


/* =========================================================
   SMALL MOBILE BRAND SAFEGUARD
   ========================================================= */

@media (max-width: 699px) {

  .service-copy span {
    display: none;
  }

  .service-card {
    min-height: 112px;
  }
}


@media (max-width: 389px) {

  .brand-logo {
    width: 118px;
  }

  .portal-identity {
    padding-left: 9px;
  }

  .brand-title {
    font-size: 12px;
    letter-spacing: 0.07em;
  }

  .brand-tagline {
    font-size: 9px;
  }
}


/* =========================================================
   MOBILE COMPACT GRID
   ========================================================= */

@media (min-width: 390px) {

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card {
    min-height: 108px;

    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;

    gap: 6px 9px;

    padding: 13px;
  }

  .service-icon {
    grid-row: auto;

    width: 34px;
    height: 34px;
  }

  .service-copy {
    align-self: center;
  }

  .service-copy span {
    margin-top: 5px;
  }

  .service-status {
    grid-column: 1 / -1;

    padding-top: 7px;

    border-top: 1px solid var(--border-soft);
  }
}


/* =========================================================
   DESKTOP / LARGE SCREEN
   ========================================================= */

@media (min-width: 700px) {

  body {
    padding: 30px 24px 48px;
  }

  .app-shell {
    max-width: 860px;
    min-height: auto;

    border: 0;
    border-radius: 0;

    background: transparent;
  }

  .login-screen {
    width: 100%;
    max-width: 420px;
    min-height: calc(100svh - 60px);

    margin: 0 auto;
    padding: 40px 12px;

    background: transparent;
  }

  .login-brand {
    margin-bottom: 34px;
  }

  .login-logo {
    width: 190px;

    margin-bottom: 24px;
  }

  .login-form {
    max-width: 100%;
  }

  .app-header {
    padding: 0 0 18px;

    border-bottom: 1px solid var(--border-champagne);
  }

  .brand-logo {
    width: 180px;
  }

  .page {
    padding: 26px 0 0;
  }

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-card {
    min-height: 132px;
  }
}
