/* DimOne brand palette. Functional/status colours remain independent. */
:root {
  --brand-primary: #315BEB;
  --brand-primary-hover: #274BC8;
  --brand-primary-ink: #2448C0;
  --brand-cyan: #16C9ED;
  --brand-purple: #7952E8;
  --brand-navy: #101B42;
  --brand-surface: #F7F9FC;
  --brand-white: #FFFFFF;
  --brand-soft: #EEF2FE;
  --brand-focus-soft: #315beb14;
  --brand-focus-medium: #315beb1a;
  --brand-focus-strong: #315beb33;
  --brand-shadow: #315beb25;
}
.auth-page {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--brand-surface, #F7F9FC);
  color: #263b50;
  font:
    14px/1.5 system-ui,
    sans-serif;
  padding: 24px;
  box-sizing: border-box;
}
.auth-card {
  width: min(100%, 400px);
  box-sizing: border-box;
  padding: 32px;
  background: white;
  border: 1px solid #dce8f3;
  border-radius: 20px;
  box-shadow: 0 16px 48px #163b6010;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
  font-weight: 750;
  margin-bottom: 30px;
}
.auth-brand-symbol {
  display: block;
  width: 40px;
  height: auto;
}
.auth-brand-wordmark {
  display: block;
  width: 126px;
  height: auto;
}
.auth-card h1 {
  font-size: 23px;
  margin: 0 0 8px;
}
.auth-card p {
  color: #7890a6;
  margin: 0 0 24px;
}
.auth-card form {
  display: grid;
  gap: 18px;
}
.auth-card label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: #667f94;
}
.auth-card input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  border: 1px solid #d9e5f0;
  border-radius: 9px;
  padding: 0 12px;
  font: 15px system-ui;
  color: #263b50;
  background: white;
}
.auth-card input:focus {
  outline: 2px solid #a6ddff;
  border-color: var(--brand-primary, #315BEB);
}
.auth-card button {
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  background: var(--brand-primary, #315BEB);
  color: white;
  font: 600 14px system-ui;
  cursor: pointer;
}
.auth-card button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.auth-card .auth-secondary {
  background: #e8f5ff;
  color: var(--brand-primary-ink, #2448C0);
}
.auth-card .auth-link {
  background: transparent;
  color: var(--brand-primary-ink, #2448C0);
  justify-self: end;
  padding: 6px 0;
  text-decoration: underline;
}
.auth-card #auth-success {
  margin: 0;
  padding: 12px;
  color: #205d41;
  background: #edf8f1;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.auth-card #auth-error {
  padding: 12px;
  background: #fff1f4;
  border: 1px solid #ffc9d4;
  color: #d53559;
  border-radius: 8px;
  margin: 0;
}
.auth-card .auth-footnote {
  font-size: 12px;
  margin: 24px 0 0;
}
.auth-card [hidden] {
  display: none !important;
}
.auth-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #eaf6ff;
  border-bottom: 1px solid #dce8f3;
  font: 13px system-ui;
  color: #36546c;
}
.auth-account button {
  border: 1px solid #b9ddf6;
  background: white;
  color: var(--brand-primary-ink, #2448C0);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
}
.auth-account small {
  display: block;
  color: #72899d;
}
#dimart-expiry-notice {
  margin: 12px 0;
  padding: 14px 18px;
  background: #fff4d6;
  border: 1px solid #eac66b;
  border-radius: 12px;
  color: #684b13;
}
.dimart-seller-locked body > * { visibility: hidden !important; }
.dimart-seller-locked #dimart-seller-lock,
.dimart-seller-locked #dimart-seller-lock * { visibility: visible !important; }
#dimart-seller-lock {
  position: fixed; inset: 0; z-index: 2147483647;
  margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; box-sizing: border-box;
  background: #fff; color: #25364a; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 28px; text-align: center;
  font-size: 18px; line-height: 1.5;
}
#dimart-seller-lock p { max-width: 600px; }
#dimart-seller-lock button { padding: 12px 24px; background: var(--brand-primary, #315BEB); color: white; border: 0; border-radius: 10px; }
.auth-no-access {
  padding: 40px;
  text-align: center;
}
#dimart-access-notice {
  margin: 12px 16px;
  padding: 12px 16px;
  border: 1px solid #c4dcf3;
  border-radius: 10px;
  background: #edf6ff;
  color: #234b70;
  font: 14px/1.5 system-ui, sans-serif;
}
.auth-denied {
  display: none !important;
}
@media (max-width: 480px) {
  .auth-card {
    padding: 24px;
  }
  .auth-page {
    padding: 16px;
  }
}

