/* ============================================================
   Falcora — Login Page Styles (Fully Responsive)
   Place in: Content/css/auth-login.css
   
   Breakpoints:
   - Desktop:      > 1100px
   - Small desktop: ≤ 1100px
   - Tablet:        ≤ 860px  (hero becomes banner)
   - Large phone:   ≤ 600px  (hero hidden, full-screen form)
   - Small phone:   ≤ 380px  (compact everything)
   - Landscape:     ≤ 600px height (condensed spacing)
   ============================================================ */

:root {
    --color-primary: #1B3BF5;
    --color-primary-dark: #0F2BD4;
    --color-primary-light: #E8EDFE;
    --color-bg: #FFFFFF;
    --color-bg-page: #E8EDFE;
    --color-text: #1A1D2B;
    --color-text-secondary: #5E6278;
    --color-text-muted: #9CA0B0;
    --color-border: #E4E6EF;
    --color-red: #EF4444;
    --color-red-bg: #FEF2F2;
    --color-green: #0ABF6B;
    --color-green-bg: #E6F9F0;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg-page);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input {
    font-family: inherit;
    font-size: 16px;
}

.nav__logo-icon {
    width: 110px;
}



/* ── Card ── */
.auth-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1100px;
    min-height: 640px;
    background: var(--color-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(27,59,245,0.04), 0 20px 60px rgba(27,59,245,0.08), 0 0 0 1px rgba(27,59,245,0.04);
}

/* ── Form ── */
.auth-form {
    display: flex;
    flex-direction: column;
    padding: 40px 48px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-form__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 45px;
    flex-shrink: 0;
}

.auth-form__logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.auth-form__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 400px;
}

.auth-form__heading {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text);
    line-height: 1.2;
    margin-bottom: 15px;
}

/* ── Alerts ── */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    word-break: break-word;
}

.auth-alert--error {
    background: var(--color-red-bg);
    color: var(--color-red);
    border: 1px solid rgba(239,68,68,0.15);
}

.auth-alert--success {
    background: var(--color-green-bg);
    color: var(--color-green);
    border: 1px solid rgba(10,191,107,0.15);
}

.auth-alert svg {
    flex-shrink: 0;
}

/* ── Fields ── */
.field {
    margin-bottom: 20px;
}

.field__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.field__input-wrap {
    position: relative;
}

.field__input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    padding-right: 48px;
    font-size: 16px;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

    .field__input::placeholder {
        color: var(--color-text-muted);
    }

    .field__input:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(27,59,245,0.08);
    }

.field__input--error {
    border-color: var(--color-red);
}

    .field__input--error:focus {
        box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
    }

.field__input[type="email"] {
    padding-right: 16px;
}

.field__error {
    display: block;
    font-size: 12px;
    color: var(--color-red);
    margin-top: 5px;
}

.field__toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

    .field__toggle:hover {
        color: var(--color-text-secondary);
    }

/* ── Options ── */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-secondary);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

    .auth-remember input[type="checkbox"] {
        width: 18px;
        height: 18px;
        border-radius: 4px;
        border: 1.5px solid var(--color-border);
        accent-color: var(--color-primary);
        cursor: pointer;
        flex-shrink: 0;
    }

