:root {
  --dh-ink: #182321;
  --dh-muted: #687571;
  --dh-forest: #123f3a;
  --dh-forest-deep: #092c2b;
  --dh-leaf: #22745d;
  --dh-lime: #d3df25;
  --dh-cream: #f3efe4;
  --dh-paper: #fbfcf8;
  --dh-line: #dce4df;
  --dh-danger: #a63e35;
  --dh-shadow: 0 28px 75px rgba(18, 63, 58, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.dh-login-page {
  margin: 0;
  color: var(--dh-ink);
  background: var(--dh-paper);
  font-family: "Source Sans Pro", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a,
input,
label {
  -webkit-tap-highlight-color: transparent;
}

.dh-login-shell {
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(440px, 0.85fr);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.dh-login-story {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(34px, 4vw, 68px) clamp(38px, 5vw, 82px) 32px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(145deg, var(--dh-forest) 0%, var(--dh-forest-deep) 68%, #061f20 100%);
  background-size: 54px 54px, 54px 54px, auto;
}

.dh-login-story::before {
  position: absolute;
  z-index: -1;
  right: -170px;
  bottom: -220px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(211, 223, 37, 0.22);
  border-radius: 50%;
  content: "";
}

.dh-login-story::after {
  position: absolute;
  z-index: -1;
  right: -75px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
}

.dh-story-glow {
  position: absolute;
  z-index: -2;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.dh-story-glow-one {
  top: -130px;
  right: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(211, 223, 37, 0.15), transparent 69%);
}

.dh-story-glow-two {
  bottom: 5%;
  left: -190px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(45, 151, 119, 0.18), transparent 68%);
}

.dh-story-brand,
.dh-story-footer,
.dh-story-copy,
.dh-network-art {
  position: relative;
  z-index: 1;
}

.dh-story-brand {
  display: flex;
  align-items: center;
  gap: 24px;
  opacity: 0;
  animation: dh-rise 0.7s 0.08s ease forwards;
}

.dh-story-brand img {
  width: clamp(205px, 17vw, 276px);
  height: auto;
  /* The real logo colours on a soft white plate (its grey lettering would vanish on the forest green). */
  box-sizing: content-box;
  padding: 12px 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(211, 223, 37, 0.35);
}

.dh-story-brand span {
  max-width: 125px;
  padding-left: 23px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.45;
  text-transform: uppercase;
}

.dh-story-copy {
  width: min(700px, 100%);
  margin: auto 0;
  padding: clamp(58px, 8vh, 110px) 0 36px;
}

.dh-story-kicker,
.dh-story-footer span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dh-story-kicker {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0;
  animation: dh-rise 0.7s 0.18s ease forwards;
}

.dh-story-kicker i,
.dh-story-footer i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dh-lime);
  box-shadow: 0 0 0 5px rgba(211, 223, 37, 0.12);
}

.dh-story-copy h1 {
  margin: 22px 0 22px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 5.4vw, 82px);
  font-weight: 400;
  letter-spacing: -0.048em;
  line-height: 0.98;
  opacity: 0;
  animation: dh-rise 0.75s 0.25s ease forwards;
}

.dh-story-copy h1 em {
  color: var(--dh-lime);
  font-weight: 400;
}

.dh-story-copy > p {
  max-width: 570px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.62;
  opacity: 0;
  animation: dh-rise 0.75s 0.34s ease forwards;
}

.dh-story-signals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 650px;
  margin-top: clamp(34px, 6vh, 66px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  animation: dh-rise 0.75s 0.44s ease forwards;
}

.dh-story-signals div {
  padding: 19px 18px 20px 0;
}

.dh-story-signals div + div {
  padding-left: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.dh-story-signals strong,
.dh-story-signals span {
  display: block;
}

.dh-story-signals strong {
  margin-bottom: 5px;
  color: var(--dh-lime);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

.dh-story-signals span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.dh-network-art {
  position: absolute;
  right: -55px;
  bottom: 32px;
  width: min(53vw, 640px);
  opacity: 0.34;
  pointer-events: none;
}

.dh-network-art svg {
  display: block;
  width: 100%;
  overflow: visible;
}

.dh-network-lines path {
  fill: none;
  stroke: rgba(211, 223, 37, 0.38);
  stroke-dasharray: 4 9;
  stroke-width: 1.2;
}

.dh-network-nodes circle {
  fill: #fff;
  stroke: rgba(211, 223, 37, 0.7);
  stroke-width: 4;
}

.dh-network-nodes .is-core {
  fill: var(--dh-lime);
  stroke: rgba(211, 223, 37, 0.24);
  stroke-width: 12;
  animation: dh-pulse 2.8s ease-in-out infinite;
}

.dh-story-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.dh-login-access {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(38px, 6vw, 86px);
  background:
    radial-gradient(circle at 95% 4%, rgba(211, 223, 37, 0.18), transparent 24%),
    radial-gradient(circle at 3% 96%, rgba(34, 116, 93, 0.08), transparent 27%),
    var(--dh-paper);
}

.dh-login-card {
  width: min(455px, 100%);
  margin: auto;
  opacity: 0;
  animation: dh-rise 0.72s 0.16s ease forwards;
}

.dh-mobile-brand {
  display: none;
}

.dh-login-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 34px;
}

/* Language picker beside "Sign in" (cfg/i18n.php) */
.dh-lang-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--dh-line);
  border-radius: 999px;
  background: #fff;
  color: var(--dh-forest);
}