.side .auth-account {
  margin: 20px 0 8px;
  padding: 14px 10px;
  flex-wrap: wrap;
  border: 1px solid #dce8f3;
  border-radius: 12px;
  background: #f3f9ff;
}
.side .auth-account > span {
  overflow-wrap: anywhere;
  font-weight: 600;
}
.side .auth-account small {
  font-size: 11px;
  line-height: 1.6;
  font-weight: 400;
}
.side .auth-account button {
  width: 100%;
  padding: 9px;
}

.auth-phone-field {
  display: grid;
  gap: 7px;
}
.auth-phone-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #d9e5f0;
  border-radius: 9px;
  background: #fff;
  min-height: 48px;
}
.auth-phone-row:focus-within {
  border-color: var(--brand-primary, #315BEB);
  box-shadow: 0 0 0 3px var(--brand-focus-medium);
}
.auth-region {
  position: relative;
  flex: 0 0 auto;
  min-width: 102px;
}
.auth-region-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 100%;
  padding: 0 12px;
  color: #263b50;
  font-size: 15px;
  white-space: nowrap;
}
.auth-chevron {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: url('/assets/select-chevron.svg') center/18px 18px no-repeat;
  pointer-events: none;
}
.auth-region select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}
.auth-card .auth-phone-row input,
.auth-card .auth-phone-row input:focus {
  min-width: 0;
  flex: 1;
  width: 0;
  border: 0;
  border-radius: 0 9px 9px 0;
  outline: none;
  box-shadow: none;
  height: 48px;
  padding: 0 12px 0 4px;
  background: transparent;
}
.auth-phone-field small {
  font-size: 11px;
  color: #7890a6;
  line-height: 1.45;
}
.auth-region:has(select:disabled) {
  opacity: 0.65;
}
@media (max-height: 600px) {
  .auth-page {
    align-items: start;
    padding-top: 16px;
  }
  .auth-card {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}

/* Login follows the existing Dimart mobile screen: a full-width white surface. */
.auth-topbar {
  display: none;
}
.auth-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.auth-heading .auth-brand {
  margin: 0;
  gap: 6px;
}
.auth-heading .auth-brand-symbol {
  width: 30px;
}
.auth-heading .auth-brand-wordmark {
  width: 94px;
}
.auth-heading h1 {
  margin: 0;
  min-width: 0;
}
@media (max-width: 600px) {
  .auth-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100dvh;
    padding: 0;
    background: var(--brand-surface, #F7F9FC);
    color: #202b33;
    font-family: system-ui, sans-serif;
  }
  .auth-topbar {
    display: flex;
    align-items: center;
    flex: none;
    min-height: 56px;
    box-sizing: border-box;
    padding: 12px 20px;
    background: var(--brand-primary, #315BEB);
    color: white;
    font-size: 20px;
    font-weight: 500;
  }
  .auth-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 24px 28px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .auth-card h1 {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 600;
  }
  .auth-card #auth-hint {
    font-size: 16px;
    line-height: 1.5;
    color: #647580;
    margin: 0 0 36px;
  }
  .auth-card form {
    gap: 24px;
  }
  .auth-card label {
    font-size: 14px;
    line-height: 1.45;
    color: #526773;
    gap: 8px;
  }
  .auth-card input {
    height: 56px;
    font-size: 17px;
    padding: 0 16px;
    border: 1px solid #dce2e6;
    border-radius: 5px;
    color: #20343e;
  }
  .auth-card input::placeholder {
    color: #788994;
    opacity: 1;
  }
  .auth-phone-row {
    min-height: 56px;
    border-color: #dce2e6;
    border-radius: 5px;
  }
  .auth-card .auth-phone-row input,
  .auth-card .auth-phone-row input:focus {
    height: 56px;
    font-size: 17px;
    border-radius: 0 5px 5px 0;
    padding-left: 10px;
  }
  .auth-region {
    min-width: 108px;
  }
  .auth-region-display {
    font-size: 17px;
    gap: 8px;
    padding: 0 10px;
  }
  .auth-region:after {
    content: '';
    position: absolute;
    right: 0;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: #e2e8ec;
    pointer-events: none;
  }
  .auth-phone-field small {
    font-size: 13px;
    line-height: 1.5;
    color: #6d7f89;
  }
  .auth-card button {
    min-height: 52px;
    border-radius: 5px;
    background: var(--brand-primary, #315BEB);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 16px;
  }
  .auth-card #auth-submit {
    margin-top: 8px;
  }
  .auth-card .auth-footnote {
    margin-top: auto;
    padding-top: 40px;
    font-size: 13px;
    line-height: 1.6;
    color: #7a8992;
  }
  .auth-card #auth-error {
    font-size: 14px;
  }
}
@media (max-width: 360px) {
  .auth-card {
    padding: 28px 18px 24px;
  }
  .auth-card #auth-hint {
    margin-bottom: 28px;
  }
  .auth-heading .auth-brand-wordmark {
    width: 82px;
  }
  .auth-heading .auth-brand-symbol {
    width: 27px;
  }
  .auth-region {
    min-width: 98px;
  }
  .auth-region-display {
    gap: 6px;
    padding: 0 8px;
  }
}
@media (max-width: 600px) and (max-height: 540px) {
  .auth-topbar {
    min-height: 48px;
    padding: 8px 18px;
  }
  .auth-card {
    padding-top: 20px;
  }
  .auth-card #auth-hint {
    margin-bottom: 20px;
  }
  .auth-card form {
    gap: 16px;
  }
  .auth-card .auth-footnote {
    padding-top: 24px;
  }
}

