/* AMG Logistics - authentication screens (uses the site's theme tokens) */
:root {
    --a-orange: #FD5523;
    --a-orange-dark: #e2440f;
    --a-orange-rgb: 253, 85, 35;
    --a-ink: #062E39;
    --a-ink-2: #0a4252;
    --a-gray: #565969;
    --a-line: #e3e7ec;
    --a-bg: #F4F5F9;
    --a-danger: #c62f2f;
    --a-ok: #14804a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.auth-body {
    font-family: "DM Sans", sans-serif;
    color: var(--a-ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
.auth-body a { color: var(--a-orange); text-decoration: none; font-weight: 600; }
.auth-body a:hover { color: var(--a-orange-dark); text-decoration: underline; }

.auth { display: grid; grid-template-columns: minmax(380px, 44%) 1fr; min-height: 100vh; }

/* ---------- brand panel ---------- */
.auth__brand {
    position: relative; overflow: hidden; color: #fff;
    padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
    background:
        radial-gradient(900px 500px at 110% -10%, rgba(var(--a-orange-rgb), .28), transparent 60%),
        radial-gradient(700px 480px at -20% 110%, rgba(255, 255, 255, .07), transparent 60%),
        linear-gradient(160deg, var(--a-ink) 0%, #04222b 100%);
}
.auth__brand::before {
    content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
    background: url("../images/pattern/footer-v1-pattern.png") center / cover no-repeat;
}
.auth__brand > * { position: relative; z-index: 1; }
.auth__logo img { width: 170px; height: auto; display: block; }
.auth__pitch h1 {
    font-size: clamp(30px, 3.1vw, 44px); line-height: 1.12; font-weight: 700; margin: 0 0 18px; letter-spacing: -.02em; color: #fff;
}
.auth__pitch h1 span { color: var(--a-orange); }
.auth__pitch p { color: rgba(255, 255, 255, .74); font-size: 17px; line-height: 1.65; margin: 0 0 34px; max-width: 460px; }
.auth__points { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; max-width: 460px; }
.auth__points li { display: flex; gap: 16px; align-items: flex-start; }
.auth__points i {
    flex: 0 0 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 16px;
    color: var(--a-orange); background: rgba(var(--a-orange-rgb), .14); border: 1px solid rgba(var(--a-orange-rgb), .3);
}
.auth__points strong { display: block; font-size: 16px; margin-bottom: 2px; color: #fff; }
.auth__points span { font-size: 14px; color: rgba(255, 255, 255, .66); line-height: 1.5; }
.auth__legal { font-size: 13px; color: rgba(255, 255, 255, .5); }

/* ---------- form side ---------- */
.auth__main { background: var(--a-bg); display: flex; flex-direction: column; padding: 28px 32px; }
.auth__top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--a-gray); min-height: 40px; }
.auth__top .auth__mobile-logo { display: none; }
.auth__top .auth__mobile-logo img { width: 118px; display: block; }
.auth__center { flex: 1; display: grid; place-items: center; padding: 28px 0; }
.auth__card {
    width: 100%; max-width: 470px; background: #fff; border-radius: 20px; padding: 44px 42px;
    border: 1px solid var(--a-line); box-shadow: 0 24px 60px -28px rgba(6, 46, 57, .28), 0 2px 6px rgba(6, 46, 57, .04);
}
.auth__card--wide { max-width: 640px; }
.auth__head { margin-bottom: 26px; }
.auth__eyebrow {
    display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--a-orange); margin-bottom: 12px;
}
.auth__eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--a-orange); border-radius: 2px; }
.auth__head h2 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; font-weight: 700; letter-spacing: -.01em; color: var(--a-ink); }
.auth__head p { margin: 0; color: var(--a-gray); font-size: 15.5px; line-height: 1.6; }
.auth__head p strong { color: var(--a-ink); }

