/* Auth pages — login redesign */

/* Login screen: +20% text scale (mobile + desktop) */
html.auth-page--login {
    font-size: 120%;
}

:root {
    --auth-orange: #F16744;
    --auth-orange-dark: #D94E2E;
    --auth-orange-light: #FEF0EC;
    --auth-text: #1a1a1a;
    --auth-text-muted: #5c5c5c;
    --auth-border: #d1d5db;
    --auth-card-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    color: var(--auth-text);
    background: #fff;
}

.auth-page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #fffaf5;
    background-image: url('../images/login-bg-mobile.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}

@media (min-width: 768px) {
    .auth-page-bg {
        background-image: url('../images/login-bg-desktop.png');
        background-position: center;
    }
}

.auth-page-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 16px 24px;
    box-sizing: border-box;
}

.auth-page-lang {
    align-self: flex-end;
    margin-bottom: 8px;
    font-size: 16px!important;
}

.auth-lang-switch {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--auth-border);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--auth-text);
    transition: background 0.15s, color 0.15s;
}

.auth-lang-switch a.is-active {
    background: var(--auth-orange);
    color: #fff;
}

.auth-lang-switch a:not(.is-active):hover {
    background: var(--auth-orange-light);
    color: var(--auth-orange-dark);
}

.auth-lang-switch .auth-lang-divider {
    display: none;
}

.auth-page-main {
    width: 100%;
    max-width: 352px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .auth-page-shell {
        padding: 24px 24px 32px;
    }
    .auth-page-main {
        max-width: 384px;
    }
}

/* Brand header — logo + Modi12 + tagline */
.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.auth-brand-logo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 2px solid var(--auth-orange);
    object-fit: cover;
    background: #fff;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(241, 103, 68, 0.15);
}

@media (min-width: 768px) {
    .auth-brand-logo {
        width: 100px;
        height: 100px;
    }
}

.auth-brand-name {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--auth-orange);
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .auth-brand-name {
        font-size: 32px;
    }
}

.auth-brand-tagline {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--auth-text);
    font-weight: 500;
}

.auth-brand-tagline .auth-dot {
    color: var(--auth-orange);
    margin: 0 4px;
}

/* Login card */
.auth-card {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(195, 198, 215, 0.6);
    box-shadow: var(--auth-card-shadow);
    padding: 20px 20px 16px;
}

@media (min-width: 768px) {
    .auth-card {
        padding: 24px 24px 20px;
    }
}

.auth-card-label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--auth-text);
}

.auth-phone-field {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-phone-field:focus-within {
    border-color: var(--auth-orange);
    box-shadow: 0 0 0 3px rgba(241, 103, 68, 0.12);
}

.auth-phone-prefix {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 0 10px;
    border-right: 1px solid var(--auth-border);
    background: #fafafa;
    font-size: 15px;
    font-weight: 500;
    color: var(--auth-text);
}

.auth-phone-prefix .material-symbols-outlined {
    font-size: 18px;
    color: var(--auth-text-muted);
    line-height: 1;
}

.auth-phone-input {
    flex: 1;
    min-width: 0;
    padding: 0 14px;
    border: none !important;
    background: transparent !important;
    font-size: 16px!important;
    color: var(--auth-text);
    outline: none !important;
    box-shadow: none !important;
    min-height: 48px;
}

.auth-phone-input::placeholder {
    color: #9ca3af;
}

.auth-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: var(--auth-orange);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.auth-btn-primary:hover:not(:disabled) {
    background: var(--auth-orange-dark);
}

.auth-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-otp-meta .auth-btn-primary {
    margin-top: 0;
}

.auth-card-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    color: var(--auth-text-muted);
}

.auth-card-footer a {
    color: var(--auth-orange);
    font-weight: 700;
    text-decoration: none;
}

.auth-card-footer a:hover {
    text-decoration: underline;
}

.auth-form-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-dev-banner {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 13px;
    color: #92400e;
    line-height: 1.4;
}

.auth-otp-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.auth-otp-hint {
    margin: 0 0 12px;
    text-align: center;
    font-size: 14px;
    color: var(--auth-text-muted);
}

.auth-otp-input {
    width: 100%;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.35em;
    padding: 12px;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    min-height: 48px;
    box-sizing: border-box;
}

.auth-otp-input:focus {
    outline: none;
    border-color: var(--auth-orange);
    box-shadow: 0 0 0 3px rgba(241, 103, 68, 0.12);
}

.auth-otp-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.auth-countdown {
    margin: 0;
    font-size: 12px;
    color: var(--auth-text-muted);
}

.auth-countdown button {
    color: var(--auth-orange);
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

.auth-page-copyright {
    margin-top: auto;
    padding-top: 24px;
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    width: 100%;
    max-width: 352px;
}

.auth-card > .auth-flash {
    margin-bottom: 12px;
}

.auth-flash {
    width: 100%;
    max-width: 352px;
    margin-bottom: 12px;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
}

.auth-flash--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.auth-flash--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Register page */
.auth-page-main--register {
    max-width: 416px;
}

.auth-card--register .auth-card-heading {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: var(--auth-text);
    text-align: center;
}

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

.auth-field {
    margin-bottom: 12px;
}

.auth-field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-field-label .auth-required {
    color: #dc2626;
}

.auth-card--register .auth-field-input,
.auth-card--register .auth-field-select,
.auth-field-input,
.auth-field-select {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--auth-border) !important;
    border-radius: 12px !important;
    background: #fff !important;
    font-size: 15px;
    color: var(--auth-text);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.auth-card--register .auth-field-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 32px !important;
}

.auth-card--register .auth-field-input:focus,
.auth-card--register .auth-field-select:focus,
.auth-field-input:focus,
.auth-field-select:focus {
    outline: none !important;
    border-color: var(--auth-orange) !important;
    box-shadow: 0 0 0 3px rgba(241, 103, 68, 0.12) !important;
    border-radius: 12px !important;
}

.auth-field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 640px) {
    .auth-field-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .auth-field-grid .auth-field {
        margin-bottom: 0;
    }
}

.auth-page-main--register .auth-page-copyright,
.auth-page-main--register .auth-flash {
    max-width: 416px;
}