.auth-page [hidden] {
  display: none !important;
}
.auth-modes {
  display: flex;
  gap: 6px;
  background: #eef5fb;
  padding: 4px;
  border-radius: 11px;
  margin-bottom: 20px;
}
.auth-modes button {
  flex: 1;
  color: #60758a;
  background: transparent;
}
.auth-modes button[aria-pressed='true'] {
  background: #fff;
  color: var(--brand-primary-ink, #2448C0);
  box-shadow: 0 1px 5px #163b6010;
}
#auth-google {
  margin: 0 0 20px;
}
.auth-password-field {
  position: relative;
  display: block;
}
.auth-card .auth-password-field input {
  padding-right: 96px;
}
.auth-card .auth-password-toggle {
  position: absolute;
  right: 2px;
  top: 2px;
  bottom: auto;
  height: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 0 10px;
  background: transparent;
  color: var(--brand-primary-ink, #2448C0);
  font-size: 12px;
}
.auth-card .auth-password-toggle:focus-visible {
  outline: 2px solid var(--brand-primary, #315BEB);
  outline-offset: -2px;
}
.auth-card [role='alert'] {
  color: #bd3455;
  margin: 0;
  font-size: 13px;
}
.auth-card form > small {
  color: #667f94;
  font-size: 12px;
  margin-top: -12px;
}

.auth-card .auth-password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: start;
}
.auth-card .auth-password-field input {
  grid-area: 1/1/2/3;
  padding-right: 52px;
}
.auth-card .auth-password-field .auth-password-toggle {
  position: relative;
  grid-area: 1/2/2/3;
  align-self: stretch;
  top: auto;
  right: auto;
  bottom: auto;
  width: 48px;
  min-width: 48px;
  height: auto;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--brand-primary-ink, #2448C0);
  z-index: 1;
}
.auth-card .auth-password-field > :not(input):not(button) {
  grid-column: 1/-1;
}
.auth-card .auth-password-field .password-eye {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
}
.auth-card .auth-password-field [aria-pressed='false'] .password-eye-slash {
  display: none;
}

.auth-page .auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
  min-height: 64px;
  padding: 12px 20px;
  box-sizing: border-box;
  background: var(--brand-primary, #315BEB);
}
.auth-topbar .auth-brand {
  margin: 0;
  gap: 6px;
}
.auth-topbar .auth-brand-symbol {
  width: 28px;
}
.auth-topbar .auth-brand-wordmark {
  width: 96px;
}
.auth-page .auth-language {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 2;
}
.auth-page .auth-language .dm-language {
  min-height: 40px;
  padding: 0 10px;
  gap: 6px;
}
.auth-page .auth-language select {
  font-size: 14px;
  min-width: 50px;
}
.auth-page .auth-language .dm-language > span {
  display: none;
}
.auth-page .auth-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.auth-page #auth-hint {
  margin: 4px 0 22px;
  font-size: 14px;
  line-height: 1.5;
}
.auth-page .auth-modes {
  margin-bottom: 16px;
}
.auth-page > .auth-card {
  padding-top: 28px;
}
@media (min-width: 601px) {
  .auth-page {
    display: flex;
    flex-direction: column;
    padding: 0;
  }
  .auth-page > .auth-card {
    margin: 32px auto;
  }
  .auth-page .auth-topbar {
    flex: none;
  }
}
