/**
 * Speedo Order — responsive authentication interface.
 * Version: v0.1.0
 * Copyright © 2026 Basil — basil.dgh@gmail.com
 */

:root {
    --navy-950: #0b0f3c;
    --navy-900: #101447;
    --teal-800: #066b82;
    --teal-700: #087a8f;
    --mint-500: #5fc49c;
    --mint-400: #7bd3ac;
    --yellow-400: #f1d64b;
    --ink: #121735;
    --muted: #68738a;
    --line: #dce5ea;
    --surface: #ffffff;
    --surface-soft: #f3f7f8;
    --danger: #b9384c;
    --danger-bg: #fff0f2;
    --success: #16745d;
    --success-bg: #eaf9f3;
    --shadow-xl: 0 30px 80px rgba(11, 15, 60, 0.18);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--surface-soft); }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--surface-soft);
    font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 0.92fr) minmax(560px, 1.08fr);
    overflow: hidden;
    background:
        radial-gradient(circle at 90% 8%, rgba(95, 196, 156, .18), transparent 25%),
        #f5f8f9;
}

.auth-brand {
    direction: rtl;
    position: relative;
    min-height: 100vh;
    padding: clamp(40px, 5vw, 88px);
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(150deg, rgba(8, 122, 143, .94) 0%, rgba(16, 20, 71, .98) 70%),
        var(--navy-900);
}

.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .28;
    background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.auth-brand::after {
    content: "";
    position: absolute;
    width: 54%;
    height: 7px;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, var(--yellow-400));
}

.brand-orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
}

.orbit-one { width: 520px; height: 520px; left: -260px; top: 8%; }
.orbit-two { width: 290px; height: 290px; left: -95px; top: 27%; border-color: rgba(241,214,75,.32); }

.brand-content {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - clamp(80px, 10vw, 176px));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 56px;
}

.brand-logo-frame {
    width: clamp(170px, 16vw, 240px);
    min-height: 112px;
    display: grid;
    place-items: center;
    padding: 22px 25px;
    border-radius: 26px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
}

.brand-logo { display: block; width: 100%; max-height: 128px; object-fit: contain; }

.brand-copy { max-width: 620px; }
.brand-kicker { color: var(--yellow-400); font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.brand-copy h1 { margin: 18px 0 22px; font-size: clamp(40px, 4.5vw, 72px); line-height: 1.18; letter-spacing: -.045em; }
.brand-copy h1 em { color: var(--mint-400); font-style: normal; }
.brand-copy p { max-width: 520px; margin: 0; color: rgba(255,255,255,.74); font-size: clamp(15px, 1.2vw, 19px); line-height: 1.9; }

.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trust-grid div { padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.065); backdrop-filter: blur(10px); }
.trust-grid strong, .trust-grid span { display: block; }
.trust-grid strong { color: var(--yellow-400); font-size: 15px; }
.trust-grid span { margin-top: 4px; color: rgba(255,255,255,.68); font-size: 11px; line-height: 1.5; }

.auth-stage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 88px);
}

.mobile-brand { display: none; }

.auth-card {
    width: min(100%, 510px);
    padding: clamp(28px, 3vw, 46px);
    border: 1px solid rgba(16,20,71,.08);
    border-radius: 30px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow-xl);
}

