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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}


.container {
    width: 100%;
    max-width: 450px;
}

.form-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 40px;
    height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo-image {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 16px;
    margin: 0 auto 12px;
    transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
    will-change: transform, filter;
    cursor: default;
}

.logo-image:hover {
    transform: translateY(-4px) scale(1.05) rotate(-1deg);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.25);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

.logo-image:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.2);
}

.logo {
    color: #6366f1;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: #6b7280;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 16px;
}

.back-to-home {
    display: inline-block;
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-to-home:hover {
    color: #5856eb;
    text-decoration: underline;
}


.form-container {
    width: 100%;
}

.form-title {
    color: #111827;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.form-subtitle {
    color: #6b7280;
    font-size: 14px;
    text-align: center;
    margin-bottom: 32px;
}


.login-form {
    width: 100%;
}

.input-group {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.required {
    color: #ef4444;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.input-field:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-field:valid {
    border-color: #10b981;
    background: #f0fdf4;
}

.input-field:invalid:not(:focus):not(:placeholder-shown) {

    background: #f5f5f5;
}


.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.error-message.show {
    opacity: 1;
}


.submit-btn {
    width: 100%;
    background: #6366f1;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.submit-btn:hover:not(:disabled) {
    background: #5856eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.hidden {
    display: none;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.btn-text.loading {
    opacity: 0;
}


.form-links {
    text-align: center;
    margin-bottom: 24px;
}

.forgot-password {
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #5856eb;
    text-decoration: underline;
}

.signup-link {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link:hover {
    color: #5856eb;
    text-decoration: underline;
}


.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.error {
    background: #ef4444;
}

.toast-content {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
}


@media (max-width: 480px) {
    .form-wrapper {
        padding: 24px;
    }

    .logo {
        font-size: 24px;
    }

    .form-title {
        font-size: 20px;
    }

    .toast {
        left: 20px;
        right: 20px;
        transform: translateY(-100px);
    }

    .toast.show {
        transform: translateY(0);
    }
}


@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


.submit-btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.input-field:focus-visible {
    outline: none;
}

.input-field.error {
    border: 2px solid #ef4444;
    background: #fef2f2;
}