* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #C7CEE6 0%, #E8ECF5 50%, #F0F2F8 100%);
    min-height: 100vh;
    color: #1e293b;
    overflow-x: hidden;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.lang-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.flag-icon {
    font-size: 1.2rem;
}

.arrow-down {
    transition: transform 0.2s;
}

/* Main Content */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: 80px;
}

/* Login Card */
.login-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    width: 420px;
    max-width: 90vw;
    min-height: 230px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
}

/* Input Group */
.input-group {
    margin-bottom: 16px;
}

.phone-field {
    display: flex;
    align-items: center;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    transition: all 0.2s;
    overflow: hidden;
}

.phone-field:focus-within {
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: white;
}

.phone-prefix {
    padding: 14px 0 14px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    user-select: none;
}

.phone-input {
    width: 100%;
    padding: 14px 16px 14px 8px;
    border: none;
    border-radius: 0;
    font-size: 0.95rem;
    font-family: inherit;
    background: transparent;
    color: #1e293b;
    outline: none;
}

.phone-input::placeholder {
    color: #94A3B8;
}

.phone-input.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Primary Button */
.btn-primary {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: none;
    transition: background 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    background: rgba(0, 0, 0, 0.25);
    pointer-events: all;
}

/* Modal Card */
.modal-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    width: 420px;
    max-width: 90vw;
    min-height: 260px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #F1F5F9;
}

.modal-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    margin-top: 8px;
}

/* Password Input */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #F8FAFC;
    color: #1e293b;
    outline: none;
    transition: all 0.2s;
}

.password-wrapper input::placeholder {
    color: #94A3B8;
}

.password-wrapper input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: white;
}

.password-wrapper input.shake {
    animation: shake 0.5s ease;
}

.eye-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.eye-toggle:hover {
    opacity: 0.7;
}

/* Forgot Link */
.forgot-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #64748b;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #3B82F6;
}

/* Messages */
.messages {
    margin-bottom: 16px;
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-align: center;
}

.alert-error {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.alert-success {
    background: #F0FDF4;
    color: #16A34A;
    border: 1px solid #BBF7D0;
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar {
        padding: 16px 20px;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
    }

    .logo-title {
        font-size: 1rem;
    }

    .logo-subtitle {
        font-size: 0.7rem;
    }

    .lang-btn {
        padding: 8px 12px;
    }

    .login-card,
    .modal-card {
        width: 100%;
        max-width: 90vw;
        padding: 28px 24px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding-top: 100px;
    }

    .login-card,
    .modal-card {
        border-radius: 12px;
        min-height: auto;
    }

    .card-title,
    .modal-title {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
}