.auth-card-head { margin-bottom: 30px; }
.version-pill { display: inline-flex; padding: 6px 11px; border: 1px solid rgba(8,122,143,.16); border-radius: 999px; color: var(--teal-800); background: #eef9f6; font-size: 10px; font-weight: 800; direction: ltr; }
.heading-block { margin-top: 24px; }
.eyebrow { color: var(--teal-700); font-size: 12px; font-weight: 800; }
.heading-block h2 { margin: 8px 0 7px; color: var(--navy-900); font-size: clamp(28px, 3vw, 38px); line-height: 1.3; letter-spacing: -.035em; }
.heading-block p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.auth-form { display: grid; gap: 19px; }
.field-group { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 750; }
.field-group small { color: var(--danger); font-weight: 600; }
.input-wrap { position: relative; display: block; }
.input-wrap input {
    width: 100%;
    height: 56px;
    padding: 0 49px 0 16px;
    border: 1px solid #cfdae0;
    border-radius: 15px;
    outline: none;
    color: var(--navy-900);
    background: #fbfdfd;
    font-size: 14px;
    direction: ltr;
    text-align: left;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap input:focus { border-color: var(--teal-700); background: #fff; box-shadow: 0 0 0 4px rgba(8,122,143,.12); }
.input-icon { position: absolute; z-index: 1; right: 17px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 20px; height: 20px; color: var(--teal-700); font-size: 14px; font-weight: 900; }
.lock-icon { font-size: 8px; border: 2px solid currentColor; border-radius: 6px; }

.primary-button, .secondary-button {
    min-height: 56px;
    border: 0;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 850;
    transition: translate .2s, box-shadow .2s, filter .2s;
}
.primary-button { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; padding: 0 22px; color: #fff; background: linear-gradient(110deg, var(--teal-800), var(--mint-500)); box-shadow: 0 13px 28px rgba(8,122,143,.2); }
.primary-button:hover { translate: 0 -2px; box-shadow: 0 17px 34px rgba(8,122,143,.28); }
.primary-button:focus-visible, .secondary-button:focus-visible { outline: 3px solid var(--yellow-400); outline-offset: 3px; }
.secondary-button { padding: 0 26px; color: var(--navy-900); background: #e7eef1; }
.form-help { margin: -2px 0 0; color: #8791a3; font-size: 11px; line-height: 1.7; text-align: center; }

.notice { margin-bottom: 20px; padding: 13px 15px; border-radius: 13px; font-size: 12px; line-height: 1.7; }
.notice-error { color: var(--danger); background: var(--danger-bg); border: 1px solid rgba(185,56,76,.13); }
.notice-success { color: var(--success); background: var(--success-bg); border: 1px solid rgba(22,116,93,.12); }
.password-rules { display: grid; gap: 3px; padding: 13px 15px; border-radius: 13px; color: #7a6831; background: #fff8dc; font-size: 11px; line-height: 1.7; }

.auth-footer { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 28px; padding-top: 21px; border-top: 1px solid #e7edef; color: #83909e; font-size: 10px; }
.security-mark { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; background: var(--mint-500); font-size: 10px; }
.copyright { margin: 22px 0 0; color: #8a95a5; font-size: 9px; direction: ltr; text-align: center; }

.dashboard-body { display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #f2f8f6, #eaf0f4); }
.dashboard-placeholder { width: min(100%, 620px); padding: 48px; border-radius: 30px; background: #fff; box-shadow: var(--shadow-xl); text-align: center; }
.dashboard-placeholder img { width: 190px; max-height: 130px; object-fit: contain; }
.dashboard-placeholder .version-pill { margin-top: 24px; }
.dashboard-placeholder h1 { color: var(--navy-900); font-size: 32px; }
.dashboard-placeholder p { color: var(--muted); line-height: 1.8; }

@media (max-width: 1100px) {
    .auth-shell { grid-template-columns: minmax(360px, .82fr) minmax(500px, 1.18fr); }
    .auth-brand { padding: 46px; }
    .brand-copy h1 { font-size: 43px; }
    .trust-grid { grid-template-columns: 1fr; }
    .trust-grid div { padding: 12px 15px; }
}

@media (max-width: 820px) {
    .auth-shell { display: block; min-height: 100svh; }
    .auth-brand { display: none; }
    .auth-stage { min-height: 100svh; justify-content: flex-start; padding: 32px 22px; background: linear-gradient(160deg, var(--navy-900) 0 210px, #f4f8f9 210px); }
    .mobile-brand { display: grid; place-items: center; width: 150px; min-height: 88px; margin: 4px auto 24px; padding: 13px 17px; border-radius: 18px; background: #fff; box-shadow: 0 15px 35px rgba(0,0,0,.2); }
    .mobile-brand img { width: 100%; max-height: 78px; object-fit: contain; }
    .auth-card { width: min(100%, 560px); border-radius: 25px; }
}

@media (max-width: 520px) {
    .auth-stage { padding: 22px 12px 24px; background: linear-gradient(160deg, var(--navy-900) 0 176px, #f4f8f9 176px); }
    .mobile-brand { width: 128px; min-height: 74px; margin-bottom: 18px; border-radius: 15px; }
    .auth-card { padding: 25px 20px; border-radius: 22px; box-shadow: 0 20px 55px rgba(11,15,60,.19); }
    .auth-card-head { margin-bottom: 23px; }
    .heading-block { margin-top: 18px; }
    .heading-block h2 { font-size: 28px; }
    .input-wrap input { height: 54px; }
    .primary-button { min-height: 54px; }
    .copyright { max-width: 280px; line-height: 1.6; }
}

@media (min-width: 1680px) {
    .auth-stage { padding-inline: 8vw; }
    .auth-card { width: 560px; }
    .brand-content { max-width: 760px; margin-inline: auto; }
}

@media (min-width: 821px) and (max-height: 850px) {
    .auth-brand { padding: 30px 46px; }
    .brand-content { min-height: calc(100vh - 60px); gap: 22px; }
    .brand-logo-frame { width: 170px; min-height: 82px; padding: 12px 18px; border-radius: 19px; }
    .brand-logo { max-height: 92px; }
    .brand-copy h1 { margin: 10px 0 12px; font-size: 38px; }
    .brand-copy p { font-size: 14px; line-height: 1.7; }
    .trust-grid div { padding: 10px 13px; }
    .auth-stage { padding-block: 24px; }
    .auth-card { padding: 27px 36px; border-radius: 25px; }
    .auth-card-head { margin-bottom: 21px; }
    .heading-block { margin-top: 15px; }
    .heading-block h2 { margin-block: 5px; font-size: 29px; }
    .heading-block p { line-height: 1.6; }
    .auth-form { gap: 14px; }
    .input-wrap input, .primary-button, .secondary-button { min-height: 50px; height: 50px; }
    .auth-footer { margin-top: 18px; padding-top: 15px; }
    .copyright { margin-top: 14px; }
}

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