@import url("logo-theme.css");

:root {
  color-scheme: light;
  --orange: #ff7200;
  --orange-deep: #e85f00;
  --ink: #101828;
  --muted: #667085;
  --line: #dfe5ed;
  --surface: rgba(255, 255, 255, 0.94);
  --input: #fff;
  --danger: #c62828;
  --success: #16834b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 122, 0, 0.2), transparent 28%),
    radial-gradient(circle at 84% 80%, rgba(255, 122, 0, 0.12), transparent 26%),
    linear-gradient(145deg, #07111f, #111d2c 55%, #261508);
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  opacity: 0.16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f8fafc;
  --muted: #aab6c7;
  --line: #334155;
  --surface: rgba(14, 24, 37, 0.96);
  --input: #111c2b;
}

button, input, select { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.aff-login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
}

.aff-login-card {
  width: min(470px, calc(100vw - 36px));
  min-width: 0;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0,0,0,.36);
  backdrop-filter: blur(18px);
}

.aff-login-toolbar, .aff-login-tools, .aff-login-heading, .aff-login-input {
  display: flex;
  align-items: center;
}

.aff-login-toolbar { justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.aff-login-back img { display: block; width: 176px; max-width: 100%; }
.aff-login-tools { gap: 8px; }

.aff-login-icon, .aff-login-language > button {
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--input);
  color: var(--ink);
}

.aff-login-icon { width: 39px; cursor: pointer; }
.aff-login-language { position: relative; }
.aff-login-language > button { display: flex; align-items: center; gap: 7px; padding: 0 9px; cursor: pointer; }
.aff-login-language > button img, .aff-login-language-list img { width: 21px; height: 15px; flex: none; object-fit: cover; }
.aff-login-language > button i { color: var(--muted); font-size: 10px; }
.aff-login-language-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: 190px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--input);
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}
.aff-login-language-list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 750; }
.aff-login-language-list a:hover, .aff-login-language-list a.is-active { color: var(--orange); background: rgba(255,114,0,.1); }
.aff-login-heading { align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.aff-login-lock { display: grid; width: 45px; height: 45px; flex: none; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); box-shadow: 0 10px 24px rgba(255,114,0,.28); }
.aff-login-heading h1, .aff-login-reset h2, .aff-login-authenticated h1 { margin: 0; font-size: 25px; line-height: 1.18; }
.aff-login-heading p, .aff-login-reset-heading p, .aff-login-authenticated p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }

.aff-login-form { display: grid; gap: 15px; }
.aff-login-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; }
.aff-login-form small { color: var(--muted); font-weight: 500; }
.aff-login-input { min-height: 48px; gap: 10px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--input); transition: .2s; }
.aff-login-input:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,114,0,.12); }
.aff-login-input > i { width: 18px; color: var(--muted); text-align: center; }
.aff-login-input input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.aff-login-input button { width: 34px; height: 34px; flex: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; }

.aff-login-submit {
  min-height: 49px;
  margin-top: 3px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  box-shadow: 0 13px 28px rgba(255,114,0,.23);
  cursor: pointer;
  font-weight: 900;
}

.aff-login-submit:hover { transform: translateY(-1px); }
.aff-login-submit:disabled { cursor: wait; opacity: .7; transform: none; }
.aff-login-link { justify-self: center; border: 0; background: transparent; color: var(--orange); cursor: pointer; font-weight: 800; }
.aff-login-link--block { display: block; margin-top: 18px; text-align: center; text-decoration: none; }
.aff-login-feedback { display: none; margin: 0 0 16px; padding: 11px 13px; border-radius: 10px; font-size: 13px; font-weight: 750; line-height: 1.4; }
.aff-login-feedback.is-visible { display: block; }
.aff-login-feedback.is-error { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.aff-login-feedback.is-success { color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent); }
.aff-login-reset-heading { margin-bottom: 20px; }
.aff-login-reset .aff-login-link { display: block; margin: 18px auto 0; }
.aff-login-authenticated { text-align: center; }
.aff-login-authenticated > span { display: grid; width: 66px; height: 66px; margin: 0 auto 18px; place-items: center; border-radius: 50%; color: #fff; background: var(--success); font-size: 30px; }

@media (max-width: 520px) {
  .aff-login-shell { padding: 14px; }
  .aff-login-card { width: calc(100vw - 28px); padding: 22px 18px; border-radius: 19px; }
  .aff-login-back img { width: 138px; }
  .aff-login-toolbar { gap: 8px; }
  .aff-login-toolbar { margin-bottom: 25px; }
  .aff-login-heading h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
