/* Auth pages — modern layout, tokens shared via site.css :root where present */
.account-page {
  padding: 1.5rem 0 2.25rem;
  --account-accent: var(--zkh-accent, #1f4a7f);
  --account-accent-mid: #2a5f97;
  --account-surface: #ffffff;
  --account-muted: #64748b;
  --account-border: #e2e8f0;
  --account-radius: 16px;
  --account-shadow: 0 14px 35px -16px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 0;
  min-height: calc(100vh - 132px);
  align-items: stretch;
}

@media (min-width: 992px) {
  .account-page {
    padding: 2.25rem 0 3.25rem;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 480px);
    max-width: 1040px;
    margin-inline: auto;
    border-radius: var(--account-radius);
    overflow: hidden;
    box-shadow: var(--account-shadow);
    border: 1px solid var(--account-border);
  }

  .account-page__decoration {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    background:
      radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 55%),
      linear-gradient(145deg, var(--account-accent) 0%, #0f2744 48%, var(--account-accent-mid) 100%);
    color: #f1f5f9;
    position: relative;
    min-height: 500px;
  }

  .account-page__decoration::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.9;
    pointer-events: none;
  }

  .account-page__decoration-inner {
    position: relative;
    z-index: 1;
  }

  .account-page__kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.85;
    margin-bottom: 0.5rem;
  }

  .account-page__headline {
    font-size: clamp(1.45rem, 2.3vw, 1.9rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.75rem;
  }

  .account-page__sub {
    font-size: 0.9rem;
    line-height: 1.55;
    opacity: 0.9;
    max-width: 34ch;
    margin: 0;
  }
}

@media (max-width: 991.98px) {
  .account-page__decoration {
    display: none;
  }
}

.account-card {
  background: var(--account-surface);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
}

@media (max-width: 991.98px) {
  .account-card {
    border-radius: var(--account-radius);
    border: 1px solid var(--account-border);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    max-width: 480px;
    width: 100%;
    margin-inline: auto;
  }
}

@media (min-width: 992px) {
  .account-card {
    border-inline-start: 1px solid #eef2f7;
  }
}

.account-card__header {
  margin-bottom: 1rem;
}

.account-brand {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--account-accent);
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.account-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 1.4rem;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.account-subtitle {
  margin: 0;
  color: var(--account-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Form */
.account-form--modern {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.account-form--modern > * {
  margin: 0;
}

.account-form--modern .validation-summary-errors {
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.9rem;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.account-label {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #334155;
  margin: 0;
}

.account-hint {
  font-size: 0.78rem;
  color: var(--account-muted);
  margin: 0;
  line-height: 1.4;
}

.account-input,
.account-form--modern .form-control,
.account-form--modern .form-select {
  border-radius: 10px;
  border: 1px solid var(--account-border);
  padding: 0.62rem 0.85rem;
  font-size: 0.95rem;
  line-height: 1.35;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: #fafbfc;
  color: #0f172a;
}

.account-form--modern .form-control:focus,
.account-form--modern .form-select:focus {
  border-color: var(--account-accent);
  box-shadow: 0 0 0 3px rgba(31, 74, 127, 0.15);
  background: #fff;
  outline: none;
}

.account-form--modern .form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.account-form--modern .form-control:disabled,
.account-form--modern .form-select:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.account-form--modern .form-control:-webkit-autofill,
.account-form--modern .form-control:-webkit-autofill:hover,
.account-form--modern .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 5000s ease-in-out 0s;
}

.account-input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.account-input-wrap .form-control {
  flex: 1;
  padding-inline-end: 3.25rem;
}

.account-password-toggle {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: #f1f5f9;
  color: #475569;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.account-password-toggle:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.account-password-toggle:focus-visible {
  outline: 2px solid var(--account-accent);
  outline-offset: 2px;
}

.account-password-toggle .account-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

/* File drop zone */
.account-file-zone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.account-file-zone.is-dragover {
  border-color: var(--account-accent);
  background: rgba(31, 74, 127, 0.06);
  box-shadow: 0 0 0 3px rgba(31, 74, 127, 0.14);
}

.account-file-zone.has-file {
  border-style: solid;
  border-color: #86efac;
  background: #f0fdf4;
}

.account-file-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.account-file-zone__inner {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.account-file-zone__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.5rem;
  color: var(--account-accent);
  opacity: 0.85;
}

.account-file-zone__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
  margin: 0 0 0.25rem;
}

.account-file-zone__meta {
  font-size: 0.78rem;
  color: var(--account-muted);
  margin: 0;
}

.account-file-preview {
  margin-top: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.account-file-zone.has-file .account-file-preview {
  display: flex;
}

.account-file-preview img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.account-file-preview__name {
  font-size: 0.8rem;
  color: #166534;
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Submit */
.account-submit {
  margin-top: 0.25rem;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  font-size: 0.97rem;
  color: #fff;
  background: linear-gradient(135deg, var(--account-accent) 0%, var(--account-accent-mid) 100%);
  box-shadow: 0 3px 10px rgba(31, 74, 127, 0.24);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.account-submit:hover {
  filter: brightness(1.03);
  box-shadow: 0 6px 16px rgba(31, 74, 127, 0.3);
}

.account-submit:active {
  transform: scale(0.98);
}

.account-submit:focus-visible {
  outline: 2px solid var(--account-accent);
  outline-offset: 3px;
}

.account-footer {
  text-align: center;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--account-border);
  font-size: 0.86rem;
  color: var(--account-muted);
}

.account-footer a {
  font-weight: 600;
  color: var(--account-accent);
  text-decoration: none;
}

.account-footer a:hover {
  text-decoration: underline;
}

.account-inline-link {
  color: var(--account-accent) !important;
  font-weight: 600;
}

.account-inline-link:hover {
  text-decoration: underline !important;
}

.account-form--modern .input-validation-error {
  border-color: #dc2626 !important;
  background: #fff;
}

.account-form--modern .field-validation-error {
  font-size: 0.8rem;
  color: #b91c1c;
  line-height: 1.35;
}

.account-form--modern .form-check {
  padding: 0.5rem 0;
}

.account-form--modern .account-remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0 0.15rem;
  min-height: 2rem;
}

.account-form--modern .account-remember .form-check-input {
  float: none;
  margin: 0;
  width: 1.05rem;
  height: 1.05rem;
  border-color: #94a3b8;
  cursor: pointer;
}

.account-form--modern .account-remember .form-check-label {
  margin: 0;
  font-size: 0.92rem;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
}

.account-form--modern .form-check-input:checked {
  background-color: var(--account-accent);
  border-color: var(--account-accent);
}

.account-form--modern .account-remember .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(31, 74, 127, 0.15);
}

.account-form--modern .account-remember .form-check-input:focus-visible {
  outline: 2px solid var(--account-accent);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .account-submit,
  .account-form--modern .form-control,
  .account-form--modern .form-select,
  .account-password-toggle,
  .account-file-zone {
    transition: none;
  }

  .account-submit:active {
    transform: none;
  }
}

@media (max-width: 575.98px) {
  .account-page {
    padding: 1rem 0 1.5rem;
  }

  .account-card {
    padding: 1.25rem;
  }

  .account-title {
    font-size: 1.25rem;
  }
}
