html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden !important;
    background: #f4f6fb !important;
    animation: none !important;
    font-family: "Nunito", sans-serif;
}

/* Page fixed, scroll nahi karega */
.login-page {
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px;
    box-sizing: border-box;
    overflow: hidden;
}

/* ---------- Card ---------- */
.login-box {
    width: 100%;
    max-width: 520px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 20px;
    padding: 30px 34px 30px;
    box-sizing: border-box;
    box-shadow: 0 12px 40px rgba(11, 26, 51, 0.08);
}

/* ---------- Header ---------- */
.login-header {
    flex-shrink: 0;
    text-align: center;
    margin: -30px -34px 20px;
    padding: 24px 34px 16px;
    background: linear-gradient(180deg, #eaf1ff 0%, #f8faff 70%, #ffffff 100%);
    border-bottom: 1px solid #eaf0fa;
    border-radius: 20px 20px 0 0;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.login-logo img {
    width: 100%;
    max-width: 260px;
    max-height: 90px;
    height: auto;
    object-fit: contain;
    display: block;
}

.login-title {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1.2;
    text-transform: uppercase;
    color: #0b1a33;
}

.login-title span {
    color: #2563eb;
}

.login-sub {
    margin: 8px 0 0;
    font-size: 15px;
    font-weight: 600;
    color: #6b7a90;
}

/* Sirf yeh hissa scroll hoga, scrollbar hidden */
.login-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 6px 6px;
    margin: 0 -6px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.login-scroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ---------- Avatar upload ---------- */
.reg-avatar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f7f9fd;
    border: 1.5px dashed #cdd8ea;
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 16px;
    text-align: left;
}

.reg-avatar-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: #2563eb;
    color: #fff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow:
        0 0 0 3px #fff,
        0 4px 12px rgba(37, 99, 235, 0.2);
}

.reg-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reg-avatar-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.reg-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #1e3a8a;
    border: 1.5px solid #1e3a8a;
    border-radius: 9px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s;
}

.reg-avatar-btn:hover {
    background: #1e3a8a;
    color: #fff;
}

.reg-hint {
    font-size: 11.5px;
    font-weight: 600;
    color: #7a889d;
}

.reg-image-error {
    margin: -10px 0 14px;
}

/* ---------- Fields ---------- */
.login-field {
    margin-bottom: 14px;
    text-align: left;
}

.reg-row {
    display: flex;
    gap: 14px;
}

.reg-row .login-field {
    flex: 1;
    min-width: 0;
}

.login-pass {
    position: relative;
}

.login-input {
    width: 100%;
    height: 50px;
    border: 1.5px solid #e3e9f2;
    border-radius: 11px;
    background: #f5f7fb;
    padding: 0 16px;
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    color: #0b1a33;
    outline: none;
    box-sizing: border-box;
    transition:
        border-color 0.2s,
        background-color 0.2s,
        box-shadow 0.2s;
}

.login-input.has-icon {
    padding-left: 46px;
}

.login-input.has-eye {
    padding-right: 46px;
}

.login-input::placeholder {
    color: #8591a5;
    font-weight: 600;
}

.login-input:hover {
    border-color: #cdd8ea;
}

.login-input:focus {
    border-color: #2563eb;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Left icon */
.login-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    line-height: 1;
    color: #8591a5;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s;
}

.login-pass:focus-within .login-icon {
    color: #2563eb;
}

/* Select */
select.login-input {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238591a5' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

select.login-input:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%232563eb' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
}

select.login-input:invalid {
    color: #8591a5;
}

/* Eye button */
.login-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 8px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    color: #8591a5;
    cursor: pointer;
    transition:
        color 0.2s,
        background 0.2s;
}

.login-eye:hover {
    color: #0b1a33;
    background: #e9eef7;
}

/* Errors */
.login-error {
    display: block;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
    padding-left: 2px;
    text-align: left;
}

.login-error:empty {
    display: none;
}

/* ---------- Primary button ---------- */
.login-btn {
    width: 100%;
    min-height: 50px;
    height: auto;
    margin-top: 6px;
    padding: 10px 14px;
    border: none;
    border-radius: 11px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.6px;
    line-height: 1.3;
    text-align: center;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
    transition:
        background 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}

.login-btn:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(30, 58, 138, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.is-loading {
    opacity: 0.75;
    pointer-events: none;
}

.login-btn .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- OR divider ---------- */
.login-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #8591a5;
}

.login-or::before,
.login-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e3e9f2;
}

/* ---------- Outline button ---------- */
.login-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    height: auto;
    padding: 10px 14px;
    border: 1.5px solid #1e3a8a;
    border-radius: 11px;
    background: #fff;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition:
        background 0.2s,
        color 0.2s;
}

.login-btn-outline:hover {
    background: #1e3a8a;
    color: #fff;
}

/* ---------- Page loader ---------- */
.page-loader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.page-loader.show {
    display: flex;
}

.loader-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #dbe5f5;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ---------- Toast ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toast-in 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.toast.success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.toast.error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.toast.hide {
    animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-in {
    from {
        transform: translateX(110%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(110%);
        opacity: 0;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
    .login-page {
        padding: 14px;
    }

    .login-box {
        padding: 24px 20px 24px;
        border-radius: 18px;
        box-shadow: 0 6px 24px rgba(11, 26, 51, 0.06);
    }

    .login-header {
        margin: -24px -20px 18px;
        padding: 22px 20px 14px;
        border-radius: 18px 18px 0 0;
    }

    .login-logo img {
        max-width: 210px;
        max-height: 72px;
    }

    .login-title {
        font-size: 26px;
    }

    .login-sub {
        font-size: 14px;
    }

    .reg-row {
        flex-direction: column;
        gap: 0;
    }

    .reg-avatar {
        padding: 12px 14px;
        gap: 14px;
    }

    /* iPhone pe input focus pe zoom na ho */
    .login-input {
        font-size: 16px;
    }

    .login-btn-outline {
        font-size: 13px;
        letter-spacing: 0.3px;
    }

    .toast-container {
        left: 16px;
        right: 16px;
    }

    .toast {
        min-width: 0;
        max-width: none;
    }
}

@media (max-width: 360px) {
    .login-page {
        padding: 10px;
    }

    .login-box {
        padding: 20px 16px;
    }

    .login-header {
        margin-top: -20px;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .login-logo img {
        max-width: 180px;
        max-height: 62px;
    }

    .login-title {
        font-size: 23px;
    }

    .login-btn,
    .login-btn-outline {
        font-size: 12.5px;
        letter-spacing: 0.2px;
        padding: 10px;
    }

    .reg-avatar {
        padding: 10px 12px;
        gap: 10px;
    }
}

/* Bohat chhoti height (ab sirf 560px se neeche) */
@media (max-height: 560px) {
    .login-page {
        padding: 10px 16px;
    }

    .login-box {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .login-header {
        margin-top: -18px;
        margin-bottom: 12px;
        padding-top: 14px;
        padding-bottom: 10px;
    }

    .login-logo {
        margin-bottom: 8px;
    }

    .login-logo img {
        max-width: 190px;
        max-height: 60px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-sub {
        font-size: 13px;
        margin-top: 4px;
    }
}