.dh-lang-picker svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.dh-lang-picker select {
  border: 0;
  background: transparent;
  color: var(--dh-ink);
  font: inherit;
  font-size: 14px;
  padding: 2px 0;
  cursor: pointer;
}

.dh-lang-picker select:focus-visible {
  outline: 2px solid var(--dh-leaf);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.dh-login-overline {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--dh-leaf);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dh-login-heading h2 {
  margin: 0 0 9px;
  color: var(--dh-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(35px, 3.2vw, 48px);
  font-weight: 400;
  letter-spacing: -0.038em;
  line-height: 1.05;
}

.dh-login-heading p {
  margin: 0;
  color: var(--dh-muted);
  font-size: 16px;
}

.dh-login-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 24px;
  padding: 13px 15px;
  border: 1px solid rgba(166, 62, 53, 0.18);
  border-radius: 13px;
  color: #71332d;
  background: #fff3f0;
  font-size: 14px;
  line-height: 1.45;
}

.dh-alert-icon {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--dh-danger);
  font-size: 12px;
  font-weight: 700;
}

.dh-login-alert p,
.dh-login-alert .text-danger,
.dh-login-alert .text-warning {
  margin: 0;
  color: inherit !important;
}

.dh-login-form {
  display: grid;
  gap: 21px;
}

.dh-field label,
.dh-field-label-row a {
  font-size: 14px;
  font-weight: 600;
}

.dh-field label {
  display: inline-block;
  margin-bottom: 8px;
  color: #31413d;
}

.dh-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dh-field-label-row a {
  margin-bottom: 8px;
  color: var(--dh-leaf);
  text-decoration: none;
}

.dh-field-label-row a:hover,
.dh-field-label-row a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dh-field-control {
  position: relative;
  display: flex;
  align-items: center;
}

.dh-field-control > svg {
  position: absolute;
  z-index: 1;
  left: 17px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #82908c;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  pointer-events: none;
  transition: stroke 0.2s ease;
}