.auth-forgot {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    transition: color 0.2s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

    .auth-forgot:hover {
        color: var(--color-primary-dark);
        text-decoration: underline;
        text-underline-offset: 2px;
    }

/* ── Buttons ── */
.btn-primary {
    width: 100%;
    height: 52px;
    background: var(--color-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

    .btn-primary:hover:not(:disabled) {
        background: var(--color-primary-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(27,59,245,0.3);
    }

    .btn-primary:active:not(:disabled) {
        transform: translateY(0);
        box-shadow: none;
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.btn-loader svg {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

    .auth-divider::before, .auth-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--color-border);
    }

    .auth-divider span {
        font-size: 13px;
        color: var(--color-text-muted);
        font-weight: 500;
    }

.btn-google {
    width: 100%;
    height: 48px;
    background: #fff;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 500;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

    .btn-google:hover {
        background: #F9FAFB;
        border-color: var(--color-text-muted);
    }

    .btn-google:active {
        background: #F3F4F6;
    }

    .btn-google svg {
        flex-shrink: 0;
    }

.auth-signup {
    text-align: center;
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: 28px;
    padding-bottom: 8px;
}

    .auth-signup a {
        font-weight: 600;
        color: var(--color-primary);
        margin-left: 4px;
    }

        .auth-signup a:hover {
            text-decoration: underline;
            text-underline-offset: 2px;
        }

/* ── Hero ── */
.auth-hero {
    background: linear-gradient(160deg, #0B1437 0%, #1B3BF5 60%, #3B6AFF 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin: 12px;
}

    .auth-hero::before {
        content: '';
        position: absolute;
        top: -40%;
        right: -20%;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(59,106,255,0.3) 0%, transparent 70%);
        pointer-events: none;
    }

    .auth-hero::after {
        content: '';
        position: absolute;
        bottom: -30%;
        left: -10%;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(27,59,245,0.25) 0%, transparent 70%);
        pointer-events: none;
    }

.auth-hero__content {
    position: relative;
    z-index: 2;
}

.auth-hero__title {
    font-size: clamp(36px, 4.5vw, 56px);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.auth-hero__subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    max-width: 400px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Small desktop */
@media (max-width: 1100px) {
    .auth-card {
        max-width: 960px;
    }

    .auth-form {
        padding: 36px 36px;
    }

    .auth-hero {
        padding: 48px 40px;
    }

    .auth-hero__title {
        font-size: clamp(30px, 4vw, 44px);
    }
}

/* Tablet — hero becomes compact banner */
@media (max-width: 860px) {
    body {
        padding: 16px;
        align-items: flex-start;
    }

    .auth-card {
        grid-template-columns: 1fr;
        max-width: 560px;
        min-height: auto;
        margin: 0 auto;
    }

    .auth-hero {
        margin: 12px 12px 0 12px;
        padding: 36px 32px;
        min-height: auto;
        order: -1;
    }

    .auth-hero__title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .auth-hero__subtitle {
        font-size: 14px;
    }

    .auth-form {
        padding: 32px 32px;
    }

    .auth-form__logo {
        margin-bottom: 28px;
        margin-top: 15px;
    
    }

    .auth-form__heading {
        font-size: 26px;
        margin-bottom: 24px;
    }
}

/* Large phone — hero hidden, full screen */
@media (max-width: 600px) {
    body {
        padding: 0;
        align-items: stretch;
        background: var(--color-bg);
    }

    .auth-card {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-hero {
        display: none;
    }

    .auth-form {
        padding: 24px 24px;
        justify-content: flex-start;
        padding-top: env(safe-area-inset-top, 24px);
        padding-bottom: env(safe-area-inset-bottom, 24px);
    }

    .auth-form__logo {
        margin-bottom: 32px;
        margin-top: 15px;
    
    }

    .auth-form__content {
        max-width: 100%;
        justify-content: flex-start;
    }

    .auth-form__heading {
        font-size: 24px;
        margin-bottom: 24px;
    }

        .auth-form__heading br {
            display: none;
        }

    .field {
        margin-bottom: 16px;
    }

    .field__input {
        height: 50px;
    }

    .btn-primary {
        height: 54px;
        font-size: 17px;
    }

    .btn-google {
        height: 50px;
    }

    .auth-options {
        margin-bottom: 24px;
    }

    .auth-divider {
        margin: 20px 0;
    }

    .auth-signup {
        margin-top: 24px;
    }
}

/* Small phone */
@media (max-width: 380px) {
    .auth-form {
        padding: 20px 16px;
    }

    .auth-form__logo {
        font-size: 18px;
        margin-bottom: 24px;
        margin-top: 15px;
    
    }

    .auth-form__logo-icon {
        width: 28px;
        height: 28px;
    }

    .auth-form__heading {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .field__label {
        font-size: 13px;
    }

    .field__input {
        height: 48px;
        padding: 0 14px;
        font-size: 15px;
    }

        .field__input[type="password"] {
            padding-right: 44px;
        }

    .auth-remember {
        font-size: 13px;
    }

    .auth-forgot {
        font-size: 13px;
    }

    .btn-primary {
        height: 50px;
        font-size: 16px;
        border-radius: 25px;
    }

    .btn-google {
        height: 48px;
        font-size: 14px;
    }

    .auth-signup {
        font-size: 13px;
    }
}

/* Landscape phone */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding: 8px;
    }

    .auth-card {
        min-height: auto;
    }

    .auth-form {
        padding: 20px 32px;
    }

    .auth-form__logo {
        margin-bottom: 16px;
        margin-top: 15px;
    
    }

    .auth-form__heading {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .field {
        margin-bottom: 12px;
    }

    .field__input {
        height: 44px;
    }

    .auth-options {
        margin-bottom: 16px;
    }

    .btn-primary {
        height: 46px;
    }

    .auth-divider {
        margin: 14px 0;
    }
}
