/* Public login screen (glass, iOS-style). Self-contained because styles.css is only served after sign-in.
   The pre-glass version is in checkpoints/dhl-billing-app-before-glass-20261110.tgz. */
:root {
  color-scheme: light;
  --ink: #12233a;
  --muted: #5d6b7e;
  --cobalt: #24508a;
  --cobalt-deep: #1b3f6e;
  --red: #b23a2e;
  --red-soft: rgba(255, 235, 232, .85);
  --hairline: rgba(18, 35, 58, .12);
  --font-ui: "Inter Variable", "Noto Sans SC Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", sans-serif;
  --spring: cubic-bezier(.2, .8, .2, 1);
  --swell: cubic-bezier(.34, 1.56, .64, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -.005em;
  /* One hue, same as the app: blue-grey lightening toward the top. */
  font-weight: 480;
  background:
    radial-gradient(ellipse 70% 60% at 12% 6%, #f6f9fc 0%, rgba(246, 249, 252, 0) 62%),
    radial-gradient(ellipse 55% 50% at 72% 34%, rgba(150, 175, 210, .55) 0%, rgba(150, 175, 210, 0) 70%),
    radial-gradient(ellipse 65% 70% at 100% 100%, #46679a 0%, rgba(70, 103, 154, 0) 68%),
    linear-gradient(155deg, #e6edf6 0%, #b9cadf 52%, #7d97bf 100%);
  background-attachment: fixed;
}

::selection {
  color: #fff;
  background: var(--cobalt);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px 16px;
}

.login-panel {
  width: min(100%, 392px);
  padding: 34px 28px 28px;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 28px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 24px 60px -24px rgba(11, 26, 44, .45),
    0 2px 10px -4px rgba(11, 26, 44, .15);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-panel { background: rgba(250, 252, 254, .96); }
}

@media (prefers-reduced-transparency: reduce) {
  .login-panel { background: #fafcfe; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 26px;
  text-align: center;
}

/* App-icon style mark: rounded square with a top highlight. */
.brand-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: #e6eef8;
  background: linear-gradient(180deg, #2a4f7d 0%, #10243a 100%);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 22px -10px rgba(11, 26, 44, .7);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .03em;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.login-brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 14px;
}

/* iOS inset-grouped fields: one rounded group, hairline between rows. */
.field-group {
  overflow: hidden;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(11, 26, 44, .06);
}

.field-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  padding: 0 16px;
  cursor: text;
  transition: background-color 160ms var(--spring);
}

.field-row + .field-row {
  border-top: 1px solid var(--hairline);
}

.field-row:focus-within {
  background: rgba(255, 255, 255, .9);
}

.field-row span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.field-row input {
  width: 100%;
  height: 48px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  caret-color: var(--cobalt);
}

.field-row input::placeholder {
  color: #7d8a9b;
}

.login-error {
  margin: 0;
  padding: 10px 14px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 12px;
  font-size: 13px;
}

/* Tactile button: lit from above, presses in on touch. */
.login-form button {
  height: 50px;
  margin-top: 4px;
  color: #fff;
  background: linear-gradient(180deg, #33639f 0%, var(--cobalt) 55%, var(--cobalt-deep) 100%);
  border: 0;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 20px -10px rgba(16, 40, 72, .85);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 460ms var(--swell), box-shadow 300ms ease, filter 200ms ease;
}

.login-form button:hover {
  filter: brightness(1.05);
}

/* Puffy press: the button swells under the finger, lit where it was touched. */
.login-form button.is-pressed {
  transform: scale(1.05);
  filter: brightness(1.05);
  background:
    radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 65%),
    linear-gradient(180deg, #33639f 0%, var(--cobalt) 55%, var(--cobalt-deep) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 16px 30px -12px rgba(16, 40, 72, .9);
  transition: transform 140ms var(--spring), box-shadow 140ms ease, filter 140ms ease;
}

.login-form button:focus-visible {
  outline: 3px solid rgba(47, 95, 179, .35);
  outline-offset: 3px;
}

.login-form button:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .login-form button,
  .field-row {
    transition: none;
  }

  .login-form button.is-pressed {
    transform: none;
  }
}