.dh-field-control input {
  width: 100%;
  height: 56px;
  padding: 0 52px 0 50px;
  border: 1px solid var(--dh-line);
  border-radius: 14px;
  outline: none;
  color: var(--dh-ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(18, 63, 58, 0.02);
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dh-field-control input::placeholder {
  color: #9aa5a2;
}

.dh-field-control:focus-within input {
  border-color: var(--dh-leaf);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(34, 116, 93, 0.1), 0 10px 28px rgba(18, 63, 58, 0.07);
}

.dh-field-control:focus-within > svg {
  stroke: var(--dh-leaf);
}

.dh-password-toggle {
  position: absolute;
  right: 9px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  outline: none;
  color: #75817e;
  background: transparent;
  cursor: pointer;
}

.dh-password-toggle:hover,
.dh-password-toggle:focus-visible {
  color: var(--dh-forest);
  background: #edf3ef;
}

.dh-password-toggle svg {
  position: static;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.dh-eye-closed,
.dh-password-toggle.is-visible .dh-eye-open {
  display: none;
}

.dh-password-toggle.is-visible .dh-eye-closed {
  display: block;
}

.dh-caps-warning {
  display: none;
  margin-top: 7px;
  color: #9a5c17;
  font-size: 12px;
  font-weight: 600;
}

.dh-caps-warning.is-visible {
  display: block;
}

.dh-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: -2px;
}

.dh-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #42514e;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.dh-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dh-check span {
  position: relative;
  width: 19px;
  height: 19px;
  border: 1.5px solid #a8b3af;
  border-radius: 6px;
  background: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dh-check span::after {
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.dh-check input:checked + span {
  border-color: var(--dh-leaf);
  background: var(--dh-leaf);
}

.dh-check input:checked + span::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.dh-check input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(34, 116, 93, 0.12);
}

.dh-private-device {
  color: #8a9692;
  font-size: 12px;
}

.dh-signin-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 58px;
  margin-top: 4px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  outline: none;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(115deg, var(--dh-forest) 0%, var(--dh-leaf) 100%);
  box-shadow: 0 13px 30px rgba(18, 63, 58, 0.21);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.dh-signin-button::before {
  position: absolute;
  top: 0;
  left: -75%;
  width: 52%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  content: "";
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}

.dh-signin-button:hover {
  box-shadow: 0 16px 34px rgba(18, 63, 58, 0.27);
  filter: saturate(1.08);
  transform: translateY(-2px);
}

.dh-signin-button:hover::before {
  left: 125%;
}

.dh-signin-button:focus-visible {
  box-shadow: 0 0 0 4px rgba(34, 116, 93, 0.18), 0 13px 30px rgba(18, 63, 58, 0.21);
}

.dh-signin-button:disabled {
  cursor: wait;
  filter: saturate(0.75);
  transform: none;
}

.dh-signin-button > svg {
  position: absolute;
  right: 20px;
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dh-button-loading {
  display: none;
  align-items: center;
  gap: 10px;
}

.dh-button-loading i {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dh-spin 0.7s linear infinite;
}

.dh-signin-button.is-loading .dh-button-label,
.dh-signin-button.is-loading > svg {
  display: none;
}

.dh-signin-button.is-loading .dh-button-loading {
  display: inline-flex;
}

.dh-login-trust {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 29px;
  padding-top: 25px;
  border-top: 1px solid var(--dh-line);
}

.dh-login-trust > svg {
  flex: 0 0 23px;
  width: 23px;
  fill: none;
  stroke: var(--dh-leaf);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.dh-login-trust strong,
.dh-login-trust span {
  display: block;
}

.dh-login-trust strong {
  margin-bottom: 3px;
  color: #3b4a47;
  font-size: 13px;
}

.dh-login-trust span {
  color: #8a9692;
  font-size: 12px;
  line-height: 1.45;
}

.dh-access-footer {
  position: absolute;
  right: 24px;
  bottom: 18px;
  left: 24px;
  color: #98a29f;
  font-size: 11px;
  letter-spacing: 0.025em;
  text-align: center;
}

@keyframes dh-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dh-pulse {
  0%, 100% { stroke-width: 8; }
  50% { stroke-width: 18; }
}

@keyframes dh-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1080px) {
  .dh-login-shell {
    grid-template-columns: minmax(450px, 0.95fr) minmax(420px, 1.05fr);
  }

  .dh-login-story {
    padding-right: 45px;
    padding-left: 45px;
  }

  .dh-story-copy h1 {
    font-size: clamp(45px, 5.5vw, 62px);
  }

  .dh-story-signals div {
    padding-right: 9px;
  }

  .dh-story-signals div + div {
    padding-left: 13px;
  }
}

@media (max-width: 820px) {
  .dh-login-shell {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .dh-login-story {
    display: none;
  }

  .dh-login-access {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 34px 24px 58px;
  }

  .dh-mobile-brand {
    display: block;
    width: min(455px, 100%);
    margin: 0 auto clamp(42px, 8vh, 72px);
  }

  .dh-mobile-brand img {
    display: block;
    width: 205px;
    height: auto;
  }

  .dh-login-card {
    margin: 0 auto auto;
  }

  .dh-access-footer {
    position: static;
    margin-top: 48px;
  }
}

@media (max-width: 460px) {
  .dh-login-access {
    justify-content: flex-start;
    padding: 25px 18px 32px;
    background:
      radial-gradient(circle at 100% 0, rgba(211, 223, 37, 0.18), transparent 28%),
      var(--dh-paper);
  }

  .dh-mobile-brand {
    margin-bottom: 42px;
  }

  .dh-mobile-brand img {
    width: 176px;
  }

  .dh-login-heading {
    margin-bottom: 27px;
  }

  .dh-login-heading h2 {
    font-size: 36px;
  }

  .dh-login-form {
    gap: 18px;
  }

  .dh-field-control input {
    height: 54px;
  }

  .dh-form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .dh-private-device {
    padding-left: 29px;
  }

  .dh-login-trust {
    margin-top: 25px;
  }

  .dh-access-footer {
    margin-top: 38px;
  }
}

@media (max-height: 760px) and (min-width: 821px) {
  .dh-login-story {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .dh-story-copy {
    padding-top: 35px;
    padding-bottom: 20px;
  }

  .dh-story-copy h1 {
    font-size: 50px;
  }

  .dh-story-signals {
    margin-top: 30px;
  }

  .dh-login-access {
    padding-top: 38px;
    padding-bottom: 48px;
  }

  .dh-login-heading {
    margin-bottom: 24px;
  }

  .dh-login-trust {
    margin-top: 22px;
    padding-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Forgot password page (reset.php), same design as the sign-in page (2026-10-23) */
.dh-login-alert.is-success { border-color: rgba(34, 116, 93, 0.22); color: #174b3f; background: #e9f5ef; }
.dh-login-alert.is-success .dh-alert-icon { background: var(--dh-leaf); }
.dh-login-alert.is-info, .dh-login-alert.is-warning { border-color: rgba(154, 92, 23, 0.2); color: #6b4a14; background: #fbf4e6; }
.dh-login-alert.is-info .dh-alert-icon, .dh-login-alert.is-warning .dh-alert-icon { background: #9a5c17; }
.dh-login-alert a { color: inherit; font-weight: 600; }
.dh-reset-step-title { display: flex; align-items: center; gap: 10px; color: var(--dh-ink); font-size: 15px; font-weight: 700; }
.dh-reset-step-title span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: var(--dh-forest-deep); background: var(--dh-lime); font-size: 13px; }
.dh-reset-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0; color: var(--dh-muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.dh-reset-divider::before, .dh-reset-divider::after { content: ''; flex: 1; height: 1px; background: var(--dh-line); }
.dh-login-trust a { color: var(--dh-leaf); font-weight: 600; }

/* Reset page: plain way back to sign in */
.dh-back-link {
  display: block;
  margin-top: 26px;
  text-align: center;
  color: var(--dh-leaf, #22745d);
  font-weight: 700;
  text-decoration: none;
}
.dh-back-link:hover { text-decoration: underline; }

/* Arabic (dir="rtl", cfg/i18n.php): mirror the field icons, the show-password button and the arrow. */
[dir="rtl"] .dh-field-control > svg { left: auto; right: 17px; }
[dir="rtl"] .dh-password-toggle { right: auto; left: 9px; }
[dir="rtl"] .dh-field-control input { padding: 0 50px 0 52px; }
[dir="rtl"] .dh-signin-button > svg { right: auto; left: 20px; transform: scaleX(-1); }
[dir="rtl"] .dh-check span::after { left: auto; right: 6px; }

/* Version 0.2.4 (2026-10-25, Gerald): the logo centred in the story panel, with the words centred right below it,
   the two held together in the middle of the panel (sign-in and reset pages). */
@media (min-width: 821px) {
  .dh-login-story {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .dh-story-brand {
    justify-content: center;
  }

  .dh-story-copy {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: clamp(34px, 6vh, 64px) 0 clamp(40px, 8vh, 90px);
  }

  .dh-story-copy h1 {
    margin: 0;
  }
}
