/*
 * Green Fleet Mobility theme for a GFM instance of the hub (HUB_THEME=gfm). Loaded after credixa.css and
 * redefines its palette variables with the GFM brand (green-fleet resources/brand/gfm/gfm-tokens.css).
 */
:root {
  --credixa-teal: #1f4d3a;
  --credixa-teal-dark: #163a2b;
  --credixa-cyan: #4f8a64;
  --credixa-blue: #2e6b4f;
  --credixa-mint: #e6cf8a;
  --credixa-gradient: linear-gradient(135deg, #163a2b 0%, #1f4d3a 55%, #4f8a64 100%);
  --credixa-soft: rgb(31 77 58 / 10%);
  --gfm-gold: #c9a24a;
}

/* The two places credixa.css names the teal directly. */
.navbar-horizontal.navbar-top.credixa-bar-white {
  border-bottom-color: rgb(31 77 58 / 15%) !important;
  box-shadow: 0 2px 10px rgb(31 77 58 / 8%);
}

.navbar-horizontal.navbar-top.credixa-bar-white .navbar-nav .nav-link,
.navbar-horizontal.navbar-top.credixa-bar-white .navbar-nav .nav-link span {
  color: #1f4d3a !important;
}

.credixa-soft-bg {
  background: linear-gradient(180deg, #f3f6f1 0%, #e8efe6 100%);
}

/* Gold accent: the partner cards' top rule and the sign-in band's call to action. */
.partner-card {
  border-top: 3px solid var(--gfm-gold) !important;
}

.header .btn-white.text-primary {
  color: #1f4d3a !important;
  border-bottom: 2px solid var(--gfm-gold);
}

.hub-hero {
  max-height: 120px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
}

/* Partners without a logo file get a lettered mark in the brand colours. */
.partner-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--credixa-gradient);
  color: var(--gfm-gold);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/*
 * custom.css names the Credixa teal directly, many times with !important. This file loads after it, so the
 * same selectors with !important take precedence. Green #1f4d3a, dark #163a2b, button green #4f8a64.
 */
:root {
  --blue: #1f4d3a !important;
  --primary: #1f4d3a !important;
}

a { color: #1f4d3a; }
a:hover { color: #163a2b; }

.bg-primary { background-color: #1f4d3a !important; }
.text-primary { color: #1f4d3a !important; }
.border-primary,
[class*='border-']:not(.border-primary):not(.border-secondary):not(.border-info):not(.border-success):not(.border-danger):not(.border-warning):not(.border-light):not(.border-dark):not(.border-white):not(.border-0):not(.border-top):not(.border-bottom):not(.border-left):not(.border-right) {
  border-color: #1f4d3a !important;
}
.bg-gradient-primary,
[class*='bg-gradient-']:not(.bg-gradient-primary):not(.bg-gradient-secondary):not(.bg-gradient-info):not(.bg-gradient-success):not(.bg-gradient-danger):not(.bg-gradient-warning):not(.bg-gradient-light):not(.bg-gradient-dark):not(.bg-gradient-white) {
  background: var(--credixa-gradient) !important;
}

.btn-primary,
.btn-default {
  background-color: #4f8a64 !important;
  border-color: #4f8a64 !important;
  box-shadow: 0 4px 10px rgb(31 77 58 / 25%);
}
.btn-primary:hover,
.btn-default:hover {
  background-color: #1f4d3a !important;
  border-color: #1f4d3a !important;
}
.btn-outline-primary {
  color: #1f4d3a !important;
  border-color: #1f4d3a !important;
}
.btn-outline-primary:hover { background-color: #1f4d3a !important; color: #fff !important; }

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before,
.custom-radio .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #4f8a64 !important;
  border-color: #4f8a64 !important;
}
.progress-bar { background-color: #4f8a64; }
.page-item.active .page-link { background-color: #1f4d3a !important; border-color: #1f4d3a !important; }

.main-content .navbar-top { border-bottom-color: #1f4d3a; }
.navbar-dark .navbar-nav .nav-link { color: #1f4d3a; }
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus { color: #4f8a64; }
/* custom.css colours the collapsed (phone) menu inside the same breakpoint; outside it these stay transparent. */
@media (max-width: 768px) {
  .navbar-horizontal.navbar-dark,
  .navbar-collapse,
  .navbar-collapse-header { background-color: #1f4d3a; }
  .navbar-dark .navbar-toggler { color: #1f4d3a; border-color: #1f4d3a; }
}

/* Guest top bar on the landing page (credixa-bar-teal): the green gradient instead of teal-to-cyan. */
.navbar-horizontal.navbar-top.credixa-bar-teal {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 6%) 0%, rgb(255 255 255 / 0%) 50%),
    linear-gradient(135deg, rgb(22 58 43 / 97%) 0%, rgb(31 77 58 / 95%) 55%, rgb(79 138 100 / 92%) 100%) !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 8px 24px rgb(22 58 43 / 25%);
}
.navbar-top .navbar-brand img { max-height: 56px; }

/* Partners heading in the brand ink rather than Argon's indigo. */
.credixa-soft-bg h2 { color: #1d2b24; }

/* Compact, full-viewport GFM sign-in shared with the Control Centre. */
.gfm-login-page {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 32%, rgb(201 162 74 / 16%), transparent 28%),
    linear-gradient(135deg, #103324 0%, #1f4d3a 58%, #386e50 100%) !important;
}

.gfm-login-page .main-content {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100vh;
  padding-top: 72px !important;
}

.gfm-login-page .navbar-top {
  min-height: 72px;
}

.gfm-login-page .navbar-top .navbar-brand img {
  width: 54px;
  height: 48px;
  max-height: 48px;
  object-fit: contain;
}

.gfm-auth-shell {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(470px, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  width: min(1160px, calc(100% - 48px));
  min-height: 0;
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 2.25rem) 0;
}

.gfm-auth-story {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex-direction: column;
  color: #fff;
  text-align: center;
}

.gfm-auth-emblem {
  width: min(100%, 420px);
  max-height: min(43vh, 365px);
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgb(0 0 0 / 28%));
}

.gfm-auth-copy {
  max-width: 520px;
}

.gfm-auth-copy p,
.gfm-auth-copy h1,
.gfm-auth-copy span {
  margin: 0;
}

.gfm-auth-copy p {
  color: #f2d983;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.gfm-auth-copy h1 {
  margin: .2rem 0 .35rem;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.gfm-auth-copy span {
  display: block;
  color: rgb(255 255 255 / 82%);
  font-size: .92rem;
  line-height: 1.45;
}

.gfm-auth-form-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.gfm-auth-card {
  width: 100%;
  max-width: 535px;
  padding: clamp(2rem, 4vh, 3.25rem) clamp(2rem, 4vw, 3.5rem) 2.5rem;
  border: 1px solid rgb(255 255 255 / 35%) !important;
  border-radius: 18px;
  background: rgb(250 252 250 / 97%);
  box-shadow: 0 24px 64px rgb(7 31 21 / 32%) !important;
}

.gfm-auth-card-heading {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.5rem;
}

.gfm-auth-card-heading img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.gfm-auth-card-heading p,
.gfm-auth-card-heading h2 {
  margin: 0;
}

.gfm-auth-card-heading p {
  color: #7a6530;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.gfm-auth-card-heading h2 {
  color: #103324;
  font-size: 1.65rem;
}

.gfm-auth-card .input-group-alternative {
  min-height: 56px;
  border: 1px solid rgb(31 77 58 / 13%);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgb(31 77 58 / 13%) !important;
}

.gfm-auth-card .form-control,
.gfm-auth-card .input-group-text {
  min-height: 54px;
  font-size: 1rem;
}

.gfm-auth-submit {
  min-height: 52px;
  margin-top: 1.6rem;
  font-size: 1rem;
}

.gfm-forgot-link {
  font-size: .82rem;
}

.gfm-auth-partners {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 88px;
  padding: .45rem 1.5rem;
  border-top: 1px solid rgb(201 162 74 / 24%);
  background: rgb(247 250 247 / 96%);
}

.gfm-auth-partners h2 {
  flex: 0 0 auto;
  margin: 0;
  color: #103324;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gfm-auth-partners ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gfm-auth-partners li {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: #42564b;
  font-size: .76rem;
  font-weight: 600;
}

.gfm-auth-partners img {
  box-sizing: border-box;
  width: 78px;
  height: 42px;
  padding: 7px;
  border-radius: 8px;
  background: #153a2b;
  object-fit: contain;
}

@media (max-width: 900px) {
  .gfm-login-page {
    overflow: auto;
  }

  .gfm-login-page .main-content {
    display: block;
    height: auto;
    min-height: 100vh;
  }

  .gfm-auth-shell {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: min(590px, calc(100% - 28px));
  }

  .gfm-auth-story {
    flex-direction: row;
    gap: 1rem;
    text-align: left;
  }

  .gfm-auth-emblem {
    width: 120px;
    max-height: 115px;
  }

  .gfm-auth-copy h1 {
    font-size: 1.7rem;
  }

  .gfm-auth-partners {
    flex-direction: column;
    gap: .5rem;
    padding: .9rem;
  }
}

@media (max-width: 600px) {
  .gfm-auth-emblem {
    width: 92px;
    max-height: 90px;
  }

  .gfm-auth-copy span {
    font-size: .8rem;
  }

  .gfm-auth-card {
    padding: 1.5rem 1.2rem 2rem;
  }

  .gfm-auth-partners li span {
    display: none;
  }

  .gfm-auth-partners ul {
    width: 100%;
    justify-content: space-around;
    gap: .35rem;
  }

  .gfm-auth-partners img {
    width: 64px;
    height: 36px;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .gfm-auth-emblem {
    max-height: 245px;
  }

  .gfm-auth-card {
    padding-block: 1.65rem 1.9rem;
  }

  .gfm-auth-card-heading {
    margin-bottom: .9rem;
  }
}
