* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.login-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container img {
    max-width: 80px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.welcome-title {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-subtitle {
    color: #666;
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}

/* Legacy alert - hidden by default, using toast instead */
.alert {
    display: none !important;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.login-type-tabs {
    display: flex;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 28px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #667eea;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-btn:hover:not(.active) {
    color: #667eea;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    outline: none;
    background: #fafafa;
    color: #333;
}

.password-wrapper{position:relative}
.password-wrapper input{padding-right:44px}
.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:none;background:transparent;color:#667eea;cursor:pointer;padding:6px;border-radius:8px}
.password-toggle:hover{background:#eef2ff}
.password-toggle .eye-icon,.password-toggle .eye-off-icon{display:inline-block}

.form-group input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 3px solid rgba(102, 126, 234, 0.1);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tablet */
@media (max-width: 768px) {
    .login-container {
        padding: 40px 32px;
        max-width: 400px;
    }

    .welcome-title {
        font-size: 22px;
    }

    .logo-container img {
        max-width: 70px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .login-container {
        padding: 32px 24px;
        border-radius: 12px;
        max-width: 100%;
    }

    .logo-section {
        margin-bottom: 32px;
    }

    .logo-container {
        margin-bottom: 20px;
    }

    .logo-container img {
        max-width: 60px;
    }

    .welcome-title {
        font-size: 20px;
    }

    .welcome-subtitle {
        font-size: 13px;
    }

    .login-type-tabs {
        margin-bottom: 24px;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }
    .password-wrapper input{padding-right:40px}

    .btn-login {
        padding: 12px;
        font-size: 14px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .login-container {
        padding: 28px 20px;
    }

    .logo-container img {
        max-width: 50px;
    }

    .welcome-title {
        font-size: 18px;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .login-container {
        max-width: 450px;
        padding: 52px 44px;
    }

    .welcome-title {
        font-size: 26px;
    }
}

/* Landscape Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 12px;
    }

    .login-container {
        padding: 24px 32px;
        max-width: 500px;
    }

    .logo-section {
        margin-bottom: 20px;
    }

    .logo-container {
        margin-bottom: 12px;
    }

    .logo-container img {
        max-width: 50px;
    }

    .welcome-title {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .welcome-subtitle {
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 14px;
    }
}
