﻿:root {
    --brand-red: #E21B22;
    --brand-red-hover: #c8161d;
    --text: #1a1a1a;
    --muted: #6b6b6b;
    --border: #E5E7EB;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: #fff;
}

.auth-shell {
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

.auth-card {
    width: 100%;
    min-height: 100vh;
    background: #fff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.auth-image {
    background-image: url('/images/pizza-hero.jpg'), linear-gradient(135deg, #2a1a14 0%, #4a2a1a 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
}

.auth-form {
    padding: 40px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-logo img {
    height: 38px;
    object-fit: contain;
}

.auth-logo-fallback {
    font-size: 26px;
    font-weight: 700;
    color: var(--brand-red);
    letter-spacing: -0.5px;
    font-style: italic;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 8px 0;
}

.auth-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.field input,
.select-wrap select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.field input::placeholder {
    color: #bdbdbd;
}

.field input:focus,
.select-wrap select:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(226, 27, 34, 0.12);
}

.select-wrap {
    position: relative;
}

.select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
}

.select-wrap .chev {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid #6b6b6b;
    border-bottom: 2px solid #6b6b6b;
    transform: translateY(-75%) rotate(45deg);
    pointer-events: none;
}

.btn-primary {
    margin-top: 8px;
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--brand-red);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
    font-family: inherit;
}

.btn-primary:hover { background: var(--brand-red-hover); }
.btn-primary:active { transform: translateY(1px); }

.auth-alt-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.auth-alt-link:hover { text-decoration: underline; }

/* OTP */
.otp-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin: 8px 0 6px;
}

.otp-box {
    width: 56px;
    height: 56px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    outline: none;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.otp-box:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(226, 27, 34, 0.12);
}

.resend {
    text-align: center;
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--muted);
}

/* ---------------------------------------------------------
   Responsive breakpoints
   --------------------------------------------------------- */

/* Large laptop / small desktop (<= 1280px): tighten form padding */
@media (max-width: 1280px) {
    .auth-form {
        padding: 32px 48px;
        max-width: 440px;
    }
}

/* Tablet landscape (<= 1024px): still split, more compact */
@media (max-width: 1024px) {
    .auth-form {
        padding: 28px 36px;
        max-width: 400px;
    }
    .auth-logo img { height: 34px; }
    .auth-title { font-size: 20px; }
    .otp-box { width: 52px; height: 52px; font-size: 20px; }
}

/* Tablet portrait & large phones (<= 820px): stack vertically */
@media (max-width: 820px) {
    .auth-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .auth-image {
        min-height: 240px;
        height: 32vh;
        max-height: 320px;
    }
    .auth-form {
        min-height: auto;
        padding: 36px 32px 48px;
        max-width: 520px;
    }
    .auth-logo { margin-bottom: 20px; }
    .auth-logo img { height: 36px; }
}

/* Mobile (<= 560px) */
@media (max-width: 560px) {
    .auth-image {
        min-height: 200px;
        height: 28vh;
        max-height: 260px;
    }
    .auth-form {
        padding: 28px 20px 40px;
    }
    .auth-logo { margin-bottom: 18px; }
    .auth-logo img { height: 32px; }
    .auth-title { font-size: 19px; }
    .auth-subtitle { font-size: 13px; margin-bottom: 22px; }
    .field input,
    .select-wrap select { height: 44px; }
    .btn-primary { height: 46px; font-size: 15px; }
    .otp-row { gap: 10px; }
    .otp-box { width: 52px; height: 52px; font-size: 20px; }
}

/* Small phones (<= 380px) */
@media (max-width: 380px) {
    .auth-image {
        min-height: 160px;
        height: 24vh;
        max-height: 200px;
    }
    .auth-form { padding: 24px 16px 32px; }
    .auth-logo img { height: 30px; }
    .otp-row { gap: 8px; }
    .otp-box { width: 48px; height: 48px; font-size: 18px; }
}

/* Short landscape phones: shrink the hero so the form is reachable */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 900px) {
    .auth-card { grid-template-columns: 1fr 1fr; }
    .auth-image {
        min-height: 100vh;
        height: 100vh;
        max-height: none;
    }
    .auth-form {
        min-height: 100vh;
        padding: 20px 28px;
        justify-content: flex-start;
        overflow-y: auto;
    }
    .auth-logo { margin-bottom: 12px; }
    .auth-logo img { height: 28px; }
    .auth-subtitle { margin-bottom: 16px; }
    .auth-fields { gap: 10px; }
}

/* Touch-input refinements: prevent iOS auto-zoom on focused inputs */
@media (hover: none) and (pointer: coarse) {
    .field input,
    .select-wrap select,
    .otp-box {
        font-size: 16px;
    }
}
