/* Auth pages — login & register layout */

body.auth-layout .loading-indicator {
    display: none !important;
}

body.auth-layout #layout--default {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.auth-layout main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.register.register--d {
    flex: 1;
    width: 100%;
    min-height: calc(100vh - 70px - 60px - env(safe-area-inset-bottom));
    padding: 1.5rem 1rem 2.5rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("/media/auth/login-bg.jpg") no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

.register__container {
    position: relative;
    width: 90%;
    max-width: 600px;
    margin: auto;
    border-radius: 5px;
    border: 1px solid #1b3a8e;
    background-color: rgba(9, 24, 64, 0.92);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.login__banner,
.register__banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
}

.login__banner {
    position: relative;
    padding: 1rem 1rem 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
    background-color: #091840;
    border-radius: 5px 5px 0 0;
    overflow: visible;
}

.login__banner img {
    display: block;
    width: auto;
    max-width: 85%;
    max-height: 90px;
    margin: 0 auto;
    object-fit: contain;
}

.register__banner {
    height: 0;
    padding-bottom: 33.33333%;
    margin-bottom: 1rem;
    overflow: visible;
}

.register__banner img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login form,
.register form {
    padding: 1rem;
}

.login__slogan,
.register__slogan {
    position: absolute;
    left: 50%;
    bottom: 0;
    font-size: 0.36rem;
    font-weight: 600;
    padding: 0.125rem 0.75rem;
    transform: translate(-50%, 100%);
    background-color: #1b3a8e;
    border-radius: 0 0 20px 20px;
    color: #fff;
    text-align: center;
    margin: 0;
    white-space: nowrap;
    z-index: 2;
}

.login__slogan span {
    display: block;
}

.login__title {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin: 0.75rem 1rem 0.35rem;
    color: #ebb058;
}

.login__text {
    font-size: 0.8rem;
    text-align: center;
    margin: 0 1rem 0.75rem;
    color: #fff;
    opacity: 0.9;
    line-height: 1.4;
}

.auth-field {
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #fff;
    border: 1px solid #1b3a8e;
}

.auth-field i {
    flex-shrink: 0;
    width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0e1f4e;
    color: #ebb058;
    pointer-events: none;
}

.auth-field input,
.auth-field select {
    flex: 1;
    width: 100%;
    border: none;
    padding: 0.55rem 0.75rem;
    color: #000;
    background: #fff;
    font-size: 0.95rem;
    min-height: 2.5rem;
    box-sizing: border-box;
}

.auth-field select {
    appearance: auto;
    cursor: pointer;
}

.auth-field--phone .auth-field__prefix {
    display: flex;
    align-items: center;
    padding: 0 0.35rem 0 0.5rem;
    color: #333;
    font-size: 0.9rem;
    background: #fff;
    pointer-events: none;
}

.auth-field--phone input {
    padding-left: 0.35rem;
}

.auth-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 5px;
    background-color: #1b3a8e;
    color: #ebb058;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    margin-bottom: 0.75rem;
    transition: background-color 0.2s ease;
}

.auth-btn:hover {
    background-color: #142d70;
}

.login__forgot-pass,
.auth-link {
    display: block;
    text-align: center;
    color: #fff;
    font-style: italic;
    text-decoration: underline;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.login__forgot-pass:hover,
.auth-link:hover {
    color: #ebb058;
}

.auth-switch {
    text-align: center;
    font-size: 0.8rem;
    margin: 0;
    color: #fff;
}

.auth-switch a {
    color: #ebb058;
    font-weight: 600;
    text-decoration: underline;
}

.auth-alert {
    padding: 0.65rem 0.85rem;
    border-radius: 5px;
    margin: 0 1rem 0.75rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.auth-alert--ok {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
    color: #fff;
}

.auth-alert--err {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #fff;
}

/* Kayıt: tam 5 satır × 2 kutu — sıra HTML = sol, sağ, sol, sağ … */
.register form.auth-form-register {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 0.75rem;
    row-gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.auth-form-register > .auth-field {
    margin-bottom: 0;
    min-width: 0;
}

.auth-form-register .auth-form-grid-span {
    grid-column: 1 / -1;
}

.auth-form-register > .auth-btn {
    margin-top: 0.25rem;
}

.auth-form-register > .auth-switch {
    margin-top: 0;
}

.auth-field-hint--ok {
    color: #7dffb3;
}

.auth-field-hint--err {
    color: #ff8a8a;
}

.auth-alert--in-form {
    margin: 0 1rem 0.75rem;
}

.auth-form-register input[type="date"] {
    min-height: 2.5rem;
}

@media (min-width: 1024px) {
    .register__container {
        max-width: 640px;
    }

    .auth-form-register .auth-field input,
    .auth-form-register .auth-field select {
        font-size: 0.95rem;
        padding: 0.6rem 0.75rem;
    }
}

@media (max-width: 640px) {
    .register form.auth-form-register {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .register.register--d {
        background-attachment: scroll;
        padding: 1rem 0.65rem 2rem;
        align-items: flex-start;
    }

    .register__container {
        width: 100%;
        max-width: none;
        margin-top: 0.5rem;
    }

    .register form {
        padding: 0.85rem 0.75rem 1rem;
    }

    .auth-field input,
    .auth-field select {
        font-size: 16px;
    }

    .auth-field-hint {
        margin-left: 0.5rem;
        margin-right: 0.25rem;
    }
}
