/* Traccar 6.16 web styles.css, plus the Al-Misbaah brand (website values 2026-09-30, www.al-misbaah.org is the brand source;
   docs/brand/al-misbaah-tokens.css): Geist body and headings (headings 500, tight tracking), Epilogue 600 on contained buttons,
   all self hosted from web.override /fonts (no Google Fonts), ground #F7F6F0 behind the sign in card in the light scheme.
   Map, drawers and the dark scheme are untouched. Served from web.override. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: block; src: url('/fonts/Geist-normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: block; src: url('/fonts/Geist-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Epilogue'; font-style: normal; font-weight: 100 900; font-display: block; src: url('/fonts/Epilogue-variable.woff2') format('woff2'); }

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Geist', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  body {
    background: black;
  }
}

.root {
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media print {
  * {
    height: auto !important;
    overflow: visible !important;
  }
}

/* Al-Misbaah brand type */
.MuiTypography-root, .MuiButtonBase-root, .MuiInputBase-root, .MuiFormLabel-root,
.MuiInputLabel-root, .MuiMenuItem-root, .MuiListItemText-primary, .MuiListItemText-secondary,
.MuiTableCell-root, .MuiChip-label, .MuiTab-root, .MuiAlert-message, .MuiSnackbarContent-message,
.maplibregl-popup-content {
  font-family: 'Geist', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}
.MuiTypography-h1, .MuiTypography-h2, .MuiTypography-h3, .MuiTypography-h4, .MuiTypography-h5,
.MuiTypography-h6, .MuiDialogTitle-root {
  font-family: 'Geist', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em;
}
/* contained (main) buttons square in Epilogue 600, as DONATE NOW on the website */
.MuiButton-contained {
  font-family: 'Epilogue', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
  font-weight: 600 !important;
  border-radius: 0 !important;
}

/* html body outranks the app's own baseline body rule (Roboto, #fafafa) */
html body { font-family: 'Geist', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; }
/* light scheme: the website ground behind the pages (the map covers it where there is one) */
@media (prefers-color-scheme: light) {
  html body { background: #F7F6F0; }
}

/* ---- Sign in page (CEO 2026-09-30, before the Monday launch) ----
   am-signin.js (appended to the sign in page module in override/assets by rebuild-signin-override.sh) marks the parts with data-am attributes, renames the main button to
   "Sign in with Al-Misbaah", and folds the email and password form behind a text link. Nothing here leans on the app's
   hashed class names. The orange button and the layout apply in both schemes; the ground and the white card only in light. */
:root { --am-signin: 1; }  /* am-signin.js checks this, so a stale copy of this sheet never meets the new script */

[data-am="box"] > img { order: -3; }
button[data-am="sso"] {
  order: -2;
  background-color: #E9582E !important;
  color: #ffffff !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: 'Epilogue', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
  font-weight: 600 !important;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: uppercase;
  min-height: 48px;
  padding: 12px 16px;
}
button[data-am="sso"]:hover, button[data-am="sso"]:active { background-color: #B83F1B !important; }
button[data-am="sso"]:focus-visible { box-shadow: 0 0 0 3px rgba(233,88,46,.35) !important; }
button[data-am="pw-toggle"] {
  order: -1;
  align-self: center;
  -webkit-appearance: none; appearance: none;
  background: none; border: 0; margin: 0; padding: 10px 6px; min-height: 44px;
  font-family: 'Geist', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; font-weight: 400; line-height: 1.4;
  color: inherit;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button[data-am="pw-toggle"]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(233,88,46,.35); }
/* folded: only the logo, the main button and the link show */
html[data-am-signin]:not([data-am-pw="open"]) [data-am="box"] > :not(img):not([data-am="sso"]):not([data-am="pw-toggle"]) { display: none !important; }

@media (prefers-color-scheme: light) {
  /* the sign in layout is the only <main> in the app: website ground, form on a white card */
  main > .MuiPaper-root { background-color: #F7F6F0 !important; }
  main > .MuiPaper-root > form { background-color: #ffffff; border: 1px solid #E0DED8; border-radius: 12px; }
  button[data-am="pw-toggle"] { color: #B83F1B; }
  /* the email and password button is the second choice: an outline, never a grey slab */
  button[data-am="pw-submit"], button[data-am="pw-submit"].Mui-disabled {
    background-color: transparent !important;
    color: #0D0901 !important;
    border: 1px solid #0D0901;
    box-shadow: none !important;
  }
  button[data-am="pw-submit"].Mui-disabled { color: #4F4D4B !important; border-color: #BBBAB8; }
  button[data-am="pw-submit"]:not(.Mui-disabled):hover { background-color: #EEECE6 !important; }
}
@media (max-width: 599.95px) {
  main > .MuiPaper-root > form { width: calc(100% - 32px); padding: 32px 24px; }
}
