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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(circle at top left, #eff6ff 0, #f9fafb 40%, #f9fafb 100%);
    min-height: 100vh;
    padding: 20px;
}

.login-page {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 40px);
}

.login-container {
    width: 100%;
    max-width: 480px;
    animation: fadeIn 0.5s ease-in;
    filter: drop-shadow(0 10px 40px rgba(15, 23, 42, 0.18));
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.login-logo {
    max-width: 260px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.login-header h1 {
    color: #111827;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.login-header p {
    color: #6b7280;
    font-size: 12px;
    font-weight: 400;
}

.login-header-text {
    max-width: 260px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fff;
    color: #111827;
}

.password-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
}

.password-toggle:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.password-toggle:active {
    background: #e5e7eb;
    transform: translateY(-50%) scale(0.95);
}

.password-toggle:focus {
    outline: none;
    background: #eff6ff;
    color: #272727;
}

.eye-icon {
    width: 18px;
    height: 18px;
    pointer-events: none;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.login-button {
    width: 100%;
    padding: 10px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.login-button:hover:not(:disabled) {
    background: #2563eb;
}

.login-button:active:not(:disabled) {
    background: #1d4ed8;
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #9ca3af;
}

.button-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message,
.success-message {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.login-footer {
    margin-top: 18px;
    border-top: 1px dashed #e5e7eb;
    padding-top: 10px;
}

.login-footer-text {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.login-footer-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    margin-left: 4px;
}

.login-footer-link:hover {
    text-decoration: underline;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.success-message {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}


@media (max-width: 768px) {
    body {
        padding: 16px;
    }

    .login-container {
        max-width: 100%;
    }

    .login-box {
        padding: 28px 20px;
        border-radius: 8px;
    }

    .login-header {
        margin-bottom: 18px;
    }

    .login-logo {
        max-width: 280px;
    }

    .login-header h1 {
        font-size: 18px;
    }

    .login-header p {
        font-size: 11px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .password-wrapper input {
        padding-right: 44px;
    }

    .password-toggle {
        width: 36px;
        height: 36px;
    }

    .login-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .login-box {
        padding: 24px 16px;
        border-radius: 8px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .login-logo {
        max-width: 240px;
    }

    .login-header h1 {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .login-header p {
        font-size: 11px;
    }

    .login-form {
        gap: 14px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 6px;
    }

    .password-wrapper input {
        padding-right: 44px;
    }

    .password-toggle {
        width: 36px;
        height: 36px;
        right: 6px;
    }

    .login-button {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 6px;
    }

    .error-message,
    .success-message {
        padding: 8px 12px;
        font-size: 12px;
    }
}