/* ---------- fields ---------- */
.af { margin-bottom: 18px; }
.af label { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--a-ink); }
.af__wrap { position: relative; }
.af__wrap > i.af__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #8d95a3; font-size: 15px; pointer-events: none; transition: color .2s; }
.af input[type=text], .af input[type=email], .af input[type=tel], .af input[type=password] {
    width: 100%; height: 54px; padding: 0 16px 0 46px; font: inherit; font-size: 15.5px; color: var(--a-ink);
    background: #f8f9fb; border: 1.5px solid var(--a-line); border-radius: 12px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.af input::placeholder { color: #a3aab6; }
.af input:focus { background: #fff; border-color: var(--a-orange); box-shadow: 0 0 0 4px rgba(var(--a-orange-rgb), .13); }
.af__wrap:focus-within > i.af__icon { color: var(--a-orange); }
.af.has-error input { border-color: var(--a-danger); background: #fff8f8; }
.af__error { display: block; color: var(--a-danger); font-size: 13px; margin-top: 6px; }
.af__toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none;
    color: #8d95a3; cursor: pointer; border-radius: 8px; font-size: 15px;
}
.af__toggle:hover { color: var(--a-ink); background: #eef0f4; }
.af input[type=password], .af input.has-toggle { padding-right: 52px; }

.af--code input { text-align: center; letter-spacing: .55em; font-size: 26px; font-weight: 700; padding: 0 0 0 .55em; height: 64px; }
.af--code .af__wrap > i.af__icon { display: none; }

.auth__row { display: flex; justify-content: space-between; align-items: center; margin: -2px 0 22px; font-size: 14px; gap: 12px; flex-wrap: wrap; }
.auth__check { display: inline-flex; align-items: center; gap: 9px; color: var(--a-gray); cursor: pointer; font-weight: 500; }
.auth__check input { width: 18px; height: 18px; accent-color: var(--a-orange); margin: 0; }

.auth-btn {
    width: 100%; height: 56px; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .01em;
    color: #fff; background: linear-gradient(180deg, #ff6a3b, var(--a-orange)); box-shadow: 0 12px 24px -10px rgba(var(--a-orange-rgb), .75);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .15s, box-shadow .2s, filter .2s;
}
.auth-btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 16px 28px -10px rgba(var(--a-orange-rgb), .8); }
.auth-btn:active { transform: translateY(0); }
.auth-btn[disabled] { opacity: .75; cursor: wait; }
.auth-btn--ghost { background: #fff; color: var(--a-ink); border: 1.5px solid var(--a-line); box-shadow: none; }
.auth-btn--ghost:hover { border-color: var(--a-ink); box-shadow: none; filter: none; }
.auth-btn--dark { background: var(--a-ink); box-shadow: 0 12px 24px -12px rgba(6, 46, 57, .7); }
.auth-btn--sm { height: 46px; font-size: 14.5px; width: auto; padding: 0 22px; }

.auth__foot { text-align: center; margin-top: 24px; font-size: 14.5px; color: var(--a-gray); }
.auth__foot p { margin: 6px 0 0; }
.auth-link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--a-orange); cursor: pointer; }
.auth-link-btn:hover { text-decoration: underline; color: var(--a-orange-dark); }

/* ---------- alerts ---------- */
.auth-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 14.5px; line-height: 1.5; border: 1px solid; }
.auth-alert i { margin-top: 3px; }
.auth-alert--danger { background: #fff5f5; border-color: #f6c9c9; color: #8f1f1f; }
.auth-alert--success { background: #f0faf4; border-color: #bfe5cf; color: #0f6238; }
.auth-alert--warning { background: #fff8ec; border-color: #f4dcae; color: #7a5200; }
.auth-alert--info { background: #eef7fa; border-color: #c4e0e9; color: #0a4252; }

/* ---------- password strength ---------- */
.pw-meter { display: flex; gap: 5px; margin-top: 9px; }
.pw-meter span { flex: 1; height: 4px; border-radius: 4px; background: #e6e9ee; transition: background .25s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: #e4572e; }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: #f0a21a; }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: #7bb344; }
.pw-meter[data-score="4"] span:nth-child(-n+4) { background: var(--a-ok); }
.pw-hint { font-size: 12.5px; color: #8a93a1; margin-top: 6px; }

.af-grid { display: grid; grid-template-columns: 1fr; }

/* ---------- misc blocks (security page etc.) ---------- */
.auth-section { padding: 22px 0; border-top: 1px solid var(--a-line); }
.auth-section:first-of-type { border-top: 0; padding-top: 0; }
.auth-section h3 { font-size: 18px; margin: 0 0 6px; }
.auth-section p { color: var(--a-gray); font-size: 14.5px; line-height: 1.6; margin: 0 0 14px; }
.auth-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.auth-badge--on { background: #e7f6ee; color: var(--a-ok); }
.auth-badge--off { background: #eef0f4; color: var(--a-gray); }
.auth-qr { display: grid; place-items: center; margin: 6px 0 14px; }
.auth-qr > div { padding: 12px; background: #fff; border: 1px solid var(--a-line); border-radius: 14px; line-height: 0; }
.auth-secret { display: block; text-align: center; font: 600 16px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .12em; background: #f8f9fb; border: 1px dashed #cfd5de; border-radius: 10px; padding: 12px; margin-bottom: 18px; word-break: break-all; }
.auth-codes { columns: 2; gap: 16px; font: 600 15px/2 ui-monospace, Consolas, monospace; margin: 10px 0 0; padding: 14px 18px; background: #fff; border: 1px dashed #e0b45a; border-radius: 10px; color: var(--a-ink); }
.auth-steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 18px; }
.auth-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--a-gray); margin-bottom: 10px; }
.auth-steps li::before { content: counter(s); flex: 0 0 26px; height: 26px; border-radius: 50%; background: rgba(var(--a-orange-rgb), .12); color: var(--a-orange); font-weight: 700; font-size: 13px; display: grid; place-items: center; }

.auth-icon-badge { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; color: var(--a-orange); background: rgba(var(--a-orange-rgb), .1); margin-bottom: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
    .auth { grid-template-columns: 1fr; }
    .auth__brand { display: none; }
    .auth__top .auth__mobile-logo { display: block; }
    .auth__main { padding: 20px 16px; min-height: 100vh; }
}
@media (max-width: 520px) {
    .auth__card { padding: 32px 22px; border-radius: 16px; }
    .af-grid { grid-template-columns: 1fr; }
    .auth__head h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
