/*
 * OnlyBulls / BMAX UI tokens + utilities (loaded after styles.css)
 *
 * Theme palette (from BMAX_OB_html design):
 *   --bg        #222223  page background
 *   --green     #39B550  primary brand green (CTAs, links, focus)
 *   --inchworm  #C2EA62  accent / highlight
 *   --white     #FFFFFF  primary text on dark bg
 *   --stone     #707372  muted text / icon labels
 *   font: Inter, system fallbacks
 */
:root {
  --bg:        #222223;
  --bg-elev:   #2c2c2e;
  --green:     #39B550;
  --green-hi:  #2ea344;
  --green-lo:  #257f37;
  --inchworm:  #C2EA62;
  --white:     #FFFFFF;
  --stone:     #707372;
  --stone-soft:#9a9c9b;

  --bmax-page-bg:   var(--bg);
  --bmax-text:      var(--white);
  --bmax-muted:     var(--stone);
  --bmax-white:     var(--white);
  --bmax-error-bg:  rgba(255, 99, 99, 0.12);
  --bmax-error-text:#ffb3b3;

  --bmax-radius-card:  12px;
  --bmax-radius-input: 10px;
  --bmax-radius-pill:  999px;

  --bmax-shadow-card: 0 8px 30px rgba(0, 0, 0, 0.45);
  --bmax-shadow-lift: 0 12px 28px rgba(0, 0, 0, 0.5);

  --bmax-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --bmax-title-page:    clamp(1.35rem, 2.5vw, 1.6rem);
  --bmax-title-section: 1.1rem;
  --bmax-body:          0.95rem;
  --bmax-caption:       0.8rem;

  --bmax-focus-ring: 0 0 0 3px rgba(57, 181, 80, 0.45);

  /* legacy aliases used by older templates */
  --bmax-navy:      var(--green);
  --bmax-navy-deep: var(--inchworm);
}

/* ---------- Brand accent bar ---------- */
.ob-accent-bar {
  width: 52px;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--inchworm));
  border-radius: 2px;
  margin: 0 auto 28px;
}

/* ---------- Public header ---------- */
.ob-header {
  padding: 36px 48px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ob-header__logo {
  height: 36px;
  width: auto;
}

.ob-footer {
  padding: 24px 24px 32px;
  text-align: center;
  color: var(--stone);
  font-size: 12px;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .ob-header { padding: 24px 20px; }
  .ob-header__logo { height: 28px; }
}

/* ---------- Staff shell ---------- */
body.staff-shell {
  margin: 0;
  min-height: 100vh;
  font-family: var(--bmax-font);
  font-size: var(--bmax-body);
  color: var(--white);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(57, 181, 80, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 0% 100%, rgba(194, 234, 98, 0.06) 0%, transparent 50%);
}

.staff-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 56px;
  padding: 0 1.25rem;
  background: rgba(34, 34, 35, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

@supports not (backdrop-filter: blur(10px)) {
  .staff-topbar { background: var(--bg-elev); }
}

.staff-topbar__brand {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: var(--bmax-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}

.staff-topbar__brand img {
  height: 22px;
  width: auto;
  display: block;
}

.staff-topbar__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.05rem;
  font: inherit;
  font-size: var(--bmax-caption);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--bmax-radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.staff-topbar__logout:hover {
  background: rgba(57, 181, 80, 0.12);
  border-color: var(--green);
  color: var(--white);
}

.staff-main {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.75rem;
}

.staff-page-title {
  margin: 0 0 0.25rem;
  font-size: var(--bmax-title-page);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

.staff-page-lead {
  margin: 0 0 1.25rem;
  font-size: var(--bmax-caption);
  color: var(--stone-soft);
}

/* ---------- Toolbar ---------- */
.staff-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.staff-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* ---------- Buttons ---------- */
.bmax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  font: inherit;
  font-family: var(--bmax-font);
  font-size: var(--bmax-body);
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--bmax-radius-pill);
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease,
    transform 0.12s ease, box-shadow 0.18s ease, color 0.15s ease;
}

.bmax-btn--primary {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.bmax-btn--primary:hover {
  background: var(--green-hi);
  border-color: var(--green-hi);
}

.bmax-btn--primary:active { transform: scale(0.98); }

.bmax-btn--outline {
  color: var(--white);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.22);
}

.bmax-btn--outline:hover {
  background: rgba(57, 181, 80, 0.12);
  border-color: var(--green);
}

.bmax-btn--icon {
  padding: 0.55rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.bmax-btn--icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* ---------- Icon button (share/download tile) ---------- */
.bmax-icon-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-family: var(--bmax-font);
  color: inherit;
  text-decoration: none;
}

.bmax-icon-btn__hit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.bmax-icon-btn__hit img,
.bmax-icon-btn__hit svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.bmax-icon-btn__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--stone);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bmax-icon-btn:hover .bmax-icon-btn__hit {
  background: rgba(57, 181, 80, 0.15);
  border-color: var(--green);
  transform: translateY(-3px);
}

.bmax-icon-btn:hover .bmax-icon-btn__label { color: var(--white); }

.bmax-icon-btn:focus-visible { outline: none; }
.bmax-icon-btn:focus-visible .bmax-icon-btn__hit {
  box-shadow: 0 0 0 3px rgba(57, 181, 80, 0.45);
}

/* ---------- Table shell ---------- */
.staff-table-shell {
  background: var(--bg-elev);
  border-radius: var(--bmax-radius-card);
  box-shadow: var(--bmax-shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.staff-table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: min(70vh, 640px);
  -webkit-overflow-scrolling: touch;
}

.staff-table-scroll--metrics { max-height: min(65vh, 560px); }

.staff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  color: var(--white);
}

.staff-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.85rem 1rem;
  text-align: center;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--inchworm);
  background: linear-gradient(180deg, #2a2a2c 0%, #232325 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  font-size: var(--bmax-caption);
}

