*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #0099e6;
    overflow: hidden;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: linear-gradient(160deg, #00b4f5 0%, #0077cc 60%, #005fa3 100%);
    position: relative;
    overflow: hidden;
}
.app-wrapper::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
    z-index: 0;
}
.app-wrapper::after {
    content: '';
    position: absolute;
    bottom: 80px;
    left: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
    z-index: 0;
}
.top-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 14px 20px 0 20px;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.lang-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.15);
}

.lang-btn span {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.logo-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 20px 20px 20px;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.logo-img {
    max-width: 200px;
    max-height: 70px;
    object-fit: contain;
}

.logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: rgba(255,255,255,0.13);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    margin: 0 18px;
    padding: 20px 22px 18px 22px;
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}
.account-type {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
}
.type-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 0;
    border-radius: 12px;
    transition: background 0.2s;
    opacity: 0.55;
}

.type-btn.active {
    opacity: 1;
}

.type-btn:hover {
    background: rgba(255,255,255,0.08);
    opacity: 0.9;
}

.type-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    transition: border-color 0.2s, background 0.2s;
}

.type-btn.active .type-icon {
    border-color: #fff;
    background: rgba(255,255,255,0.12);
}

.type-btn span {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.type-divider {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.25);
    margin: 0 8px;
}
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
    background: rgba(255,255,255,0.92);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 14px 44px 14px 18px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: #1a2a3a;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.form-input::placeholder {
    color: #9ab0c4;
    font-size: 14px;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 1px;
    background: rgba(0,120,200,0.13);
}

.input-group:last-child .input-line {
    display: none;
}

.toggle-pass {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ab0c4;
    font-size: 16px;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-pass:hover {
    color: #0077cc;
}
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #1a4a7a 0%, #1a5fa0 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,60,120,0.35);
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    margin-bottom: 12px;
    font-family: inherit;
}

.login-btn:hover {
    background: linear-gradient(90deg, #1a5fa0 0%, #0077cc 100%);
    box-shadow: 0 6px 24px rgba(0,80,160,0.40);
}

.login-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,60,120,0.25);
}
.forgot-area {
    text-align: right;
    padding-top: 2px;
}

.forgot-link {
    color: rgba(255,255,255,0.90);
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.1px;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #fff;
    text-decoration: underline;
}
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(0,80,160,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.22);
    margin: 0 0;
}

.nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 14px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: rgba(255,255,255,0.80);
    transition: color 0.2s;
    min-width: 52px;
}

.nav-item:hover {
    color: #fff;
}

.nav-item i {
    font-size: 20px;
}

.nav-item span {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.step-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 22px;
    gap: 8px;
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    margin-bottom: 4px;
}

.step-title {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.step-desc {
    color: rgba(255,255,255,0.80);
    font-size: 13px;
    line-height: 1.5;
}
.success-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 0 6px 0;
    gap: 10px;
}

.success-icon {
    font-size: 52px;
    color: #4ade80;
    line-height: 1;
    filter: drop-shadow(0 2px 8px rgba(74,222,128,0.35));
}

.success-title {
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.success-msg {
    color: rgba(255,255,255,0.90);
    font-size: 14px;
    line-height: 1.7;
}

.success-msg strong {
    color: #fff;
    font-weight: 700;
}

.success-divider {
    width: 60px;
    height: 1px;
    background: rgba(255,255,255,0.30);
    margin: 2px 0;
}

.success-sub {
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    font-style: italic;
}
.input-error {
    color: #c0392b !important;
}

.group-error {
    background: rgba(255, 235, 235, 0.6);
}

.form-fields .input-group.group-error .input-line {
    background: rgba(192, 57, 43, 0.35);
}

.error-msg {
    position: absolute;
    bottom: -18px;
    left: 18px;
    font-size: 11px;
    color: #e74c3c;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20,40,70,0.95);
    color: #fff;
    padding: 13px 24px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    max-width: 90vw;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.toast-success {
    background: rgba(0,140,80,0.95);
}

.toast.toast-error {
    background: rgba(180,30,30,0.92);
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.45s ease;
}
@media (max-width: 400px) {
    .login-card {
        margin: 0 10px;
        padding: 22px 14px 18px 14px;
    }
    .logo-img {
        max-width: 160px;
    }
}

@media (min-width: 481px) {
    html, body {
        background: #1a2a3a;
    }
}
