/* Sports Boulevard login — values from Figma (file FRFVlb1uGmJnMRdfu8tirr, frames 1:288–1:723). */

@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url(../fonts/figtree-latin-400.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url(../fonts/figtree-latin-600.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url(../fonts/figtree-latin-700.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 800; font-display: swap; src: url(../fonts/figtree-latin-800.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-700.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-sans-arabic-400.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url(../fonts/ibm-plex-sans-arabic-700.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
/* Figtree has no Arabic glyphs; heavier weights fall back to Plex Arabic bold. */
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600 800; font-display: swap; src: url(../fonts/ibm-plex-sans-arabic-700.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --sbf-primary: #104631;
  --sbf-ink: #384250;
  --sbf-label: #222;
  --sbf-muted: #6d675f;
  --sbf-placeholder: #928b83;
  --sbf-link: #00779b;
  --sbf-line: #e4dfda;
  --sbf-field-bg: #f6f4f2;
  --sbf-tab: #efece9;
  --sbf-close-bg: #f3f4f6;
  --sbf-track: #d2d6db;
  --sbf-danger: #b42318;
  --sbf-field-error: #992e13;
  --sbf-focus-ring: #e8f8fd;
  --sbf-warning-bg: #fffcf5;
  --sbf-warning-line: #e7944c;
  --sbf-success-bg: #f6fef9;
  --sbf-success-line: #4fb486;

  --sbf-font-display: "Figtree", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --sbf-font-text: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --sbf-gutter: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.sbf { margin: 0; background: #fff; color: var(--sbf-ink); font-family: var(--sbf-font-text); font-size: 14px; }
.sbf a { color: var(--sbf-link); text-decoration: none; }
.sbf p { margin: 0; }
.sbf-screen { max-width: 430px; min-height: 100vh; margin: 0 auto; padding-bottom: 32px; }

/* Top bars */
.sbf-tabs { display: flex; align-items: center; gap: 8px; padding: 16px 16px 0; }
.sbf-tab {
  flex: 1 1 0; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--sbf-tab); color: var(--sbf-muted) !important;
  font: 700 14px var(--sbf-font-display);
}
.sbf-tab.is-active { background: var(--sbf-primary); color: #fff !important; }
.sbf-close {
  flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; background: var(--sbf-close-bg);
}
.sbf-close img { width: 15.5px; height: 15.5px; }
.sbf-tabs--register .sbf-close { width: 36px; height: 36px; background: var(--sbf-tab); }
.sbf-tabs--register .sbf-close img { width: 15px; height: 15px; }
.sbf-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 15px 0 31px; min-height: 56px; }
.sbf-bar .sbf-close { margin-inline-start: auto; }
.sbf-back { display: flex; width: 19px; height: 12px; }
.sbf-back img { width: 19px; height: 12px; transform: rotate(180deg); }
[dir="rtl"] .sbf-back img { transform: none; }
[dir="rtl"] .sbf-bar { padding: 16px 31px 0 15px; }

/* Photo header */
.sbf-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: stretch;
  height: 234px; margin-top: 16px; padding: 24px 20px 22px; gap: 30px; background: var(--sbf-primary); color: #fff;
}
.sbf-hero--register { height: 228px; margin-top: 24px; gap: 12px; }
.sbf-hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Figma crops the register photo this way (frame 1:455). */
.sbf-hero--register .sbf-hero__photo { left: -249.99%; top: -38.27%; width: 597.11%; height: 158.26%; max-width: none; object-fit: fill; }
.sbf-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(255,255,255,0) 0%, rgba(0,0,0,.69) 84.686%); }
[dir="rtl"] .sbf-hero::after { background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(0,0,0,.69) 84.686%); }
.sbf-hero__logo, .sbf-hero__title { position: relative; z-index: 1; }
.sbf-hero__logo { align-self: center; width: 100px; height: 27px; }
.sbf-hero--register .sbf-hero__logo { margin: 9px 0; }
.sbf-hero__title { margin: 0; font: 600 22px/27.5px var(--sbf-font-display); }
.sbf-hero--register .sbf-hero__title { padding: 9px 0; }
.sbf-hero__title span { display: block; font-weight: 800; text-decoration: underline; text-decoration-skip-ink: auto; }

/* Content */
.sbf-main { padding: 0 var(--sbf-gutter); }
.sbf-main--hero { padding-top: 34px; }
.sbf-title { margin: 34px 0 6px; font: 700 26px/29.9px var(--sbf-font-display); color: var(--sbf-ink); }
.sbf-lead { color: var(--sbf-muted); font-size: 14px; line-height: 21px; }
.sbf-lead strong { color: var(--sbf-ink); }
.sbf-lead + .sbf-lead { margin-top: 21px; }
.sbf-invisible { visibility: hidden; }

.sbf-form { display: flex; flex-direction: column; gap: 14px; }
.sbf-form--register { gap: 16px; }
.sbf-field { display: flex; flex-direction: column; gap: 8px; }
.sbf-label { font: 600 13px var(--sbf-font-display); color: var(--sbf-label); }
.sbf-label--muted { font-size: 12.5px; line-height: 20px; color: var(--sbf-muted); }
.sbf-input {
  width: 100%; height: 52px; padding: 0 18px; border: 1px solid var(--sbf-ink); border-radius: 12px;
  background: #fff; color: var(--sbf-ink); font: 400 15px var(--sbf-font-display); outline: none;
}
.sbf-input::placeholder { color: var(--sbf-placeholder); opacity: 1; }
.sbf-input--filled { background: var(--sbf-field-bg); border-color: var(--sbf-line); }
.sbf-input:focus { border-color: var(--sbf-primary); box-shadow: 0 0 0 4px var(--sbf-focus-ring); }
.sbf-input.is-invalid { border-color: var(--sbf-field-error); }
.sbf-field__error { margin-top: -4px !important; color: var(--sbf-field-error); font-size: 12px; line-height: 19.2px; }

.sbf-phone { display: flex; gap: 5px; }
.sbf-phone__prefix {
  flex: none; width: 107px; height: 48px; display: flex; align-items: center; padding: 0 12px;
  border: 1px solid var(--sbf-ink); border-radius: 12px; font: 400 15px/24px var(--sbf-font-text); color: var(--sbf-ink);
}
.sbf-phone__number { height: 48px; padding: 0 14px; font-family: var(--sbf-font-text); }

.sbf-check { display: flex; align-items: flex-start; gap: 14px; margin-top: 8px; cursor: pointer; }
.sbf-check input { position: absolute; opacity: 0; pointer-events: none; }
.sbf-check__box {
  flex: none; width: 18px; height: 18px; border: 1px solid var(--sbf-ink); border-radius: 5px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px;
}
.sbf-check input:checked + .sbf-check__box { background: var(--sbf-primary); border-color: var(--sbf-primary); }
.sbf-check input:checked + .sbf-check__box::after { content: "✓"; }
.sbf-check input:focus-visible + .sbf-check__box { box-shadow: 0 0 0 4px var(--sbf-focus-ring); }
.sbf-check__text { color: var(--sbf-muted); font-size: 12.5px; line-height: 18.13px; }
.sbf-check.is-invalid .sbf-check__box { border-color: var(--sbf-field-error); }
.sbf-check.is-invalid .sbf-check__text { color: var(--sbf-field-error); }

.sbf-button {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; margin: 0;
  border: 1px solid transparent; border-radius: 999px; background: var(--sbf-primary); color: #fff !important;
  font: 600 15px/24px var(--sbf-font-display); cursor: pointer;
}
.sbf-button:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--sbf-focus-ring); }
.sbf-button--caps { text-transform: uppercase; margin-top: 10px; }
.sbf-button--outline { background: #fff; border-color: var(--sbf-primary); color: var(--sbf-primary) !important; }
.sbf-switch { margin-top: 16px !important; text-align: center; color: var(--sbf-muted); font: 400 13px var(--sbf-font-display); }
.sbf-switch a { font-weight: 700; }

/* Alerts */
.sbf-alert { margin: 0 0 16px; padding: 12px 14px; border: 1px solid; border-radius: 12px; font-size: 13px; line-height: 19.5px; }
.sbf-alert--error { background: #fff; border-color: var(--sbf-danger); color: var(--sbf-danger); }
.sbf-alert--warning { background: var(--sbf-warning-bg); border-color: var(--sbf-warning-line); color: var(--sbf-ink); }
.sbf-alert--success, .sbf-alert--info { background: var(--sbf-success-bg); border-color: var(--sbf-success-line); border-radius: 14px; color: var(--sbf-primary); text-align: center; }
.sbf-card-alert { margin-bottom: 18px; padding: 14px 16px 16px; border: 1px solid var(--sbf-danger); border-radius: 14px; color: var(--sbf-muted); font-size: 13px; line-height: 19.5px; }
.sbf-card-alert__title { margin-bottom: 12px !important; color: var(--sbf-danger); font: 700 14px/22.4px var(--sbf-font-display); }

/* Code entry */
.sbf-otp { margin-top: 28px; }
.sbf-otp__boxes { display: flex; justify-content: center; gap: 18.5px; }
.sbf-otp__box {
  width: 64.5px; height: 64px; padding: 0; border: 1px solid #fff; border-radius: 14px; background: #fff;
  text-align: center; font: 700 26px/41.6px var(--sbf-font-display); color: var(--sbf-ink); caret-color: var(--sbf-primary); outline: none;
}
.sbf-otp__box:focus { border-color: var(--sbf-primary); box-shadow: 0 0 0 4px var(--sbf-focus-ring); }
.sbf-otp__boxes.is-invalid .sbf-otp__box { border-color: var(--sbf-danger); color: var(--sbf-danger); caret-color: var(--sbf-danger); }
.sbf-otp__meta { margin-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sbf-otp--notice .sbf-otp__meta { margin-top: 12px; flex-direction: row; justify-content: space-between; align-items: center; padding: 0 0 0 8px; margin-bottom: 14px; }
.sbf-otp__expires { color: var(--sbf-muted); font-size: 13px; line-height: 20.8px; }
.sbf-otp__resend {
  padding: 0; border: 0; background: none; cursor: pointer; color: var(--sbf-link);
  font: 600 13px/20.8px var(--sbf-font-display);
}
.sbf-otp__resend:disabled { color: var(--sbf-track); cursor: default; }
.sbf-otp .sbf-button { margin-top: 36px; }
.sbf-otp--notice .sbf-button { margin-top: 22px; }

.sbf-progress { position: relative; height: 4px; margin-top: 18px; border-radius: 999px; background: var(--sbf-track); overflow: hidden; }
.sbf-progress__fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--sbf-primary); }
.sbf-progress--danger { margin: 18px 8px 0; }
.sbf-progress--danger .sbf-progress__fill { background: var(--sbf-danger); }

/* Too many attempts */
.sbf--centered .sbf-title { display: none; }
.sbf-locked { width: 294px; max-width: 100%; margin: 69px auto 0; text-align: center; }
.sbf-locked__icon {
  width: 66px; height: 66px; margin: 0 auto; border-radius: 33px; background: #fff;
  display: flex; align-items: center; justify-content: center; color: var(--sbf-danger); font-size: 28px;
}
.sbf-locked__title { margin: 15px 0 0; font: 700 22px/26.4px var(--sbf-font-display); color: var(--sbf-ink); }
.sbf-locked__text { margin-top: 12px !important; color: var(--sbf-muted); font-size: 14px; line-height: 21.7px; }
.sbf-locked__text strong { color: var(--sbf-ink); }
.sbf-locked .sbf-button { margin-top: 50px; }
.sbf-locked__retry { margin-top: 16px !important; font-size: 14px; }

/* Keycloak's generic pages (error, info, expired…) rendered with this layout */
.sbf-main .instruction { color: var(--sbf-muted); line-height: 21px; }
.sbf-main #kc-error-message a, .sbf-main #kc-info-message a { display: inline-block; margin-top: 16px; font-weight: 600; }
/* Emails and numbers are typed left-to-right; keep them on the reading side in Arabic. */
[dir="rtl"] .sbf-input[dir="ltr"] { text-align: right; }
[dir="rtl"] .sbf-phone { flex-direction: row-reverse; }

/* ---- Entra login web ---- */
/* Entra sends 8-digit codes: boxes shrink to fit the phone width. */
.sbf-otp__boxes { gap: clamp(6px, 2vw, 18.5px); }
.sbf-otp__box { flex: 0 1 64.5px; min-width: 0; }
.sbf-otp__boxes--8 .sbf-otp__box { height: 56px; border-radius: 12px; font-size: 24px; }
/* Empty boxes get a light outline (the design leaves them borderless; with 8 they would be invisible). */
.sbf-otp__boxes:not(.is-invalid) .sbf-otp__box:placeholder-shown:not(:focus) { border-color: var(--sbf-line); }
.sbf-button:disabled { opacity: .7; cursor: default; }
/* Browser test page (not shown inside the app) */
.sbf-claims { margin: 20px 0 24px; display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; font-size: 13px; }
.sbf-claims dt { color: var(--sbf-muted); }
.sbf-claims dd { margin: 0; color: var(--sbf-ink); word-break: break-all; }