.staff-table tbody td {
  padding: 0.75rem 1rem;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: var(--white);
}

.staff-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.staff-table tbody tr:hover td           { background: rgba(57, 181, 80, 0.08); }

.staff-table tbody tr:hover td.staff-table__sticky { background: #2a3a2c; }

.staff-table__sticky {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left !important;
  background: var(--bg-elev);
  box-shadow: 4px 0 12px -6px rgba(0, 0, 0, 0.5);
}

.staff-table thead th.staff-table__sticky {
  z-index: 4;
  background: linear-gradient(180deg, #2a2a2c 0%, #232325 100%);
}

.staff-table__link {
  color: var(--inchworm);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.staff-table__link:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

.staff-table tfoot td,
.staff-table tfoot th {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 0.9rem 1rem;
  text-align: center;
  white-space: nowrap;
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(180deg, #2a2a2c 0%, #1f1f21 100%);
  border-top: 2px solid rgba(57, 181, 80, 0.25);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
}

.staff-table .bmax-btn {
  padding: 0.4rem 0.9rem;
  font-size: var(--bmax-caption);
}

/* ---------- Pagination ---------- */
.staff-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  padding: 1rem 1.25rem;
  font-size: var(--bmax-caption);
  color: var(--stone-soft);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.staff-pagination a {
  color: var(--inchworm);
  font-weight: 700;
  text-decoration: none;
}

.staff-pagination a:hover {
  color: var(--green);
  text-decoration: underline;
}

.staff-scroll-hint {
  display: none;
  font-size: var(--bmax-caption);
  color: var(--stone-soft);
  margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
  .staff-scroll-hint { display: block; }
}

/* ---------- Focus ring ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.bmax-icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--bmax-focus-ring);
}

.bmax-btn:focus-visible {
  outline: none;
  box-shadow: var(--bmax-focus-ring), 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .bmax-btn,
  .bmax-icon-btn__hit,
  .staff-topbar__logout {
    transition: none;
  }
  .bmax-icon-btn:hover .bmax-icon-btn__hit { transform: none; }
}

/* ---------- Public home / card ---------- */
body.bmax-home {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  font-family: var(--bmax-font);
  color: var(--white);
  background-color: var(--bg);
}

.bmax-home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
  text-align: center;
}

.bmax-home h1 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.bmax-home h1 em {
  font-style: normal;
  color: var(--green);
}

.bmax-home .sub {
  font-size: clamp(15px, 2.5vw, 19px);
  font-weight: 400;
  color: var(--stone);
  max-width: 440px;
  line-height: 1.6;
  margin: 0 auto 40px;
}

.bmax-home-form {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.bmax-home-field {
  position: relative;
  margin-bottom: 12px;
  text-align: left;
}

.bmax-home-form label {
  display: block;
  font-size: var(--bmax-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone-soft);
  margin: 0 0 8px;
}

.bmax-home-form input[type="email"],
.bmax-home-form input[type="text"],
.bmax-home-form input[type="password"] {
  width: 100%;
  padding: 17px 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--bmax-radius-input);
  color: var(--white);
  font-family: var(--bmax-font);
  font-size: 16px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.bmax-home-form input::placeholder { color: var(--stone); }

.bmax-home-form input:focus {
  border-color: var(--green);
  background: rgba(255, 255, 255, 0.07);
}

.bmax-home-form button[type="submit"] {
  width: 100%;
  margin-top: 4px;
  padding: 17px 22px;
  background: var(--green);
  border: none;
  border-radius: var(--bmax-radius-input);
  color: var(--white);
  font-family: var(--bmax-font);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.bmax-home-form button[type="submit"]:hover { background: var(--green-hi); }
.bmax-home-form button[type="submit"]:active { transform: scale(0.98); }

.bmax-home-messages {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  text-align: left;
}

.bmax-home-messages li {
  padding: 0.65rem 0.85rem;
  border-radius: var(--bmax-radius-input);
  font-size: var(--bmax-body);
  background: var(--bmax-error-bg);
  color: var(--bmax-error-text);
  border: 1px solid rgba(255, 99, 99, 0.25);
}

.bmax-home-footer {
  padding: 24px 24px 32px;
  text-align: center;
  color: var(--stone);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.bmax-home-footer a {
  color: var(--stone-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.bmax-home-footer a:hover {
  color: var(--inchworm);
  border-bottom-color: rgba(194, 234, 98, 0.45);
}

/* ---------- Staff login (uses same card on dark bg) ---------- */
body.bmax-staff-login {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  font-family: var(--bmax-font);
  color: var(--white);
  background-color: var(--bg);
}

.bmax-staff-login main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.bmax-staff-login .ob-accent-bar { margin-bottom: 24px; }

.bmax-staff-login h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.bmax-staff-login .sub {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--stone);
  max-width: 380px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

.bmax-staff-login .back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: var(--bmax-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--stone-soft);
  text-decoration: none;
}

.bmax-staff-login .back-link:hover {
  color: var(--inchworm);
  text-decoration: underline;
}
